From d0fc373dccb033751b454c007a182f51f43ddd40 Mon Sep 17 00:00:00 2001 From: Shaygun <17057583+shaygun@users.noreply.github.com> Date: Fri, 4 Dec 2026 01:00:18 +0000 Subject: [PATCH] Revert "feat: domain registration API and wait_for_domain_order (#3)" This reverts commit a4bc066f380a3fca2cd95acb80a1e46fd2df5982. --- CHANGELOG.md | 7 - README.md | 8 +- api/openapi.json | 30544 ++++++++++++++--------------------- src/noderings/__init__.py | 3 +- src/noderings/_client.py | 77 +- src/noderings/_services.py | 29630 +++++++++++++++------------------ src/noderings/models.py | 2083 +-- tests/_operations.py | 60 - tests/test_client.py | 27 - tests/test_operations.py | 2 +- 10 files changed, 25258 insertions(+), 37183 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b1ab8ec..1471518 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,13 +6,6 @@ All notable changes are documented here. The format follows ## [Unreleased] -### Added - -- Domain registration: the `domain_search`, `domain_order`, `registered_domain` and - `domain_contact` services (`/v1/registrar/...`), regenerated from the API description. Domain - orders are paid by card only; checkout needs `accept_terms_version` and `mit_consent`. -- `wait_for_domain_order` (sync and async) waits until a domain order is final. - ## [0.1.0] ### Added diff --git a/README.md b/README.md index e283164..8571761 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ The official Python SDK for the [NodeRings](https://noderings.com) API. It covers the whole public API: virtual machines, DNS, firewalls, snapshots and backups, game servers, IP address management, the marketplace, billing, access control, support tickets, and the provider side for -hosts who sell on NodeRings. That is 545 operations in 75 services, all typed, with a sync and an +hosts who sell on NodeRings. That is 485 operations in 69 services, all typed, with a sync and an asyncio client. ```sh @@ -141,15 +141,13 @@ retry a create safely after your program restarts. **Waiting.** `wait_for_virtual_machine_status`, `wait_for_virtual_machine_deleted` and the general `wait_for_virtual_machine(id, until=...)` poll until a condition holds, with `interval` -and `timeout` in seconds. `wait_for_domain_order(order_id)` polls a domain order (after -`domain_order.checkout_domain_order`) until it is completed, partially completed, failed, canceled -or expired. They raise `WaitTimeoutError` with the last state read. +and `timeout` in seconds. They raise `WaitTimeoutError` with the last state read. ## Testing | Suite | What it checks | |---|---| -| `pytest` | Calls every one of the 545 generated methods, sync and async, against a fake API and checks the HTTP method, the path and its escaping, every query parameter's name, every body field's name and the auth headers against the API description. Also covers retries, `Retry-After`, errors, idempotency keys, paging, waiting, nulls, unknown enum values, and 64-bit and bytes encoding. | +| `pytest` | Calls every one of the 485 generated methods, sync and async, against a fake API and checks the HTTP method, the path and its escaping, every query parameter's name, every body field's name and the auth headers against the API description. Also covers retries, `Retry-After`, errors, idempotency keys, paging, waiting, nulls, unknown enum values, and 64-bit and bytes encoding. | | `pytest -m live` | Against the real API: every read that needs no ID, checked for fields the description lacks; SSH keys, a DNS zone with records, firewall rulesets and rules, and cloud-init data created and deleted; async reads. With `NODERINGS_TEST_BILLED=1`, a virtual machine is created, started, stopped, started, restarted, tagged, snapshotted, given a firewall and deleted. | The live suite runs nightly in CI. See [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/api/openapi.json b/api/openapi.json index b71607f..bde2890 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -374,120 +374,6 @@ "DnssecServiceEnableDnssecBody": { "type": "object" }, - "DomainContactServiceUpdateDomainContactBody": { - "properties": { - "contact": { - "$ref": "#/components/schemas/v1DomainContactInput" - }, - "tlds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "DomainOrderServiceCancelDomainOrderBody": { - "properties": { - "reason": { - "type": "string" - } - }, - "type": "object" - }, - "DomainOrderServiceCheckoutDomainOrderBody": { - "description": "CheckoutDomainOrder errors carry a google.rpc.ErrorInfo detail (Domain is\nthe API error domain) with a stable reason the frontend maps:\n CARD_DECLINED (FailedPrecondition): the card was declined; try another card (new attempt).\n QUOTE_EXPIRED (FailedPrecondition): re-price the order (PriceDomainOrder) and try again.\n PRICE_CHANGED (FailedPrecondition): a live price changed; re-price and review.\n NAME_UNAVAILABLE (FailedPrecondition): an item is no longer available; metadata \"domain\" names it.\n BILLING_ADDRESS_REQUIRED (FailedPrecondition): save a billing address first.\n EVIDENCE_CONFIRMATION_REQUIRED (FailedPrecondition): billing country matches neither card\n nor IP; resend with confirm_billing_country and evidence_country.\n IN_REVIEW: not an error; the response state is IN_REVIEW (manual review, card authorized).\n REQUIRES_PORTAL_VERIFICATION (FailedPrecondition): 3-D Secure needed but the caller is\n non-interactive (API token, CLI, Terraform, MCP); metadata \"portal_url\" is the link.\nOther FailedPrecondition reasons: TERMS_NOT_ACCEPTED, MIT_CONSENT_REQUIRED,\nCONTACT_REQUIRED, PURCHASE_BLOCKED, EMAIL_NOT_VERIFIED, REGISTRAR_UNAVAILABLE;\nResourceExhausted: ORDER_LIMIT.", - "properties": { - "acceptTermsVersion": { - "description": "Must equal the current terms version (no implicit acceptance).", - "type": "string" - }, - "confirmBillingCountry": { - "description": "Customer confirmed a billing country that matches neither card nor IP.", - "type": "boolean" - }, - "evidenceCountry": { - "description": "Second proof of country when confirm_billing_country is set (ISO 3166-1 alpha-2).", - "type": "string" - }, - "idempotencyKey": { - "type": "string" - }, - "mitConsent": { - "description": "Consent to merchant-initiated renewal charges.", - "type": "boolean" - }, - "paymentMethodId": { - "description": "Card to charge. Domains are card-only: account credit and coupons never apply.", - "type": "string" - } - }, - "type": "object" - }, - "DomainOrderServiceConfirmDomainOrderBody": { - "properties": { - "paymentIntentId": { - "type": "string" - } - }, - "type": "object" - }, - "DomainOrderServicePriceDomainOrderBody": { - "properties": { - "confirmBillingCountry": { - "description": "Customer confirmed a billing country that matches neither card nor IP\n(send when the quote had billing_country_confirmation_required).", - "type": "boolean" - }, - "evidenceCountry": { - "description": "Second proof of country with confirm_billing_country (ISO 3166-1 alpha-2,\ne.g. the phone number's country). Must equal the billing country.", - "type": "string" - }, - "paymentMethodId": { - "description": "Card to quote with (its country is tax location evidence). Empty = default card.", - "type": "string" - } - }, - "type": "object" - }, - "DomainOrderServiceUpdateDomainOrderBody": { - "properties": { - "addItems": { - "description": "Items to add.", - "items": { - "$ref": "#/components/schemas/v1DomainOrderItemInput" - }, - "type": "array" - }, - "contactId": { - "description": "Registrant contact for every item.", - "type": "string" - }, - "itemUpdates": { - "description": "Changes to existing items.", - "items": { - "$ref": "#/components/schemas/v1DomainOrderItemUpdate" - }, - "type": "array" - }, - "nameservers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "nsMode": { - "$ref": "#/components/schemas/v1DomainNsMode" - }, - "removeItemIds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "EnforcementServiceBanOrganizationBody": { "properties": { "message": { @@ -1295,311 +1181,6 @@ }, "type": "object" }, - "RegisteredDomainServiceApproveOutgoingTransferBody": { - "type": "object" - }, - "RegisteredDomainServiceConfirmRegistrantChangeBody": { - "properties": { - "approve": { - "type": "boolean" - } - }, - "type": "object" - }, - "RegisteredDomainServiceDeleteRegisteredDomainBody": { - "properties": { - "confirmName": { - "description": "Typed confirmation: must equal name.", - "type": "string" - }, - "confirmationCode": { - "description": "Code emailed to the org owners (30 min). Empty = send a code.", - "type": "string" - }, - "reauthToken": { - "type": "string" - } - }, - "type": "object" - }, - "RegisteredDomainServiceGetDomainAuthCodeBody": { - "properties": { - "reauthToken": { - "description": "Step-up token from ReauthenticateUser (10 minutes).", - "type": "string" - } - }, - "type": "object" - }, - "RegisteredDomainServiceRenewDomainBody": { - "properties": { - "idempotencyKey": { - "type": "string" - }, - "years": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "RegisteredDomainServiceResendRegistrantVerificationBody": { - "type": "object" - }, - "RegisteredDomainServiceResetDomainAuthCodeBody": { - "properties": { - "reauthToken": { - "type": "string" - } - }, - "type": "object" - }, - "RegisteredDomainServiceRestoreDomainBody": { - "properties": { - "idempotencyKey": { - "type": "string" - } - }, - "type": "object" - }, - "RegisteredDomainServiceRetryDomainTransferBody": { - "properties": { - "authCode": { - "type": "string" - } - }, - "type": "object" - }, - "RegisteredDomainServiceSetDomainAutoRenewBody": { - "properties": { - "autoRenew": { - "type": "boolean" - }, - "mitConsent": { - "description": "Required when turning auto-renew on.", - "type": "boolean" - }, - "paymentMethodId": { - "description": "Card for this domain's renewals (empty = org default card).", - "type": "string" - }, - "whoisPrivacyAutoRenew": { - "type": "boolean" - } - }, - "type": "object" - }, - "RegisteredDomainServiceSetDomainDnssecBody": { - "properties": { - "dnskeys": { - "description": "CUSTOM mode: DNSKEY records (or ds_records where supported).", - "items": { - "$ref": "#/components/schemas/v1DomainDnskeyRecord" - }, - "type": "array" - }, - "dsRecords": { - "items": { - "$ref": "#/components/schemas/v1DomainDsRecord" - }, - "type": "array" - }, - "mode": { - "$ref": "#/components/schemas/v1DomainDnssecMode" - } - }, - "type": "object" - }, - "RegisteredDomainServiceSetDomainNameserversBody": { - "properties": { - "nameservers": { - "description": "Custom nameservers (2-13) when ns_mode is CUSTOM.", - "items": { - "type": "string" - }, - "type": "array" - }, - "nsMode": { - "$ref": "#/components/schemas/v1DomainNsMode" - } - }, - "type": "object" - }, - "RegisteredDomainServiceSetDomainPrivacyBody": { - "properties": { - "enabled": { - "type": "boolean" - }, - "idempotencyKey": { - "description": "Idempotency key for the privacy order created when enabling needs payment.", - "type": "string" - } - }, - "type": "object" - }, - "RegisteredDomainServiceSetDomainTransferLockBody": { - "properties": { - "locked": { - "type": "boolean" - }, - "reauthToken": { - "description": "Step-up token from ReauthenticateUser; required to unlock.", - "type": "string" - } - }, - "type": "object" - }, - "RegisteredDomainServiceUpdateDomainContactsBody": { - "properties": { - "adminContactId": { - "type": "string" - }, - "reauthToken": { - "description": "Required for a registrant change.", - "type": "string" - }, - "registrantContactId": { - "type": "string" - }, - "skipTransferLock": { - "description": "ICANN Transfer Policy opt-out of the 60-day lock after a registrant change.", - "type": "boolean" - }, - "techContactId": { - "type": "string" - } - }, - "type": "object" - }, - "RegisteredDomainServiceUpsertDomainGlueRecordBody": { - "properties": { - "ipv4": { - "items": { - "type": "string" - }, - "type": "array" - }, - "ipv6": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RegistrarAdminServiceAddDomainHoldBody": { - "properties": { - "hold": { - "$ref": "#/components/schemas/v1DomainHold" - }, - "reason": { - "type": "string" - } - }, - "type": "object" - }, - "RegistrarAdminServiceMoveDomainToOrganizationBody": { - "properties": { - "reason": { - "description": "Reference to both owners' written consent.", - "type": "string" - }, - "targetOrganizationId": { - "type": "string" - } - }, - "type": "object" - }, - "RegistrarAdminServiceRemoveDomainHoldBody": { - "properties": { - "hold": { - "$ref": "#/components/schemas/v1DomainHold" - }, - "reason": { - "type": "string" - } - }, - "type": "object" - }, - "RegistrarAdminServiceReviewDomainOrderBody": { - "properties": { - "approve": { - "type": "boolean" - }, - "reason": { - "type": "string" - } - }, - "type": "object" - }, - "RegistrarAdminServiceSetClientHoldBody": { - "properties": { - "enabled": { - "type": "boolean" - }, - "reason": { - "type": "string" - } - }, - "type": "object" - }, - "RegistrarAdminServiceSetTldOfferingBody": { - "properties": { - "blocked": { - "type": "boolean" - }, - "blockedReason": { - "type": "string" - }, - "category": { - "$ref": "#/components/schemas/v1TldCategory" - }, - "displayOrder": { - "format": "int32", - "type": "integer" - }, - "eligibility": { - "$ref": "#/components/schemas/v1TldEligibility" - }, - "eligibilityNote": { - "type": "string" - }, - "eligibleCountries": { - "description": "Replaces the list when eligibility is RESIDENTS_ONLY.", - "items": { - "type": "string" - }, - "type": "array" - }, - "enabled": { - "type": "boolean" - }, - "featured": { - "type": "boolean" - }, - "priceOverride": { - "description": "Manual sell price / markup override; null clears it.", - "type": "object" - }, - "provider": { - "type": "string" - }, - "reason": { - "type": "string" - }, - "riskNote": { - "type": "string" - }, - "riskTier": { - "$ref": "#/components/schemas/v1TldRiskTier" - } - }, - "type": "object" - }, - "RegistrarAdminServiceSyncDomainBody": { - "type": "object" - }, "RoadmapServiceCreateRoadmapFeatureRequestCommentBody": { "properties": { "body": { @@ -2341,51 +1922,6 @@ ], "type": "string" }, - "v1AdminDomainOrder": { - "properties": { - "costTotal": { - "description": "Registrar cost of the order (ops only).", - "type": "string" - }, - "order": { - "$ref": "#/components/schemas/v1DomainOrder" - }, - "organizationName": { - "type": "string" - }, - "riskReasons": { - "items": { - "type": "string" - }, - "type": "array" - }, - "riskScore": { - "format": "int32", - "type": "integer" - }, - "taxEvidence": { - "type": "object" - } - }, - "type": "object" - }, - "v1AdminRegisteredDomain": { - "properties": { - "domain": { - "$ref": "#/components/schemas/v1RegisteredDomain" - }, - "organizationName": { - "type": "string" - }, - "provider": { - "type": "string" - }, - "providerDomainId": { - "type": "string" - } - }, - "type": "object" - }, "v1Agent": { "properties": { "agentPublicIp": { @@ -2806,17 +2342,6 @@ "title": "- BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan)", "type": "string" }, - "v1BlogSubscriptionStatus": { - "default": "BLOG_SUBSCRIPTION_STATUS_UNSPECIFIED", - "description": "State of a blog email subscription.\n\n - BLOG_SUBSCRIPTION_STATUS_PENDING: Waiting for the reader to click the confirmation link.\n - BLOG_SUBSCRIPTION_STATUS_VERIFIED: Confirmed. New posts are emailed to this address.\n - BLOG_SUBSCRIPTION_STATUS_UNSUBSCRIBED: The reader unsubscribed. Nothing is sent.", - "enum": [ - "BLOG_SUBSCRIPTION_STATUS_UNSPECIFIED", - "BLOG_SUBSCRIPTION_STATUS_PENDING", - "BLOG_SUBSCRIPTION_STATUS_VERIFIED", - "BLOG_SUBSCRIPTION_STATUS_UNSUBSCRIBED" - ], - "type": "string" - }, "v1CPUType": { "default": "CPU_TYPE_UNSPECIFIED", "enum": [ @@ -3056,71 +2581,6 @@ }, "type": "object" }, - "v1CheckDomainsRequest": { - "properties": { - "names": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1CheckDomainsResponse": { - "properties": { - "results": { - "items": { - "$ref": "#/components/schemas/v1DomainSearchResult" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1CheckTransferRequest": { - "properties": { - "names": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1CheckTransferResponse": { - "properties": { - "results": { - "items": { - "$ref": "#/components/schemas/v1TransferCheckResult" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1CheckoutDomainOrderResponse": { - "properties": { - "clientSecret": { - "type": "string" - }, - "order": { - "$ref": "#/components/schemas/v1DomainOrder" - }, - "paymentIntentId": { - "type": "string" - }, - "requiresAction": { - "description": "Card needs 3-D Secure: run stripe.confirmCardPayment(client_secret), then ConfirmDomainOrder.", - "type": "boolean" - }, - "state": { - "$ref": "#/components/schemas/v1DomainOrderState" - } - }, - "type": "object" - }, "v1City": { "properties": { "id": { @@ -3556,41 +3016,6 @@ "title": "Compute type enum for plan classification\nBased on plan code category values: GC, HF, VHF, HP, GP, CPU, MEM, STO, GS", "type": "string" }, - "v1ConfirmBlogSubscriptionRequest": { - "properties": { - "token": { - "description": "Token from the confirmation email link.", - "type": "string" - } - }, - "type": "object" - }, - "v1ConfirmBlogSubscriptionResponse": { - "properties": { - "maskedEmail": { - "description": "Address with the local part masked, for example \"j***@example.com\".", - "type": "string" - }, - "message": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/v1BlogSubscriptionStatus" - } - }, - "type": "object" - }, - "v1ConfirmRegistrantChangeResponse": { - "properties": { - "domainName": { - "type": "string" - }, - "state": { - "$ref": "#/components/schemas/v1RegistrantChangeState" - } - }, - "type": "object" - }, "v1ConfirmTicketAttachmentUploadRequest": { "properties": { "uploadToken": { @@ -3737,126 +3162,6 @@ }, "type": "object" }, - "v1ContactFieldError": { - "properties": { - "code": { - "type": "string" - }, - "field": { - "description": "Field name (or \".\").", - "type": "string" - }, - "message": { - "type": "string" - } - }, - "type": "object" - }, - "v1ContactFieldOption": { - "properties": { - "label": { - "type": "string" - }, - "value": { - "type": "string" - } - }, - "type": "object" - }, - "v1ContactFieldSpec": { - "description": "Spec of one contact form field, rendered dynamically by the frontend.", - "properties": { - "description": { - "type": "string" - }, - "label": { - "type": "string" - }, - "maxLength": { - "format": "int32", - "type": "integer" - }, - "name": { - "description": "Key: a DomainContact field name, or \".\" inside extension_data.", - "type": "string" - }, - "options": { - "items": { - "$ref": "#/components/schemas/v1ContactFieldOption" - }, - "type": "array" - }, - "pattern": { - "description": "RE2 pattern the value must match (optional).", - "type": "string" - }, - "placeholder": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "requiredWhen": { - "description": "Only required when this condition holds, e.g. \"kind=organization\" or \"country!=ES\".", - "type": "string" - }, - "tld": { - "description": "TLD the field belongs to (empty for base contact fields).", - "type": "string" - }, - "type": { - "$ref": "#/components/schemas/v1ContactFieldType" - } - }, - "type": "object" - }, - "v1ContactFieldType": { - "default": "CONTACT_FIELD_TYPE_UNSPECIFIED", - "description": "Input type of a dynamic contact field.\n\n - CONTACT_FIELD_TYPE_ACCEPTANCE: Checkbox that must be ticked (e.g. es_annex_acceptance).", - "enum": [ - "CONTACT_FIELD_TYPE_UNSPECIFIED", - "CONTACT_FIELD_TYPE_STRING", - "CONTACT_FIELD_TYPE_SELECT", - "CONTACT_FIELD_TYPE_BOOLEAN", - "CONTACT_FIELD_TYPE_DATE", - "CONTACT_FIELD_TYPE_COUNTRY", - "CONTACT_FIELD_TYPE_EMAIL", - "CONTACT_FIELD_TYPE_PHONE", - "CONTACT_FIELD_TYPE_ACCEPTANCE" - ], - "type": "string" - }, - "v1ContactRequirements": { - "properties": { - "allowedCountries": { - "description": "Registrant country must be one of these (empty = any).", - "items": { - "type": "string" - }, - "type": "array" - }, - "fields": { - "items": { - "$ref": "#/components/schemas/v1ContactFieldSpec" - }, - "type": "array" - }, - "note": { - "type": "string" - }, - "operation": { - "$ref": "#/components/schemas/v1DomainOperation" - }, - "organizationRequired": { - "description": "Registrant must be an organization.", - "type": "boolean" - }, - "tld": { - "type": "string" - } - }, - "type": "object" - }, "v1ConversationInfo": { "properties": { "conversationId": { @@ -3919,39 +3224,6 @@ "title": "Country, City, Datacenter hierarchy messages", "type": "object" }, - "v1CountryContactRules": { - "properties": { - "country": { - "type": "string" - }, - "name": { - "type": "string" - }, - "phoneCountryCode": { - "description": "Calling code, e.g. \"+31\".", - "type": "string" - }, - "postalCodeExample": { - "type": "string" - }, - "postalCodePattern": { - "type": "string" - }, - "postalCodeRequired": { - "type": "boolean" - }, - "stateRequired": { - "type": "boolean" - }, - "states": { - "items": { - "$ref": "#/components/schemas/v1ContactFieldOption" - }, - "type": "array" - } - }, - "type": "object" - }, "v1Coupon": { "description": "A discount. Codes customers type live in CouponCode. Provider coupons apply\nto that provider's plans. Platform coupons apply across providers.", "properties": { @@ -4722,49 +3994,6 @@ }, "type": "object" }, - "v1CreateDomainContactRequest": { - "properties": { - "contact": { - "$ref": "#/components/schemas/v1DomainContactInput" - }, - "tlds": { - "description": "Validate against the requirements of these TLDs too.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1CreateDomainOrderRequest": { - "properties": { - "contactId": { - "description": "Default registrant contact for all items.", - "type": "string" - }, - "idempotencyKey": { - "description": "Client-supplied key; repeating it returns the same order.", - "type": "string" - }, - "items": { - "items": { - "$ref": "#/components/schemas/v1DomainOrderItemInput" - }, - "type": "array" - }, - "nameservers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "nsMode": { - "$ref": "#/components/schemas/v1DomainNsMode" - } - }, - "type": "object" - }, "v1CreateDomainRequest": { "properties": { "name": { @@ -6236,23 +5465,6 @@ }, "type": "object" }, - "v1DeleteRegisteredDomainResponse": { - "properties": { - "codeExpiresAt": { - "format": "date-time", - "type": "string" - }, - "codeSent": { - "description": "A confirmation code was emailed; call again with it.", - "type": "boolean" - }, - "deleted": { - "description": "Deletion was submitted to the registrar.", - "type": "boolean" - } - }, - "type": "object" - }, "v1DeleteRoadmapFeatureRequestCommentResponse": { "properties": { "success": { @@ -6431,9 +5643,6 @@ "readOnly": true, "type": "array" }, - "delegationIssue": { - "$ref": "#/components/schemas/v1DnsZoneDelegationIssue" - }, "delegationOk": { "readOnly": true, "type": "boolean" @@ -6456,15 +5665,6 @@ "readOnly": true, "type": "string" }, - "staleDsKeyTags": { - "description": "Key tags of the parent DS records that match no key we serve (DNSSEC_MISMATCH).", - "items": { - "format": "int64", - "type": "integer" - }, - "readOnly": true, - "type": "array" - }, "state": { "$ref": "#/components/schemas/v1DnsZoneState" }, @@ -6481,15 +5681,6 @@ }, "type": "object" }, - "v1DnsZoneDelegationIssue": { - "default": "DNS_ZONE_DELEGATION_ISSUE_UNSPECIFIED", - "description": "Why a zone does not resolve although its parent delegation may be correct.\n\n - DNS_ZONE_DELEGATION_ISSUE_DNSSEC_MISMATCH: The parent publishes a DS that matches no key we serve (often left over\nfrom the previous DNS host), so validating resolvers answer SERVFAIL.\nRemove that DS at the registrar, or enable DNSSEC here and replace it.", - "enum": [ - "DNS_ZONE_DELEGATION_ISSUE_UNSPECIFIED", - "DNS_ZONE_DELEGATION_ISSUE_DNSSEC_MISMATCH" - ], - "type": "string" - }, "v1DnsZoneState": { "default": "DNS_ZONE_STATE_UNSPECIFIED", "enum": [ @@ -6592,3105 +5783,2978 @@ }, "type": "object" }, - "v1DomainAvailability": { - "default": "DOMAIN_AVAILABILITY_UNSPECIFIED", - "description": "Availability of a name for registration.\n\n - DOMAIN_AVAILABILITY_AVAILABLE: Can be registered now.\n - DOMAIN_AVAILABILITY_TAKEN: Registered by someone else (offer transfer if the caller owns it).\n - DOMAIN_AVAILABILITY_PREMIUM: Premium or early-access name; not sold in v1.\n - DOMAIN_AVAILABILITY_UNSUPPORTED: TLD not sold by NodeRings.\n - DOMAIN_AVAILABILITY_RESERVED: Reserved by the registry or by NodeRings.\n - DOMAIN_AVAILABILITY_INVALID: Not a valid domain name.\n - DOMAIN_AVAILABILITY_BLOCKED: TLD is blocked or the name failed an abuse check.\n - DOMAIN_AVAILABILITY_UNKNOWN: Upstream check failed; try again.", - "enum": [ - "DOMAIN_AVAILABILITY_UNSPECIFIED", - "DOMAIN_AVAILABILITY_AVAILABLE", - "DOMAIN_AVAILABILITY_TAKEN", - "DOMAIN_AVAILABILITY_PREMIUM", - "DOMAIN_AVAILABILITY_UNSUPPORTED", - "DOMAIN_AVAILABILITY_RESERVED", - "DOMAIN_AVAILABILITY_INVALID", - "DOMAIN_AVAILABILITY_BLOCKED", - "DOMAIN_AVAILABILITY_UNKNOWN" - ], - "type": "string" + "v1DownloadFileResponse": { + "properties": { + "content": { + "format": "byte", + "type": "string" + } + }, + "type": "object" }, - "v1DomainContact": { + "v1DownloadTicketAttachmentResponse": { "properties": { - "city": { + "attachmentId": { "type": "string" }, - "consentPublish": { - "type": "boolean" - }, - "country": { + "fileContent": { + "format": "byte", "type": "string" }, - "domainCount": { - "description": "Number of live domains using this contact (cannot be deleted while > 0).", - "format": "int32", - "readOnly": true, - "type": "integer" + "fileName": { + "type": "string" }, - "email": { + "fileSize": { + "format": "int64", "type": "string" }, - "emailVerified": { - "type": "boolean" + "mimeType": { + "type": "string" + } + }, + "type": "object" + }, + "v1EffectivePermissions": { + "properties": { + "permissions": { + "items": { + "$ref": "#/components/schemas/v1Permission" + }, + "type": "array" }, - "emailVerifiedAt": { - "format": "date-time", + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1EggVariable": { + "description": "EggVariable is one panel variable the customer can see while ordering a game.", + "properties": { + "defaultValue": { "type": "string" }, - "extensionData": { - "type": "object" + "description": { + "type": "string" }, - "fax": { + "envVariable": { "type": "string" }, - "firstName": { + "helpText": { + "description": "help_text explains where the customer finds the value.", "type": "string" }, - "id": { - "readOnly": true, + "helpUrl": { + "description": "help_url is a page that shows the value, when one is known.", "type": "string" }, - "isDefault": { + "isRequired": { + "description": "is_required is true when the panel rules contain required.", "type": "boolean" }, - "kind": { - "$ref": "#/components/schemas/v1DomainContactKind" - }, - "label": { - "type": "string" - }, - "lastName": { + "name": { "type": "string" }, - "organization": { + "rules": { "type": "string" }, - "organizationId": { - "readOnly": true, - "type": "string" + "userEditable": { + "type": "boolean" }, - "phone": { - "type": "string" + "userViewable": { + "type": "boolean" + } + }, + "type": "object" + }, + "v1EnableAdditionalIPResponse": { + "description": "EnableAdditionalIPResponse returns the newly allocated address.", + "properties": { + "allocation": { + "$ref": "#/components/schemas/v1AdditionalIPAddress" }, - "phoneExt": { + "billingMessage": { + "description": "Human-readable billing summary for the UI.", "type": "string" }, - "postalCode": { + "currency": { "type": "string" }, - "state": { + "monthlyUnitPrice": { + "description": "Monthly list price per additional IP (fixed billing). Empty for usage-based VMs.", "type": "string" }, - "street": { + "proratedChargeAmount": { + "description": "Prorated amount charged now for the remaining VM billing period (fixed billing).", "type": "string" }, - "street2": { + "totalAdditionalIps": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1EndUser": { + "default": "END_USER_UNSPECIFIED", + "enum": [ + "END_USER_UNSPECIFIED", + "END_USER_CLIENT", + "END_USER_PROVIDER", + "END_USER_ALL", + "END_USER_USER" + ], + "type": "string" + }, + "v1EnrollMfaTotpRequest": { + "type": "object" + }, + "v1EnrollMfaTotpResponse": { + "properties": { + "otpauthUrl": { "type": "string" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "vatId": { + "secret": { + "description": "Base32 TOTP secret for manual entry / backup. Shown once during enrollment.", "type": "string" } }, "type": "object" }, - "v1DomainContactInput": { - "description": "Writable contact fields. ASCII only in v1; the server normalizes and validates.", + "v1EnvironmentVariable": { "properties": { - "city": { - "type": "string" - }, - "consentPublish": { - "type": "boolean" - }, - "country": { - "description": "ISO 3166-1 alpha-2.", + "id": { + "title": "Fields", "type": "string" }, - "email": { + "key": { "type": "string" }, - "extensionData": { - "description": "TLD extension fields keyed by TLD.", + "metadata": { + "title": "Metadata", "type": "object" }, - "fax": { - "type": "string" - }, - "firstName": { - "type": "string" - }, - "isDefault": { - "type": "boolean" - }, - "kind": { - "$ref": "#/components/schemas/v1DomainContactKind" - }, - "label": { - "type": "string" - }, - "lastName": { - "type": "string" - }, "organization": { "type": "string" }, - "phone": { - "description": "E.164 (+31201234567) or national format with country.", - "type": "string" - }, - "phoneExt": { - "type": "string" - }, - "postalCode": { - "type": "string" + "status": { + "$ref": "#/components/schemas/protov1Status" }, - "state": { - "type": "string" + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" }, - "street": { + "user": { + "title": "Relations", "type": "string" }, - "street2": { + "value": { "type": "string" - }, - "vatId": { + } + }, + "type": "object" + }, + "v1ExchangeSSOCodeRequest": { + "properties": { + "code": { "type": "string" } }, "type": "object" }, - "v1DomainContactKind": { - "default": "DOMAIN_CONTACT_KIND_UNSPECIFIED", - "enum": [ - "DOMAIN_CONTACT_KIND_UNSPECIFIED", - "DOMAIN_CONTACT_KIND_INDIVIDUAL", - "DOMAIN_CONTACT_KIND_ORGANIZATION" - ], - "type": "string" + "v1ExpireConnectTaxRegistrationResponse": { + "properties": { + "registration": { + "$ref": "#/components/schemas/v1ConnectTaxRegistration" + } + }, + "type": "object" }, - "v1DomainDnskeyRecord": { + "v1ExportCouponCodesResponse": { "properties": { - "algorithm": { - "format": "int64", - "type": "integer" - }, - "flags": { - "format": "int64", + "count": { + "format": "int32", "type": "integer" }, - "protocol": { - "format": "int64", - "type": "integer" + "csv": { + "description": "CSV with a header row: code,status,times_redeemed,max_redemptions,valid_until,campaign,channel.", + "type": "string" }, - "publicKey": { + "filename": { "type": "string" } }, "type": "object" }, - "v1DomainDnssec": { + "v1ExportDnsZoneResponse": { "properties": { - "allowed": { - "description": "TLD supports DNSSEC.", - "type": "boolean" - }, - "dnskeys": { - "items": { - "$ref": "#/components/schemas/v1DomainDnskeyRecord" - }, - "type": "array" - }, - "dsAtParent": { - "type": "boolean" - }, - "dsDataSupported": { - "description": "Registrar accepts DS data (not only DNSKEY) for this TLD.", - "type": "boolean" - }, - "dsRecords": { - "description": "DS records derived from the keys (shown for information on NodeRings DNS).", - "items": { - "$ref": "#/components/schemas/v1DomainDsRecord" - }, - "type": "array" - }, - "mode": { - "$ref": "#/components/schemas/v1DomainDnssecMode" - }, - "safeToDisableAt": { - "description": "Earliest time signing can stop after keys were removed (parent DS TTL).", - "format": "date-time", + "zoneText": { "type": "string" - }, - "status": { - "$ref": "#/components/schemas/v1DomainDnssecStatus" } }, "type": "object" }, - "v1DomainDnssecMode": { - "default": "DOMAIN_DNSSEC_MODE_UNSPECIFIED", - "description": " - DOMAIN_DNSSEC_MODE_MANAGED: NodeRings keys, pushed to the registry automatically.\n - DOMAIN_DNSSEC_MODE_CUSTOM: Customer-supplied DNSKEY/DS records (custom nameservers).", - "enum": [ - "DOMAIN_DNSSEC_MODE_UNSPECIFIED", - "DOMAIN_DNSSEC_MODE_OFF", - "DOMAIN_DNSSEC_MODE_MANAGED", - "DOMAIN_DNSSEC_MODE_CUSTOM" - ], - "type": "string" - }, - "v1DomainDnssecStatus": { - "default": "DOMAIN_DNSSEC_STATUS_UNSPECIFIED", - "description": " - DOMAIN_DNSSEC_STATUS_PENDING: Keys sent to the registry; parent DS not seen yet.\n - DOMAIN_DNSSEC_STATUS_MISMATCH: Parent DS does not match the served keys.\n - DOMAIN_DNSSEC_STATUS_DISABLING: Keys are being removed at the registry (waiting for the DS TTL).", + "v1FirewallAction": { + "default": "FIREWALL_ACTION_UNSPECIFIED", "enum": [ - "DOMAIN_DNSSEC_STATUS_UNSPECIFIED", - "DOMAIN_DNSSEC_STATUS_UNSIGNED", - "DOMAIN_DNSSEC_STATUS_PENDING", - "DOMAIN_DNSSEC_STATUS_ACTIVE", - "DOMAIN_DNSSEC_STATUS_MISMATCH", - "DOMAIN_DNSSEC_STATUS_DISABLING" + "FIREWALL_ACTION_UNSPECIFIED", + "FIREWALL_ACTION_ACCEPT", + "FIREWALL_ACTION_DROP" ], "type": "string" }, - "v1DomainDsRecord": { + "v1FirewallAddressGroup": { "properties": { - "algorithm": { - "format": "int64", - "type": "integer" + "id": { + "readOnly": true, + "type": "string" }, - "digest": { + "name": { "type": "string" }, - "digestType": { - "format": "int64", - "type": "integer" + "prefixes": { + "description": "CIDR prefixes. Can contain mixed IPv4 and IPv6 addresses.\nSupports \"all IPs\" via 0.0.0.0/0 or ::/0.", + "items": { + "$ref": "#/components/schemas/v1FirewallIPPrefix" + }, + "type": "array" }, - "keyTag": { - "format": "int64", - "type": "integer" + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" } }, "type": "object" }, - "v1DomainEvent": { + "v1FirewallAddressGroupInput": { + "description": "FirewallAddressGroupInput is the client-provided payload for create/update.\nClients must not provide id/timestamps (those are server-controlled).", "properties": { - "actorId": { - "type": "string" - }, - "actorName": { - "description": "User email / service account name / \"NodeRings\".", - "type": "string" - }, - "actorType": { - "$ref": "#/components/schemas/v1DomainEventActorType" - }, - "createTime": { - "format": "date-time", - "type": "string" - }, - "details": { - "description": "Structured details (never secrets).", - "type": "object" - }, - "id": { - "type": "string" - }, - "ip": { + "name": { "type": "string" }, - "kind": { - "$ref": "#/components/schemas/v1DomainEventKind" - }, - "summary": { - "description": "Human-readable one-line summary.", - "type": "string" + "prefixes": { + "description": "CIDR prefixes. Can contain mixed IPv4 and IPv6 addresses.\nSupports \"all IPs\" via 0.0.0.0/0 or ::/0.", + "items": { + "$ref": "#/components/schemas/v1FirewallIPPrefix" + }, + "type": "array" } }, "type": "object" }, - "v1DomainEventActorType": { - "default": "DOMAIN_EVENT_ACTOR_TYPE_UNSPECIFIED", + "v1FirewallDirection": { + "default": "FIREWALL_DIRECTION_UNSPECIFIED", "enum": [ - "DOMAIN_EVENT_ACTOR_TYPE_UNSPECIFIED", - "DOMAIN_EVENT_ACTOR_TYPE_USER", - "DOMAIN_EVENT_ACTOR_TYPE_SERVICE_ACCOUNT", - "DOMAIN_EVENT_ACTOR_TYPE_SYSTEM", - "DOMAIN_EVENT_ACTOR_TYPE_OPS" + "FIREWALL_DIRECTION_UNSPECIFIED", + "FIREWALL_DIRECTION_INGRESS", + "FIREWALL_DIRECTION_EGRESS" ], "type": "string" }, - "v1DomainEventKind": { - "default": "DOMAIN_EVENT_KIND_UNSPECIFIED", - "enum": [ - "DOMAIN_EVENT_KIND_UNSPECIFIED", - "DOMAIN_EVENT_KIND_REGISTERED", - "DOMAIN_EVENT_KIND_REGISTRATION_FAILED", - "DOMAIN_EVENT_KIND_RENEWED", - "DOMAIN_EVENT_KIND_RENEWAL_FAILED", - "DOMAIN_EVENT_KIND_RESTORED", - "DOMAIN_EVENT_KIND_EXPIRED", - "DOMAIN_EVENT_KIND_DELETED", - "DOMAIN_EVENT_KIND_STATE_CHANGED", - "DOMAIN_EVENT_KIND_TRANSFER_IN_STARTED", - "DOMAIN_EVENT_KIND_TRANSFER_IN_COMPLETED", - "DOMAIN_EVENT_KIND_TRANSFER_IN_FAILED", - "DOMAIN_EVENT_KIND_NS_CHANGED", - "DOMAIN_EVENT_KIND_DNSSEC_CHANGED", - "DOMAIN_EVENT_KIND_GLUE_CHANGED", - "DOMAIN_EVENT_KIND_CONTACT_CHANGE_REQUESTED", - "DOMAIN_EVENT_KIND_CONTACT_CHANGED", - "DOMAIN_EVENT_KIND_LOCK_CHANGED", - "DOMAIN_EVENT_KIND_PRIVACY_CHANGED", - "DOMAIN_EVENT_KIND_AUTH_CODE_VIEWED", - "DOMAIN_EVENT_KIND_AUTH_CODE_RESET", - "DOMAIN_EVENT_KIND_TRANSFER_OUT_REQUESTED", - "DOMAIN_EVENT_KIND_TRANSFER_OUT_APPROVED", - "DOMAIN_EVENT_KIND_TRANSFER_OUT_COMPLETED", - "DOMAIN_EVENT_KIND_AUTO_RENEW_CHANGED", - "DOMAIN_EVENT_KIND_HOLD_ADDED", - "DOMAIN_EVENT_KIND_HOLD_REMOVED", - "DOMAIN_EVENT_KIND_VERIFICATION_SENT", - "DOMAIN_EVENT_KIND_VERIFICATION_COMPLETED", - "DOMAIN_EVENT_KIND_MOVED", - "DOMAIN_EVENT_KIND_SYNCED_DRIFT" - ], - "type": "string" + "v1FirewallIPPrefix": { + "description": "FirewallIPPrefix represents a single CIDR prefix as separate fields.\nThe backend will normalize/store it as a CIDR string (e.g., \"10.0.0.0/24\", \"0.0.0.0/0\", \"::/0\").", + "properties": { + "ip": { + "description": "IPv4 or IPv6 address. May be \"0.0.0.0\" (v4 default route) or \"::\" (v6 default route).", + "type": "string" + }, + "prefix": { + "description": "Prefix length. IPv4: 0-32. IPv6: 0-128. Enforced by backend based on derived family.", + "format": "int64", + "type": "integer" + } + }, + "type": "object" }, - "v1DomainGlueHostState": { - "default": "DOMAIN_GLUE_HOST_STATE_UNSPECIFIED", + "v1FirewallProtocol": { + "default": "FIREWALL_PROTOCOL_UNSPECIFIED", "enum": [ - "DOMAIN_GLUE_HOST_STATE_UNSPECIFIED", - "DOMAIN_GLUE_HOST_STATE_PENDING", - "DOMAIN_GLUE_HOST_STATE_ACTIVE", - "DOMAIN_GLUE_HOST_STATE_FAILED", - "DOMAIN_GLUE_HOST_STATE_DELETING" + "FIREWALL_PROTOCOL_UNSPECIFIED", + "FIREWALL_PROTOCOL_TCP", + "FIREWALL_PROTOCOL_UDP", + "FIREWALL_PROTOCOL_SCTP", + "FIREWALL_PROTOCOL_IPV6", + "FIREWALL_PROTOCOL_ICMP", + "FIREWALL_PROTOCOL_ICMPV6", + "FIREWALL_PROTOCOL_ESP", + "FIREWALL_PROTOCOL_AH", + "FIREWALL_PROTOCOL_IPSEC", + "FIREWALL_PROTOCOL_GRE", + "FIREWALL_PROTOCOL_IPIP", + "FIREWALL_PROTOCOL_VXLAN", + "FIREWALL_PROTOCOL_L2TP", + "FIREWALL_PROTOCOL_GENEVE", + "FIREWALL_PROTOCOL_ANY", + "FIREWALL_PROTOCOL_IGMP", + "FIREWALL_PROTOCOL_GGP", + "FIREWALL_PROTOCOL_IPENCAP", + "FIREWALL_PROTOCOL_ST", + "FIREWALL_PROTOCOL_EGP", + "FIREWALL_PROTOCOL_IGP", + "FIREWALL_PROTOCOL_PUP", + "FIREWALL_PROTOCOL_HMP", + "FIREWALL_PROTOCOL_XNS_IDP", + "FIREWALL_PROTOCOL_RDP", + "FIREWALL_PROTOCOL_ISO_TP4", + "FIREWALL_PROTOCOL_DCCP", + "FIREWALL_PROTOCOL_XTP", + "FIREWALL_PROTOCOL_DDP", + "FIREWALL_PROTOCOL_IDPR_CMTP", + "FIREWALL_PROTOCOL_IPV6_ROUTE", + "FIREWALL_PROTOCOL_IPV6_FRAG", + "FIREWALL_PROTOCOL_IDRP", + "FIREWALL_PROTOCOL_RSVP", + "FIREWALL_PROTOCOL_SKIP", + "FIREWALL_PROTOCOL_IPV6_ICMP", + "FIREWALL_PROTOCOL_IPV6_NONXT", + "FIREWALL_PROTOCOL_IPV6_OPTS", + "FIREWALL_PROTOCOL_VMTP", + "FIREWALL_PROTOCOL_EIGRP", + "FIREWALL_PROTOCOL_OSPF", + "FIREWALL_PROTOCOL_AX_25", + "FIREWALL_PROTOCOL_ETHERIP", + "FIREWALL_PROTOCOL_ENCAP", + "FIREWALL_PROTOCOL_PIM", + "FIREWALL_PROTOCOL_IPCOMP", + "FIREWALL_PROTOCOL_VRRP", + "FIREWALL_PROTOCOL_ISIS", + "FIREWALL_PROTOCOL_FC", + "FIREWALL_PROTOCOL_MOBILITY_HEADER", + "FIREWALL_PROTOCOL_UDPLITE", + "FIREWALL_PROTOCOL_MPLS_IN_IP", + "FIREWALL_PROTOCOL_HIP", + "FIREWALL_PROTOCOL_SHIM6", + "FIREWALL_PROTOCOL_WESP", + "FIREWALL_PROTOCOL_ROHC" ], + "title": "- FIREWALL_PROTOCOL_ICMPV6: legacy alias; prefer IPV6_ICMP for new rules\n - FIREWALL_PROTOCOL_IPSEC: legacy logical grouping; not a Proxmox /etc/protocols name\n - FIREWALL_PROTOCOL_VXLAN: legacy; not in Proxmox protocol selector\n - FIREWALL_PROTOCOL_GENEVE: legacy; not in Proxmox protocol selector\n - FIREWALL_PROTOCOL_ANY: Match all protocols (Proxmox proto left unset)\n - FIREWALL_PROTOCOL_IGMP: Remaining values mirror Proxmox VE IPProtocolSelector (www/manager6/form/IPProtocolSelector.js)\n - FIREWALL_PROTOCOL_XNS_IDP: xns-idp\n - FIREWALL_PROTOCOL_ISO_TP4: iso-tp4\n - FIREWALL_PROTOCOL_IDPR_CMTP: idpr-cmtp\n - FIREWALL_PROTOCOL_IPV6_ROUTE: ipv6-route\n - FIREWALL_PROTOCOL_IPV6_FRAG: ipv6-frag\n - FIREWALL_PROTOCOL_IPV6_ICMP: ipv6-icmp (Proxmox name for ICMPv6)\n - FIREWALL_PROTOCOL_IPV6_NONXT: ipv6-nonxt\n - FIREWALL_PROTOCOL_IPV6_OPTS: ipv6-opts\n - FIREWALL_PROTOCOL_AX_25: ax.25\n - FIREWALL_PROTOCOL_MOBILITY_HEADER: mobility-header\n - FIREWALL_PROTOCOL_MPLS_IN_IP: mpls-in-ip", "type": "string" }, - "v1DomainGlueRecord": { + "v1FirewallRuleAddressGroups": { + "description": "FirewallRuleAddressGroups contains address group UUIDs. Can be one or more.", "properties": { - "host": { - "description": "Host name under the domain, e.g. ns1.example.com.", - "type": "string" - }, - "ipv4": { - "items": { - "type": "string" - }, - "type": "array" - }, - "ipv6": { + "addressGroupIds": { "items": { "type": "string" }, "type": "array" + } + }, + "type": "object" + }, + "v1FirewallRuleDestination": { + "description": "FirewallRuleDestination defines the destination specification for a firewall rule.\nAll fields are optional, but at least one must be set. Multiple fields can be combined.", + "properties": { + "addressGroupIds": { + "$ref": "#/components/schemas/v1FirewallRuleAddressGroups" }, - "lastError": { - "type": "string" - }, - "state": { - "$ref": "#/components/schemas/v1DomainGlueHostState" + "ips": { + "$ref": "#/components/schemas/v1FirewallRuleIPs" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "vmTags": { + "$ref": "#/components/schemas/v1FirewallRuleVMTags" } }, "type": "object" }, - "v1DomainHold": { - "default": "DOMAIN_HOLD_UNSPECIFIED", - "description": "Holds sit beside the state; any hold blocks risky mutations.", - "enum": [ - "DOMAIN_HOLD_UNSPECIFIED", - "DOMAIN_HOLD_VERIFICATION", - "DOMAIN_HOLD_ABUSE", - "DOMAIN_HOLD_PAYMENT_DISPUTE", - "DOMAIN_HOLD_UNPAID", - "DOMAIN_HOLD_UDRP", - "DOMAIN_HOLD_ADMIN" - ], - "type": "string" - }, - "v1DomainInvoice": { - "description": "A paid invoice that covers the domain. Download/view it with InvoiceService\nusing invoice_id.", + "v1FirewallRuleIPs": { + "description": "FirewallRuleIPs contains IP addresses in CIDR format. Can be one or more.", "properties": { - "currency": { - "type": "string" - }, - "descriptions": { - "description": "Lines of this invoice that belong to the domain.", + "ips": { "items": { "type": "string" }, "type": "array" + } + }, + "type": "object" + }, + "v1FirewallRuleInput": { + "description": "FirewallRuleInput is the client-provided rule payload for create/update.\nClients must not provide id/ruleset_id/timestamps (those are server-controlled).", + "properties": { + "action": { + "$ref": "#/components/schemas/v1FirewallAction" }, - "domainOrderId": { - "type": "string" - }, - "domainRenewalId": { - "type": "string" - }, - "invoiceId": { - "type": "string" + "destination": { + "$ref": "#/components/schemas/v1FirewallRuleDestination" }, - "invoiceNumber": { + "destinationPorts": { + "title": "Optional: single port or range (e.g., \"443\" or \"5000-5010\")", "type": "string" }, - "issuedAt": { - "format": "date-time", - "type": "string" + "direction": { + "$ref": "#/components/schemas/v1FirewallDirection" }, - "paidAt": { - "format": "date-time", - "type": "string" + "protocol": { + "$ref": "#/components/schemas/v1FirewallProtocol" }, "source": { - "$ref": "#/components/schemas/v1DomainInvoiceSource" - }, - "status": { - "type": "string" - }, - "subtotal": { - "description": "Invoice totals (decimal strings, tax exclusive subtotal).", - "type": "string" - }, - "taxAmount": { - "type": "string" + "$ref": "#/components/schemas/v1FirewallRuleSource" }, - "total": { + "sourcePorts": { + "title": "Optional: single port or range (e.g., \"80\" or \"8000-9000\")", "type": "string" } }, "type": "object" }, - "v1DomainInvoiceSource": { - "default": "DOMAIN_INVOICE_SOURCE_UNSPECIFIED", - "description": "Source of a domain invoice.\n\n - DOMAIN_INVOICE_SOURCE_ORDER: Checkout order (registration, transfer, renewal, restore, privacy).\n - DOMAIN_INVOICE_SOURCE_AUTO_RENEWAL: Automatic renewal (no order).", - "enum": [ - "DOMAIN_INVOICE_SOURCE_UNSPECIFIED", - "DOMAIN_INVOICE_SOURCE_ORDER", - "DOMAIN_INVOICE_SOURCE_AUTO_RENEWAL" - ], - "type": "string" - }, - "v1DomainNsMode": { - "default": "DOMAIN_NS_MODE_UNSPECIFIED", - "description": " - DOMAIN_NS_MODE_NODERINGS: NodeRings DNS (cfg.PowerDNS.AssignedNameservers).\n - DOMAIN_NS_MODE_CUSTOM: Customer nameservers.", - "enum": [ - "DOMAIN_NS_MODE_UNSPECIFIED", - "DOMAIN_NS_MODE_NODERINGS", - "DOMAIN_NS_MODE_CUSTOM" - ], - "type": "string" - }, - "v1DomainOperation": { - "default": "DOMAIN_OPERATION_UNSPECIFIED", - "description": "Operation a TLD requirement lookup is for.", + "v1FirewallRulePosition": { + "default": "FIREWALL_RULE_POSITION_UNSPECIFIED", "enum": [ - "DOMAIN_OPERATION_UNSPECIFIED", - "DOMAIN_OPERATION_REGISTER", - "DOMAIN_OPERATION_TRANSFER", - "DOMAIN_OPERATION_UPDATE" + "FIREWALL_RULE_POSITION_UNSPECIFIED", + "FIREWALL_RULE_POSITION_BEFORE", + "FIREWALL_RULE_POSITION_AFTER" ], + "title": "- FIREWALL_RULE_POSITION_BEFORE: Move before the target rule (higher priority)\n - FIREWALL_RULE_POSITION_AFTER: Move after the target rule (lower priority)", "type": "string" }, - "v1DomainOrder": { + "v1FirewallRuleResource": { + "description": "FirewallRuleResource is a first-class rule resource that belongs to a FirewallRuleSet.", "properties": { - "completedAt": { - "format": "date-time", - "type": "string" - }, - "currency": { - "type": "string" - }, - "failureCode": { - "type": "string" - }, - "failureMessage": { - "type": "string" - }, "id": { "readOnly": true, "type": "string" }, - "idempotencyKey": { - "type": "string" + "position": { + "description": "Position of the rule (0, 1, 2, 3...). Sequential position indicating order. Auto-assigned by the system.", + "format": "int64", + "readOnly": true, + "type": "integer" }, - "invoiceId": { + "rule": { + "$ref": "#/components/schemas/v1FirewallRuleInput" + }, + "rulesetId": { + "readOnly": true, "type": "string" }, - "items": { + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + } + }, + "type": "object" + }, + "v1FirewallRuleSet": { + "properties": { + "attachedVmCount": { + "description": "Number of virtual machines currently attached to this ruleset.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "attachedVmHostnames": { + "description": "Hostnames of virtual machines attached to this ruleset (sorted).", "items": { - "$ref": "#/components/schemas/v1DomainOrderItem" + "type": "string" }, + "readOnly": true, "type": "array" }, - "mitConsent": { - "type": "boolean" - }, - "organizationId": { + "id": { "readOnly": true, "type": "string" }, - "paymentMethodId": { + "name": { "type": "string" }, - "quoteExpiresAt": { - "format": "date-time", + "ruleCount": { + "description": "Number of rules in this ruleset (ingress and egress combined).", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + } + }, + "type": "object" + }, + "v1FirewallRuleSetAttachmentFilter": { + "default": "FIREWALL_RULESET_ATTACHMENT_FILTER_UNSPECIFIED", + "description": "FirewallRuleSetAttachmentFilter filters rulesets by whether any VM is attached.\n\n - FIREWALL_RULESET_ATTACHMENT_FILTER_UNSPECIFIED: All rulesets\n - FIREWALL_RULESET_ATTACHMENT_FILTER_ATTACHED: Rulesets with at least one VM attached\n - FIREWALL_RULESET_ATTACHMENT_FILTER_UNATTACHED: Rulesets with no VMs attached", + "enum": [ + "FIREWALL_RULESET_ATTACHMENT_FILTER_UNSPECIFIED", + "FIREWALL_RULESET_ATTACHMENT_FILTER_ATTACHED", + "FIREWALL_RULESET_ATTACHMENT_FILTER_UNATTACHED" + ], + "type": "string" + }, + "v1FirewallRuleSetInput": { + "properties": { + "name": { "type": "string" + } + }, + "type": "object" + }, + "v1FirewallRuleSource": { + "description": "FirewallRuleSource defines the source specification for a firewall rule.\nAll fields are optional, but at least one must be set. Multiple fields can be combined.", + "properties": { + "addressGroupIds": { + "$ref": "#/components/schemas/v1FirewallRuleAddressGroups" }, - "state": { - "$ref": "#/components/schemas/v1DomainOrderState" + "ips": { + "$ref": "#/components/schemas/v1FirewallRuleIPs" }, - "subtotal": { + "vmTags": { + "$ref": "#/components/schemas/v1FirewallRuleVMTags" + } + }, + "type": "object" + }, + "v1FirewallRuleVMTags": { + "description": "FirewallRuleVMTags contains VM tags. Can be one or more.", + "properties": { + "tags": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "v1ForgotPasswordRequest": { + "properties": { + "email": { "type": "string" }, - "taxAmount": { + "turnstileToken": { + "description": "Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).", "type": "string" - }, - "termsAcceptedAt": { - "format": "date-time", + } + }, + "type": "object" + }, + "v1FunctionCall": { + "properties": { + "arguments": { + "title": "Function arguments as JSON string", "type": "string" }, - "termsVersion": { - "description": "Current terms version the customer must accept at checkout.", + "id": { + "title": "Unique ID for this function call", "type": "string" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "total": { + "name": { + "title": "Function name (e.g., \"list_providers\", \"list_available_regions\")", "type": "string" } }, "type": "object" }, - "v1DomainOrderItem": { + "v1FunctionResult": { "properties": { - "autoRenew": { - "type": "boolean" - }, - "availability": { - "$ref": "#/components/schemas/v1DomainAvailability" - }, - "contactId": { + "content": { + "title": "Result content as JSON string", "type": "string" }, - "currency": { + "functionCallId": { + "title": "ID of the function call this result corresponds to", "type": "string" }, - "dnssec": { + "isError": { + "title": "Whether this is an error result", "type": "boolean" + } + }, + "type": "object" + }, + "v1GameServer": { + "properties": { + "allocationAlias": { + "type": "string" }, - "dnssecAllowed": { - "type": "boolean" + "allocationIp": { + "type": "string" }, - "dnssecPublished": { - "description": "DNSSEC keys were sent to the registry with the registration.", - "type": "boolean" + "allocationLimit": { + "description": "allocation_limit is how many extra ports this plan allows besides the one created with the server. From 1 to 99.", + "format": "int32", + "type": "integer" }, - "domainName": { - "type": "string" + "allocationPort": { + "format": "int32", + "type": "integer" }, - "extensionData": { - "type": "object" + "backupLimit": { + "description": "backup_limit is how many backups this plan allows. From 1 to 99.", + "format": "int32", + "type": "integer" }, - "failureCode": { - "type": "string" + "databaseLimit": { + "description": "database_limit is how many databases this plan allows. From 1 to 99.", + "format": "int32", + "type": "integer" }, - "failureMessage": { - "description": "Product copy (\"What failed. Next step.\").", + "gameName": { "type": "string" }, - "hasAuthCode": { - "description": "An auth code is stored (never returned).", - "type": "boolean" + "icon": { + "type": "string" }, "id": { - "readOnly": true, "type": "string" }, - "importNameserversFromRegistry": { - "type": "boolean" - }, - "kind": { - "$ref": "#/components/schemas/v1DomainOrderItemKind" - }, - "lineTotal": { - "description": "sell_price + privacy_price + tax_amount.", + "lastError": { "type": "string" }, - "maxYears": { - "format": "int32", - "type": "integer" + "name": { + "type": "string" }, - "minYears": { - "format": "int32", - "type": "integer" + "nodeId": { + "type": "string" }, - "nameservers": { - "items": { - "type": "string" - }, - "type": "array" + "organizationId": { + "type": "string" }, - "nsMode": { - "$ref": "#/components/schemas/v1DomainNsMode" + "panelIdentifier": { + "type": "string" }, - "privacyAllowed": { - "type": "boolean" + "phase": { + "$ref": "#/components/schemas/v1GameServerPhase" }, - "privacyPrice": { - "description": "WHOIS privacy add-on for the term (0 when not selected).", + "planBillingType": { + "description": "BILLING_TYPE_SUBSCRIPTION is fixed price. The delete dialog uses this for the no-refund warning.", "type": "string" }, - "registeredDomainId": { + "planCode": { "type": "string" }, - "renewalPrice": { - "description": "Price of one renewal year after this term.", + "planId": { "type": "string" }, - "requiresExtensionData": { - "type": "boolean" - }, - "sellPrice": { - "description": "Price of the operation for the chosen years.", + "powerState": { "type": "string" }, - "stage": { - "$ref": "#/components/schemas/v1DomainOrderItemStage" - }, - "starterRecords": { - "items": { - "$ref": "#/components/schemas/v1DomainStarterRecord" - }, - "type": "array" + "providerName": { + "type": "string" }, - "state": { - "$ref": "#/components/schemas/v1DomainOrderItemState" + "regionCity": { + "type": "string" }, - "taxAmount": { + "regionCountry": { "type": "string" }, - "tld": { + "regionId": { "type": "string" }, - "unavailableReason": { + "templateId": { "type": "string" }, - "whoisPrivacy": { - "type": "boolean" + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" }, - "years": { - "format": "int32", - "type": "integer" + "variant": { + "type": "string" }, - "zoneCreated": { - "description": "A NodeRings zone was created for this item.", - "type": "boolean" + "versionValue": { + "type": "string" } }, "type": "object" }, - "v1DomainOrderItemInput": { + "v1GameServerAllocation": { "properties": { - "authCode": { - "description": "Transfer auth code (transfer_in only). Encrypted at rest, never returned.", + "alias": { "type": "string" }, - "autoRenew": { - "type": "boolean" + "id": { + "format": "int32", + "type": "integer" }, - "contactId": { - "description": "Registrant contact; defaults to the order contact.", + "ip": { "type": "string" }, - "dnssec": { + "isDefault": { "type": "boolean" }, - "domainName": { + "notes": { "type": "string" }, - "extensionData": { - "description": "TLD extension fields, e.g. {\"us\":{\"nexus_category\":\"C11\"}}.\nAuthority: contact-scope fields (FieldScopeContact) live on the DomainContact\n(contact.extension_data); domain-scope fields live here on the item. Both\nare accepted here: values set on the item win over the contact for this\nregistration only (the contact is not changed).", - "type": "object" - }, - "importNameserversFromRegistry": { - "description": "Transfer-in: keep the nameservers currently at the registry.", - "type": "boolean" - }, - "kind": { - "$ref": "#/components/schemas/v1DomainOrderItemKind" - }, - "nameservers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "nsMode": { - "$ref": "#/components/schemas/v1DomainNsMode" - }, - "starterRecords": { - "items": { - "$ref": "#/components/schemas/v1DomainStarterRecord" - }, - "type": "array" - }, - "whoisPrivacy": { - "type": "boolean" - }, - "years": { + "port": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1DomainOrderItemKind": { - "default": "DOMAIN_ORDER_ITEM_KIND_UNSPECIFIED", - "description": " - DOMAIN_ORDER_ITEM_KIND_PRIVACY: WHOIS privacy bought later for an existing domain.", - "enum": [ - "DOMAIN_ORDER_ITEM_KIND_UNSPECIFIED", - "DOMAIN_ORDER_ITEM_KIND_REGISTER", - "DOMAIN_ORDER_ITEM_KIND_TRANSFER_IN", - "DOMAIN_ORDER_ITEM_KIND_RENEW", - "DOMAIN_ORDER_ITEM_KIND_RESTORE", - "DOMAIN_ORDER_ITEM_KIND_PRIVACY" - ], - "type": "string" - }, - "v1DomainOrderItemStage": { - "default": "DOMAIN_ORDER_ITEM_STAGE_UNSPECIFIED", - "description": "Processing progress of one order item (checkout progress page).\n\n - DOMAIN_ORDER_ITEM_STAGE_PENDING: Waiting for payment or for processing to start.\n - DOMAIN_ORDER_ITEM_STAGE_REGISTERING: Registry call in flight or the registry is still processing (REQ).\n - DOMAIN_ORDER_ITEM_STAGE_DNS: Creating the NodeRings DNS zone.\n - DOMAIN_ORDER_ITEM_STAGE_DNSSEC: Publishing DNSSEC keys at the registry.", - "enum": [ - "DOMAIN_ORDER_ITEM_STAGE_UNSPECIFIED", - "DOMAIN_ORDER_ITEM_STAGE_PENDING", - "DOMAIN_ORDER_ITEM_STAGE_REGISTERING", - "DOMAIN_ORDER_ITEM_STAGE_DNS", - "DOMAIN_ORDER_ITEM_STAGE_DNSSEC", - "DOMAIN_ORDER_ITEM_STAGE_DONE", - "DOMAIN_ORDER_ITEM_STAGE_FAILED" - ], - "type": "string" - }, - "v1DomainOrderItemState": { - "default": "DOMAIN_ORDER_ITEM_STATE_UNSPECIFIED", - "description": " - DOMAIN_ORDER_ITEM_STATE_SUBMITTED: Accepted by the registry, still processing (REQ).", - "enum": [ - "DOMAIN_ORDER_ITEM_STATE_UNSPECIFIED", - "DOMAIN_ORDER_ITEM_STATE_PENDING", - "DOMAIN_ORDER_ITEM_STATE_SUBMITTED", - "DOMAIN_ORDER_ITEM_STATE_SUCCEEDED", - "DOMAIN_ORDER_ITEM_STATE_FAILED", - "DOMAIN_ORDER_ITEM_STATE_CANCELED" - ], - "type": "string" - }, - "v1DomainOrderItemUpdate": { - "description": "Partial update of one order item.", + "v1GameServerBackup": { "properties": { - "authCode": { + "bytes": { + "format": "int64", "type": "string" }, - "autoRenew": { - "type": "boolean" - }, - "contactId": { + "completedAt": { "type": "string" }, - "dnssec": { + "isLocked": { + "type": "boolean" + }, + "isSuccessful": { "type": "boolean" }, - "extensionData": { - "type": "object" + "name": { + "type": "string" }, - "itemId": { + "uuid": { + "type": "string" + } + }, + "type": "object" + }, + "v1GameServerDatabase": { + "properties": { + "connectionsFrom": { "type": "string" }, - "nameservers": { - "items": { - "type": "string" - }, - "type": "array" + "host": { + "type": "string" }, - "nsMode": { - "$ref": "#/components/schemas/v1DomainNsMode" + "id": { + "type": "string" }, - "starterRecords": { - "items": { - "$ref": "#/components/schemas/v1DomainStarterRecord" - }, - "type": "array" + "jdbc": { + "type": "string" }, - "whoisPrivacy": { - "type": "boolean" + "name": { + "type": "string" + }, + "password": { + "type": "string" }, - "years": { + "port": { "format": "int32", "type": "integer" + }, + "username": { + "type": "string" } }, "type": "object" }, - "v1DomainOrderQuote": { + "v1GameServerFile": { "properties": { - "billingCountryConfirmationRequired": { - "description": "Billing country matches neither card nor IP country: ask for confirmation.", + "isFile": { "type": "boolean" }, - "currency": { + "mime": { "type": "string" }, - "lines": { - "items": { - "$ref": "#/components/schemas/v1DomainOrderQuoteLine" - }, - "type": "array" - }, - "mitConsentRequired": { - "description": "Some item has auto-renew on: MIT consent checkbox required.", - "type": "boolean" - }, - "mitConsentText": { + "name": { "type": "string" }, - "orderId": { + "size": { + "format": "int64", "type": "string" + } + }, + "type": "object" + }, + "v1GameServerMatchStatus": { + "default": "GAME_SERVER_MATCH_STATUS_UNSPECIFIED", + "enum": [ + "GAME_SERVER_MATCH_STATUS_UNSPECIFIED", + "GAME_SERVER_MATCH_STATUS_MATCHED", + "GAME_SERVER_MATCH_STATUS_UNMAPPED", + "GAME_SERVER_MATCH_STATUS_AMBIGUOUS" + ], + "type": "string" + }, + "v1GameServerPhase": { + "default": "GAME_SERVER_PHASE_UNSPECIFIED", + "enum": [ + "GAME_SERVER_PHASE_UNSPECIFIED", + "GAME_SERVER_PHASE_PENDING", + "GAME_SERVER_PHASE_READY", + "GAME_SERVER_PHASE_ERROR", + "GAME_SERVER_PHASE_FAILED" + ], + "type": "string" + }, + "v1GameServerResources": { + "properties": { + "cpuAbsolute": { + "format": "double", + "type": "number" }, - "quoteExpiresAt": { - "format": "date-time", + "diskBytes": { + "format": "int64", "type": "string" }, - "state": { - "$ref": "#/components/schemas/v1DomainOrderState" - }, - "subtotal": { + "memoryBytes": { + "format": "int64", "type": "string" }, - "taxAmount": { + "networkRxBytes": { + "format": "int64", "type": "string" }, - "taxBreakdown": { - "items": { - "$ref": "#/components/schemas/v1DomainTaxLine" - }, - "type": "array" - }, - "taxRequiresAddress": { - "description": "Billing address missing: show the address form (prefilled from the registrant).", - "type": "boolean" - }, - "termsUrl": { - "description": "Link to the terms of terms_version (relative to the site, e.g. \"/legal/domain-terms\").", + "networkTxBytes": { + "format": "int64", "type": "string" }, - "termsVersion": { + "state": { "type": "string" }, - "total": { + "uptimeMillis": { + "format": "int64", "type": "string" } }, "type": "object" }, - "v1DomainOrderQuoteLine": { + "v1GameServerSchedule": { "properties": { - "available": { - "type": "boolean" - }, - "description": { + "dayOfMonth": { "type": "string" }, - "domainName": { + "dayOfWeek": { "type": "string" }, - "itemId": { + "hour": { "type": "string" }, - "kind": { - "$ref": "#/components/schemas/v1DomainOrderItemKind" + "id": { + "type": "string" }, - "priceChanged": { - "description": "The price changed since the cart or the last quote.", + "isActive": { "type": "boolean" }, - "privacyPrice": { - "type": "string" + "isProcessing": { + "type": "boolean" }, - "renewalPrice": { + "lastRunAt": { "type": "string" }, - "sellPrice": { + "minute": { "type": "string" }, - "subtotal": { + "month": { "type": "string" }, - "taxAmount": { + "name": { "type": "string" }, - "total": { + "nextRunAt": { "type": "string" }, - "unavailableReason": { - "type": "string" + "onlyWhenOnline": { + "type": "boolean" }, - "years": { - "format": "int32", - "type": "integer" + "tasks": { + "items": { + "$ref": "#/components/schemas/v1GameServerScheduleTask" + }, + "type": "array" } }, "type": "object" }, - "v1DomainOrderState": { - "default": "DOMAIN_ORDER_STATE_UNSPECIFIED", - "enum": [ - "DOMAIN_ORDER_STATE_UNSPECIFIED", - "DOMAIN_ORDER_STATE_DRAFT", - "DOMAIN_ORDER_STATE_QUOTED", - "DOMAIN_ORDER_STATE_AWAITING_PAYMENT", - "DOMAIN_ORDER_STATE_AUTHORIZED", - "DOMAIN_ORDER_STATE_IN_REVIEW", - "DOMAIN_ORDER_STATE_PROCESSING", - "DOMAIN_ORDER_STATE_COMPLETED", - "DOMAIN_ORDER_STATE_PARTIALLY_COMPLETED", - "DOMAIN_ORDER_STATE_FAILED", - "DOMAIN_ORDER_STATE_CANCELED", - "DOMAIN_ORDER_STATE_EXPIRED" - ], - "type": "string" - }, - "v1DomainRenewalInfo": { + "v1GameServerScheduleTask": { "properties": { - "currency": { + "action": { "type": "string" }, - "maxExtendYears": { - "description": "Maximum extra years that can be added now (10-year cap).", - "format": "int32", - "type": "integer" + "continueOnFailure": { + "type": "boolean" }, - "nextAttemptAt": { - "description": "Next automatic renewal attempt (T-25 days before renew_by), if auto-renew is on.", - "format": "date-time", + "id": { "type": "string" }, - "privacyPrice": { - "description": "Privacy add-on renewal per year (0 when off).", + "payload": { "type": "string" }, - "renewalPrice": { - "description": "Price of one renewal year.", - "type": "string" + "sequenceId": { + "format": "int32", + "type": "integer" }, - "restorePrice": { - "description": "Restore price (shown in redemption).", - "type": "string" + "timeOffset": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1GameServerServiceRestoreBackupBody": { + "properties": { + "truncate": { + "description": "Restore only. When true, the panel deletes every file before extracting the backup.", + "type": "boolean" } }, "type": "object" }, - "v1DomainSearchResult": { - "description": "One row of a search or check result.", + "v1GameServerTemplate": { "properties": { - "availability": { - "$ref": "#/components/schemas/v1DomainAvailability" - }, - "category": { - "$ref": "#/components/schemas/v1TldCategory" - }, - "currency": { + "catalogKey": { "type": "string" }, - "dnssecAllowed": { + "confirmed": { "type": "boolean" }, - "eligibility": { - "$ref": "#/components/schemas/v1TldEligibility" - }, - "eligibilityNote": { + "dockerImage": { "type": "string" }, - "eligibleCountries": { - "description": "ISO 3166-1 alpha-2 countries allowed when eligibility is RESIDENTS_ONLY.", - "items": { - "type": "string" - }, - "type": "array" - }, - "exactMatch": { - "description": "The exact name the customer typed.", - "type": "boolean" + "eggId": { + "format": "int32", + "type": "integer" }, - "featured": { - "description": "Same label on a featured TLD.", + "hidden": { "type": "boolean" }, - "firstYearPrice": { - "description": "First-year registration price.", + "icon": { "type": "string" }, - "isPromotion": { - "description": "first_year_price is an upstream promotion.", - "type": "boolean" - }, - "maxYears": { - "format": "int32", - "type": "integer" + "id": { + "type": "string" }, - "minYears": { - "format": "int32", - "type": "integer" + "matchStatus": { + "$ref": "#/components/schemas/v1GameServerMatchStatus" }, "name": { "type": "string" }, - "ownedByCaller": { - "description": "The caller's organization already holds this domain (signed-in callers only).", - "type": "boolean" + "nestId": { + "format": "int32", + "type": "integer" }, - "priceGapWarning": { - "description": "Renewal is much more expensive than the first year: show a warning chip.", + "nestOrderingEnabled": { + "description": "Optional so a false value is still sent. Missing means the nest is offered.", "type": "boolean" }, - "privacyAllowed": { + "orderingEnabled": { + "description": "Optional so a false value is still sent. Missing means the egg is offered.", "type": "boolean" }, - "privacyPrice": { - "description": "WHOIS privacy add-on per year; empty when privacy_allowed is false.", - "type": "string" - }, - "reason": { - "description": "Product copy for non-available rows (e.g. \"Premium \u2014 not available yet\").", - "type": "string" - }, - "renewalPrice": { - "description": "Price of each renewal year.", + "platformId": { "type": "string" }, - "requiresExtensionData": { - "description": "Extra contact data is required for this TLD (GetTldRequirements).", - "type": "boolean" - }, - "riskNote": { + "startup": { "type": "string" }, - "riskTier": { - "$ref": "#/components/schemas/v1TldRiskTier" - }, - "suggestion": { - "description": "Registrar suggestion.", - "type": "boolean" + "suggestedEggId": { + "format": "int32", + "type": "integer" }, - "tld": { - "type": "string" + "suggestedNestId": { + "format": "int32", + "type": "integer" }, - "transferPrice": { + "versionVariable": { "type": "string" } }, "type": "object" }, - "v1DomainStarterRecord": { - "description": "Optional starter record for a new NodeRings zone (@ or www to a server).", + "v1GenerateCouponCodesResponse": { "properties": { - "name": { - "description": "\"@\" or \"www\".", - "type": "string" - }, - "type": { - "description": "A or AAAA.", - "type": "string" + "batch": { + "$ref": "#/components/schemas/v1CouponCodeBatch" }, - "value": { + "batchId": { "type": "string" }, - "virtualMachineId": { - "description": "Resolve the address from this VM instead of value.", - "type": "string" + "count": { + "description": "Requested count. Large batches are generated in the background; poll\nGetCouponCodeBatch until batch.status is COMPLETED or FAILED.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1DomainTaxLine": { + "v1GenerateInstallCommandResponse": { "properties": { - "amount": { - "type": "string" - }, - "jurisdiction": { - "type": "string" - }, - "ratePercent": { - "type": "string" - }, - "reverseCharge": { - "type": "boolean" - }, - "taxType": { - "description": "vat, gst, sales_tax, ...", + "command": { + "title": "Full curl/bash command that can be executed", "type": "string" }, - "taxabilityReason": { + "token": { + "title": "One-time token used in the command for authentication", "type": "string" } }, "type": "object" }, - "v1DomainTransferIn": { + "v1GeneratePeeringConfigResponse": { "properties": { - "failureReason": { + "config": { + "type": "string" + } + }, + "type": "object" + }, + "v1GenerateServiceAccountTokenResponse": { + "properties": { + "createdAt": { + "format": "date-time", "type": "string" }, - "orderId": { + "expiresAt": { + "format": "date-time", "type": "string" }, - "orderItemId": { + "token": { "type": "string" }, - "startedAt": { - "format": "date-time", + "tokenId": { "type": "string" }, - "state": { - "$ref": "#/components/schemas/v1DomainTransferInState" + "warning": { + "type": "string" } }, "type": "object" }, - "v1DomainTransferInState": { - "default": "DOMAIN_TRANSFER_IN_STATE_UNSPECIFIED", - "description": " - DOMAIN_TRANSFER_IN_STATE_AUTH_CODE_REJECTED: Registry rejected the auth code; enter it again on the order item.", - "enum": [ - "DOMAIN_TRANSFER_IN_STATE_UNSPECIFIED", - "DOMAIN_TRANSFER_IN_STATE_NONE", - "DOMAIN_TRANSFER_IN_STATE_PENDING", - "DOMAIN_TRANSFER_IN_STATE_AUTH_CODE_REJECTED", - "DOMAIN_TRANSFER_IN_STATE_COMPLETED", - "DOMAIN_TRANSFER_IN_STATE_FAILED" - ], - "type": "string" + "v1GetActiveSessionsResponse": { + "properties": { + "sessions": { + "items": { + "$ref": "#/components/schemas/v1SessionInfo" + }, + "type": "array" + } + }, + "type": "object" }, - "v1DomainTransferOut": { + "v1GetAddonResponse": { "properties": { - "completesAt": { - "format": "date-time", - "type": "string" + "addon": { + "$ref": "#/components/schemas/v1Addon" }, - "gainingRegistrar": { + "addonPrices": { + "items": { + "$ref": "#/components/schemas/v1AddonPrice" + }, + "type": "array" + } + }, + "type": "object" + }, + "v1GetAgentResponse": { + "properties": { + "agent": { + "$ref": "#/components/schemas/v1Agent" + } + }, + "type": "object" + }, + "v1GetAllExchangeRatesResponse": { + "properties": { + "lastUpdated": { + "format": "int64", + "title": "Timestamp when rates were last updated", "type": "string" }, - "state": { - "$ref": "#/components/schemas/v1DomainTransferOutState" + "rates": { + "additionalProperties": { + "type": "string" + }, + "title": "Map of currency codes to exchange rates (from USD)\nKey: currency code (e.g., \"EUR\", \"GBP\")\nValue: exchange rate as decimal string", + "type": "object" } }, "type": "object" }, - "v1DomainTransferOutState": { - "default": "DOMAIN_TRANSFER_OUT_STATE_UNSPECIFIED", - "enum": [ - "DOMAIN_TRANSFER_OUT_STATE_UNSPECIFIED", - "DOMAIN_TRANSFER_OUT_STATE_NONE", - "DOMAIN_TRANSFER_OUT_STATE_PENDING", - "DOMAIN_TRANSFER_OUT_STATE_APPROVED", - "DOMAIN_TRANSFER_OUT_STATE_COMPLETED", - "DOMAIN_TRANSFER_OUT_STATE_REJECTED" - ], - "type": "string" + "v1GetBackupResponse": { + "properties": { + "backup": { + "$ref": "#/components/schemas/v1Backup" + } + }, + "type": "object" }, - "v1DomainVerification": { + "v1GetClientDashboardBillingResponse": { "properties": { - "deadline": { - "description": "Domain is suspended if not verified by then.", - "format": "date-time", + "currency": { "type": "string" }, - "email": { - "type": "string" + "spendDays": { + "description": "Daily categorized spend, oldest first (fixed window ending today, UTC).", + "items": { + "$ref": "#/components/schemas/v1ClientDashboardSpendBucket" + }, + "type": "array" }, - "lastSentAt": { - "format": "date-time", - "type": "string" + "spendHours": { + "description": "Hourly categorized spend for the last 24 hours, oldest first.", + "items": { + "$ref": "#/components/schemas/v1ClientDashboardSpendBucket" + }, + "type": "array" }, - "status": { - "$ref": "#/components/schemas/v1DomainVerificationStatus" + "usageRollups": { + "items": { + "$ref": "#/components/schemas/v1ClientDashboardUsageRollup" + }, + "type": "array" } }, "type": "object" }, - "v1DomainVerificationStatus": { - "default": "DOMAIN_VERIFICATION_STATUS_UNSPECIFIED", - "enum": [ - "DOMAIN_VERIFICATION_STATUS_UNSPECIFIED", - "DOMAIN_VERIFICATION_STATUS_VERIFIED", - "DOMAIN_VERIFICATION_STATUS_PENDING", - "DOMAIN_VERIFICATION_STATUS_FAILED" - ], - "type": "string" - }, - "v1DownloadFileResponse": { + "v1GetClientDashboardSummaryResponse": { + "description": "Client dashboard (buyer org): single read for Summary tab widgets.", "properties": { - "content": { - "format": "byte", - "type": "string" + "spendingWindows": { + "items": { + "$ref": "#/components/schemas/v1ClientDashboardSpendingWindow" + }, + "type": "array" + }, + "virtualMachines": { + "$ref": "#/components/schemas/v1ClientDashboardVirtualMachinesSummary" } }, "type": "object" }, - "v1DownloadTicketAttachmentResponse": { + "v1GetClientReviewForVirtualMachineResponse": { "properties": { - "attachmentId": { - "type": "string" + "canSubmitReview": { + "type": "boolean" }, - "fileContent": { - "format": "byte", - "type": "string" + "hasSubmitted": { + "type": "boolean" }, - "fileName": { + "review": { + "$ref": "#/components/schemas/v1ClientProviderReview" + }, + "reviewAvailableAt": { + "format": "date-time", "type": "string" }, - "fileSize": { - "format": "int64", + "reviewBlockedReason": { + "description": "Set when can_submit_review is false and has_submitted is false (e.g. usage-based 24h window).", "type": "string" + } + }, + "type": "object" + }, + "v1GetCloudInitTemplateResponse": { + "properties": { + "cloudInitTemplate": { + "$ref": "#/components/schemas/v1CloudInitTemplate" + } + }, + "type": "object" + }, + "v1GetConnectAccountResponse": { + "properties": { + "account": { + "$ref": "#/components/schemas/v1ConnectAccount" }, - "mimeType": { + "onboardingUrl": { + "title": "URL for provider to complete setup (if required)", "type": "string" + }, + "requiresOnboarding": { + "title": "Whether provider needs to complete onboarding", + "type": "boolean" } }, "type": "object" }, - "v1EffectivePermissions": { + "v1GetConnectTaxSettingsResponse": { "properties": { - "permissions": { + "settings": { + "$ref": "#/components/schemas/v1ConnectTaxSettingsDetails" + } + }, + "type": "object" + }, + "v1GetConversationHistoryResponse": { + "properties": { + "conversationId": { + "title": "Conversation ID", + "type": "string" + }, + "messages": { "items": { - "$ref": "#/components/schemas/v1Permission" + "$ref": "#/components/schemas/v1ChatMessage" }, + "title": "List of messages in the conversation", "type": "array" }, - "totalCount": { - "format": "int32", - "type": "integer" + "title": { + "title": "Conversation title", + "type": "string" } }, "type": "object" }, - "v1EggVariable": { - "description": "EggVariable is one panel variable the customer can see while ordering a game.", + "v1GetCouponReportResponse": { "properties": { - "defaultValue": { - "type": "string" - }, - "description": { + "consumed": { "type": "string" }, - "envVariable": { + "couponId": { "type": "string" }, - "helpText": { - "description": "help_text explains where the customer finds the value.", + "expired": { "type": "string" }, - "helpUrl": { - "description": "help_url is a page that shows the value, when one is known.", + "generatedAt": { + "format": "date-time", "type": "string" }, - "isRequired": { - "description": "is_required is true when the panel rules contain required.", - "type": "boolean" - }, - "name": { + "granted": { + "description": "Set for credit coupons. Decimal USD strings.", "type": "string" }, - "rules": { + "outstanding": { "type": "string" }, - "userEditable": { - "type": "boolean" - }, - "userViewable": { - "type": "boolean" + "rows": { + "description": "One row per group and currency. Currencies are never converted or summed.", + "items": { + "$ref": "#/components/schemas/v1CouponReportRow" + }, + "type": "array" } }, "type": "object" }, - "v1EnableAdditionalIPResponse": { - "description": "EnableAdditionalIPResponse returns the newly allocated address.", + "v1GetCreditBalanceResponse": { "properties": { - "allocation": { - "$ref": "#/components/schemas/v1AdditionalIPAddress" + "available": { + "title": "Decimal string: balance - reserved", + "type": "string" }, - "billingMessage": { - "description": "Human-readable billing summary for the UI.", + "balance": { + "title": "Decimal string: settled wallet balance in USD", "type": "string" }, "currency": { + "title": "Always \"USD\" in v1", "type": "string" }, - "monthlyUnitPrice": { - "description": "Monthly list price per additional IP (fixed billing). Empty for usage-based VMs.", + "frozen": { + "type": "boolean" + }, + "frozenReason": { + "title": "Empty when not frozen", "type": "string" }, - "proratedChargeAmount": { - "description": "Prorated amount charged now for the remaining VM billing period (fixed billing).", + "promotionalAvailable": { + "description": "Unreserved promotional credit that can be applied to the next invoice.", "type": "string" }, - "totalAdditionalIps": { - "format": "int32", - "type": "integer" + "promotionalExpiringSoon": { + "description": "Promotional credit that expires within 7 days.", + "type": "string" + }, + "reserved": { + "title": "Decimal string: sum of open holds", + "type": "string" } }, "type": "object" }, - "v1EndUser": { - "default": "END_USER_UNSPECIFIED", - "enum": [ - "END_USER_UNSPECIFIED", - "END_USER_CLIENT", - "END_USER_PROVIDER", - "END_USER_ALL", - "END_USER_USER" - ], - "type": "string" - }, - "v1EnrollMfaTotpRequest": { - "type": "object" - }, - "v1EnrollMfaTotpResponse": { + "v1GetDashboardAssetSalesTimeseriesResponse": { "properties": { - "otpauthUrl": { - "type": "string" - }, - "secret": { - "description": "Base32 TOTP secret for manual entry / backup. Shown once during enrollment.", - "type": "string" + "assetsSoldPerDay": { + "items": { + "$ref": "#/components/schemas/v1DashboardAssetSalesDayBucket" + }, + "type": "array" } }, "type": "object" }, - "v1EnvironmentVariable": { + "v1GetDashboardBillingSalesResponse": { "properties": { - "id": { - "title": "Fields", - "type": "string" + "commercialHealth": { + "$ref": "#/components/schemas/v1DashboardBillingCommercialHealth" }, - "key": { + "currency": { "type": "string" }, - "metadata": { - "title": "Metadata", - "type": "object" + "days": { + "items": { + "$ref": "#/components/schemas/v1DashboardBillingSalesDayBucket" + }, + "type": "array" }, - "organization": { - "type": "string" + "revenueByCustomer": { + "items": { + "$ref": "#/components/schemas/v1DashboardBillingCustomerRevenue" + }, + "type": "array" }, - "status": { - "$ref": "#/components/schemas/protov1Status" + "revenueByCustomerTotalCount": { + "description": "Rows matching email filter (for pagination).", + "format": "int32", + "type": "integer" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "revenueByCustomerWindowTotal": { + "description": "Distinct customer orgs with revenue in the window (before email filter).", + "format": "int32", + "type": "integer" }, - "user": { - "title": "Relations", + "totalFixedBillingSalesAmount": { + "description": "Fixed = subscription + free plan lines + all add-ons; usage = usage-rated plan lines only.", "type": "string" }, - "value": { + "totalUsageBillingSalesAmount": { "type": "string" } }, "type": "object" }, - "v1ExchangeSSOCodeRequest": { + "v1GetDashboardCustomerAcquisitionTimeseriesResponse": { "properties": { - "code": { - "type": "string" + "buckets": { + "items": { + "$ref": "#/components/schemas/v1DashboardCustomerAcquisitionDayBucket" + }, + "type": "array" } }, "type": "object" }, - "v1ExpireConnectTaxRegistrationResponse": { + "v1GetDashboardSummaryResponse": { "properties": { - "registration": { - "$ref": "#/components/schemas/v1ConnectTaxRegistration" + "activeCustomerTotal": { + "format": "int32", + "type": "integer" + }, + "activeVmTotal": { + "format": "int32", + "type": "integer" + }, + "addonBreakdown": { + "items": { + "$ref": "#/components/schemas/v1DashboardSummaryAddonBreakdown" + }, + "type": "array" + }, + "byRegion": { + "items": { + "$ref": "#/components/schemas/v1DashboardSummaryRegionBreakdown" + }, + "type": "array" + }, + "nodeTotal": { + "format": "int32", + "type": "integer" + }, + "planBreakdown": { + "items": { + "$ref": "#/components/schemas/v1DashboardSummaryPlanBreakdown" + }, + "type": "array" + }, + "tickets": { + "$ref": "#/components/schemas/v1DashboardSummaryTickets" } }, "type": "object" }, - "v1ExportCouponCodesResponse": { + "v1GetDnsZoneResponse": { "properties": { - "count": { - "format": "int32", - "type": "integer" - }, - "csv": { - "description": "CSV with a header row: code,status,times_redeemed,max_redemptions,valid_until,campaign,channel.", - "type": "string" - }, - "filename": { - "type": "string" + "zone": { + "$ref": "#/components/schemas/v1DnsZone" } }, "type": "object" }, - "v1ExportDnsZoneResponse": { + "v1GetDomainResponse": { "properties": { - "zoneText": { - "type": "string" + "domain": { + "$ref": "#/components/schemas/v1Domain" } }, "type": "object" }, - "v1FirewallAction": { - "default": "FIREWALL_ACTION_UNSPECIFIED", - "enum": [ - "FIREWALL_ACTION_UNSPECIFIED", - "FIREWALL_ACTION_ACCEPT", - "FIREWALL_ACTION_DROP" - ], - "type": "string" + "v1GetEnvironmentVariableResponse": { + "properties": { + "environmentVariable": { + "$ref": "#/components/schemas/v1EnvironmentVariable" + } + }, + "type": "object" }, - "v1FirewallAddressGroup": { + "v1GetExchangeRateResponse": { "properties": { - "id": { - "readOnly": true, + "currencyCode": { + "title": "Currency code", "type": "string" }, - "name": { + "exchangeRate": { + "title": "Exchange rate from USD to the requested currency", "type": "string" }, - "prefixes": { - "description": "CIDR prefixes. Can contain mixed IPv4 and IPv6 addresses.\nSupports \"all IPs\" via 0.0.0.0/0 or ::/0.", - "items": { - "$ref": "#/components/schemas/v1FirewallIPPrefix" - }, - "type": "array" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "lastUpdated": { + "format": "int64", + "title": "Timestamp when the rate was last updated", + "type": "string" } }, "type": "object" }, - "v1FirewallAddressGroupInput": { - "description": "FirewallAddressGroupInput is the client-provided payload for create/update.\nClients must not provide id/timestamps (those are server-controlled).", + "v1GetGroupResponse": { "properties": { - "name": { - "type": "string" + "group": { + "$ref": "#/components/schemas/v1Group" + } + }, + "type": "object" + }, + "v1GetInvoiceResponse": { + "properties": { + "invoice": { + "$ref": "#/components/schemas/v1Invoice" }, - "prefixes": { - "description": "CIDR prefixes. Can contain mixed IPv4 and IPv6 addresses.\nSupports \"all IPs\" via 0.0.0.0/0 or ::/0.", + "invoiceLines": { "items": { - "$ref": "#/components/schemas/v1FirewallIPPrefix" + "$ref": "#/components/schemas/v1InvoiceLine" }, "type": "array" } }, "type": "object" }, - "v1FirewallDirection": { - "default": "FIREWALL_DIRECTION_UNSPECIFIED", - "enum": [ - "FIREWALL_DIRECTION_UNSPECIFIED", - "FIREWALL_DIRECTION_INGRESS", - "FIREWALL_DIRECTION_EGRESS" - ], - "type": "string" - }, - "v1FirewallIPPrefix": { - "description": "FirewallIPPrefix represents a single CIDR prefix as separate fields.\nThe backend will normalize/store it as a CIDR string (e.g., \"10.0.0.0/24\", \"0.0.0.0/0\", \"::/0\").", + "v1GetManualPayoutResponse": { "properties": { - "ip": { - "description": "IPv4 or IPv6 address. May be \"0.0.0.0\" (v4 default route) or \"::\" (v6 default route).", - "type": "string" - }, - "prefix": { - "description": "Prefix length. IPv4: 0-32. IPv6: 0-128. Enforced by backend based on derived family.", - "format": "int64", - "type": "integer" + "payout": { + "$ref": "#/components/schemas/v1ManualPayout" } }, "type": "object" }, - "v1FirewallProtocol": { - "default": "FIREWALL_PROTOCOL_UNSPECIFIED", - "enum": [ - "FIREWALL_PROTOCOL_UNSPECIFIED", - "FIREWALL_PROTOCOL_TCP", - "FIREWALL_PROTOCOL_UDP", - "FIREWALL_PROTOCOL_SCTP", - "FIREWALL_PROTOCOL_IPV6", - "FIREWALL_PROTOCOL_ICMP", - "FIREWALL_PROTOCOL_ICMPV6", - "FIREWALL_PROTOCOL_ESP", - "FIREWALL_PROTOCOL_AH", - "FIREWALL_PROTOCOL_IPSEC", - "FIREWALL_PROTOCOL_GRE", - "FIREWALL_PROTOCOL_IPIP", - "FIREWALL_PROTOCOL_VXLAN", - "FIREWALL_PROTOCOL_L2TP", - "FIREWALL_PROTOCOL_GENEVE", - "FIREWALL_PROTOCOL_ANY", - "FIREWALL_PROTOCOL_IGMP", - "FIREWALL_PROTOCOL_GGP", - "FIREWALL_PROTOCOL_IPENCAP", - "FIREWALL_PROTOCOL_ST", - "FIREWALL_PROTOCOL_EGP", - "FIREWALL_PROTOCOL_IGP", - "FIREWALL_PROTOCOL_PUP", - "FIREWALL_PROTOCOL_HMP", - "FIREWALL_PROTOCOL_XNS_IDP", - "FIREWALL_PROTOCOL_RDP", - "FIREWALL_PROTOCOL_ISO_TP4", - "FIREWALL_PROTOCOL_DCCP", - "FIREWALL_PROTOCOL_XTP", - "FIREWALL_PROTOCOL_DDP", - "FIREWALL_PROTOCOL_IDPR_CMTP", - "FIREWALL_PROTOCOL_IPV6_ROUTE", - "FIREWALL_PROTOCOL_IPV6_FRAG", - "FIREWALL_PROTOCOL_IDRP", - "FIREWALL_PROTOCOL_RSVP", - "FIREWALL_PROTOCOL_SKIP", - "FIREWALL_PROTOCOL_IPV6_ICMP", - "FIREWALL_PROTOCOL_IPV6_NONXT", - "FIREWALL_PROTOCOL_IPV6_OPTS", - "FIREWALL_PROTOCOL_VMTP", - "FIREWALL_PROTOCOL_EIGRP", - "FIREWALL_PROTOCOL_OSPF", - "FIREWALL_PROTOCOL_AX_25", - "FIREWALL_PROTOCOL_ETHERIP", - "FIREWALL_PROTOCOL_ENCAP", - "FIREWALL_PROTOCOL_PIM", - "FIREWALL_PROTOCOL_IPCOMP", - "FIREWALL_PROTOCOL_VRRP", - "FIREWALL_PROTOCOL_ISIS", - "FIREWALL_PROTOCOL_FC", - "FIREWALL_PROTOCOL_MOBILITY_HEADER", - "FIREWALL_PROTOCOL_UDPLITE", - "FIREWALL_PROTOCOL_MPLS_IN_IP", - "FIREWALL_PROTOCOL_HIP", - "FIREWALL_PROTOCOL_SHIM6", - "FIREWALL_PROTOCOL_WESP", - "FIREWALL_PROTOCOL_ROHC" - ], - "title": "- FIREWALL_PROTOCOL_ICMPV6: legacy alias; prefer IPV6_ICMP for new rules\n - FIREWALL_PROTOCOL_IPSEC: legacy logical grouping; not a Proxmox /etc/protocols name\n - FIREWALL_PROTOCOL_VXLAN: legacy; not in Proxmox protocol selector\n - FIREWALL_PROTOCOL_GENEVE: legacy; not in Proxmox protocol selector\n - FIREWALL_PROTOCOL_ANY: Match all protocols (Proxmox proto left unset)\n - FIREWALL_PROTOCOL_IGMP: Remaining values mirror Proxmox VE IPProtocolSelector (www/manager6/form/IPProtocolSelector.js)\n - FIREWALL_PROTOCOL_XNS_IDP: xns-idp\n - FIREWALL_PROTOCOL_ISO_TP4: iso-tp4\n - FIREWALL_PROTOCOL_IDPR_CMTP: idpr-cmtp\n - FIREWALL_PROTOCOL_IPV6_ROUTE: ipv6-route\n - FIREWALL_PROTOCOL_IPV6_FRAG: ipv6-frag\n - FIREWALL_PROTOCOL_IPV6_ICMP: ipv6-icmp (Proxmox name for ICMPv6)\n - FIREWALL_PROTOCOL_IPV6_NONXT: ipv6-nonxt\n - FIREWALL_PROTOCOL_IPV6_OPTS: ipv6-opts\n - FIREWALL_PROTOCOL_AX_25: ax.25\n - FIREWALL_PROTOCOL_MOBILITY_HEADER: mobility-header\n - FIREWALL_PROTOCOL_MPLS_IN_IP: mpls-in-ip", - "type": "string" - }, - "v1FirewallRuleAddressGroups": { - "description": "FirewallRuleAddressGroups contains address group UUIDs. Can be one or more.", + "v1GetMarketplacePlanResponse": { + "description": "Resolved marketplace offer for VM create prefill (authenticated clients).", "properties": { - "addressGroupIds": { + "billingType": { + "$ref": "#/components/schemas/v1BillingType" + }, + "diskGb": { + "format": "int32", + "type": "integer" + }, + "organizationId": { + "type": "string" + }, + "organizationName": { + "type": "string" + }, + "planCode": { + "type": "string" + }, + "planId": { + "type": "string" + }, + "planPrices": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1PlanPrice" }, "type": "array" - } - }, - "type": "object" - }, - "v1FirewallRuleDestination": { - "description": "FirewallRuleDestination defines the destination specification for a firewall rule.\nAll fields are optional, but at least one must be set. Multiple fields can be combined.", - "properties": { - "addressGroupIds": { - "$ref": "#/components/schemas/v1FirewallRuleAddressGroups" - }, - "ips": { - "$ref": "#/components/schemas/v1FirewallRuleIPs" }, - "vmTags": { - "$ref": "#/components/schemas/v1FirewallRuleVMTags" - } - }, - "type": "object" - }, - "v1FirewallRuleIPs": { - "description": "FirewallRuleIPs contains IP addresses in CIDR format. Can be one or more.", - "properties": { - "ips": { + "planRegions": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1PlanRegion" }, "type": "array" - } - }, - "type": "object" - }, - "v1FirewallRuleInput": { - "description": "FirewallRuleInput is the client-provided rule payload for create/update.\nClients must not provide id/ruleset_id/timestamps (those are server-controlled).", - "properties": { - "action": { - "$ref": "#/components/schemas/v1FirewallAction" - }, - "destination": { - "$ref": "#/components/schemas/v1FirewallRuleDestination" }, - "destinationPorts": { - "title": "Optional: single port or range (e.g., \"443\" or \"5000-5010\")", + "providerLogoUrl": { "type": "string" }, - "direction": { - "$ref": "#/components/schemas/v1FirewallDirection" + "ramGb": { + "format": "int32", + "type": "integer" }, - "protocol": { - "$ref": "#/components/schemas/v1FirewallProtocol" + "rating": { + "format": "float", + "type": "number" }, - "source": { - "$ref": "#/components/schemas/v1FirewallRuleSource" + "regionCity": { + "type": "string" }, - "sourcePorts": { - "title": "Optional: single port or range (e.g., \"80\" or \"8000-9000\")", + "regionCountry": { + "type": "string" + }, + "regionId": { "type": "string" + }, + "totalReviews": { + "format": "int32", + "type": "integer" + }, + "vcpus": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1FirewallRulePosition": { - "default": "FIREWALL_RULE_POSITION_UNSPECIFIED", - "enum": [ - "FIREWALL_RULE_POSITION_UNSPECIFIED", - "FIREWALL_RULE_POSITION_BEFORE", - "FIREWALL_RULE_POSITION_AFTER" - ], - "title": "- FIREWALL_RULE_POSITION_BEFORE: Move before the target rule (higher priority)\n - FIREWALL_RULE_POSITION_AFTER: Move after the target rule (lower priority)", - "type": "string" + "v1GetMetricResponse": { + "properties": { + "metric": { + "$ref": "#/components/schemas/v1Metric" + } + }, + "type": "object" }, - "v1FirewallRuleResource": { - "description": "FirewallRuleResource is a first-class rule resource that belongs to a FirewallRuleSet.", + "v1GetMfaStatusResponse": { "properties": { - "id": { - "readOnly": true, - "type": "string" - }, - "position": { - "description": "Position of the rule (0, 1, 2, 3...). Sequential position indicating order. Auto-assigned by the system.", - "format": "int64", - "readOnly": true, + "backupCodesRemaining": { + "format": "int32", "type": "integer" }, - "rule": { - "$ref": "#/components/schemas/v1FirewallRuleInput" + "enabled": { + "type": "boolean" }, - "rulesetId": { - "readOnly": true, + "factorLabel": { "type": "string" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" } }, "type": "object" }, - "v1FirewallRuleSet": { + "v1GetMyStorefrontResponse": { "properties": { - "attachedVmCount": { - "description": "Number of virtual machines currently attached to this ruleset.", + "storefront": { + "$ref": "#/components/schemas/v1MyStorefront" + } + }, + "type": "object" + }, + "v1GetNetworkResponse": { + "properties": { + "network": { + "$ref": "#/components/schemas/v1Network" + } + }, + "type": "object" + }, + "v1GetNodeCPUMapResponse": { + "properties": { + "computeType": { + "$ref": "#/components/schemas/v1NodeComputeType" + }, + "cpus": { + "items": { + "$ref": "#/components/schemas/v1NodeCPUMapCPU" + }, + "type": "array" + }, + "logicalCpus": { "format": "int32", - "readOnly": true, "type": "integer" }, - "attachedVmHostnames": { - "description": "Hostnames of virtual machines attached to this ruleset (sorted).", + "modelName": { + "type": "string" + }, + "numaNodes": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1NodeCPUMapNUMA" }, - "readOnly": true, "type": "array" }, - "id": { - "readOnly": true, - "type": "string" + "physicalCores": { + "format": "int32", + "type": "integer" }, - "name": { - "type": "string" + "smtEnabled": { + "type": "boolean" }, - "ruleCount": { - "description": "Number of rules in this ruleset (ingress and egress combined).", + "sockets": { "format": "int32", - "readOnly": true, "type": "integer" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "threadsPerCore": { + "format": "int32", + "type": "integer" + }, + "topologyCollectedAt": { + "description": "RFC3339 time the stored topology was collected/pasted.", + "type": "string" } }, "type": "object" }, - "v1FirewallRuleSetAttachmentFilter": { - "default": "FIREWALL_RULESET_ATTACHMENT_FILTER_UNSPECIFIED", - "description": "FirewallRuleSetAttachmentFilter filters rulesets by whether any VM is attached.\n\n - FIREWALL_RULESET_ATTACHMENT_FILTER_UNSPECIFIED: All rulesets\n - FIREWALL_RULESET_ATTACHMENT_FILTER_ATTACHED: Rulesets with at least one VM attached\n - FIREWALL_RULESET_ATTACHMENT_FILTER_UNATTACHED: Rulesets with no VMs attached", - "enum": [ - "FIREWALL_RULESET_ATTACHMENT_FILTER_UNSPECIFIED", - "FIREWALL_RULESET_ATTACHMENT_FILTER_ATTACHED", - "FIREWALL_RULESET_ATTACHMENT_FILTER_UNATTACHED" - ], - "type": "string" + "v1GetNodeNetworkResponse": { + "properties": { + "network": { + "$ref": "#/components/schemas/v1Network" + } + }, + "type": "object" }, - "v1FirewallRuleSetInput": { + "v1GetNodePlacementPolicyResponse": { "properties": { - "name": { - "type": "string" + "policy": { + "$ref": "#/components/schemas/v1NodePlacementPolicy" } }, "type": "object" }, - "v1FirewallRuleSource": { - "description": "FirewallRuleSource defines the source specification for a firewall rule.\nAll fields are optional, but at least one must be set. Multiple fields can be combined.", + "v1GetNodeResponse": { "properties": { - "addressGroupIds": { - "$ref": "#/components/schemas/v1FirewallRuleAddressGroups" - }, - "ips": { - "$ref": "#/components/schemas/v1FirewallRuleIPs" - }, - "vmTags": { - "$ref": "#/components/schemas/v1FirewallRuleVMTags" + "node": { + "$ref": "#/components/schemas/v1Node" } }, "type": "object" }, - "v1FirewallRuleVMTags": { - "description": "FirewallRuleVMTags contains VM tags. Can be one or more.", + "v1GetNotificationSettingResponse": { "properties": { - "tags": { + "notificationSetting": { + "$ref": "#/components/schemas/v1NotificationSetting" + } + }, + "type": "object" + }, + "v1GetNotificationTemplateResponse": { + "properties": { + "notificationTemplate": { + "$ref": "#/components/schemas/v1NotificationTemplate" + } + }, + "type": "object" + }, + "v1GetOrganizationResponse": { + "properties": { + "organization": { + "$ref": "#/components/schemas/v1Organization" + } + }, + "type": "object" + }, + "v1GetPaymentResponse": { + "properties": { + "payment": { + "$ref": "#/components/schemas/v1Payment" + }, + "refunds": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1Refund" }, + "title": "Refunds for this payment", "type": "array" } }, "type": "object" }, - "v1ForgotPasswordRequest": { + "v1GetPayoutConfigurationResponse": { "properties": { - "email": { - "type": "string" - }, - "turnstileToken": { - "description": "Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).", - "type": "string" + "configuration": { + "$ref": "#/components/schemas/v1PayoutConfiguration" } }, "type": "object" }, - "v1FunctionCall": { + "v1GetPayoutInvoiceResponse": { "properties": { - "arguments": { - "title": "Function arguments as JSON string", - "type": "string" - }, - "id": { - "title": "Unique ID for this function call", - "type": "string" + "invoices": { + "items": { + "$ref": "#/components/schemas/v1Invoice" + }, + "title": "Client invoices that contributed to this payout", + "type": "array" }, - "name": { - "title": "Function name (e.g., \"list_providers\", \"list_available_regions\")", - "type": "string" + "payoutInvoice": { + "$ref": "#/components/schemas/v1PayoutInvoice" } }, "type": "object" }, - "v1FunctionResult": { + "v1GetPlanLiveValidationResponse": { "properties": { - "content": { - "title": "Result content as JSON string", - "type": "string" - }, - "functionCallId": { - "title": "ID of the function call this result corresponds to", - "type": "string" - }, - "isError": { - "title": "Whether this is an error result", - "type": "boolean" + "validation": { + "$ref": "#/components/schemas/v1PlanLiveValidationView" } }, "type": "object" }, - "v1GameServer": { + "v1GetPlatformResponse": { "properties": { - "allocationAlias": { - "type": "string" - }, - "allocationIp": { - "type": "string" - }, - "allocationLimit": { - "description": "allocation_limit is how many extra ports this plan allows besides the one created with the server. From 1 to 99.", + "platform": { + "$ref": "#/components/schemas/v1Platform" + } + }, + "type": "object" + }, + "v1GetPrefixResponse": { + "properties": { + "prefix": { + "$ref": "#/components/schemas/v1Prefix" + } + }, + "type": "object" + }, + "v1GetPrefixUtilizationResponse": { + "properties": { + "allocatedCount": { "format": "int32", + "title": "Active VM IP allocations", "type": "integer" }, - "allocationPort": { + "availableCount": { "format": "int32", + "title": "total_ips minus allocated_count", "type": "integer" }, - "backupLimit": { - "description": "backup_limit is how many backups this plan allows. From 1 to 99.", + "capacityIsOpenEnded": { + "title": "true when pool size does not fit int64", + "type": "boolean" + }, + "capacityUnitLabel": { + "title": "e.g. \"addresses\", \"/64 blocks\"", + "type": "string" + }, + "reservedCount": { "format": "int32", + "title": "Len(reserved list) only; informational, not added to utilization", "type": "integer" }, - "databaseLimit": { - "description": "database_limit is how many databases this plan allows. From 1 to 99.", + "totalIps": { + "description": "Assignable pool: structurally assignable hosts minus explicit reserved list and one\nin-prefix gateway slot when the gateway is not already listed as reserved. Out-of-prefix\ngateways are ignored.", "format": "int32", "type": "integer" }, - "gameName": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "id": { - "type": "string" - }, - "lastError": { - "type": "string" - }, - "name": { - "type": "string" - }, - "nodeId": { - "type": "string" - }, - "organizationId": { - "type": "string" - }, - "panelIdentifier": { - "type": "string" - }, - "phase": { - "$ref": "#/components/schemas/v1GameServerPhase" - }, - "planBillingType": { - "description": "BILLING_TYPE_SUBSCRIPTION is fixed price. The delete dialog uses this for the no-refund warning.", - "type": "string" - }, - "planCode": { - "type": "string" - }, - "planId": { - "type": "string" - }, - "powerState": { - "type": "string" + "utilizationPercent": { + "format": "double", + "title": "allocated_count / total_ips when total_ips > 0", + "type": "number" }, - "providerName": { + "vmAssignmentPrefixLength": { + "format": "int32", + "title": "IPv6 assignment length when applicable", + "type": "integer" + } + }, + "type": "object" + }, + "v1GetProviderCustomerBillingResponse": { + "description": "Billing KPIs for one client organization of the authenticated provider.\nWhen the provider has a Stripe Connect account, paid/refunded/gross are\nsucceeded direct charges for this customer. Unpaid, cancelled, and\ncollections remain invoice balances. Amounts are decimal strings with 2 places.", + "properties": { + "cancelledAmount": { + "description": "Sum of invoice totals with status void.", "type": "string" }, - "regionCity": { + "collectionsAmount": { + "description": "Sum of invoice totals with status uncollectible.", "type": "string" }, - "regionCountry": { + "currency": { "type": "string" }, - "regionId": { + "grossRevenueAmount": { + "description": "Same as paid_amount (gross; not net of refunds).", "type": "string" }, - "templateId": { + "paidAmount": { + "description": "Succeeded Stripe Connect charges for this customer, or paid invoice totals without Connect.", "type": "string" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "variant": { + "refundedAmount": { + "description": "Stripe refunded amounts on this customer's charges, or succeeded invoice refunds without Connect.", "type": "string" }, - "versionValue": { + "unpaidDueAmount": { + "description": "Sum of amount_due for open and past_due invoices.", "type": "string" } }, "type": "object" }, - "v1GameServerAllocation": { + "v1GetProviderCustomerResponse": { "properties": { - "alias": { - "type": "string" - }, - "id": { + "customer": { + "$ref": "#/components/schemas/v1ProviderCustomerRow" + } + }, + "type": "object" + }, + "v1GetProviderCustomerStatsResponse": { + "properties": { + "activeCustomers": { "format": "int32", "type": "integer" }, - "ip": { - "type": "string" - }, - "isDefault": { - "type": "boolean" - }, - "notes": { - "type": "string" + "inactiveCustomers": { + "format": "int32", + "type": "integer" }, - "port": { + "totalActiveVms": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1GameServerBackup": { + "v1GetProviderOnboardingChecklistResponse": { "properties": { - "bytes": { - "format": "int64", - "type": "string" - }, - "completedAt": { - "type": "string" + "completedCount": { + "format": "int32", + "type": "integer" }, - "isLocked": { - "type": "boolean" + "nextStep": { + "$ref": "#/components/schemas/v1ProviderOnboardingStepCode" }, - "isSuccessful": { + "onboarded": { + "description": "True when the org has completed every step at least once (persisted latch).", "type": "boolean" }, - "name": { + "progressMessage": { + "description": "Short copy for the wizard banner (\"You created a region. Next: create a platform.\").", "type": "string" }, - "uuid": { - "type": "string" - } - }, - "type": "object" - }, - "v1GameServerDatabase": { - "properties": { - "connectionsFrom": { - "type": "string" - }, - "host": { - "type": "string" - }, - "id": { - "type": "string" - }, - "jdbc": { - "type": "string" - }, - "name": { - "type": "string" - }, - "password": { - "type": "string" + "steps": { + "description": "Ordered checklist; empty when onboarded is true.", + "items": { + "$ref": "#/components/schemas/v1ProviderOnboardingStep" + }, + "type": "array" }, - "port": { + "totalCount": { "format": "int32", "type": "integer" - }, - "username": { - "type": "string" - } - }, - "type": "object" - }, - "v1GameServerFile": { - "properties": { - "isFile": { - "type": "boolean" - }, - "mime": { - "type": "string" - }, - "name": { - "type": "string" - }, - "size": { - "format": "int64", - "type": "string" } }, "type": "object" }, - "v1GameServerMatchStatus": { - "default": "GAME_SERVER_MATCH_STATUS_UNSPECIFIED", - "enum": [ - "GAME_SERVER_MATCH_STATUS_UNSPECIFIED", - "GAME_SERVER_MATCH_STATUS_MATCHED", - "GAME_SERVER_MATCH_STATUS_UNMAPPED", - "GAME_SERVER_MATCH_STATUS_AMBIGUOUS" - ], - "type": "string" - }, - "v1GameServerPhase": { - "default": "GAME_SERVER_PHASE_UNSPECIFIED", - "enum": [ - "GAME_SERVER_PHASE_UNSPECIFIED", - "GAME_SERVER_PHASE_PENDING", - "GAME_SERVER_PHASE_READY", - "GAME_SERVER_PHASE_ERROR", - "GAME_SERVER_PHASE_FAILED" - ], - "type": "string" - }, - "v1GameServerResources": { + "v1GetProviderResponse": { "properties": { - "cpuAbsolute": { - "format": "double", - "type": "number" - }, - "diskBytes": { - "format": "int64", - "type": "string" - }, - "memoryBytes": { - "format": "int64", - "type": "string" - }, - "networkRxBytes": { - "format": "int64", - "type": "string" - }, - "networkTxBytes": { - "format": "int64", - "type": "string" - }, - "state": { - "type": "string" - }, - "uptimeMillis": { - "format": "int64", - "type": "string" + "provider": { + "$ref": "#/components/schemas/v1ProviderDetails" } }, "type": "object" }, - "v1GameServerSchedule": { + "v1GetProviderRevenueResponse": { "properties": { - "dayOfMonth": { - "type": "string" - }, - "dayOfWeek": { - "type": "string" - }, - "hour": { - "type": "string" - }, - "id": { - "type": "string" - }, - "isActive": { - "type": "boolean" - }, - "isProcessing": { - "type": "boolean" - }, - "lastRunAt": { - "type": "string" - }, - "minute": { - "type": "string" - }, - "month": { - "type": "string" - }, - "name": { - "type": "string" - }, - "nextRunAt": { - "type": "string" - }, - "onlyWhenOnline": { - "type": "boolean" + "completedPayoutCount": { + "format": "int32", + "title": "Number of completed payouts", + "type": "integer" }, - "tasks": { - "items": { - "$ref": "#/components/schemas/v1GameServerScheduleTask" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1GameServerScheduleTask": { - "properties": { - "action": { + "currency": { + "title": "Currency code (ISO 4217)", "type": "string" }, - "continueOnFailure": { - "type": "boolean" - }, - "id": { + "dataSource": { + "title": "stripe_connect or payout_invoices", "type": "string" }, - "payload": { + "endDate": { + "format": "date-time", + "title": "End date used for calculation", "type": "string" }, - "sequenceId": { + "failedPayoutCount": { "format": "int32", + "title": "Number of failed payouts", "type": "integer" }, - "timeOffset": { + "failedTransactionCount": { "format": "int32", "type": "integer" - } - }, - "type": "object" - }, - "v1GameServerServiceRestoreBackupBody": { - "properties": { - "truncate": { - "description": "Restore only. When true, the panel deletes every file before extracting the backup.", - "type": "boolean" - } - }, - "type": "object" - }, - "v1GameServerTemplate": { - "properties": { - "catalogKey": { - "type": "string" }, - "confirmed": { + "hasMoreTransactions": { "type": "boolean" }, - "dockerImage": { - "type": "string" - }, - "eggId": { + "pendingPayoutCount": { "format": "int32", + "title": "Number of pending/processing payouts", "type": "integer" }, - "hidden": { - "type": "boolean" - }, - "icon": { + "settlementCurrency": { "type": "string" }, - "id": { + "startDate": { + "format": "date-time", + "title": "Start date used for calculation", "type": "string" }, - "matchStatus": { - "$ref": "#/components/schemas/v1GameServerMatchStatus" - }, - "name": { + "stripeWarning": { + "title": "Non-fatal Stripe listing error", "type": "string" }, - "nestId": { + "succeededTransactionCount": { "format": "int32", "type": "integer" }, - "nestOrderingEnabled": { - "description": "Optional so a false value is still sent. Missing means the nest is offered.", - "type": "boolean" - }, - "orderingEnabled": { - "description": "Optional so a false value is still sent. Missing means the egg is offered.", - "type": "boolean" - }, - "platformId": { + "totalNetPayouts": { + "title": "Total net payouts (payout amounts) - decimal string", "type": "string" }, - "startup": { + "totalPlatformFees": { + "title": "Total platform fees deducted - decimal string", "type": "string" }, - "suggestedEggId": { - "format": "int32", - "type": "integer" + "totalRevenue": { + "title": "Total revenue (gross: payout amount + platform fees) - decimal string", + "type": "string" }, - "suggestedNestId": { - "format": "int32", - "type": "integer" + "transactions": { + "items": { + "$ref": "#/components/schemas/v1ProviderStripeTransaction" + }, + "type": "array" }, - "versionVariable": { - "type": "string" + "waterfall": { + "$ref": "#/components/schemas/v1ProviderRevenueWaterfall" } }, "type": "object" }, - "v1GenerateCouponCodesResponse": { + "v1GetProviderTicketNotificationPolicyResponse": { "properties": { - "batch": { - "$ref": "#/components/schemas/v1CouponCodeBatch" - }, - "batchId": { - "type": "string" - }, - "count": { - "description": "Requested count. Large batches are generated in the background; poll\nGetCouponCodeBatch until batch.status is COMPLETED or FAILED.", - "format": "int32", - "type": "integer" + "policy": { + "$ref": "#/components/schemas/v1ProviderTicketNotificationPolicy" } }, "type": "object" }, - "v1GenerateInstallCommandResponse": { + "v1GetPublicStorefrontResponse": { "properties": { - "command": { - "title": "Full curl/bash command that can be executed", - "type": "string" - }, - "token": { - "title": "One-time token used in the command for authentication", - "type": "string" + "storefront": { + "$ref": "#/components/schemas/v1PublicStorefront" } }, "type": "object" }, - "v1GeneratePeeringConfigResponse": { + "v1GetRefundResponse": { "properties": { - "config": { - "type": "string" + "invoice": { + "$ref": "#/components/schemas/v1Invoice" + }, + "payment": { + "$ref": "#/components/schemas/v1Payment" + }, + "refund": { + "$ref": "#/components/schemas/v1Refund" } }, "type": "object" }, - "v1GenerateServiceAccountTokenResponse": { + "v1GetRoadmapFeatureRequestResponse": { "properties": { - "createdAt": { - "format": "date-time", - "type": "string" - }, - "expiresAt": { - "format": "date-time", - "type": "string" - }, - "token": { - "type": "string" - }, - "tokenId": { - "type": "string" - }, - "warning": { - "type": "string" + "request": { + "$ref": "#/components/schemas/v1RoadmapFeatureRequest" } }, "type": "object" }, - "v1GetActiveSessionsResponse": { + "v1GetRoadmapStatsResponse": { "properties": { - "sessions": { + "byProduct": { "items": { - "$ref": "#/components/schemas/v1SessionInfo" + "$ref": "#/components/schemas/v1RoadmapProductStats" }, "type": "array" + }, + "totalRequests": { + "format": "int32", + "type": "integer" + }, + "totalVotes": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetAddonResponse": { + "v1GetSSHKeyResponse": { "properties": { - "addon": { - "$ref": "#/components/schemas/v1Addon" - }, - "addonPrices": { - "items": { - "$ref": "#/components/schemas/v1AddonPrice" - }, - "type": "array" + "sshKey": { + "$ref": "#/components/schemas/v1SSHKey" } }, "type": "object" }, - "v1GetAgentResponse": { + "v1GetSecretResponse": { "properties": { - "agent": { - "$ref": "#/components/schemas/v1Agent" + "secret": { + "$ref": "#/components/schemas/v1Secret" } }, "type": "object" }, - "v1GetAllExchangeRatesResponse": { + "v1GetSmtpOutboundProviderPolicyResponse": { "properties": { - "lastUpdated": { - "format": "int64", - "title": "Timestamp when rates were last updated", - "type": "string" - }, - "rates": { - "additionalProperties": { - "type": "string" - }, - "title": "Map of currency codes to exchange rates (from USD)\nKey: currency code (e.g., \"EUR\", \"GBP\")\nValue: exchange rate as decimal string", - "type": "object" + "policy": { + "$ref": "#/components/schemas/v1SmtpOutboundProviderPolicy" } }, "type": "object" }, - "v1GetBackupResponse": { + "v1GetSnapshotResponse": { "properties": { - "backup": { - "$ref": "#/components/schemas/v1Backup" + "snapshot": { + "$ref": "#/components/schemas/v1Snapshot" } }, "type": "object" }, - "v1GetClientDashboardBillingResponse": { + "v1GetStartupResponse": { "properties": { - "currency": { + "dockerImage": { "type": "string" }, - "spendDays": { - "description": "Daily categorized spend, oldest first (fixed window ending today, UTC).", + "dockerImages": { "items": { - "$ref": "#/components/schemas/v1ClientDashboardSpendBucket" + "$ref": "#/components/schemas/v1DockerImageChoice" }, "type": "array" }, - "spendHours": { - "description": "Hourly categorized spend for the last 24 hours, oldest first.", - "items": { - "$ref": "#/components/schemas/v1ClientDashboardSpendBucket" - }, - "type": "array" + "rawStartupCommand": { + "type": "string" }, - "usageRollups": { + "startupCommand": { + "type": "string" + }, + "variables": { "items": { - "$ref": "#/components/schemas/v1ClientDashboardUsageRollup" + "$ref": "#/components/schemas/v1StartupVariable" }, "type": "array" } }, "type": "object" }, - "v1GetClientDashboardSummaryResponse": { - "description": "Client dashboard (buyer org): single read for Summary tab widgets.", + "v1GetSubscriptionCouponResponse": { "properties": { - "spendingWindows": { + "coupon": { + "$ref": "#/components/schemas/v1SubscriptionCoupon" + } + }, + "type": "object" + }, + "v1GetSubscriptionStatusResponse": { + "properties": { + "rules": { "items": { - "$ref": "#/components/schemas/v1ClientDashboardSpendingWindow" + "$ref": "#/components/schemas/v1Rules" }, "type": "array" - }, - "virtualMachines": { - "$ref": "#/components/schemas/v1ClientDashboardVirtualMachinesSummary" } }, "type": "object" }, - "v1GetClientReviewForVirtualMachineResponse": { + "v1GetTicketResponse": { "properties": { - "canSubmitReview": { - "type": "boolean" - }, - "hasSubmitted": { - "type": "boolean" + "organizationDetails": { + "additionalProperties": { + "$ref": "#/components/schemas/v1OrganizationDetails" + }, + "title": "Map of organization ID to organization name", + "type": "object" }, - "review": { - "$ref": "#/components/schemas/v1ClientProviderReview" + "thread": { + "items": { + "$ref": "#/components/schemas/v1TicketMessage" + }, + "title": "All messages in chronological order (original + replies)", + "type": "array" }, - "reviewAvailableAt": { - "format": "date-time", - "type": "string" + "ticket": { + "$ref": "#/components/schemas/v1Ticket" }, - "reviewBlockedReason": { - "description": "Set when can_submit_review is false and has_submitted is false (e.g. usage-based 24h window).", - "type": "string" + "userDetails": { + "additionalProperties": { + "$ref": "#/components/schemas/v1UserDetails" + }, + "title": "Map of user ID to user details (first_name, last_name)", + "type": "object" } }, "type": "object" }, - "v1GetCloudInitTemplateResponse": { + "v1GetUsageRecordResponse": { "properties": { - "cloudInitTemplate": { - "$ref": "#/components/schemas/v1CloudInitTemplate" + "usageRecord": { + "$ref": "#/components/schemas/v1UsageRecord" } }, "type": "object" }, - "v1GetConnectAccountResponse": { + "v1GetUsageReportResponse": { "properties": { - "account": { - "$ref": "#/components/schemas/v1ConnectAccount" + "aggregates": { + "items": { + "$ref": "#/components/schemas/v1UsageAggregate" + }, + "type": "array" }, - "onboardingUrl": { - "title": "URL for provider to complete setup (if required)", + "billingPeriodEnd": { + "format": "date-time", "type": "string" }, - "requiresOnboarding": { - "title": "Whether provider needs to complete onboarding", - "type": "boolean" + "billingPeriodStart": { + "format": "date-time", + "type": "string" + }, + "totalRecords": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetConnectTaxSettingsResponse": { + "v1GetUserResponse": { "properties": { - "settings": { - "$ref": "#/components/schemas/v1ConnectTaxSettingsDetails" + "user": { + "$ref": "#/components/schemas/v1User" } }, "type": "object" }, - "v1GetContactSchemaResponse": { + "v1GetVMTemplateResponse": { "properties": { - "countries": { - "items": { - "$ref": "#/components/schemas/v1CountryContactRules" - }, - "type": "array" - }, - "fields": { - "description": "Base contact fields.", - "items": { - "$ref": "#/components/schemas/v1ContactFieldSpec" - }, - "type": "array" - }, - "tldRequirements": { - "items": { - "$ref": "#/components/schemas/v1ContactRequirements" - }, - "type": "array" - }, - "version": { - "description": "Rule-set version (DomainContact.validation_version).", - "format": "int32", - "type": "integer" + "vmTemplate": { + "$ref": "#/components/schemas/v1VMTemplate" } }, "type": "object" }, - "v1GetConversationHistoryResponse": { + "v1GetVNCConsoleResponse": { "properties": { - "conversationId": { - "title": "Conversation ID", + "password": { + "title": "RFB password for noVNC credentials", "type": "string" }, - "messages": { - "items": { - "$ref": "#/components/schemas/v1ChatMessage" - }, - "title": "List of messages in the conversation", - "type": "array" + "sessionId": { + "title": "Session ID for the console connection", + "type": "string" }, - "title": { - "title": "Conversation title", + "token": { + "title": "Signed session token; frontend sends this on WS connect", + "type": "string" + }, + "websocketUrl": { + "title": "WebSocket URL for console connection (e.g., \"ws://backend/api/v1/virtual-machines/{vm_id}/console/ws\")", "type": "string" } }, "type": "object" }, - "v1GetCouponReportResponse": { + "v1Group": { "properties": { - "consumed": { + "description": { "type": "string" }, - "couponId": { - "type": "string" + "groupRoles": { + "items": { + "type": "string" + }, + "title": "Relations", + "type": "array" }, - "expired": { + "id": { + "title": "Fields", "type": "string" }, - "generatedAt": { - "format": "date-time", - "type": "string" + "metadata": { + "title": "Metadata", + "type": "object" }, - "granted": { - "description": "Set for credit coupons. Decimal USD strings.", + "name": { "type": "string" }, - "outstanding": { - "type": "string" + "status": { + "$ref": "#/components/schemas/protov1Status" }, - "rows": { - "description": "One row per group and currency. Currencies are never converted or summed.", + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "userEmails": { "items": { - "$ref": "#/components/schemas/v1CouponReportRow" + "type": "string" }, "type": "array" } }, "type": "object" }, - "v1GetCreditBalanceResponse": { + "v1HandleWebhookResponse": { "properties": { - "available": { - "title": "Decimal string: balance - reserved", - "type": "string" - }, - "balance": { - "title": "Decimal string: settled wallet balance in USD", + "eventId": { + "title": "Webhook event ID (for idempotency tracking)", "type": "string" }, - "currency": { - "title": "Always \"USD\" in v1", + "message": { + "title": "Optional message", "type": "string" }, - "frozen": { + "success": { + "title": "Success indicator", "type": "boolean" - }, - "frozenReason": { - "title": "Empty when not frozen", - "type": "string" - }, - "promotionalAvailable": { - "description": "Unreserved promotional credit that can be applied to the next invoice.", - "type": "string" - }, - "promotionalExpiringSoon": { - "description": "Promotional credit that expires within 7 days.", - "type": "string" - }, - "reserved": { - "title": "Decimal string: sum of open holds", - "type": "string" } }, "type": "object" }, - "v1GetDashboardAssetSalesTimeseriesResponse": { + "v1HealthCheckResponse": { "properties": { - "assetsSoldPerDay": { - "items": { - "$ref": "#/components/schemas/v1DashboardAssetSalesDayBucket" - }, - "type": "array" + "status": { + "$ref": "#/components/schemas/v1ServingStatus" } }, "type": "object" }, - "v1GetDashboardBillingSalesResponse": { + "v1HeldPayout": { + "description": "A paid client invoice whose provider payout is waiting on a hold.", "properties": { - "commercialHealth": { - "$ref": "#/components/schemas/v1DashboardBillingCommercialHealth" - }, "currency": { "type": "string" }, - "days": { - "items": { - "$ref": "#/components/schemas/v1DashboardBillingSalesDayBucket" - }, - "type": "array" - }, - "revenueByCustomer": { - "items": { - "$ref": "#/components/schemas/v1DashboardBillingCustomerRevenue" - }, - "type": "array" + "heldUntil": { + "description": "Unset for dispute holds.", + "format": "date-time", + "type": "string" }, - "revenueByCustomerTotalCount": { - "description": "Rows matching email filter (for pagination).", - "format": "int32", - "type": "integer" + "invoiceId": { + "type": "string" }, - "revenueByCustomerWindowTotal": { - "description": "Distinct customer orgs with revenue in the window (before email filter).", - "format": "int32", - "type": "integer" + "invoiceNumber": { + "type": "string" }, - "totalFixedBillingSalesAmount": { - "description": "Fixed = subscription + free plan lines + all add-ons; usage = usage-rated plan lines only.", + "paidAt": { + "format": "date-time", "type": "string" }, - "totalUsageBillingSalesAmount": { + "providerRevenue": { + "description": "This provider's revenue on the invoice, as a decimal string.", "type": "string" + }, + "reason": { + "$ref": "#/components/schemas/v1PayoutHoldReason" } }, "type": "object" }, - "v1GetDashboardCustomerAcquisitionTimeseriesResponse": { - "properties": { - "buckets": { - "items": { - "$ref": "#/components/schemas/v1DashboardCustomerAcquisitionDayBucket" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1GetDashboardSummaryResponse": { + "v1HighRiskCoupon": { + "description": "A high-risk coupon as seen by platform admins.", "properties": { - "activeCustomerTotal": { - "format": "int32", - "type": "integer" + "coupon": { + "$ref": "#/components/schemas/v1Coupon" }, - "activeVmTotal": { - "format": "int32", - "type": "integer" + "lastRedeemedAt": { + "format": "date-time", + "type": "string" }, - "addonBreakdown": { - "items": { - "$ref": "#/components/schemas/v1DashboardSummaryAddonBreakdown" - }, - "type": "array" + "providerOrganizationId": { + "type": "string" }, - "byRegion": { - "items": { - "$ref": "#/components/schemas/v1DashboardSummaryRegionBreakdown" - }, - "type": "array" + "providerOrganizationName": { + "type": "string" }, - "nodeTotal": { + "redemptionsLast7Days": { + "description": "Applications in the last 7 days, excluding reversed ones.", "format": "int32", "type": "integer" - }, - "planBreakdown": { - "items": { - "$ref": "#/components/schemas/v1DashboardSummaryPlanBreakdown" - }, - "type": "array" - }, - "tickets": { - "$ref": "#/components/schemas/v1DashboardSummaryTickets" - } - }, - "type": "object" - }, - "v1GetDnsZoneResponse": { - "properties": { - "zone": { - "$ref": "#/components/schemas/v1DnsZone" } }, "type": "object" }, - "v1GetDomainAuthCodeResponse": { + "v1HookScript": { + "description": "HookScript is a provider-owned Python script run after a VM lifecycle event.", "properties": { - "authCode": { - "description": "Sensitive: show once, never log.", + "enabled": { + "type": "boolean" + }, + "hook": { + "$ref": "#/components/schemas/v1LifecycleHook" + }, + "id": { "type": "string" }, - "expiresAt": { - "format": "date-time", + "organizationId": { "type": "string" + }, + "script": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "subject": { + "$ref": "#/components/schemas/v1HookSubject" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" } }, "type": "object" }, - "v1GetDomainResponse": { - "properties": { - "domain": { - "$ref": "#/components/schemas/v1Domain" - } - }, - "type": "object" - }, - "v1GetEnvironmentVariableResponse": { - "properties": { - "environmentVariable": { - "$ref": "#/components/schemas/v1EnvironmentVariable" - } - }, - "type": "object" + "v1HookSubject": { + "default": "HOOK_SUBJECT_UNSPECIFIED", + "description": "LifecycleHook is the VM operation that triggers a provider hook script.", + "enum": [ + "HOOK_SUBJECT_UNSPECIFIED", + "HOOK_SUBJECT_VM", + "HOOK_SUBJECT_GAMESERVER" + ], + "type": "string" }, - "v1GetExchangeRateResponse": { + "v1IPAllocation": { "properties": { - "currencyCode": { - "title": "Currency code", + "allocatedCidr": { + "title": "Allocated CIDR (host or delegated block)", "type": "string" }, - "exchangeRate": { - "title": "Exchange rate from USD to the requested currency", + "allocationKind": { + "title": "ipv4_host, ipv6_host, ipv6_prefix", "type": "string" }, - "lastUpdated": { - "format": "int64", - "title": "Timestamp when the rate was last updated", + "id": { + "title": "Fields", "type": "string" - } - }, - "type": "object" - }, - "v1GetGroupResponse": { - "properties": { - "group": { - "$ref": "#/components/schemas/v1Group" - } - }, - "type": "object" - }, - "v1GetInvoiceResponse": { - "properties": { - "invoice": { - "$ref": "#/components/schemas/v1Invoice" }, - "invoiceLines": { - "items": { - "$ref": "#/components/schemas/v1InvoiceLine" - }, - "type": "array" + "ipAddress": { + "title": "IP address allocated (e.g., 10.0.0.5, 2001:db8::1)", + "type": "string" + }, + "organizationId": { + "title": "Organization that owns this allocation", + "type": "string" + }, + "prefixId": { + "description": "Prefix this IP allocation is from", + "title": "Relations", + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/v1IPAllocationStatus" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "virtualMachineId": { + "title": "Virtual machine this IP is allocated to", + "type": "string" } }, "type": "object" }, - "v1GetManualPayoutResponse": { - "properties": { - "payout": { - "$ref": "#/components/schemas/v1ManualPayout" - } - }, - "type": "object" + "v1IPAllocationStatus": { + "default": "IP_ALLOCATION_STATUS_UNSPECIFIED", + "enum": [ + "IP_ALLOCATION_STATUS_UNSPECIFIED", + "IP_ALLOCATION_STATUS_ACTIVE", + "IP_ALLOCATION_STATUS_RELEASED" + ], + "type": "string" }, - "v1GetMarketplacePlanResponse": { - "description": "Resolved marketplace offer for VM create prefill (authenticated clients).", + "v1ImportGameServerTemplateRequest": { "properties": { - "billingType": { - "$ref": "#/components/schemas/v1BillingType" + "dockerImage": { + "type": "string" }, - "diskGb": { + "eggId": { "format": "int32", "type": "integer" }, - "organizationId": { + "icon": { "type": "string" }, - "organizationName": { + "name": { "type": "string" }, - "planCode": { - "type": "string" + "nestId": { + "format": "int32", + "type": "integer" }, - "planId": { + "platformId": { "type": "string" }, - "planPrices": { - "items": { - "$ref": "#/components/schemas/v1PlanPrice" - }, - "type": "array" - }, - "planRegions": { + "startup": { + "type": "string" + } + }, + "type": "object" + }, + "v1InboundPeeringState": { + "default": "INBOUND_PEERING_STATE_UNSPECIFIED", + "enum": [ + "INBOUND_PEERING_STATE_UNSPECIFIED", + "INBOUND_PEERING_STATE_PENDING", + "INBOUND_PEERING_STATE_PEERING", + "INBOUND_PEERING_STATE_READY", + "INBOUND_PEERING_STATE_FAILED" + ], + "type": "string" + }, + "v1InstantApp": { + "description": "InstantApp is a platform-owned curated app install (Jinja user_data bound to a Distro).\nuser_data is returned on Get for catalog preview; List omits it to keep responses small.\nCreate/reinstall always load user_data server-side from storage.", + "properties": { + "categories": { "items": { - "$ref": "#/components/schemas/v1PlanRegion" + "type": "string" }, + "readOnly": true, "type": "array" }, - "providerLogoUrl": { + "description": { + "readOnly": true, "type": "string" }, - "ramGb": { - "format": "int32", - "type": "integer" + "distro": { + "$ref": "#/components/schemas/v1Distro" }, - "rating": { - "format": "float", - "type": "number" + "documentationUrl": { + "readOnly": true, + "type": "string" }, - "regionCity": { + "family": { + "readOnly": true, "type": "string" }, - "regionCountry": { + "iconUrl": { + "readOnly": true, "type": "string" }, - "regionId": { + "id": { + "readOnly": true, "type": "string" }, - "totalReviews": { + "metadata": { + "description": "Includes ports, credentials_path, estimated_ready_minutes, and optional variables[]\n(Instant App form schema: name/label/type/required/default/\u2026).", + "readOnly": true, + "type": "object" + }, + "minDiskGb": { "format": "int32", + "readOnly": true, "type": "integer" }, - "vcpus": { + "minRamGb": { "format": "int32", + "readOnly": true, "type": "integer" - } - }, - "type": "object" - }, - "v1GetMetricResponse": { - "properties": { - "metric": { - "$ref": "#/components/schemas/v1Metric" - } - }, - "type": "object" - }, - "v1GetMfaStatusResponse": { - "properties": { - "backupCodesRemaining": { + }, + "minVcpus": { + "description": "Recommended minimums (plan specifications units); not enforced at create.", "format": "int32", + "readOnly": true, "type": "integer" }, - "enabled": { - "type": "boolean" + "name": { + "readOnly": true, + "type": "string" }, - "factorLabel": { + "slug": { + "readOnly": true, + "type": "string" + }, + "sortOrder": { + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "userData": { + "description": "Jinja cloud-init user_data template. Present on Get; omitted on List.", + "readOnly": true, + "type": "string" + }, + "version": { + "readOnly": true, "type": "string" } }, "type": "object" }, - "v1GetMyStorefrontResponse": { - "properties": { - "storefront": { - "$ref": "#/components/schemas/v1MyStorefront" - } - }, - "type": "object" - }, - "v1GetNetworkResponse": { - "properties": { - "network": { - "$ref": "#/components/schemas/v1Network" - } - }, - "type": "object" - }, - "v1GetNodeCPUMapResponse": { + "v1Invite": { "properties": { - "computeType": { - "$ref": "#/components/schemas/v1NodeComputeType" + "expiresAt": { + "format": "date-time", + "type": "string" }, - "cpus": { - "items": { - "$ref": "#/components/schemas/v1NodeCPUMapCPU" - }, - "type": "array" + "group": { + "type": "string" }, - "logicalCpus": { - "format": "int32", - "type": "integer" + "id": { + "title": "Fields", + "type": "string" }, - "modelName": { + "inviteStatus": { + "$ref": "#/components/schemas/v1InviteStatus" + }, + "inviteeEmail": { "type": "string" }, - "numaNodes": { - "items": { - "$ref": "#/components/schemas/v1NodeCPUMapNUMA" - }, - "type": "array" + "inviter": { + "title": "Relations", + "type": "string" }, - "physicalCores": { - "format": "int32", - "type": "integer" + "inviterEmail": { + "title": "Display fields", + "type": "string" }, - "smtEnabled": { - "type": "boolean" + "joinedTime": { + "format": "date-time", + "type": "string" }, - "sockets": { - "format": "int32", - "type": "integer" + "metadata": { + "title": "Metadata", + "type": "object" }, - "threadsPerCore": { - "format": "int32", - "type": "integer" + "organization": { + "type": "string" }, - "topologyCollectedAt": { - "description": "RFC3339 time the stored topology was collected/pasted.", + "organizationName": { "type": "string" + }, + "role": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" } }, "type": "object" }, - "v1GetNodeNetworkResponse": { - "properties": { - "network": { - "$ref": "#/components/schemas/v1Network" - } - }, - "type": "object" - }, - "v1GetNodePlacementPolicyResponse": { + "v1InviteStatus": { + "default": "INVITE_STATUS_UNSPECIFIED", + "enum": [ + "INVITE_STATUS_UNSPECIFIED", + "INVITE_STATUS_SENT", + "INVITE_STATUS_ACCEPTED", + "INVITE_STATUS_DECLINED", + "INVITE_STATUS_EXPIRED" + ], + "type": "string" + }, + "v1Invoice": { "properties": { - "policy": { - "$ref": "#/components/schemas/v1NodePlacementPolicy" + "amountDue": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": "string" + }, + "currency": { + "type": "string" + }, + "customer": { + "$ref": "#/components/schemas/v1InvoiceParty" + }, + "dueDate": { + "format": "date-time", + "type": "string" + }, + "id": { + "type": "string" + }, + "invoiceNumber": { + "type": "string" + }, + "issuer": { + "$ref": "#/components/schemas/v1InvoiceParty" + }, + "metadata": { + "title": "Optional: custom metadata (platform fee info for providers, etc.)", + "type": "object" + }, + "paidAt": { + "format": "date-time", + "type": "string" + }, + "periodEnd": { + "format": "date-time", + "type": "string" + }, + "periodStart": { + "format": "date-time", + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/v1InvoiceStatus" + }, + "subscriptionId": { + "title": "Deprecated: Use subscription_ids instead. Kept", + "type": "string" + }, + "subscriptionIds": { + "description": "for backward compatibility.\n\nSubscriptions aggregated into this invoice (many-to-many)", + "items": { + "type": "string" + }, + "type": "array" + }, + "subtotal": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" + }, + "taxAmount": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" + }, + "total": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" + }, + "transactionId": { + "type": "string" } }, "type": "object" }, - "v1GetNodeResponse": { + "v1InvoiceLine": { "properties": { - "node": { - "$ref": "#/components/schemas/v1Node" + "amount": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" + }, + "description": { + "title": "(direct link for better tracking)", + "type": "string" + }, + "id": { + "type": "string" + }, + "invoiceId": { + "type": "string" + }, + "quantity": { + "title": "Decimal as string", + "type": "string" + }, + "subscriptionId": { + "title": "Subscription this invoice line is for", + "type": "string" + }, + "unitAmount": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" } }, "type": "object" }, - "v1GetNotificationSettingResponse": { + "v1InvoiceParty": { + "description": "InvoiceParty is a billing party (seller/issuer or buyer/customer) shown on an\ninvoice. Provider/customer identity is snapshotted at invoice generation; the\nplatform issuer is resolved from server config.", "properties": { - "notificationSetting": { - "$ref": "#/components/schemas/v1NotificationSetting" + "address": { + "title": "Single-line address fallback", + "type": "string" + }, + "addressLine1": { + "type": "string" + }, + "addressLine2": { + "type": "string" + }, + "city": { + "type": "string" + }, + "country": { + "title": "ISO 3166-1 alpha-2", + "type": "string" + }, + "email": { + "type": "string" + }, + "isPlatform": { + "title": "True when the party is the platform itself", + "type": "boolean" + }, + "legalName": { + "title": "Registered legal entity name, when different from name", + "type": "string" + }, + "name": { + "title": "Display/trading name", + "type": "string" + }, + "phone": { + "type": "string" + }, + "postalCode": { + "type": "string" + }, + "region": { + "type": "string" + }, + "taxId": { + "type": "string" + }, + "vatId": { + "type": "string" + }, + "website": { + "type": "string" } }, "type": "object" }, - "v1GetNotificationTemplateResponse": { + "v1InvoiceStatus": { + "default": "INVOICE_STATUS_UNSPECIFIED", + "enum": [ + "INVOICE_STATUS_UNSPECIFIED", + "INVOICE_STATUS_DRAFT", + "INVOICE_STATUS_OPEN", + "INVOICE_STATUS_PAID", + "INVOICE_STATUS_PAST_DUE", + "INVOICE_STATUS_VOID", + "INVOICE_STATUS_UNCOLLECTIBLE" + ], + "title": "Invoice messages", + "type": "string" + }, + "v1LastRestore": { "properties": { - "notificationTemplate": { - "$ref": "#/components/schemas/v1NotificationTemplate" + "restoredAt": { + "format": "date-time", + "readOnly": true, + "type": "string" + }, + "restoredBy": { + "readOnly": true, + "type": "string" + }, + "snapshotName": { + "readOnly": true, + "type": "string" } }, + "title": "LastRestore represents the last restore operation for a snapshot", "type": "object" }, - "v1GetOrganizationResponse": { + "v1LifecycleHook": { + "default": "LIFECYCLE_HOOK_UNSPECIFIED", + "enum": [ + "LIFECYCLE_HOOK_UNSPECIFIED", + "LIFECYCLE_HOOK_CREATED", + "LIFECYCLE_HOOK_STARTED", + "LIFECYCLE_HOOK_STOPPED", + "LIFECYCLE_HOOK_DELETED", + "LIFECYCLE_HOOK_RESTARTED", + "LIFECYCLE_HOOK_REINSTALLED" + ], + "type": "string" + }, + "v1LinkedIdentity": { "properties": { - "organization": { - "$ref": "#/components/schemas/v1Organization" + "createTime": { + "format": "date-time", + "type": "string" + }, + "email": { + "type": "string" + }, + "provider": { + "type": "string" } }, "type": "object" }, - "v1GetPaymentResponse": { + "v1ListAddonSubscriptionsResponse": { "properties": { - "payment": { - "$ref": "#/components/schemas/v1Payment" - }, - "refunds": { + "addonSubscriptions": { "items": { - "$ref": "#/components/schemas/v1Refund" + "$ref": "#/components/schemas/v1AddonSubscription" }, - "title": "Refunds for this payment", "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetPayoutConfigurationResponse": { + "v1ListAddonsResponse": { "properties": { - "configuration": { - "$ref": "#/components/schemas/v1PayoutConfiguration" + "addons": { + "items": { + "$ref": "#/components/schemas/v1Addon" + }, + "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetPayoutInvoiceResponse": { + "v1ListAgentsResponse": { "properties": { - "invoices": { + "agents": { "items": { - "$ref": "#/components/schemas/v1Invoice" + "$ref": "#/components/schemas/v1GetAgentResponse" }, - "title": "Client invoices that contributed to this payout", "type": "array" }, - "payoutInvoice": { - "$ref": "#/components/schemas/v1PayoutInvoice" + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetPlanLiveValidationResponse": { + "v1ListAllocationsResponse": { "properties": { - "validation": { - "$ref": "#/components/schemas/v1PlanLiveValidationView" + "allocations": { + "items": { + "$ref": "#/components/schemas/v1IPAllocation" + }, + "type": "array" + }, + "total": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetPlatformResponse": { + "v1ListAssignableNodesForPlanResponse": { "properties": { - "platform": { - "$ref": "#/components/schemas/v1Platform" + "nodes": { + "items": { + "$ref": "#/components/schemas/v1AssignableNodeView" + }, + "type": "array" } }, "type": "object" }, - "v1GetPrefixResponse": { + "v1ListAvailableAddonsResponse": { "properties": { - "prefix": { - "$ref": "#/components/schemas/v1Prefix" + "addons": { + "items": { + "$ref": "#/components/schemas/v1Addon" + }, + "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetPrefixUtilizationResponse": { + "v1ListAvailableIPsResponse": { "properties": { "allocatedCount": { "format": "int32", - "title": "Active VM IP allocations", + "title": "Number of allocated IPs", "type": "integer" }, "availableCount": { "format": "int32", - "title": "total_ips minus allocated_count", + "title": "Number of available IPs", "type": "integer" }, - "capacityIsOpenEnded": { - "title": "true when pool size does not fit int64", - "type": "boolean" - }, - "capacityUnitLabel": { - "title": "e.g. \"addresses\", \"/64 blocks\"", - "type": "string" + "availableIps": { + "items": { + "type": "string" + }, + "title": "List of available IP addresses", + "type": "array" }, "reservedCount": { "format": "int32", - "title": "Len(reserved list) only; informational, not added to utilization", + "title": "Number of reserved IPs", "type": "integer" }, "totalIps": { - "description": "Assignable pool: structurally assignable hosts minus explicit reserved list and one\nin-prefix gateway slot when the gateway is not already listed as reserved. Out-of-prefix\ngateways are ignored.", "format": "int32", + "title": "Total IPs in prefix", "type": "integer" + } + }, + "type": "object" + }, + "v1ListAvailablePlansResponse": { + "properties": { + "plans": { + "items": { + "$ref": "#/components/schemas/v1AvailablePlanCode" + }, + "title": "List of unique plan codes with their details", + "type": "array" }, - "utilizationPercent": { - "format": "double", - "title": "allocated_count / total_ips when total_ips > 0", - "type": "number" - }, - "vmAssignmentPrefixLength": { + "totalCount": { "format": "int32", - "title": "IPv6 assignment length when applicable", + "title": "Total number of unique plan codes", "type": "integer" } }, "type": "object" }, - "v1GetProviderCustomerBillingResponse": { - "description": "Billing KPIs for one client organization of the authenticated provider.\nWhen the provider has a Stripe Connect account, paid/refunded/gross are\nsucceeded direct charges for this customer. Unpaid, cancelled, and\ncollections remain invoice balances. Amounts are decimal strings with 2 places.", + "v1ListAvailableRegionsResponse": { "properties": { - "cancelledAmount": { - "description": "Sum of invoice totals with status void.", - "type": "string" - }, - "collectionsAmount": { - "description": "Sum of invoice totals with status uncollectible.", - "type": "string" - }, - "currency": { - "type": "string" - }, - "grossRevenueAmount": { - "description": "Same as paid_amount (gross; not net of refunds).", - "type": "string" - }, - "paidAmount": { - "description": "Succeeded Stripe Connect charges for this customer, or paid invoice totals without Connect.", - "type": "string" - }, - "refundedAmount": { - "description": "Stripe refunded amounts on this customer's charges, or succeeded invoice refunds without Connect.", - "type": "string" + "regions": { + "items": { + "$ref": "#/components/schemas/v1RegionLocation" + }, + "title": "List of unique city+country combinations", + "type": "array" }, - "unpaidDueAmount": { - "description": "Sum of amount_due for open and past_due invoices.", - "type": "string" + "totalCount": { + "format": "int32", + "title": "Total number of unique regions", + "type": "integer" } }, "type": "object" }, - "v1GetProviderCustomerResponse": { + "v1ListBackupsResponse": { "properties": { - "customer": { - "$ref": "#/components/schemas/v1ProviderCustomerRow" + "backups": { + "items": { + "$ref": "#/components/schemas/v1Backup" + }, + "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetProviderCustomerStatsResponse": { + "v1ListClientProviderReviewAssetsResponse": { "properties": { - "activeCustomers": { - "format": "int32", - "type": "integer" + "assets": { + "items": { + "$ref": "#/components/schemas/v1ClientProviderReviewAssetItem" + }, + "type": "array" }, - "inactiveCustomers": { + "reviewedAssetCount": { + "description": "Submitted reviews across all assets (not just this page).", "format": "int32", "type": "integer" }, - "totalActiveVms": { + "totalCount": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1GetProviderOnboardingChecklistResponse": { + "v1ListCloudInitTemplatesResponse": { "properties": { - "completedCount": { + "cloudInitTemplates": { + "items": { + "$ref": "#/components/schemas/v1CloudInitTemplate" + }, + "type": "array" + }, + "totalCount": { "format": "int32", "type": "integer" - }, - "nextStep": { - "$ref": "#/components/schemas/v1ProviderOnboardingStepCode" - }, - "onboarded": { - "description": "True when the org has completed every step at least once (persisted latch).", - "type": "boolean" - }, - "progressMessage": { - "description": "Short copy for the wizard banner (\"You created a region. Next: create a platform.\").", - "type": "string" - }, - "steps": { - "description": "Ordered checklist; empty when onboarded is true.", + } + }, + "type": "object" + }, + "v1ListCloudInitUserDataResponse": { + "properties": { + "profiles": { "items": { - "$ref": "#/components/schemas/v1ProviderOnboardingStep" + "$ref": "#/components/schemas/v1CloudInitUserData" }, "type": "array" }, @@ -9701,1033 +8765,945 @@ }, "type": "object" }, - "v1GetProviderResponse": { + "v1ListConnectTaxRegistrationsResponse": { "properties": { - "provider": { - "$ref": "#/components/schemas/v1ProviderDetails" + "registrations": { + "items": { + "$ref": "#/components/schemas/v1ConnectTaxRegistration" + }, + "type": "array" } }, "type": "object" }, - "v1GetProviderRevenueResponse": { + "v1ListConversationsResponse": { "properties": { - "completedPayoutCount": { - "format": "int32", - "title": "Number of completed payouts", - "type": "integer" - }, - "currency": { - "title": "Currency code (ISO 4217)", - "type": "string" - }, - "dataSource": { - "title": "stripe_connect or payout_invoices", - "type": "string" - }, - "endDate": { - "format": "date-time", - "title": "End date used for calculation", - "type": "string" + "conversations": { + "items": { + "$ref": "#/components/schemas/v1ConversationInfo" + }, + "title": "List of conversations with IDs and titles", + "type": "array" }, - "failedPayoutCount": { + "totalCount": { "format": "int32", - "title": "Number of failed payouts", + "title": "Total number of conversations", "type": "integer" + } + }, + "type": "object" + }, + "v1ListCountriesCitiesResponse": { + "properties": { + "countries": { + "items": { + "$ref": "#/components/schemas/v1Country" + }, + "type": "array" }, - "failedTransactionCount": { + "totalCount": { "format": "int32", "type": "integer" + } + }, + "type": "object" + }, + "v1ListCouponCodeBatchesResponse": { + "properties": { + "batches": { + "items": { + "$ref": "#/components/schemas/v1CouponCodeBatch" + }, + "type": "array" }, - "hasMoreTransactions": { - "type": "boolean" - }, - "pendingPayoutCount": { - "format": "int32", - "title": "Number of pending/processing payouts", - "type": "integer" - }, - "settlementCurrency": { - "type": "string" + "page": { + "format": "int32", + "type": "integer" }, - "startDate": { - "format": "date-time", - "title": "Start date used for calculation", - "type": "string" + "pageSize": { + "format": "int32", + "type": "integer" }, - "stripeWarning": { - "title": "Non-fatal Stripe listing error", - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListCouponCodesResponse": { + "properties": { + "codes": { + "items": { + "$ref": "#/components/schemas/v1CouponCode" + }, + "type": "array" }, - "succeededTransactionCount": { + "page": { "format": "int32", "type": "integer" }, - "totalNetPayouts": { - "title": "Total net payouts (payout amounts) - decimal string", - "type": "string" + "pageSize": { + "format": "int32", + "type": "integer" }, - "totalPlatformFees": { - "title": "Total platform fees deducted - decimal string", - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListCouponRedemptionsResponse": { + "properties": { + "page": { + "format": "int32", + "type": "integer" }, - "totalRevenue": { - "title": "Total revenue (gross: payout amount + platform fees) - decimal string", - "type": "string" + "pageSize": { + "format": "int32", + "type": "integer" }, - "transactions": { + "redemptions": { "items": { - "$ref": "#/components/schemas/v1ProviderStripeTransaction" + "$ref": "#/components/schemas/v1CouponRedemption" }, "type": "array" }, - "waterfall": { - "$ref": "#/components/schemas/v1ProviderRevenueWaterfall" + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetProviderTicketNotificationPolicyResponse": { + "v1ListCouponsResponse": { "properties": { - "policy": { - "$ref": "#/components/schemas/v1ProviderTicketNotificationPolicy" + "coupons": { + "items": { + "$ref": "#/components/schemas/v1Coupon" + }, + "type": "array" + }, + "page": { + "format": "int32", + "type": "integer" + }, + "pageSize": { + "format": "int32", + "type": "integer" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetPublicPlatformStatsResponse": { + "v1ListCreditLedgerEntriesResponse": { "properties": { - "collectedAt": { - "description": "When these counters were read from the database.", - "format": "date-time", - "type": "string" + "entries": { + "items": { + "$ref": "#/components/schemas/v1CreditLedgerEntryProto" + }, + "type": "array" + }, + "page": { + "format": "int32", + "type": "integer" }, - "computeInstances": { - "$ref": "#/components/schemas/v1PublicProductCount" + "pageSize": { + "format": "int32", + "type": "integer" }, - "dnsRecords": { - "description": "Records in live zones, read from PowerDNS. SOA, apex NS and DNSSEC material are not counted.", + "totalCount": { "format": "int32", "type": "integer" + } + }, + "type": "object" + }, + "v1ListDashboardAddonCatalogStatsResponse": { + "properties": { + "addonCatalog": { + "items": { + "$ref": "#/components/schemas/v1ProviderDashboardAddonCatalogRow" + }, + "type": "array" }, - "dnsRecordsAvailable": { - "description": "False when PowerDNS could not be read; dns_records is then 0.", - "type": "boolean" + "addonCatalogFilteredTotal": { + "format": "int32", + "type": "integer" }, - "dnsZones": { - "$ref": "#/components/schemas/v1PublicProductCount" + "kpiActiveAddonSubscriptionsSum": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListDashboardInfrastructureResponse": { + "properties": { + "byNode": { + "items": { + "$ref": "#/components/schemas/v1ProviderDashboardNodeRollup" + }, + "type": "array" }, - "gameServers": { - "$ref": "#/components/schemas/v1PublicProductCount" + "nodeTotalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListDashboardIpamAssignmentsResponse": { + "properties": { + "assignments": { + "items": { + "$ref": "#/components/schemas/v1DashboardIpamAssignmentRow" + }, + "type": "array" }, - "providers": { - "description": "Storefronts published on the marketplace.", + "totalCount": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1GetPublicStorefrontResponse": { + "v1ListDashboardIpamResponse": { "properties": { - "storefront": { - "$ref": "#/components/schemas/v1PublicStorefront" + "allocatedSampleIpsHasMore": { + "type": "boolean" + }, + "networks": { + "items": { + "$ref": "#/components/schemas/v1DashboardIpamNetworkRollup" + }, + "type": "array" } }, "type": "object" }, - "v1GetRefundResponse": { + "v1ListDashboardPlanSubscriptionStatsResponse": { "properties": { - "invoice": { - "$ref": "#/components/schemas/v1Invoice" + "kpiActiveSubscriptionsSum": { + "format": "int32", + "type": "integer" }, - "payment": { - "$ref": "#/components/schemas/v1Payment" + "kpiPlanCount": { + "format": "int32", + "type": "integer" }, - "refund": { - "$ref": "#/components/schemas/v1Refund" + "kpiVmAssetsSum": { + "format": "int32", + "type": "integer" + }, + "plans": { + "items": { + "$ref": "#/components/schemas/v1ProviderDashboardPlanSubscriptionStat" + }, + "type": "array" + }, + "plansFilteredTotal": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetRegistrarBalanceResponse": { + "v1ListDashboardTicketStatisticsResponse": { "properties": { - "available": { + "averageFirstResponseTimeSeconds": { + "format": "int64", "type": "string" }, - "balance": { + "averageResolutionTimeSeconds": { + "format": "int64", "type": "string" }, - "currency": { - "type": "string" + "awaitingReplyTickets": { + "format": "int32", + "type": "integer" }, - "provider": { - "type": "string" + "byCaseType": { + "items": { + "$ref": "#/components/schemas/v1DashboardTicketStatisticsByCaseType" + }, + "type": "array" }, - "reserved": { - "description": "Sum of active balance reservations.", - "type": "string" + "byPriority": { + "items": { + "$ref": "#/components/schemas/v1DashboardTicketStatisticsByPriority" + }, + "type": "array" + }, + "byStatus": { + "items": { + "$ref": "#/components/schemas/v1DashboardTicketStatisticsByStatus" + }, + "type": "array" }, - "runwayDays": { - "description": "Days of scheduled renewals the available balance covers.", + "closedTickets": { "format": "int32", "type": "integer" }, - "updatedAt": { - "format": "date-time", - "type": "string" + "openNeedingProviderFirstResponse": { + "format": "int32", + "type": "integer" + }, + "openTickets": { + "format": "int32", + "type": "integer" + }, + "slaCompliantTickets": { + "format": "int32", + "type": "integer" + }, + "slaFirstResponseBreachedTickets": { + "format": "int32", + "type": "integer" + }, + "slaResolutionBreachedTickets": { + "description": "Deprecated: ticket SLA is first-response only. Always 0; kept for wire compatibility.", + "format": "int32", + "type": "integer" + }, + "ticketsCreatedPerDay": { + "items": { + "$ref": "#/components/schemas/v1DashboardTicketStatisticsDayBucket" + }, + "type": "array" + }, + "totalTickets": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetRoadmapFeatureRequestResponse": { + "v1ListDashboardVirtualMachinesResponse": { "properties": { - "request": { - "$ref": "#/components/schemas/v1RoadmapFeatureRequest" + "dashboardVmCountTotal": { + "format": "int32", + "type": "integer" + }, + "virtualMachines": { + "items": { + "$ref": "#/components/schemas/v1DashboardVirtualMachineRow" + }, + "type": "array" + }, + "vmtemplateIdsWithVirtualMachines": { + "description": "Distinct VM template IDs with at least one provider-scoped dashboard VM (unfiltered facet for sidebar).", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "v1GetRoadmapStatsResponse": { + "v1ListDatabasesResponse": { "properties": { - "byProduct": { + "databases": { "items": { - "$ref": "#/components/schemas/v1RoadmapProductStats" + "$ref": "#/components/schemas/v1GameServerDatabase" }, "type": "array" - }, - "totalRequests": { - "format": "int32", - "type": "integer" - }, - "totalVotes": { - "format": "int32", - "type": "integer" } }, "type": "object" }, - "v1GetSSHKeyResponse": { + "v1ListDatacentersResponse": { "properties": { - "sshKey": { - "$ref": "#/components/schemas/v1SSHKey" + "datacenters": { + "items": { + "$ref": "#/components/schemas/v1DatacenterInfo" + }, + "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetSecretResponse": { + "v1ListDistrosResponse": { + "description": "ListDistrosResponse is the guest OS catalog.", "properties": { - "secret": { - "$ref": "#/components/schemas/v1Secret" + "distros": { + "items": { + "$ref": "#/components/schemas/v1DistroCatalogEntry" + }, + "type": "array" } }, "type": "object" }, - "v1GetSmtpOutboundProviderPolicyResponse": { + "v1ListDnsGeoLocationsResponse": { "properties": { - "policy": { - "$ref": "#/components/schemas/v1SmtpOutboundProviderPolicy" + "locations": { + "items": { + "$ref": "#/components/schemas/v1DnsGeoLocation" + }, + "type": "array" } }, "type": "object" }, - "v1GetSnapshotResponse": { + "v1ListDnsGeoRecordsResponse": { "properties": { - "snapshot": { - "$ref": "#/components/schemas/v1Snapshot" + "records": { + "items": { + "$ref": "#/components/schemas/v1DnsGeoRecord" + }, + "type": "array" } }, "type": "object" }, - "v1GetStartupResponse": { + "v1ListDnsRecordsResponse": { "properties": { - "dockerImage": { - "type": "string" + "page": { + "format": "int32", + "type": "integer" }, - "dockerImages": { + "pageSize": { + "format": "int32", + "type": "integer" + }, + "records": { "items": { - "$ref": "#/components/schemas/v1DockerImageChoice" + "$ref": "#/components/schemas/v1DnsRecord" }, "type": "array" }, - "rawStartupCommand": { - "type": "string" - }, - "startupCommand": { - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" }, - "variables": { + "types": { "items": { - "$ref": "#/components/schemas/v1StartupVariable" + "type": "string" }, "type": "array" } }, "type": "object" }, - "v1GetSubscriptionCouponResponse": { - "properties": { - "coupon": { - "$ref": "#/components/schemas/v1SubscriptionCoupon" - } - }, - "type": "object" - }, - "v1GetSubscriptionStatusResponse": { + "v1ListDnsZonesResponse": { "properties": { - "rules": { + "page": { + "format": "int32", + "type": "integer" + }, + "pageSize": { + "format": "int32", + "type": "integer" + }, + "totalCount": { + "format": "int32", + "type": "integer" + }, + "zones": { "items": { - "$ref": "#/components/schemas/v1Rules" + "$ref": "#/components/schemas/v1DnsZone" }, "type": "array" } }, "type": "object" }, - "v1GetTicketResponse": { + "v1ListEffectivePermissionsResponse": { "properties": { - "organizationDetails": { + "effectivePermissions": { "additionalProperties": { - "$ref": "#/components/schemas/v1OrganizationDetails" + "$ref": "#/components/schemas/v1EffectivePermissions" }, - "title": "Map of organization ID to organization name", "type": "object" }, - "thread": { + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListEligibleNodesForPlanResponse": { + "properties": { + "nodes": { "items": { - "$ref": "#/components/schemas/v1TicketMessage" + "$ref": "#/components/schemas/v1PlanLiveValidationNodeView" }, - "title": "All messages in chronological order (original + replies)", "type": "array" - }, - "ticket": { - "$ref": "#/components/schemas/v1Ticket" - }, - "userDetails": { - "additionalProperties": { - "$ref": "#/components/schemas/v1UserDetails" - }, - "title": "Map of user ID to user details (first_name, last_name)", - "type": "object" } }, "type": "object" }, - "v1GetTldRequirementsResponse": { + "v1ListEnvironmentVariablesResponse": { "properties": { - "requirements": { - "$ref": "#/components/schemas/v1ContactRequirements" + "environmentVariables": { + "items": { + "$ref": "#/components/schemas/v1EnvironmentVariable" + }, + "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetUsageRecordResponse": { + "v1ListFilesResponse": { "properties": { - "usageRecord": { - "$ref": "#/components/schemas/v1UsageRecord" + "files": { + "items": { + "$ref": "#/components/schemas/v1GameServerFile" + }, + "type": "array" } }, "type": "object" }, - "v1GetUsageReportResponse": { + "v1ListFirewallAddressGroupsResponse": { "properties": { - "aggregates": { + "groups": { "items": { - "$ref": "#/components/schemas/v1UsageAggregate" + "$ref": "#/components/schemas/v1FirewallAddressGroup" }, "type": "array" }, - "billingPeriodEnd": { - "format": "date-time", - "type": "string" - }, - "billingPeriodStart": { - "format": "date-time", - "type": "string" - }, - "totalRecords": { + "totalCount": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1GetUserResponse": { + "v1ListFirewallRuleSetsResponse": { "properties": { - "user": { - "$ref": "#/components/schemas/v1User" + "rulesets": { + "items": { + "$ref": "#/components/schemas/v1FirewallRuleSet" + }, + "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetVMTemplateResponse": { + "v1ListFirewallRulesResponse": { "properties": { - "vmTemplate": { - "$ref": "#/components/schemas/v1VMTemplate" + "rules": { + "items": { + "$ref": "#/components/schemas/v1FirewallRuleResource" + }, + "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetVNCConsoleResponse": { + "v1ListGameServerAllocationsResponse": { "properties": { - "password": { - "title": "RFB password for noVNC credentials", - "type": "string" - }, - "sessionId": { - "title": "Session ID for the console connection", - "type": "string" - }, - "token": { - "title": "Signed session token; frontend sends this on WS connect", - "type": "string" - }, - "websocketUrl": { - "title": "WebSocket URL for console connection (e.g., \"ws://backend/api/v1/virtual-machines/{vm_id}/console/ws\")", - "type": "string" + "allocations": { + "items": { + "$ref": "#/components/schemas/v1GameServerAllocation" + }, + "type": "array" } }, "type": "object" }, - "v1Group": { + "v1ListGameServerBackupsResponse": { "properties": { - "description": { - "type": "string" - }, - "groupRoles": { + "backups": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1GameServerBackup" }, - "title": "Relations", "type": "array" - }, - "id": { - "title": "Fields", - "type": "string" - }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "name": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "userEmails": { + } + }, + "type": "object" + }, + "v1ListGameServerTemplatesResponse": { + "properties": { + "templates": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1GameServerTemplate" }, "type": "array" } }, "type": "object" }, - "v1HandleWebhookResponse": { + "v1ListGameServersResponse": { "properties": { - "eventId": { - "title": "Webhook event ID (for idempotency tracking)", - "type": "string" - }, - "message": { - "title": "Optional message", - "type": "string" - }, - "success": { - "title": "Success indicator", - "type": "boolean" + "gameServers": { + "items": { + "$ref": "#/components/schemas/v1GameServer" + }, + "type": "array" } }, "type": "object" }, - "v1HealthCheckResponse": { + "v1ListGroupsResponse": { "properties": { - "status": { - "$ref": "#/components/schemas/v1ServingStatus" + "groups": { + "items": { + "$ref": "#/components/schemas/v1Group" + }, + "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1HeldPayout": { - "description": "A paid client invoice whose provider payout is waiting on a hold.", + "v1ListHeldPayoutsResponse": { "properties": { - "currency": { - "type": "string" - }, - "heldUntil": { - "description": "Unset for dispute holds.", - "format": "date-time", - "type": "string" - }, - "invoiceId": { - "type": "string" - }, - "invoiceNumber": { - "type": "string" + "heldPayouts": { + "items": { + "$ref": "#/components/schemas/v1HeldPayout" + }, + "type": "array" }, - "paidAt": { - "format": "date-time", - "type": "string" + "page": { + "format": "int32", + "type": "integer" }, - "providerRevenue": { - "description": "This provider's revenue on the invoice, as a decimal string.", - "type": "string" + "pageSize": { + "format": "int32", + "type": "integer" }, - "reason": { - "$ref": "#/components/schemas/v1PayoutHoldReason" + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1HighRiskCoupon": { - "description": "A high-risk coupon as seen by platform admins.", + "v1ListHighRiskCouponsResponse": { "properties": { - "coupon": { - "$ref": "#/components/schemas/v1Coupon" - }, - "lastRedeemedAt": { - "format": "date-time", - "type": "string" + "coupons": { + "items": { + "$ref": "#/components/schemas/v1HighRiskCoupon" + }, + "type": "array" }, - "providerOrganizationId": { - "type": "string" + "page": { + "format": "int32", + "type": "integer" }, - "providerOrganizationName": { - "type": "string" + "pageSize": { + "format": "int32", + "type": "integer" }, - "redemptionsLast7Days": { - "description": "Applications in the last 7 days, excluding reversed ones.", + "totalCount": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1HookScript": { - "description": "HookScript is a provider-owned Python script run after a VM lifecycle event.", + "v1ListHookScriptsResponse": { "properties": { - "enabled": { - "type": "boolean" - }, - "hook": { - "$ref": "#/components/schemas/v1LifecycleHook" - }, - "id": { - "type": "string" - }, - "organizationId": { - "type": "string" + "hookScripts": { + "items": { + "$ref": "#/components/schemas/v1HookScript" + }, + "type": "array" }, - "script": { - "type": "string" + "page": { + "format": "int32", + "type": "integer" }, - "status": { - "$ref": "#/components/schemas/protov1Status" + "pageSize": { + "format": "int32", + "type": "integer" }, - "subject": { - "$ref": "#/components/schemas/v1HookSubject" + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListInstantAppsResponse": { + "properties": { + "instantApps": { + "items": { + "$ref": "#/components/schemas/v1InstantApp" + }, + "type": "array" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1HookSubject": { - "default": "HOOK_SUBJECT_UNSPECIFIED", - "description": "LifecycleHook is the VM operation that triggers a provider hook script.", - "enum": [ - "HOOK_SUBJECT_UNSPECIFIED", - "HOOK_SUBJECT_VM", - "HOOK_SUBJECT_GAMESERVER" - ], - "type": "string" + "v1ListInternalCommentsResponse": { + "properties": { + "comments": { + "items": { + "$ref": "#/components/schemas/v1TicketInternalComment" + }, + "type": "array" + } + }, + "type": "object" }, - "v1IPAllocation": { + "v1ListInvitesResponse": { "properties": { - "allocatedCidr": { - "title": "Allocated CIDR (host or delegated block)", - "type": "string" - }, - "allocationKind": { - "title": "ipv4_host, ipv6_host, ipv6_prefix", - "type": "string" - }, - "id": { - "title": "Fields", - "type": "string" + "invites": { + "items": { + "$ref": "#/components/schemas/v1Invite" + }, + "type": "array" }, - "ipAddress": { - "title": "IP address allocated (e.g., 10.0.0.5, 2001:db8::1)", - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListInvoicesResponse": { + "properties": { + "invoices": { + "items": { + "$ref": "#/components/schemas/v1Invoice" + }, + "type": "array" }, - "organizationId": { - "title": "Organization that owns this allocation", - "type": "string" + "page": { + "format": "int32", + "type": "integer" }, - "prefixId": { - "description": "Prefix this IP allocation is from", - "title": "Relations", - "type": "string" + "pageSize": { + "format": "int32", + "type": "integer" }, - "status": { - "$ref": "#/components/schemas/v1IPAllocationStatus" + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListLinkedIdentitiesResponse": { + "properties": { + "hasPassword": { + "description": "True when the user has a local password (can unlink their last SSO identity).", + "type": "boolean" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "identities": { + "items": { + "$ref": "#/components/schemas/v1LinkedIdentity" + }, + "type": "array" }, - "virtualMachineId": { - "title": "Virtual machine this IP is allocated to", - "type": "string" + "ssoRegistered": { + "description": "True when the account was created by SSO sign-up.\nPassword set, change, and recovery stay disabled for that account.", + "type": "boolean" } }, "type": "object" }, - "v1IPAllocationStatus": { - "default": "IP_ALLOCATION_STATUS_UNSPECIFIED", - "enum": [ - "IP_ALLOCATION_STATUS_UNSPECIFIED", - "IP_ALLOCATION_STATUS_ACTIVE", - "IP_ALLOCATION_STATUS_RELEASED" - ], - "type": "string" - }, - "v1ImportGameServerTemplateRequest": { + "v1ListMarketplaceProviderDirectoryResponse": { "properties": { - "dockerImage": { - "type": "string" + "page": { + "format": "int32", + "type": "integer" }, - "eggId": { + "pageSize": { "format": "int32", "type": "integer" }, - "icon": { - "type": "string" + "providers": { + "items": { + "$ref": "#/components/schemas/v1ProviderInfo" + }, + "type": "array" }, - "name": { - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListMetricsResponse": { + "properties": { + "metrics": { + "items": { + "$ref": "#/components/schemas/v1Metric" + }, + "type": "array" }, - "nestId": { + "totalCount": { "format": "int32", "type": "integer" + } + }, + "type": "object" + }, + "v1ListMetricsWriteCredentialsResponse": { + "properties": { + "credentials": { + "items": { + "$ref": "#/components/schemas/v1MetricsWriteCredential" + }, + "type": "array" }, - "platformId": { - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListMyInvitesResponse": { + "properties": { + "invites": { + "items": { + "$ref": "#/components/schemas/v1Invite" + }, + "type": "array" }, - "startup": { - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1InboundPeeringState": { - "default": "INBOUND_PEERING_STATE_UNSPECIFIED", - "enum": [ - "INBOUND_PEERING_STATE_UNSPECIFIED", - "INBOUND_PEERING_STATE_PENDING", - "INBOUND_PEERING_STATE_PEERING", - "INBOUND_PEERING_STATE_READY", - "INBOUND_PEERING_STATE_FAILED" - ], - "type": "string" + "v1ListNetworkNodesResponse": { + "properties": { + "nodes": { + "items": { + "$ref": "#/components/schemas/v1Node" + }, + "title": "List of nodes assigned to this network", + "type": "array" + } + }, + "type": "object" }, - "v1InstantApp": { - "description": "InstantApp is a platform-owned curated app install (Jinja user_data bound to a Distro).\nuser_data is returned on Get for catalog preview; List omits it to keep responses small.\nCreate/reinstall always load user_data server-side from storage.", + "v1ListNetworksResponse": { "properties": { - "categories": { + "networks": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1Network" }, - "readOnly": true, "type": "array" }, - "description": { - "readOnly": true, - "type": "string" - }, - "distro": { - "$ref": "#/components/schemas/v1Distro" - }, - "documentationUrl": { - "readOnly": true, - "type": "string" - }, - "family": { - "readOnly": true, - "type": "string" - }, - "iconUrl": { - "readOnly": true, - "type": "string" - }, - "id": { - "readOnly": true, - "type": "string" - }, - "metadata": { - "description": "Includes ports, credentials_path, estimated_ready_minutes, and optional variables[]\n(Instant App form schema: name/label/type/required/default/\u2026).", - "readOnly": true, - "type": "object" - }, - "minDiskGb": { + "total": { "format": "int32", - "readOnly": true, "type": "integer" + } + }, + "type": "object" + }, + "v1ListNodesResponse": { + "properties": { + "nodes": { + "items": { + "$ref": "#/components/schemas/v1NodeWithExpandedRegion" + }, + "type": "array" }, - "minRamGb": { + "totalCount": { "format": "int32", - "readOnly": true, "type": "integer" + } + }, + "type": "object" + }, + "v1ListNotificationSettingsResponse": { + "properties": { + "notificationSettings": { + "items": { + "$ref": "#/components/schemas/v1NotificationSetting" + }, + "type": "array" }, - "minVcpus": { - "description": "Recommended minimums (plan specifications units); not enforced at create.", + "totalCount": { "format": "int32", - "readOnly": true, "type": "integer" + } + }, + "type": "object" + }, + "v1ListNotificationTemplatesResponse": { + "properties": { + "notificationTemplates": { + "items": { + "$ref": "#/components/schemas/v1NotificationTemplate" + }, + "type": "array" }, - "name": { - "readOnly": true, - "type": "string" - }, - "slug": { - "readOnly": true, - "type": "string" - }, - "sortOrder": { + "totalCount": { "format": "int32", - "readOnly": true, "type": "integer" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "userData": { - "description": "Jinja cloud-init user_data template. Present on Get; omitted on List.", - "readOnly": true, - "type": "string" - }, - "version": { - "readOnly": true, - "type": "string" } }, "type": "object" }, - "v1Invite": { + "v1ListOAuth2ClientsResponse": { "properties": { - "expiresAt": { - "format": "date-time", - "type": "string" - }, - "group": { - "type": "string" - }, - "id": { - "title": "Fields", - "type": "string" - }, - "inviteStatus": { - "$ref": "#/components/schemas/v1InviteStatus" - }, - "inviteeEmail": { - "type": "string" + "clients": { + "items": { + "$ref": "#/components/schemas/v1OAuth2Client" + }, + "type": "array" }, - "inviter": { - "title": "Relations", - "type": "string" + "page": { + "format": "int32", + "type": "integer" }, - "inviterEmail": { - "title": "Display fields", - "type": "string" + "pageSize": { + "format": "int32", + "type": "integer" }, - "joinedTime": { - "format": "date-time", - "type": "string" - }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "organization": { - "type": "string" - }, - "organizationName": { - "type": "string" - }, - "role": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - } - }, - "type": "object" - }, - "v1InviteStatus": { - "default": "INVITE_STATUS_UNSPECIFIED", - "enum": [ - "INVITE_STATUS_UNSPECIFIED", - "INVITE_STATUS_SENT", - "INVITE_STATUS_ACCEPTED", - "INVITE_STATUS_DECLINED", - "INVITE_STATUS_EXPIRED" - ], - "type": "string" - }, - "v1Invoice": { - "properties": { - "amountDue": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "currency": { - "type": "string" - }, - "customer": { - "$ref": "#/components/schemas/v1InvoiceParty" - }, - "dueDate": { - "format": "date-time", - "type": "string" - }, - "id": { - "type": "string" - }, - "invoiceNumber": { - "type": "string" - }, - "issuer": { - "$ref": "#/components/schemas/v1InvoiceParty" - }, - "metadata": { - "title": "Optional: custom metadata (platform fee info for providers, etc.)", - "type": "object" - }, - "paidAt": { - "format": "date-time", - "type": "string" - }, - "periodEnd": { - "format": "date-time", - "type": "string" - }, - "periodStart": { - "format": "date-time", - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/v1InvoiceStatus" - }, - "subscriptionId": { - "title": "Deprecated: Use subscription_ids instead. Kept", - "type": "string" - }, - "subscriptionIds": { - "description": "for backward compatibility.\n\nSubscriptions aggregated into this invoice (many-to-many)", - "items": { - "type": "string" - }, - "type": "array" - }, - "subtotal": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" - }, - "taxAmount": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" - }, - "total": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" - }, - "transactionId": { - "type": "string" - } - }, - "type": "object" - }, - "v1InvoiceLine": { - "properties": { - "amount": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" - }, - "description": { - "title": "(direct link for better tracking)", - "type": "string" - }, - "id": { - "type": "string" - }, - "invoiceId": { - "type": "string" - }, - "quantity": { - "title": "Decimal as string", - "type": "string" - }, - "subscriptionId": { - "title": "Subscription this invoice line is for", - "type": "string" - }, - "unitAmount": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" - } - }, - "type": "object" - }, - "v1InvoiceParty": { - "description": "InvoiceParty is a billing party (seller/issuer or buyer/customer) shown on an\ninvoice. Provider/customer identity is snapshotted at invoice generation; the\nplatform issuer is resolved from server config.", - "properties": { - "address": { - "title": "Single-line address fallback", - "type": "string" - }, - "addressLine1": { - "type": "string" - }, - "addressLine2": { - "type": "string" - }, - "city": { - "type": "string" - }, - "country": { - "title": "ISO 3166-1 alpha-2", - "type": "string" - }, - "email": { - "type": "string" - }, - "isPlatform": { - "title": "True when the party is the platform itself", - "type": "boolean" - }, - "legalName": { - "title": "Registered legal entity name, when different from name", - "type": "string" - }, - "name": { - "title": "Display/trading name", - "type": "string" - }, - "phone": { - "type": "string" - }, - "postalCode": { - "type": "string" - }, - "region": { - "type": "string" - }, - "taxId": { - "type": "string" - }, - "vatId": { - "type": "string" - }, - "website": { - "type": "string" - } - }, - "type": "object" - }, - "v1InvoiceStatus": { - "default": "INVOICE_STATUS_UNSPECIFIED", - "enum": [ - "INVOICE_STATUS_UNSPECIFIED", - "INVOICE_STATUS_DRAFT", - "INVOICE_STATUS_OPEN", - "INVOICE_STATUS_PAID", - "INVOICE_STATUS_PAST_DUE", - "INVOICE_STATUS_VOID", - "INVOICE_STATUS_UNCOLLECTIBLE" - ], - "title": "Invoice messages", - "type": "string" - }, - "v1LastRestore": { - "properties": { - "restoredAt": { - "format": "date-time", - "readOnly": true, - "type": "string" - }, - "restoredBy": { - "readOnly": true, - "type": "string" - }, - "snapshotName": { - "readOnly": true, - "type": "string" - } - }, - "title": "LastRestore represents the last restore operation for a snapshot", - "type": "object" - }, - "v1LifecycleHook": { - "default": "LIFECYCLE_HOOK_UNSPECIFIED", - "enum": [ - "LIFECYCLE_HOOK_UNSPECIFIED", - "LIFECYCLE_HOOK_CREATED", - "LIFECYCLE_HOOK_STARTED", - "LIFECYCLE_HOOK_STOPPED", - "LIFECYCLE_HOOK_DELETED", - "LIFECYCLE_HOOK_RESTARTED", - "LIFECYCLE_HOOK_REINSTALLED" - ], - "type": "string" - }, - "v1LinkedIdentity": { - "properties": { - "createTime": { - "format": "date-time", - "type": "string" - }, - "email": { - "type": "string" - }, - "provider": { - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1ListAddonSubscriptionsResponse": { + "v1ListOrderGamesResponse": { "properties": { - "addonSubscriptions": { + "games": { "items": { - "$ref": "#/components/schemas/v1AddonSubscription" + "$ref": "#/components/schemas/v1OrderGame" }, "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" } }, "type": "object" }, - "v1ListAddonsResponse": { + "v1ListOrganizationsResponse": { "properties": { - "addons": { + "organizations": { "items": { - "$ref": "#/components/schemas/v1Addon" + "$ref": "#/components/schemas/v1Organization" }, "type": "array" }, @@ -10738,11 +9714,11 @@ }, "type": "object" }, - "v1ListAgentsResponse": { + "v1ListPaymentMethodsResponse": { "properties": { - "agents": { + "paymentMethods": { "items": { - "$ref": "#/components/schemas/v1GetAgentResponse" + "$ref": "#/components/schemas/v1PaymentMethod" }, "type": "array" }, @@ -10753,14 +9729,8 @@ }, "type": "object" }, - "v1ListAllDomainOrdersResponse": { + "v1ListPaymentsResponse": { "properties": { - "orders": { - "items": { - "$ref": "#/components/schemas/v1AdminDomainOrder" - }, - "type": "array" - }, "page": { "format": "int32", "type": "integer" @@ -10769,6 +9739,12 @@ "format": "int32", "type": "integer" }, + "payments": { + "items": { + "$ref": "#/components/schemas/v1Payment" + }, + "type": "array" + }, "totalCount": { "format": "int32", "type": "integer" @@ -10776,14 +9752,8 @@ }, "type": "object" }, - "v1ListAllDomainsResponse": { + "v1ListPayoutInvoicesResponse": { "properties": { - "domains": { - "items": { - "$ref": "#/components/schemas/v1AdminRegisteredDomain" - }, - "type": "array" - }, "page": { "format": "int32", "type": "integer" @@ -10792,6 +9762,12 @@ "format": "int32", "type": "integer" }, + "payoutInvoices": { + "items": { + "$ref": "#/components/schemas/v1PayoutInvoice" + }, + "type": "array" + }, "totalCount": { "format": "int32", "type": "integer" @@ -10799,118 +9775,106 @@ }, "type": "object" }, - "v1ListAllocationsResponse": { + "v1ListPermissionsResponse": { "properties": { - "allocations": { + "permissions": { "items": { - "$ref": "#/components/schemas/v1IPAllocation" + "$ref": "#/components/schemas/v1Permission" }, "type": "array" }, - "total": { + "totalCount": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1ListAssignableNodesForPlanResponse": { + "v1ListPlanLiveValidationBenchmarksResponse": { "properties": { - "nodes": { + "benchmarks": { "items": { - "$ref": "#/components/schemas/v1AssignableNodeView" + "$ref": "#/components/schemas/v1PlanLiveValidationBenchmarkView" }, "type": "array" } }, "type": "object" }, - "v1ListAvailableAddonsResponse": { + "v1ListPlanLiveValidationsResponse": { "properties": { - "addons": { - "items": { - "$ref": "#/components/schemas/v1Addon" - }, - "type": "array" - }, "totalCount": { "format": "int32", "type": "integer" + }, + "validations": { + "items": { + "$ref": "#/components/schemas/v1PlanLiveValidationView" + }, + "type": "array" } }, "type": "object" }, - "v1ListAvailableIPsResponse": { + "v1ListPlansResponse": { "properties": { - "allocatedCount": { - "format": "int32", - "title": "Number of allocated IPs", - "type": "integer" - }, - "availableCount": { - "format": "int32", - "title": "Number of available IPs", - "type": "integer" - }, - "availableIps": { + "plans": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1Plan" }, - "title": "List of available IP addresses", "type": "array" }, - "reservedCount": { - "format": "int32", - "title": "Number of reserved IPs", - "type": "integer" - }, - "totalIps": { + "totalCount": { "format": "int32", - "title": "Total IPs in prefix", "type": "integer" } }, "type": "object" }, - "v1ListAvailablePlansResponse": { + "v1ListPlatformsResponse": { "properties": { - "plans": { + "platforms": { "items": { - "$ref": "#/components/schemas/v1AvailablePlanCode" + "$ref": "#/components/schemas/v1Platform" }, - "title": "List of unique plan codes with their details", "type": "array" }, "totalCount": { "format": "int32", - "title": "Total number of unique plan codes", "type": "integer" } }, "type": "object" }, - "v1ListAvailableRegionsResponse": { + "v1ListPrefixesResponse": { "properties": { - "regions": { + "prefixes": { "items": { - "$ref": "#/components/schemas/v1RegionLocation" + "$ref": "#/components/schemas/v1Prefix" }, - "title": "List of unique city+country combinations", "type": "array" }, - "totalCount": { + "total": { "format": "int32", - "title": "Total number of unique regions", "type": "integer" } }, "type": "object" }, - "v1ListBackupsResponse": { + "v1ListPreflightChecksResponse": { "properties": { - "backups": { + "marketplaceReadyCheckEnabled": { + "description": "Explicit presence: false when PLAN_MARKETPLACE_READY is disabled in config (interval may be omitted as 0).", + "type": "boolean" + }, + "marketplaceReadyCheckIntervalSeconds": { + "description": "Resolved from preflight.PLAN_MARKETPLACE_READY interval (seconds); for UI scheduling hints.", + "format": "int32", + "type": "integer" + }, + "plans": { "items": { - "$ref": "#/components/schemas/v1Backup" + "$ref": "#/components/schemas/v1PlanPreflightView" }, "type": "array" }, @@ -10921,16 +9885,19 @@ }, "type": "object" }, - "v1ListClientProviderReviewAssetsResponse": { + "v1ListPromoCreditGrantsResponse": { "properties": { - "assets": { + "grants": { "items": { - "$ref": "#/components/schemas/v1ClientProviderReviewAssetItem" + "$ref": "#/components/schemas/v1PromoCreditGrant" }, "type": "array" }, - "reviewedAssetCount": { - "description": "Submitted reviews across all assets (not just this page).", + "page": { + "format": "int32", + "type": "integer" + }, + "pageSize": { "format": "int32", "type": "integer" }, @@ -10941,11 +9908,11 @@ }, "type": "object" }, - "v1ListCloudInitTemplatesResponse": { + "v1ListProviderCustomerAssetsResponse": { "properties": { - "cloudInitTemplates": { + "assets": { "items": { - "$ref": "#/components/schemas/v1CloudInitTemplate" + "$ref": "#/components/schemas/v1ProviderCustomerAssetRow" }, "type": "array" }, @@ -10956,11 +9923,11 @@ }, "type": "object" }, - "v1ListCloudInitUserDataResponse": { + "v1ListProviderCustomersResponse": { "properties": { - "profiles": { + "customers": { "items": { - "$ref": "#/components/schemas/v1CloudInitUserData" + "$ref": "#/components/schemas/v1ProviderCustomerRow" }, "type": "array" }, @@ -10971,57 +9938,40 @@ }, "type": "object" }, - "v1ListConnectTaxRegistrationsResponse": { - "properties": { - "registrations": { - "items": { - "$ref": "#/components/schemas/v1ConnectTaxRegistration" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1ListConversationsResponse": { + "v1ListProviderReviewsResponse": { "properties": { - "conversations": { + "providerAverageStar": { + "format": "double", + "title": "all reviews for this provider", + "type": "number" + }, + "providerStarSummary": { "items": { - "$ref": "#/components/schemas/v1ConversationInfo" + "$ref": "#/components/schemas/v1ProviderReviewStarSummary" }, - "title": "List of conversations with IDs and titles", "type": "array" }, - "totalCount": { + "providerTotalReviews": { "format": "int32", - "title": "Total number of conversations", + "title": "all reviews for this provider", "type": "integer" - } - }, - "type": "object" - }, - "v1ListCountriesCitiesResponse": { - "properties": { - "countries": { + }, + "reviews": { "items": { - "$ref": "#/components/schemas/v1Country" + "$ref": "#/components/schemas/v1ProviderReviewListItem" }, "type": "array" }, "totalCount": { "format": "int32", + "title": "total matching current filters", "type": "integer" } }, "type": "object" }, - "v1ListCouponCodeBatchesResponse": { + "v1ListProvidersResponse": { "properties": { - "batches": { - "items": { - "$ref": "#/components/schemas/v1CouponCodeBatch" - }, - "type": "array" - }, "page": { "format": "int32", "type": "integer" @@ -11030,6 +9980,12 @@ "format": "int32", "type": "integer" }, + "providers": { + "items": { + "$ref": "#/components/schemas/v1ProviderInfo" + }, + "type": "array" + }, "totalCount": { "format": "int32", "type": "integer" @@ -11037,14 +9993,8 @@ }, "type": "object" }, - "v1ListCouponCodesResponse": { + "v1ListPublicStorefrontsResponse": { "properties": { - "codes": { - "items": { - "$ref": "#/components/schemas/v1CouponCode" - }, - "type": "array" - }, "page": { "format": "int32", "type": "integer" @@ -11053,6 +10003,12 @@ "format": "int32", "type": "integer" }, + "storefronts": { + "items": { + "$ref": "#/components/schemas/v1PublicStorefrontCard" + }, + "type": "array" + }, "totalCount": { "format": "int32", "type": "integer" @@ -11060,7 +10016,7 @@ }, "type": "object" }, - "v1ListCouponRedemptionsResponse": { + "v1ListRefundsResponse": { "properties": { "page": { "format": "int32", @@ -11070,9 +10026,9 @@ "format": "int32", "type": "integer" }, - "redemptions": { + "refunds": { "items": { - "$ref": "#/components/schemas/v1CouponRedemption" + "$ref": "#/components/schemas/v1Refund" }, "type": "array" }, @@ -11083,22 +10039,14 @@ }, "type": "object" }, - "v1ListCouponsResponse": { + "v1ListRegionsResponse": { "properties": { - "coupons": { + "regions": { "items": { - "$ref": "#/components/schemas/v1Coupon" + "$ref": "#/components/schemas/v1Region" }, "type": "array" }, - "page": { - "format": "int32", - "type": "integer" - }, - "pageSize": { - "format": "int32", - "type": "integer" - }, "totalCount": { "format": "int32", "type": "integer" @@ -11106,68 +10054,52 @@ }, "type": "object" }, - "v1ListCreditLedgerEntriesResponse": { + "v1ListRoadmapFeatureRequestCommentsResponse": { "properties": { - "entries": { + "comments": { "items": { - "$ref": "#/components/schemas/v1CreditLedgerEntryProto" + "$ref": "#/components/schemas/v1RoadmapFeatureRequestComment" }, "type": "array" }, - "page": { - "format": "int32", - "type": "integer" - }, - "pageSize": { - "format": "int32", - "type": "integer" - }, - "totalCount": { + "total": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1ListDashboardAddonCatalogStatsResponse": { + "v1ListRoadmapFeatureRequestsResponse": { "properties": { - "addonCatalog": { + "requests": { "items": { - "$ref": "#/components/schemas/v1ProviderDashboardAddonCatalogRow" + "$ref": "#/components/schemas/v1RoadmapFeatureRequest" }, "type": "array" }, - "addonCatalogFilteredTotal": { - "format": "int32", - "type": "integer" - }, - "kpiActiveAddonSubscriptionsSum": { + "total": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1ListDashboardInfrastructureResponse": { + "v1ListRoadmapProductCategoriesResponse": { "properties": { - "byNode": { + "products": { "items": { - "$ref": "#/components/schemas/v1ProviderDashboardNodeRollup" + "$ref": "#/components/schemas/v1RoadmapProductCategory" }, "type": "array" - }, - "nodeTotalCount": { - "format": "int32", - "type": "integer" } }, "type": "object" }, - "v1ListDashboardIpamAssignmentsResponse": { + "v1ListRolesResponse": { "properties": { - "assignments": { + "roles": { "items": { - "$ref": "#/components/schemas/v1DashboardIpamAssignmentRow" + "$ref": "#/components/schemas/v1Role" }, "type": "array" }, @@ -11178,155 +10110,45 @@ }, "type": "object" }, - "v1ListDashboardIpamResponse": { - "properties": { - "allocatedSampleIpsHasMore": { - "type": "boolean" - }, - "networks": { - "items": { - "$ref": "#/components/schemas/v1DashboardIpamNetworkRollup" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1ListDashboardPlanSubscriptionStatsResponse": { - "properties": { - "kpiActiveSubscriptionsSum": { - "format": "int32", - "type": "integer" - }, - "kpiPlanCount": { - "format": "int32", - "type": "integer" - }, - "kpiVmAssetsSum": { - "format": "int32", - "type": "integer" - }, - "plans": { - "items": { - "$ref": "#/components/schemas/v1ProviderDashboardPlanSubscriptionStat" - }, - "type": "array" - }, - "plansFilteredTotal": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListDashboardTicketStatisticsResponse": { + "v1ListSSHKeysResponse": { "properties": { - "averageFirstResponseTimeSeconds": { - "format": "int64", - "type": "string" - }, - "averageResolutionTimeSeconds": { - "format": "int64", - "type": "string" - }, - "awaitingReplyTickets": { - "format": "int32", - "type": "integer" - }, - "byCaseType": { - "items": { - "$ref": "#/components/schemas/v1DashboardTicketStatisticsByCaseType" - }, - "type": "array" - }, - "byPriority": { - "items": { - "$ref": "#/components/schemas/v1DashboardTicketStatisticsByPriority" - }, - "type": "array" - }, - "byStatus": { - "items": { - "$ref": "#/components/schemas/v1DashboardTicketStatisticsByStatus" - }, - "type": "array" - }, - "closedTickets": { - "format": "int32", - "type": "integer" - }, - "openNeedingProviderFirstResponse": { - "format": "int32", - "type": "integer" - }, - "openTickets": { - "format": "int32", - "type": "integer" - }, - "slaCompliantTickets": { - "format": "int32", - "type": "integer" - }, - "slaFirstResponseBreachedTickets": { + "page": { "format": "int32", "type": "integer" }, - "slaResolutionBreachedTickets": { - "description": "Deprecated: ticket SLA is first-response only. Always 0; kept for wire compatibility.", + "pageSize": { "format": "int32", "type": "integer" }, - "ticketsCreatedPerDay": { + "sshKeys": { "items": { - "$ref": "#/components/schemas/v1DashboardTicketStatisticsDayBucket" + "$ref": "#/components/schemas/v1SSHKey" }, "type": "array" }, - "totalTickets": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListDashboardVirtualMachinesResponse": { - "properties": { - "dashboardVmCountTotal": { + "totalCount": { "format": "int32", "type": "integer" - }, - "virtualMachines": { - "items": { - "$ref": "#/components/schemas/v1DashboardVirtualMachineRow" - }, - "type": "array" - }, - "vmtemplateIdsWithVirtualMachines": { - "description": "Distinct VM template IDs with at least one provider-scoped dashboard VM (unfiltered facet for sidebar).", - "items": { - "type": "string" - }, - "type": "array" } }, "type": "object" }, - "v1ListDatabasesResponse": { + "v1ListSchedulesResponse": { "properties": { - "databases": { + "schedules": { "items": { - "$ref": "#/components/schemas/v1GameServerDatabase" + "$ref": "#/components/schemas/v1GameServerSchedule" }, "type": "array" } }, "type": "object" }, - "v1ListDatacentersResponse": { + "v1ListSecretsResponse": { "properties": { - "datacenters": { + "secrets": { "items": { - "$ref": "#/components/schemas/v1DatacenterInfo" + "$ref": "#/components/schemas/v1Secret" }, "type": "array" }, @@ -11337,41 +10159,7 @@ }, "type": "object" }, - "v1ListDistrosResponse": { - "description": "ListDistrosResponse is the guest OS catalog.", - "properties": { - "distros": { - "items": { - "$ref": "#/components/schemas/v1DistroCatalogEntry" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1ListDnsGeoLocationsResponse": { - "properties": { - "locations": { - "items": { - "$ref": "#/components/schemas/v1DnsGeoLocation" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1ListDnsGeoRecordsResponse": { - "properties": { - "records": { - "items": { - "$ref": "#/components/schemas/v1DnsGeoRecord" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1ListDnsRecordsResponse": { + "v1ListServiceAccountTokensResponse": { "properties": { "page": { "format": "int32", @@ -11381,26 +10169,20 @@ "format": "int32", "type": "integer" }, - "records": { + "tokens": { "items": { - "$ref": "#/components/schemas/v1DnsRecord" + "$ref": "#/components/schemas/v1ServiceAccountTokenInfo" }, "type": "array" }, "totalCount": { "format": "int32", "type": "integer" - }, - "types": { - "items": { - "type": "string" - }, - "type": "array" } }, "type": "object" }, - "v1ListDnsZonesResponse": { + "v1ListServiceAccountsResponse": { "properties": { "page": { "format": "int32", @@ -11410,35 +10192,27 @@ "format": "int32", "type": "integer" }, - "totalCount": { - "format": "int32", - "type": "integer" - }, - "zones": { + "serviceAccounts": { "items": { - "$ref": "#/components/schemas/v1DnsZone" + "$ref": "#/components/schemas/v1ServiceAccountResponse" }, "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1ListDomainContactsResponse": { + "v1ListSnapshotsResponse": { "properties": { - "contacts": { + "snapshots": { "items": { - "$ref": "#/components/schemas/v1DomainContact" + "$ref": "#/components/schemas/v1Snapshot" }, "type": "array" }, - "page": { - "format": "int32", - "type": "integer" - }, - "pageSize": { - "format": "int32", - "type": "integer" - }, "totalCount": { "format": "int32", "type": "integer" @@ -11446,22 +10220,14 @@ }, "type": "object" }, - "v1ListDomainEventsResponse": { + "v1ListSubscriptionsResponse": { "properties": { - "events": { + "subscriptions": { "items": { - "$ref": "#/components/schemas/v1DomainEvent" + "$ref": "#/components/schemas/v1Subscription" }, "type": "array" }, - "page": { - "format": "int32", - "type": "integer" - }, - "pageSize": { - "format": "int32", - "type": "integer" - }, "totalCount": { "format": "int32", "type": "integer" @@ -11469,55 +10235,47 @@ }, "type": "object" }, - "v1ListDomainGlueRecordsResponse": { + "v1ListSupportedCurrenciesResponse": { "properties": { - "records": { + "currencies": { "items": { - "$ref": "#/components/schemas/v1DomainGlueRecord" + "type": "string" }, + "title": "List of supported currency codes", "type": "array" + }, + "lastUpdated": { + "format": "int64", + "title": "Timestamp when rates were last updated", + "type": "string" } }, "type": "object" }, - "v1ListDomainInvoicesResponse": { + "v1ListTicketAttachmentsResponse": { "properties": { - "invoices": { + "attachments": { "items": { - "$ref": "#/components/schemas/v1DomainInvoice" + "$ref": "#/components/schemas/v1TicketAttachment" }, "type": "array" - }, - "page": { - "format": "int32", - "type": "integer" - }, - "pageSize": { - "format": "int32", - "type": "integer" - }, - "totalCount": { - "format": "int32", - "type": "integer" } }, "type": "object" }, - "v1ListDomainOrdersResponse": { + "v1ListTicketTemplatesResponse": { "properties": { - "orders": { + "availableVariables": { "items": { - "$ref": "#/components/schemas/v1DomainOrder" + "$ref": "#/components/schemas/v1TicketTemplateVariableDefinition" }, "type": "array" }, - "page": { - "format": "int32", - "type": "integer" - }, - "pageSize": { - "format": "int32", - "type": "integer" + "ticketTemplates": { + "items": { + "$ref": "#/components/schemas/v1TicketTemplate" + }, + "type": "array" }, "totalCount": { "format": "int32", @@ -11526,3408 +10284,3808 @@ }, "type": "object" }, - "v1ListEffectivePermissionsResponse": { + "v1ListTicketsResponse": { "properties": { - "effectivePermissions": { + "organizationDetails": { "additionalProperties": { - "$ref": "#/components/schemas/v1EffectivePermissions" + "$ref": "#/components/schemas/v1OrganizationDetails" }, + "title": "Map of organization ID to organization name", "type": "object" }, + "tickets": { + "items": { + "$ref": "#/components/schemas/v1Ticket" + }, + "type": "array" + }, "totalCount": { "format": "int32", "type": "integer" + }, + "userDetails": { + "additionalProperties": { + "$ref": "#/components/schemas/v1UserDetails" + }, + "title": "Map of user ID to user details (first_name, last_name)", + "type": "object" } }, "type": "object" }, - "v1ListEligibleNodesForPlanResponse": { + "v1ListUsageRecordsResponse": { "properties": { - "nodes": { + "totalCount": { + "format": "int32", + "type": "integer" + }, + "usageRecords": { "items": { - "$ref": "#/components/schemas/v1PlanLiveValidationNodeView" + "$ref": "#/components/schemas/v1UsageRecord" }, "type": "array" } }, "type": "object" }, - "v1ListEnvironmentVariablesResponse": { + "v1ListUsersResponse": { "properties": { - "environmentVariables": { - "items": { - "$ref": "#/components/schemas/v1EnvironmentVariable" - }, - "type": "array" - }, "totalCount": { "format": "int32", "type": "integer" - } - }, - "type": "object" - }, - "v1ListFilesResponse": { - "properties": { - "files": { + }, + "users": { "items": { - "$ref": "#/components/schemas/v1GameServerFile" + "$ref": "#/components/schemas/v1User" }, "type": "array" } }, "type": "object" }, - "v1ListFirewallAddressGroupsResponse": { + "v1ListVMTagsResponse": { "properties": { - "groups": { + "tags": { "items": { - "$ref": "#/components/schemas/v1FirewallAddressGroup" + "type": "string" }, + "title": "List of unique tags from all VMs belonging to the organization", "type": "array" }, "totalCount": { "format": "int32", + "title": "Total number of unique tags", "type": "integer" } }, "type": "object" }, - "v1ListFirewallRuleSetsResponse": { + "v1ListVMTemplatesResponse": { "properties": { - "rulesets": { - "items": { - "$ref": "#/components/schemas/v1FirewallRuleSet" - }, - "type": "array" - }, "totalCount": { "format": "int32", "type": "integer" - } - }, - "type": "object" - }, - "v1ListFirewallRulesResponse": { - "properties": { - "rules": { - "items": { - "$ref": "#/components/schemas/v1FirewallRuleResource" - }, - "type": "array" }, - "totalCount": { + "totalPages": { + "description": "Page count when pagination packs whole node groups (never splits a node across pages).", "format": "int32", "type": "integer" - } - }, - "type": "object" - }, - "v1ListGameServerAllocationsResponse": { - "properties": { - "allocations": { + }, + "vmTemplates": { "items": { - "$ref": "#/components/schemas/v1GameServerAllocation" + "$ref": "#/components/schemas/v1VMTemplate" }, "type": "array" } }, "type": "object" }, - "v1ListGameServerBackupsResponse": { + "v1ListVirtualMachineSmtpOutboundPoliciesResponse": { "properties": { - "backups": { + "policies": { "items": { - "$ref": "#/components/schemas/v1GameServerBackup" + "$ref": "#/components/schemas/v1VirtualMachineSmtpOutboundPolicyView" }, "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1ListGameServerTemplatesResponse": { + "v1ListVirtualMachinesResponse": { "properties": { - "templates": { + "totalCount": { + "format": "int32", + "type": "integer" + }, + "virtualMachines": { "items": { - "$ref": "#/components/schemas/v1GameServerTemplate" + "$ref": "#/components/schemas/v1VirtualMachine" }, "type": "array" } }, "type": "object" }, - "v1ListGameServersResponse": { + "v1LiveValidationCheckView": { "properties": { - "gameServers": { - "items": { - "$ref": "#/components/schemas/v1GameServer" - }, - "type": "array" + "code": { + "type": "string" + }, + "note": { + "type": "string" + }, + "passed": { + "type": "boolean" } }, "type": "object" }, - "v1ListGroupsResponse": { + "v1LoginMfaVerifyRequest": { "properties": { - "groups": { - "items": { - "$ref": "#/components/schemas/v1Group" - }, - "type": "array" + "code": { + "description": "Authenticator TOTP code or a one-time recovery code.", + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "loginSessionId": { + "type": "string" } }, "type": "object" }, - "v1ListHeldPayoutsResponse": { + "v1LoginRequest": { "properties": { - "heldPayouts": { - "items": { - "$ref": "#/components/schemas/v1HeldPayout" - }, - "type": "array" - }, - "page": { - "format": "int32", - "type": "integer" + "email": { + "type": "string" }, - "pageSize": { - "format": "int32", - "type": "integer" + "password": { + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "turnstileToken": { + "description": "Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).", + "type": "string" } }, "type": "object" }, - "v1ListHighRiskCouponsResponse": { + "v1LoginResponse": { "properties": { - "coupons": { - "items": { - "$ref": "#/components/schemas/v1HighRiskCoupon" - }, - "type": "array" + "loginSessionId": { + "type": "string" }, - "page": { - "format": "int32", - "type": "integer" + "mfaRequired": { + "description": "When true, token/organization_id are empty and login_session_id must be used with LoginMfaVerify.", + "type": "boolean" }, - "pageSize": { - "format": "int32", - "type": "integer" + "organizationId": { + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "token": { + "description": "Present when MFA is not required (or after LoginMfaVerify succeeds).", + "type": "string" } }, "type": "object" }, - "v1ListHookScriptsResponse": { + "v1LogoutRequest": { "properties": { - "hookScripts": { - "items": { - "$ref": "#/components/schemas/v1HookScript" - }, - "type": "array" - }, - "page": { - "format": "int32", - "type": "integer" - }, - "pageSize": { - "format": "int32", - "type": "integer" - }, - "totalCount": { - "format": "int32", - "type": "integer" + "invalidateAll": { + "type": "boolean" } }, "type": "object" }, - "v1ListInstantAppsResponse": { + "v1ManualPayout": { "properties": { - "instantApps": { - "items": { - "$ref": "#/components/schemas/v1InstantApp" - }, - "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListInternalCommentsResponse": { - "properties": { - "comments": { - "items": { - "$ref": "#/components/schemas/v1TicketInternalComment" - }, - "type": "array" + "accountHolderName": { + "title": "Name of the account holder", + "type": "string" + }, + "accountNumber": { + "title": "Bank account number (for non-SEPA countries)", + "type": "string" + }, + "bankName": { + "title": "Name of the bank", + "type": "string" + }, + "bic": { + "title": "Bank Identifier Code / SWIFT code (for SEPA countries)", + "type": "string" + }, + "country": { + "title": "ISO 3166-1 alpha-2 country code", + "type": "string" + }, + "createdAt": { + "format": "date-time", + "title": "Account creation timestamp", + "type": "string" + }, + "iban": { + "title": "International Bank Account Number (for SEPA countries)", + "type": "string" + }, + "id": { + "title": "Manual payout account ID", + "type": "string" + }, + "isVerified": { + "title": "Whether the payout account has been verified by admin", + "type": "boolean" + }, + "notes": { + "title": "User-provided notes about the payout account", + "type": "string" + }, + "routingNumber": { + "title": "Routing number (for US accounts) or sort code (for UK accounts)", + "type": "string" + }, + "updatedAt": { + "format": "date-time", + "title": "Last update timestamp", + "type": "string" + }, + "verificationNotes": { + "title": "Admin notes about verification status", + "type": "string" } }, "type": "object" }, - "v1ListInvitesResponse": { + "v1MarketplaceSearchParsedQuery": { + "description": "Structured filters extracted from the user query (word matcher today; LLM later).", "properties": { - "invites": { + "filterBillingType": { + "$ref": "#/components/schemas/v1BillingType" + }, + "filterCity": { + "type": "string" + }, + "filterComputeCategory": { + "$ref": "#/components/schemas/v1ComputeCategory" + }, + "filterComputeType": { + "$ref": "#/components/schemas/v1ComputeType" + }, + "filterCountry": { + "type": "string" + }, + "filterPlanCode": { + "type": "string" + }, + "matchedTerms": { "items": { - "$ref": "#/components/schemas/v1Invite" + "type": "string" }, "type": "array" }, - "totalCount": { + "minDiskGb": { + "format": "int32", + "type": "integer" + }, + "minRamGb": { + "format": "int32", + "type": "integer" + }, + "minVcpus": { "format": "int32", "type": "integer" + }, + "parser": { + "description": "Parser implementation id, e.g. \"word_matcher\" or future \"llm\".", + "type": "string" } }, "type": "object" }, - "v1ListInvoicesResponse": { + "v1MarketplaceSearchPlanPriceSummary": { "properties": { - "invoices": { - "items": { - "$ref": "#/components/schemas/v1Invoice" - }, - "type": "array" + "billingPeriod": { + "$ref": "#/components/schemas/v1BillingPeriod" }, - "page": { - "format": "int32", - "type": "integer" + "currency": { + "type": "string" }, - "pageSize": { + "freeUnits": { + "description": "Included free units (e.g. bandwidth GB). Used for bandwidth summaries in search.", "format": "int32", "type": "integer" }, - "totalCount": { - "format": "int32", - "type": "integer" + "id": { + "type": "string" + }, + "metadata": { + "type": "object" + }, + "metricName": { + "type": "string" + }, + "overagePrice": { + "description": "Overage unit price as decimal string (same precision as PlanPrice.overage_price).", + "type": "string" + }, + "pricingFormula": { + "description": "Percentage / formula pricing for add-ons (e.g. backup = % of VM price).", + "type": "object" + }, + "pricingModel": { + "$ref": "#/components/schemas/v1PricingModel" + }, + "productType": { + "$ref": "#/components/schemas/v1ProductType" + }, + "unitAmount": { + "type": "string" + }, + "unitName": { + "type": "string" } }, "type": "object" }, - "v1ListLinkedIdentitiesResponse": { + "v1MarketplaceSearchResult": { "properties": { - "hasPassword": { - "description": "True when the user has a local password (can unlink their last SSO identity).", - "type": "boolean" + "addonPrices": { + "items": { + "$ref": "#/components/schemas/v1MarketplaceSearchPlanPriceSummary" + }, + "type": "array" }, - "identities": { + "bandwidthPrices": { + "description": "Bandwidth plan prices (egress/ingress) with free units + overage for search UI.", "items": { - "$ref": "#/components/schemas/v1LinkedIdentity" + "$ref": "#/components/schemas/v1MarketplaceSearchPlanPriceSummary" }, "type": "array" }, - "ssoRegistered": { - "description": "True when the account was created by SSO sign-up.\nPassword set, change, and recovery stay disabled for that account.", - "type": "boolean" - } - }, - "type": "object" - }, - "v1ListMarketplaceProviderDirectoryResponse": { - "properties": { - "page": { + "billingType": { + "$ref": "#/components/schemas/v1BillingType" + }, + "ddosProvider": { + "type": "string" + }, + "diskGb": { "format": "int32", "type": "integer" }, - "pageSize": { + "organizationId": { + "type": "string" + }, + "organizationName": { + "type": "string" + }, + "planCode": { + "type": "string" + }, + "planId": { + "type": "string" + }, + "planPrice": { + "$ref": "#/components/schemas/v1MarketplaceSearchPlanPriceSummary" + }, + "providerLogoUrl": { + "type": "string" + }, + "ramGb": { "format": "int32", "type": "integer" }, - "providers": { - "items": { - "$ref": "#/components/schemas/v1ProviderInfo" - }, - "type": "array" + "rating": { + "format": "float", + "type": "number" }, - "totalCount": { + "regionCity": { + "type": "string" + }, + "regionCountry": { + "type": "string" + }, + "regionId": { + "title": "Region UUID for this offer (one plan = one region after plan-model change)", + "type": "string" + }, + "totalReviews": { "format": "int32", "type": "integer" - } - }, - "type": "object" - }, - "v1ListMetricsResponse": { - "properties": { - "metrics": { - "items": { - "$ref": "#/components/schemas/v1Metric" - }, - "type": "array" }, - "totalCount": { + "vcpus": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1ListMetricsWriteCredentialsResponse": { + "v1Metadata": { "properties": { - "credentials": { - "items": { - "$ref": "#/components/schemas/v1MetricsWriteCredential" - }, - "type": "array" + "buildBranch": { + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "buildCommit": { + "type": "string" + }, + "buildDate": { + "type": "string" + }, + "buildTag": { + "type": "string" + }, + "name": { + "type": "string" + }, + "version": { + "type": "string" + }, + "versionDetails": { + "type": "string" } }, "type": "object" }, - "v1ListMyInvitesResponse": { + "v1Metric": { "properties": { - "invites": { - "items": { - "$ref": "#/components/schemas/v1Invite" - }, - "type": "array" + "aggregationType": { + "$ref": "#/components/schemas/v1AggregationType" }, - "totalCount": { + "billable": { + "title": "Billing configuration", + "type": "boolean" + }, + "code": { + "type": "string" + }, + "description": { + "type": "string" + }, + "externalId": { + "title": "External integration", + "type": "string" + }, + "id": { + "title": "Fields", + "type": "string" + }, + "metadata": { + "title": "Metadata", + "type": "object" + }, + "metricType": { + "$ref": "#/components/schemas/v1MetricType" + }, + "name": { + "title": "Metric identification", + "type": "string" + }, + "recurring": { + "type": "boolean" + }, + "retentionDays": { "format": "int32", "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "unit": { + "type": "string" + }, + "unitPlural": { + "type": "string" } }, "type": "object" }, - "v1ListNetworkNodesResponse": { - "properties": { - "nodes": { - "items": { - "$ref": "#/components/schemas/v1Node" - }, - "title": "List of nodes assigned to this network", - "type": "array" - } - }, - "type": "object" + "v1MetricAggregation": { + "default": "METRIC_AGGREGATION_UNSPECIFIED", + "enum": [ + "METRIC_AGGREGATION_UNSPECIFIED", + "METRIC_AGGREGATION_SUM", + "METRIC_AGGREGATION_MAX", + "METRIC_AGGREGATION_LAST_DURING_PERIOD", + "METRIC_AGGREGATION_COUNT" + ], + "type": "string" }, - "v1ListNetworksResponse": { + "v1MetricType": { + "default": "METRIC_TYPE_UNSPECIFIED", + "enum": [ + "METRIC_TYPE_UNSPECIFIED", + "METRIC_TYPE_COUNTER", + "METRIC_TYPE_GAUGE", + "METRIC_TYPE_HISTOGRAM", + "METRIC_TYPE_SUMMARY" + ], + "type": "string" + }, + "v1MetricsWriteCredential": { "properties": { - "networks": { + "agentId": { + "type": "string" + }, + "createTime": { + "format": "date-time", + "type": "string" + }, + "expiresAt": { + "format": "date-time", + "type": "string" + }, + "id": { + "type": "string" + }, + "lastUsedAt": { + "format": "date-time", + "type": "string" + }, + "name": { + "type": "string" + }, + "organizationId": { + "type": "string" + }, + "publicId": { + "type": "string" + }, + "revokedAt": { + "format": "date-time", + "type": "string" + }, + "scopes": { "items": { - "$ref": "#/components/schemas/v1Network" + "type": "string" }, "type": "array" - }, - "total": { - "format": "int32", - "type": "integer" } }, "type": "object" }, - "v1ListNodesResponse": { + "v1MoneyAmount": { "properties": { - "nodes": { - "items": { - "$ref": "#/components/schemas/v1NodeWithExpandedRegion" - }, - "type": "array" + "amount": { + "title": "Decimal string, e.g. \"11.00\"", + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "currency": { + "title": "ISO 4217 currency code", + "type": "string" } }, "type": "object" }, - "v1ListNotificationSettingsResponse": { + "v1MyStorefront": { "properties": { - "notificationSettings": { + "highlightAllowlist": { "items": { - "$ref": "#/components/schemas/v1NotificationSetting" + "type": "string" }, "type": "array" }, - "totalCount": { - "format": "int32", - "type": "integer" + "liveRevision": { + "$ref": "#/components/schemas/v1StorefrontRevision" + }, + "liveSlug": { + "type": "string" + }, + "optedIn": { + "type": "boolean" + }, + "participationStatus": { + "$ref": "#/components/schemas/v1StorefrontParticipationStatus" + }, + "slugLocked": { + "type": "boolean" + }, + "suggestedSlug": { + "type": "string" + }, + "unpublishedByOps": { + "type": "boolean" + }, + "workingRevision": { + "$ref": "#/components/schemas/v1StorefrontRevision" } }, "type": "object" }, - "v1ListNotificationTemplatesResponse": { + "v1Network": { "properties": { - "notificationTemplates": { + "description": { + "type": "string" + }, + "dnsServers": { "items": { - "$ref": "#/components/schemas/v1NotificationTemplate" + "type": "string" }, + "title": "DNS server IP addresses (e.g., [\"8.8.8.8\", \"1.1.1.1\"])", "type": "array" }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListOAuth2ClientsResponse": { - "properties": { - "clients": { + "id": { + "title": "Fields", + "type": "string" + }, + "macAddressPrefix": { + "description": "First 3 octets for MAC allocation within this network (e.g. BC:24:11). Default: BC:24:11.", + "type": "string" + }, + "metadata": { + "title": "Metadata", + "type": "object" + }, + "name": { + "type": "string" + }, + "nodes": { "items": { - "$ref": "#/components/schemas/v1OAuth2Client" + "$ref": "#/components/schemas/v1NetworkNode" }, + "title": "Nodes connected to this network (only populated in ListNetworks response)", "type": "array" }, - "page": { - "format": "int32", - "type": "integer" + "organizationId": { + "title": "Relations", + "type": "string" }, - "pageSize": { - "format": "int32", - "type": "integer" + "status": { + "$ref": "#/components/schemas/protov1Status" }, - "totalCount": { - "format": "int32", - "type": "integer" + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" } }, "type": "object" }, - "v1ListOrderGamesResponse": { + "v1NetworkNode": { "properties": { - "games": { - "items": { - "$ref": "#/components/schemas/v1OrderGame" - }, - "type": "array" + "id": { + "type": "string" + }, + "name": { + "type": "string" } }, + "title": "NetworkNode represents a node connected to a network (simplified info)", "type": "object" }, - "v1ListOrganizationsResponse": { + "v1Node": { "properties": { - "organizations": { - "items": { - "$ref": "#/components/schemas/v1Organization" - }, - "type": "array" + "backupStorageCompression": { + "$ref": "#/components/schemas/v1BackupStorageCompression" }, - "totalCount": { + "backupStorageDestination": { + "type": "string" + }, + "computeType": { + "$ref": "#/components/schemas/v1NodeComputeType" + }, + "cpuCatalogSupported": { + "description": "True when the host CPU model matches a cpu_catalog row with is_supported.\nFalse when the model is missing, unmatched, or matched but not supported.", + "type": "boolean" + }, + "cpuOverallocatePercent": { "format": "int32", + "title": "Overallocation", "type": "integer" - } - }, - "type": "object" - }, - "v1ListPaymentMethodsResponse": { - "properties": { - "paymentMethods": { - "items": { - "$ref": "#/components/schemas/v1PaymentMethod" - }, - "type": "array" }, - "totalCount": { + "hasCpuTopology": { + "description": "True when a dedicated node has a parsed CPU topology document stored\n(required before dedicated preflight can pass).", + "type": "boolean" + }, + "id": { + "title": "Identification", + "type": "string" + }, + "inventory": { + "$ref": "#/components/schemas/v1NodeInventory" + }, + "maintenanceMode": { + "title": "Maintenance mode - when enabled, reconciliation loop skips Proxmox state checks", + "type": "boolean" + }, + "memoryOverallocatePercent": { "format": "int32", "type": "integer" - } - }, - "type": "object" - }, - "v1ListPaymentsResponse": { - "properties": { - "page": { + }, + "metadata": { + "title": "Metadata", + "type": "object" + }, + "name": { + "type": "string" + }, + "networkBridge": { + "description": "Node provisioning settings (copied into ProxmoxVM CR at generation time)\nProxmox Linux bridge for VM primary NIC (e.g. vmbr0). Default: vmbr0.", + "type": "string" + }, + "networkId": { + "description": "Network ID this node is assigned to (optional)", + "title": "Network assignment (IPAM)", + "type": "string" + }, + "networkModel": { + "description": "Proxmox NIC model for primary NIC (virtio, e1000, ...). Default: virtio.", + "type": "string" + }, + "networkName": { + "description": "Proxmox net device key for primary NIC (e.g. net0). Default: net0.", + "type": "string" + }, + "networkVlanId": { + "description": "802.1Q VLAN tag on primary NIC (Proxmox tag=); 0 = untagged.", "format": "int32", "type": "integer" }, - "pageSize": { + "organizationId": { + "type": "string" + }, + "panelNodeId": { "format": "int32", "type": "integer" }, - "payments": { - "items": { - "$ref": "#/components/schemas/v1Payment" - }, - "type": "array" + "platform": { + "title": "Relations", + "type": "string" }, - "totalCount": { + "pterodactylLocationId": { + "format": "int32", + "type": "integer" + }, + "region": { + "type": "string" + }, + "serviceStatus": { + "$ref": "#/components/schemas/v1ServiceStatus" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "storageOverallocatePercent": { + "format": "int32", + "type": "integer" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "vmStorageDestination": { + "description": "Proxmox storage ID for new VM root disks (e.g. local-lvm).", + "type": "string" + }, + "vmidSeed": { "format": "int32", + "title": "VM ID seed - starting point for VM ID generation on this node", "type": "integer" + }, + "wingsNodeName": { + "description": "Wings node name on a Pterodactyl platform. Empty on a hypervisor node.", + "type": "string" } }, "type": "object" }, - "v1ListPayoutInvoicesResponse": { + "v1NodeCPUMapCPU": { "properties": { - "page": { + "core": { + "description": "Physical core id (unique within a socket).", "format": "int32", "type": "integer" }, - "pageSize": { + "cpu": { + "description": "Host logical CPU id (the affinity bit).", "format": "int32", "type": "integer" }, - "payoutInvoices": { + "cpuStatus": { + "$ref": "#/components/schemas/v1NodeCPUStatus" + }, + "numa": { + "format": "int32", + "type": "integer" + }, + "siblings": { + "description": "Full SMT sibling set including this CPU.", "items": { - "$ref": "#/components/schemas/v1PayoutInvoice" + "format": "int32", + "type": "integer" }, "type": "array" }, - "totalCount": { + "socket": { "format": "int32", "type": "integer" + }, + "vmHostname": { + "type": "string" + }, + "vmId": { + "description": "Set when cpu_status is ALLOCATED_NR.", + "type": "string" } }, "type": "object" }, - "v1ListPermissionsResponse": { + "v1NodeCPUMapNUMA": { "properties": { - "permissions": { + "freeCores": { + "format": "int32", + "type": "integer" + }, + "id": { + "format": "int32", + "type": "integer" + }, + "memoryAllocatedMb": { + "description": "Memory attributed to NodeRings VMs placed on this NUMA node.", + "format": "int64", + "type": "string" + }, + "memoryEstimated": { + "type": "boolean" + }, + "memoryFreeMb": { + "format": "int64", + "type": "string" + }, + "memoryMb": { + "format": "int64", + "type": "string" + }, + "memoryReservedMb": { + "description": "Host reserve withheld from VMs on this NUMA node.", + "format": "int64", + "type": "string" + }, + "sockets": { "items": { - "$ref": "#/components/schemas/v1Permission" + "format": "int32", + "type": "integer" }, "type": "array" }, - "totalCount": { + "totalCores": { + "description": "Logical CPU (vCPU) counts on this NUMA node \u2014 sellable capacity units.", "format": "int32", "type": "integer" } }, "type": "object" }, - "v1ListPlanLiveValidationBenchmarksResponse": { - "properties": { - "benchmarks": { - "items": { - "$ref": "#/components/schemas/v1PlanLiveValidationBenchmarkView" - }, - "type": "array" - } - }, - "type": "object" + "v1NodeCPUStatus": { + "default": "NODE_CPU_STATUS_UNSPECIFIED", + "description": "Occupancy status of one host logical CPU (affinity bit).\n\n - NODE_CPU_STATUS_ALLOCATED_NR: Allocated to a NodeRings VM (vm_id/vm_hostname set).\n - NODE_CPU_STATUS_PINNED_FOREIGN: Pinned by a foreign (non-NodeRings) guest per exporter observation.\n - NODE_CPU_STATUS_DRIFT: DB expectation and exporter observation disagree for this CPU.", + "enum": [ + "NODE_CPU_STATUS_UNSPECIFIED", + "NODE_CPU_STATUS_AVAILABLE", + "NODE_CPU_STATUS_ALLOCATED_NR", + "NODE_CPU_STATUS_PINNED_FOREIGN", + "NODE_CPU_STATUS_DRIFT" + ], + "type": "string" }, - "v1ListPlanLiveValidationsResponse": { + "v1NodeComputeType": { + "default": "NODE_COMPUTE_TYPE_UNSPECIFIED", + "description": "Compute product hosted by a node. Exclusive: a node is shared XOR dedicated\n(docs/README-DEDICATED-CPU-CORES.md, design decision D1).\n\n - NODE_COMPUTE_TYPE_SHARED: Shared vCPU hosting (CPU oversubscription allowed). Default.\n - NODE_COMPUTE_TYPE_DEDICATED: Dedicated pinned CPU cores (no CPU overallocation).", + "enum": [ + "NODE_COMPUTE_TYPE_UNSPECIFIED", + "NODE_COMPUTE_TYPE_SHARED", + "NODE_COMPUTE_TYPE_DEDICATED" + ], + "type": "string" + }, + "v1NodeInventory": { "properties": { - "totalCount": { + "cpuCore": { "format": "int32", "type": "integer" }, - "validations": { + "cpuCoreAllocated": { + "format": "int32", + "type": "integer" + }, + "cpuType": { + "$ref": "#/components/schemas/v1CPUType" + }, + "memory": { + "format": "int32", + "type": "integer" + }, + "memoryAllocated": { + "format": "int32", + "type": "integer" + }, + "storagePools": { "items": { - "$ref": "#/components/schemas/v1PlanLiveValidationView" + "$ref": "#/components/schemas/v1StoragePool" }, "type": "array" } }, "type": "object" }, - "v1ListPlansResponse": { + "v1NodePlacementPolicy": { "properties": { - "plans": { + "defaultStrategy": { + "$ref": "#/components/schemas/v1NodePlacementStrategy" + }, + "regionOverrides": { "items": { - "$ref": "#/components/schemas/v1Plan" + "$ref": "#/components/schemas/v1NodePlacementRegionOverride" }, "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" } }, "type": "object" }, - "v1ListPlatformsResponse": { + "v1NodePlacementRegionOverride": { "properties": { - "platforms": { - "items": { - "$ref": "#/components/schemas/v1Platform" - }, - "type": "array" + "regionId": { + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "strategy": { + "$ref": "#/components/schemas/v1NodePlacementStrategy" } }, "type": "object" }, - "v1ListPrefixesResponse": { + "v1NodePlacementStrategy": { + "default": "NODE_PLACEMENT_STRATEGY_UNSPECIFIED", + "enum": [ + "NODE_PLACEMENT_STRATEGY_UNSPECIFIED", + "NODE_PLACEMENT_STRATEGY_FIRST_STABLE", + "NODE_PLACEMENT_STRATEGY_ROUND_ROBIN", + "NODE_PLACEMENT_STRATEGY_LEAST_ASSIGNED_VMS", + "NODE_PLACEMENT_STRATEGY_RANDOM" + ], + "type": "string" + }, + "v1NodeWithExpandedRegion": { "properties": { - "prefixes": { - "items": { - "$ref": "#/components/schemas/v1Prefix" - }, - "type": "array" + "expandedRegion": { + "$ref": "#/components/schemas/v1Region" }, - "total": { - "format": "int32", - "type": "integer" + "node": { + "$ref": "#/components/schemas/v1Node" } }, "type": "object" }, - "v1ListPreflightChecksResponse": { + "v1NotificationSetting": { "properties": { - "marketplaceReadyCheckEnabled": { - "description": "Explicit presence: false when PLAN_MARKETPLACE_READY is disabled in config (interval may be omitted as 0).", + "enabled": { "type": "boolean" }, - "marketplaceReadyCheckIntervalSeconds": { - "description": "Resolved from preflight.PLAN_MARKETPLACE_READY interval (seconds); for UI scheduling hints.", - "format": "int32", - "type": "integer" + "id": { + "title": "Fields", + "type": "string" }, - "plans": { - "items": { - "$ref": "#/components/schemas/v1PlanPreflightView" - }, - "type": "array" + "metadata": { + "title": "Metadata", + "type": "object" }, - "totalCount": { - "format": "int32", - "type": "integer" + "organization": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "type": { + "type": "string" + }, + "user": { + "title": "Relations", + "type": "string" } }, "type": "object" }, - "v1ListPromoCreditGrantsResponse": { + "v1NotificationTemplate": { "properties": { - "grants": { - "items": { - "$ref": "#/components/schemas/v1PromoCreditGrant" - }, - "type": "array" + "contentType": { + "type": "string" }, - "page": { - "format": "int32", - "type": "integer" + "description": { + "type": "string" }, - "pageSize": { - "format": "int32", - "type": "integer" + "emailBodyTemplate": { + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "emailSubjectTemplate": { + "type": "string" + }, + "id": { + "title": "Fields", + "type": "string" + }, + "metadata": { + "title": "Metadata", + "type": "object" + }, + "name": { + "type": "string" + }, + "pushNotificationBodyTemplate": { + "type": "string" + }, + "pushNotificationTitleTemplate": { + "type": "string" + }, + "smsBodyTemplate": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "webhookBodyTemplate": { + "type": "string" } }, "type": "object" }, - "v1ListProviderCustomerAssetsResponse": { + "v1OAuth2Client": { "properties": { - "assets": { + "clientId": { + "type": "string" + }, + "clientType": { + "type": "string" + }, + "description": { + "type": "string" + }, + "isActive": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "redirectUris": { "items": { - "$ref": "#/components/schemas/v1ProviderCustomerAssetRow" + "type": "string" }, "type": "array" }, - "totalCount": { - "format": "int32", - "type": "integer" + "requiresPkce": { + "type": "boolean" + }, + "scopes": { + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "v1ListProviderCustomersResponse": { + "v1OpenConsoleResponse": { "properties": { - "customers": { - "items": { - "$ref": "#/components/schemas/v1ProviderCustomerRow" - }, - "type": "array" + "ticket": { + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "websocketPath": { + "type": "string" } }, "type": "object" }, - "v1ListProviderReviewsResponse": { + "v1OperationStatus": { + "default": "OPERATION_STATUS_UNSPECIFIED", + "enum": [ + "OPERATION_STATUS_UNSPECIFIED", + "OPERATION_STATUS_CREATED", + "OPERATION_STATUS_STARTED", + "OPERATION_STATUS_STOPPED", + "OPERATION_STATUS_DELETED", + "OPERATION_STATUS_RESTARTED", + "OPERATION_STATUS_REINSTALLING" + ], + "type": "string" + }, + "v1OrderGame": { "properties": { - "providerAverageStar": { - "format": "double", - "title": "all reviews for this provider", - "type": "number" + "eula": { + "description": "eula is true when this egg stops until the player accepts the Minecraft EULA.", + "type": "boolean" }, - "providerStarSummary": { - "items": { - "$ref": "#/components/schemas/v1ProviderReviewStarSummary" - }, - "type": "array" + "icon": { + "type": "string" }, - "providerTotalReviews": { - "format": "int32", - "title": "all reviews for this provider", - "type": "integer" + "id": { + "type": "string" }, - "reviews": { + "name": { + "type": "string" + }, + "variables": { "items": { - "$ref": "#/components/schemas/v1ProviderReviewListItem" + "$ref": "#/components/schemas/v1EggVariable" }, "type": "array" - }, - "totalCount": { - "format": "int32", - "title": "total matching current filters", - "type": "integer" } }, "type": "object" }, - "v1ListProvidersResponse": { + "v1Organization": { "properties": { - "page": { - "format": "int32", - "type": "integer" + "asn": { + "format": "int64", + "type": "string" }, - "pageSize": { - "format": "int32", - "type": "integer" + "ddosProvider": { + "description": "DDoS mitigation partner slug (e.g. \"none\"). Provider organizations only.", + "type": "string" }, - "providers": { + "description": { + "type": "string" + }, + "domains": { "items": { - "$ref": "#/components/schemas/v1ProviderInfo" + "type": "string" }, "type": "array" }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListPublicStorefrontsResponse": { - "properties": { - "page": { - "format": "int32", - "type": "integer" + "enforceMfa": { + "type": "boolean" }, - "pageSize": { - "format": "int32", - "type": "integer" + "enforceSso": { + "type": "boolean" }, - "storefronts": { + "enforceVerifiedDomain": { + "type": "boolean" + }, + "groups": { "items": { - "$ref": "#/components/schemas/v1PublicStorefrontCard" + "type": "string" }, "type": "array" }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListRefundsResponse": { - "properties": { - "page": { - "format": "int32", - "type": "integer" + "hypervisorDriver": { + "$ref": "#/components/schemas/v1PlatformDriver" }, - "pageSize": { - "format": "int32", - "type": "integer" + "id": { + "title": "Fields", + "type": "string" }, - "refunds": { - "items": { - "$ref": "#/components/schemas/v1Refund" - }, - "type": "array" + "isVerified": { + "description": "Provider marketplace / admin verification (first-class fields; not part of metadata).", + "type": "boolean" }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListRegionsResponse": { - "properties": { - "regions": { - "items": { - "$ref": "#/components/schemas/v1Region" - }, - "type": "array" + "metadata": { + "title": "Metadata", + "type": "object" }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListRegisteredDomainsResponse": { - "properties": { - "domains": { + "name": { + "type": "string" + }, + "onboarded": { + "description": "True after the provider has completed the self-serve onboarding checklist once.", + "type": "boolean" + }, + "organizationRoles": { "items": { - "$ref": "#/components/schemas/v1RegisteredDomain" + "type": "string" }, "type": "array" }, - "page": { - "format": "int32", - "type": "integer" + "owner": { + "title": "Relations", + "type": "string" }, - "pageSize": { - "format": "int32", - "type": "integer" + "providerLogoUrl": { + "title": "Provider marketplace logo (data URL or https URL); only used for provider organizations", + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListRoadmapFeatureRequestCommentsResponse": { - "properties": { - "comments": { + "providerWebsiteUrl": { + "description": "Public storefront / company website (http or https). Provider organizations only.", + "type": "string" + }, + "reviewRequested": { + "type": "boolean" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "subscriptions": { "items": { - "$ref": "#/components/schemas/v1RoadmapFeatureRequestComment" + "type": "string" }, "type": "array" }, - "total": { - "format": "int32", - "type": "integer" + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "type": { + "$ref": "#/components/schemas/v1OrganizationType" } }, + "title": "Organization object for providers and clients", "type": "object" }, - "v1ListRoadmapFeatureRequestsResponse": { + "v1OrganizationDetails": { "properties": { - "requests": { - "items": { - "$ref": "#/components/schemas/v1RoadmapFeatureRequest" - }, - "type": "array" + "name": { + "type": "string" }, - "total": { - "format": "int32", - "type": "integer" + "orgType": { + "type": "string" } }, + "title": "OrganizationDetails contains organization information", "type": "object" }, - "v1ListRoadmapProductCategoriesResponse": { + "v1OrganizationType": { + "default": "ORGANIZATION_TYPE_UNSPECIFIED", + "enum": [ + "ORGANIZATION_TYPE_UNSPECIFIED", + "ORGANIZATION_TYPE_PROVIDER", + "ORGANIZATION_TYPE_CLIENT" + ], + "type": "string" + }, + "v1PayInvoiceResponse": { "properties": { - "products": { + "invoice": { + "$ref": "#/components/schemas/v1Invoice" + }, + "invoiceLines": { "items": { - "$ref": "#/components/schemas/v1RoadmapProductCategory" + "$ref": "#/components/schemas/v1InvoiceLine" }, "type": "array" + }, + "paymentStatus": { + "type": "string" + }, + "transactionId": { + "type": "string" } }, "type": "object" }, - "v1ListRolesResponse": { + "v1Payment": { "properties": { - "roles": { - "items": { - "$ref": "#/components/schemas/v1Role" - }, - "type": "array" + "amount": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "createdAt": { + "format": "date-time", + "type": "string" + }, + "currency": { + "title": "Currency code (ISO 4217)", + "type": "string" + }, + "failureCode": { + "title": "Payment provider failure code (if applicable)", + "type": "string" + }, + "failureReason": { + "title": "Reason for payment failure (if applicable)", + "type": "string" + }, + "id": { + "type": "string" + }, + "invoiceId": { + "title": "Invoice this payment is for", + "type": "string" + }, + "paymentMethodId": { + "title": "Payment method used for this payment", + "type": "string" + }, + "paymentProvider": { + "title": "Payment provider name (e.g., 'stripe', 'paypal')", + "type": "string" + }, + "paymentStatus": { + "$ref": "#/components/schemas/v1PaymentStatus" + }, + "processedAt": { + "format": "date-time", + "title": "When payment was processed", + "type": "string" + }, + "refundAmount": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" + }, + "refundReason": { + "title": "Reason for refund (if applicable)", + "type": "string" + }, + "refundedAt": { + "format": "date-time", + "title": "When payment was refunded", + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "transactionId": { + "title": "Payment provider transaction ID", + "type": "string" } }, + "title": "Payment represents a payment transaction for an invoice", "type": "object" }, - "v1ListSSHKeysResponse": { + "v1PaymentMethod": { "properties": { - "page": { + "brand": { + "description": "Card brand (for cards): \"visa\", \"mastercard\", etc.", + "type": "string" + }, + "createdAt": { + "format": "date-time", + "title": "When payment method was attached", + "type": "string" + }, + "customerId": { + "title": "Payment provider customer ID", + "type": "string" + }, + "expiryMonth": { "format": "int32", + "title": "Expiry month (for cards, 1-12)", "type": "integer" }, - "pageSize": { + "expiryYear": { "format": "int32", + "title": "Expiry year (for cards)", "type": "integer" }, - "sshKeys": { - "items": { - "$ref": "#/components/schemas/v1SSHKey" - }, - "type": "array" + "id": { + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "isDefault": { + "title": "Whether this is the default payment method", + "type": "boolean" + }, + "last4": { + "title": "Last 4 digits (for cards)", + "type": "string" + }, + "metadata": { + "title": "Payment method metadata", + "type": "object" + }, + "organizationId": { + "description": "Organization that owns this payment method", + "title": "Relations", + "type": "string" + }, + "paymentProviderPaymentMethodId": { + "title": "Payment provider payment method ID (e.g., Stripe payment method ID,", + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "subscriptionId": { + "title": "Optional: Subscription this payment method is associated with", + "type": "string" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "type": { + "description": "Payment method type: \"card\", \"paypal\", etc.", + "title": "PayPal billing agreement ID)", + "type": "string" } }, + "title": "PaymentMethod represents a payment method attached to a customer/organization", "type": "object" }, - "v1ListSchedulesResponse": { + "v1PaymentStatus": { + "default": "PAYMENT_STATUS_UNSPECIFIED", + "enum": [ + "PAYMENT_STATUS_UNSPECIFIED", + "PAYMENT_STATUS_PENDING", + "PAYMENT_STATUS_PROCESSING", + "PAYMENT_STATUS_SUCCEEDED", + "PAYMENT_STATUS_FAILED", + "PAYMENT_STATUS_CANCELED", + "PAYMENT_STATUS_REFUNDED", + "PAYMENT_STATUS_PARTIALLY_REFUNDED" + ], + "type": "string" + }, + "v1PayoutConfiguration": { "properties": { - "schedules": { - "items": { - "$ref": "#/components/schemas/v1GameServerSchedule" - }, - "type": "array" + "enabled": { + "title": "Whether payout configuration is enabled (default: true)", + "type": "boolean" + }, + "scheduleTime": { + "title": "Time in HH:MM format (24-hour, UTC) - e.g., \"09:00\" for 9 AM", + "type": "string" + }, + "scheduleTimezone": { + "title": "IANA timezone identifier (e.g., \"UTC\", \"America/New_York\") - defaults to \"UTC\"", + "type": "string" + }, + "scheduleType": { + "$ref": "#/components/schemas/v1PayoutScheduleType" } }, "type": "object" }, - "v1ListSecretsResponse": { + "v1PayoutHoldReason": { + "default": "PAYOUT_HOLD_REASON_UNSPECIFIED", + "description": " - PAYOUT_HOLD_REASON_COUPON_FIRST_PURCHASE: Heavily discounted first purchase from a client.\n - PAYOUT_HOLD_REASON_CREDIT_FUNDED: Paid with prepaid credits.\n - PAYOUT_HOLD_REASON_DISPUTE: The client opened a dispute; held until it closes.", + "enum": [ + "PAYOUT_HOLD_REASON_UNSPECIFIED", + "PAYOUT_HOLD_REASON_COUPON_FIRST_PURCHASE", + "PAYOUT_HOLD_REASON_CREDIT_FUNDED", + "PAYOUT_HOLD_REASON_DISPUTE" + ], + "type": "string" + }, + "v1PayoutInvoice": { "properties": { - "secrets": { + "amount": { + "title": "Payout amount (decimal string with 6 decimal places precision)", + "type": "string" + }, + "completedAt": { + "format": "date-time", + "title": "When payout transfer was completed", + "type": "string" + }, + "connectAccountId": { + "title": "Provider's Connect account ID", + "type": "string" + }, + "currency": { + "title": "Currency code (ISO 4217)", + "type": "string" + }, + "failedAt": { + "format": "date-time", + "title": "When payout transfer failed", + "type": "string" + }, + "failureCode": { + "title": "Payment provider failure code (if applicable)", + "type": "string" + }, + "failureReason": { + "title": "Reason for payout failure (if applicable)", + "type": "string" + }, + "id": { + "title": "PayoutInvoice ID", + "type": "string" + }, + "invoiceIds": { "items": { - "$ref": "#/components/schemas/v1Secret" + "type": "string" }, + "title": "IDs of client invoices that contributed to this payout", "type": "array" }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListServiceAccountTokensResponse": { - "properties": { - "page": { - "format": "int32", - "type": "integer" + "lastRetryAt": { + "format": "date-time", + "title": "Timestamp of last retry attempt", + "type": "string" }, - "pageSize": { + "maxRetries": { "format": "int32", + "title": "Maximum number of retry attempts", "type": "integer" }, - "tokens": { - "items": { - "$ref": "#/components/schemas/v1ServiceAccountTokenInfo" - }, - "type": "array" + "metadata": { + "title": "Additional metadata", + "type": "object" }, - "totalCount": { + "paymentProvider": { + "title": "Payment provider name (e.g., 'stripe', 'paypal')", + "type": "string" + }, + "payoutStatus": { + "$ref": "#/components/schemas/v1PayoutStatus" + }, + "platformFeeAmount": { + "title": "Platform fee deducted from this payout (decimal string with 6 decimal places precision)", + "type": "string" + }, + "processedAt": { + "format": "date-time", + "title": "When payout transfer was initiated/processed", + "type": "string" + }, + "providerOrganizationId": { + "title": "Provider organization that receives this payout", + "type": "string" + }, + "retryCount": { "format": "int32", + "title": "Number of retry attempts for failed transfers", "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "transferTransactionId": { + "title": "Payment provider transfer transaction ID", + "type": "string" } }, "type": "object" }, - "v1ListServiceAccountsResponse": { + "v1PayoutScheduleType": { + "default": "PAYOUT_SCHEDULE_TYPE_UNSPECIFIED", + "description": "- PAYOUT_SCHEDULE_TYPE_IMMEDIATE: Transfer immediately when payment succeeds\n - PAYOUT_SCHEDULE_TYPE_DAILY: Transfer once per day at specified time\n - PAYOUT_SCHEDULE_TYPE_WEEKLY: Transfer once per week at specified time\n - PAYOUT_SCHEDULE_TYPE_MONTHLY: Transfer once per month at specified time", + "enum": [ + "PAYOUT_SCHEDULE_TYPE_UNSPECIFIED", + "PAYOUT_SCHEDULE_TYPE_IMMEDIATE", + "PAYOUT_SCHEDULE_TYPE_DAILY", + "PAYOUT_SCHEDULE_TYPE_WEEKLY", + "PAYOUT_SCHEDULE_TYPE_MONTHLY" + ], + "title": "Payout Configuration", + "type": "string" + }, + "v1PayoutStatus": { + "default": "PAYOUT_STATUS_UNSPECIFIED", + "enum": [ + "PAYOUT_STATUS_UNSPECIFIED", + "PAYOUT_STATUS_PENDING", + "PAYOUT_STATUS_PROCESSING", + "PAYOUT_STATUS_COMPLETED", + "PAYOUT_STATUS_FAILED", + "PAYOUT_STATUS_CANCELED" + ], + "title": "PayoutInvoice messages", + "type": "string" + }, + "v1Permission": { "properties": { - "page": { - "format": "int32", - "type": "integer" + "httpMethod": { + "type": "string" }, - "pageSize": { - "format": "int32", - "type": "integer" + "id": { + "type": "string" }, - "serviceAccounts": { - "items": { - "$ref": "#/components/schemas/v1ServiceAccountResponse" - }, - "type": "array" + "methodName": { + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "scope": { + "type": "string" + }, + "serviceName": { + "type": "string" } }, "type": "object" }, - "v1ListSnapshotsResponse": { + "v1Plan": { "properties": { - "snapshots": { - "items": { - "$ref": "#/components/schemas/v1Snapshot" - }, - "type": "array" + "assetCategory": { + "$ref": "#/components/schemas/v1AssetCategory" }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListSubscriptionsResponse": { - "properties": { - "subscriptions": { - "items": { - "$ref": "#/components/schemas/v1Subscription" - }, - "type": "array" + "assetType": { + "$ref": "#/components/schemas/v1AssetType" }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListSupportedCurrenciesResponse": { - "properties": { - "currencies": { - "items": { - "type": "string" - }, - "title": "List of supported currency codes", - "type": "array" + "autoRenew": { + "type": "boolean" }, - "lastUpdated": { - "format": "int64", - "title": "Timestamp when rates were last updated", + "billingPeriod": { + "$ref": "#/components/schemas/v1BillingPeriod" + }, + "billingType": { + "$ref": "#/components/schemas/v1BillingType" + }, + "code": { "type": "string" - } - }, - "type": "object" - }, - "v1ListTicketAttachmentsResponse": { - "properties": { - "attachments": { - "items": { - "$ref": "#/components/schemas/v1TicketAttachment" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1ListTicketTemplatesResponse": { - "properties": { - "availableVariables": { - "items": { - "$ref": "#/components/schemas/v1TicketTemplateVariableDefinition" - }, - "type": "array" }, - "ticketTemplates": { - "items": { - "$ref": "#/components/schemas/v1TicketTemplate" - }, - "type": "array" + "currency": { + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListTicketsResponse": { - "properties": { - "organizationDetails": { - "additionalProperties": { - "$ref": "#/components/schemas/v1OrganizationDetails" - }, - "title": "Map of organization ID to organization name", - "type": "object" + "description": { + "type": "string" }, - "tickets": { - "items": { - "$ref": "#/components/schemas/v1Ticket" - }, - "type": "array" + "effectiveFrom": { + "format": "date-time", + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "effectiveUntil": { + "format": "date-time", + "type": "string" }, - "userDetails": { - "additionalProperties": { - "$ref": "#/components/schemas/v1UserDetails" - }, - "title": "Map of user ID to user details (first_name, last_name)", - "type": "object" - } - }, - "type": "object" - }, - "v1ListTldOfferingsResponse": { - "properties": { - "offerings": { - "items": { - "$ref": "#/components/schemas/v1TldOffering" - }, - "type": "array" + "endUser": { + "$ref": "#/components/schemas/v1EndUser" }, - "page": { - "format": "int32", - "type": "integer" + "externalBillingId": { + "type": "string" }, - "pageSize": { + "gracePeriodDays": { "format": "int32", "type": "integer" }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListTldPricesResponse": { - "properties": { - "page": { - "format": "int32", - "type": "integer" + "id": { + "title": "Fields", + "type": "string" }, - "pageSize": { + "isPublic": { + "type": "boolean" + }, + "maxSubscribers": { "format": "int32", "type": "integer" }, - "tlds": { + "metadata": { + "title": "Metadata", + "type": "object" + }, + "name": { + "type": "string" + }, + "nodeIds": { + "description": "Nodes explicitly assigned to this plan (placement / preflight candidates).", "items": { - "$ref": "#/components/schemas/v1TldPrice" + "type": "string" }, "type": "array" }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListUsageRecordsResponse": { - "properties": { - "totalCount": { - "format": "int32", - "type": "integer" + "onCreditExhaustion": { + "description": "Provider choice when client prepaid credits are exhausted.\nValues: \"suspend\" (default), \"continue_with_dunning\". Relevant for usage-based Offerings.", + "type": "string" }, - "usageRecords": { + "organizationName": { + "description": "Name of the organization that owns this plan", + "title": "Organization/tenant information", + "type": "string" + }, + "planCategory": { + "$ref": "#/components/schemas/v1PlanCategory" + }, + "planPrices": { "items": { - "$ref": "#/components/schemas/v1UsageRecord" + "$ref": "#/components/schemas/v1PlanPrice" }, "type": "array" - } - }, - "type": "object" - }, - "v1ListUsersResponse": { - "properties": { - "totalCount": { - "format": "int32", - "type": "integer" }, - "users": { + "planType": { + "$ref": "#/components/schemas/v1PlanType" + }, + "regionIds": { "items": { - "$ref": "#/components/schemas/v1User" + "type": "string" }, "type": "array" - } - }, - "type": "object" - }, - "v1ListVMTagsResponse": { - "properties": { - "tags": { + }, + "requiresManualApproval": { + "type": "boolean" + }, + "rulesetIds": { "items": { "type": "string" }, - "title": "List of unique tags from all VMs belonging to the organization", + "title": "Relations", "type": "array" }, - "totalCount": { - "format": "int32", - "title": "Total number of unique tags", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListVMTemplatesResponse": { - "properties": { - "totalCount": { - "format": "int32", - "type": "integer" + "setupFee": { + "title": "Decimal string with 6 decimal places", + "type": "string" }, - "totalPages": { - "description": "Page count when pagination packs whole node groups (never splits a node across pages).", + "slaHours": { "format": "int32", "type": "integer" }, - "vmTemplates": { - "items": { - "$ref": "#/components/schemas/v1VMTemplate" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1ListVirtualMachineSmtpOutboundPoliciesResponse": { - "properties": { - "policies": { + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "subscriptionIds": { "items": { - "$ref": "#/components/schemas/v1VirtualMachineSmtpOutboundPolicyView" + "type": "string" }, "type": "array" }, - "totalCount": { + "templatePlanId": { + "type": "string" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "trialAvailable": { + "type": "boolean" + }, + "trialDays": { "format": "int32", + "title": "precision (e.g., \"10.00\" for $10.00)", "type": "integer" } }, "type": "object" }, - "v1ListVirtualMachinesResponse": { - "properties": { - "totalCount": { - "format": "int32", - "type": "integer" - }, - "virtualMachines": { - "items": { - "$ref": "#/components/schemas/v1VirtualMachine" - }, - "type": "array" - } - }, - "type": "object" + "v1PlanCategory": { + "default": "PLAN_CATEGORY_UNSPECIFIED", + "enum": [ + "PLAN_CATEGORY_UNSPECIFIED", + "PLAN_CATEGORY_FREE", + "PLAN_CATEGORY_STARTER", + "PLAN_CATEGORY_PREMIUM", + "PLAN_CATEGORY_CUSTOM" + ], + "type": "string" }, - "v1LiveValidationCheckView": { + "v1PlanLiveValidationBenchmarkView": { "properties": { - "code": { - "type": "string" + "cpu": { + "type": "object" }, - "note": { + "createTime": { + "format": "date-time", "type": "string" }, - "passed": { - "type": "boolean" - } - }, - "type": "object" - }, - "v1LoginMfaVerifyRequest": { - "properties": { - "code": { - "description": "Authenticator TOTP code or a one-time recovery code.", + "id": { "type": "string" }, - "loginSessionId": { + "memory": { + "type": "object" + }, + "misc": { + "type": "object" + }, + "network": { + "type": "object" + }, + "nodeId": { "type": "string" - } - }, - "type": "object" - }, - "v1LoginRequest": { - "properties": { - "email": { + }, + "nodeName": { "type": "string" }, - "password": { + "passed": { + "type": "boolean" + }, + "planCode": { "type": "string" }, - "turnstileToken": { - "description": "Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).", + "planId": { "type": "string" + }, + "storage": { + "type": "object" } }, "type": "object" }, - "v1LoginResponse": { + "v1PlanLiveValidationNodeView": { "properties": { - "loginSessionId": { + "nodeId": { "type": "string" }, - "mfaRequired": { - "description": "When true, token/organization_id are empty and login_session_id must be used with LoginMfaVerify.", - "type": "boolean" + "nodeName": { + "type": "string" }, - "organizationId": { + "regionId": { "type": "string" }, - "token": { - "description": "Present when MFA is not required (or after LoginMfaVerify succeeds).", + "regionName": { "type": "string" } }, "type": "object" }, - "v1LogoutRequest": { - "properties": { - "invalidateAll": { - "type": "boolean" - } - }, - "type": "object" - }, - "v1ManualPayout": { + "v1PlanLiveValidationView": { "properties": { - "accountHolderName": { - "title": "Name of the account holder", + "checkedAt": { + "format": "date-time", "type": "string" }, - "accountNumber": { - "title": "Bank account number (for non-SEPA countries)", - "type": "string" + "checks": { + "items": { + "$ref": "#/components/schemas/v1LiveValidationCheckView" + }, + "type": "array" }, - "bankName": { - "title": "Name of the bank", - "type": "string" + "includeBenchmarking": { + "type": "boolean" }, - "bic": { - "title": "Bank Identifier Code / SWIFT code (for SEPA countries)", - "type": "string" + "marketplaceLiveValidated": { + "type": "boolean" }, - "country": { - "title": "ISO 3166-1 alpha-2 country code", + "nodeId": { "type": "string" }, - "createdAt": { - "format": "date-time", - "title": "Account creation timestamp", + "nodeName": { "type": "string" }, - "iban": { - "title": "International Bank Account Number (for SEPA countries)", - "type": "string" + "passed": { + "type": "boolean" }, - "id": { - "title": "Manual payout account ID", + "phase": { "type": "string" }, - "isVerified": { - "title": "Whether the payout account has been verified by admin", - "type": "boolean" + "planCode": { + "type": "string" }, - "notes": { - "title": "User-provided notes about the payout account", + "planId": { "type": "string" }, - "routingNumber": { - "title": "Routing number (for US accounts) or sort code (for UK accounts)", + "regionName": { "type": "string" }, - "updatedAt": { + "startedAt": { "format": "date-time", - "title": "Last update timestamp", "type": "string" }, - "verificationNotes": { - "title": "Admin notes about verification status", + "status": { + "type": "string" + }, + "summaryNote": { "type": "string" } }, "type": "object" }, - "v1MarketplaceSearchParsedQuery": { - "description": "Structured filters extracted from the user query (word matcher today; LLM later).", + "v1PlanPreflightView": { "properties": { - "filterBillingType": { + "billingType": { "$ref": "#/components/schemas/v1BillingType" }, - "filterCity": { - "type": "string" + "infrastructure": { + "items": { + "$ref": "#/components/schemas/v1PreflightInfrastructureView" + }, + "type": "array" }, - "filterComputeCategory": { - "$ref": "#/components/schemas/v1ComputeCategory" + "marketplaceReady": { + "type": "boolean" }, - "filterComputeType": { - "$ref": "#/components/schemas/v1ComputeType" + "planChecks": { + "items": { + "$ref": "#/components/schemas/v1PreflightCheckView" + }, + "type": "array" }, - "filterCountry": { + "planCode": { "type": "string" }, - "filterPlanCode": { + "planId": { "type": "string" }, - "matchedTerms": { + "planName": { + "type": "string" + }, + "regionLabels": { "items": { "type": "string" }, "type": "array" }, - "minDiskGb": { - "format": "int32", - "type": "integer" - }, - "minRamGb": { - "format": "int32", - "type": "integer" - }, - "minVcpus": { - "format": "int32", - "type": "integer" + "summaryIssues": { + "items": { + "type": "string" + }, + "type": "array" }, - "parser": { - "description": "Parser implementation id, e.g. \"word_matcher\" or future \"llm\".", + "summaryNote": { "type": "string" } }, "type": "object" }, - "v1MarketplaceSearchPlanPriceSummary": { + "v1PlanPrice": { "properties": { + "billingInterval": { + "format": "int32", + "type": "integer" + }, "billingPeriod": { "$ref": "#/components/schemas/v1BillingPeriod" }, + "chargeTiming": { + "$ref": "#/components/schemas/v1ChargeTiming" + }, "currency": { + "title": "Pricing details", "type": "string" }, - "freeUnits": { - "description": "Included free units (e.g. bandwidth GB). Used for bandwidth summaries in search.", - "format": "int32", - "type": "integer" - }, - "id": { + "effectiveFrom": { + "format": "date-time", + "title": "Status and lifecycle", "type": "string" }, - "metadata": { - "type": "object" + "effectiveUntil": { + "format": "date-time", + "type": "string" }, - "metricName": { + "externalId": { + "title": "External integration", "type": "string" }, - "overagePrice": { - "description": "Overage unit price as decimal string (same precision as PlanPrice.overage_price).", + "freeAmount": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "pricingFormula": { - "description": "Percentage / formula pricing for add-ons (e.g. backup = % of VM price).", - "type": "object" + "freeUnits": { + "format": "int32", + "title": "Free tier configuration", + "type": "integer" + }, + "id": { + "title": "Fields", + "type": "string" + }, + "maxQuantity": { + "format": "int32", + "title": "Maximum quantity (primarily for addons)", + "type": "integer" + }, + "maximumCharge": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" + }, + "metadata": { + "title": "Metadata", + "type": "object" + }, + "metered": { + "type": "boolean" + }, + "metricAggregation": { + "$ref": "#/components/schemas/v1MetricAggregation" + }, + "metricIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "metricName": { + "title": "Usage-based pricing", + "type": "string" + }, + "minQuantity": { + "format": "int32", + "title": "Minimum quantity (primarily for addons)", + "type": "integer" + }, + "minimumCharge": { + "description": "Decimal string with 6 decimal places precision", + "title": "Minimum and maximum charges", + "type": "string" + }, + "overagePrice": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" + }, + "packagePrice": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" + }, + "packageSize": { + "format": "int32", + "title": "Package pricing", + "type": "integer" + }, + "parentPlanId": { + "title": "For addon prices: reference to parent plan (percentage-based pricing)", + "type": "string" + }, + "planPrices": { + "items": { + "$ref": "#/components/schemas/v1Plan" + }, + "title": "Relations", + "type": "array" + }, + "pricingFormula": { + "title": "Pricing formula for percentage/complex calculations", + "type": "object" }, "pricingModel": { "$ref": "#/components/schemas/v1PricingModel" }, + "pricingTierIds": { + "items": { + "type": "string" + }, + "type": "array" + }, "productType": { "$ref": "#/components/schemas/v1ProductType" }, + "prorate": { + "title": "Proration and billing", + "type": "boolean" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "subscriptionTemplateIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "tierMode": { + "$ref": "#/components/schemas/v1TierMode" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, "unitAmount": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, "unitName": { "type": "string" + }, + "unitQuantity": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1MarketplaceSearchResult": { + "v1PlanPriceInput": { "properties": { - "addonPrices": { - "items": { - "$ref": "#/components/schemas/v1MarketplaceSearchPlanPriceSummary" - }, - "type": "array" + "addonCode": { + "title": "Addon code (required if product_type is PRODUCT_TYPE_ADDON)", + "type": "string" }, - "bandwidthPrices": { - "description": "Bandwidth plan prices (egress/ingress) with free units + overage for search UI.", - "items": { - "$ref": "#/components/schemas/v1MarketplaceSearchPlanPriceSummary" - }, - "type": "array" + "billingInterval": { + "format": "int32", + "type": "integer" }, - "billingType": { - "$ref": "#/components/schemas/v1BillingType" + "billingPeriod": { + "$ref": "#/components/schemas/v1BillingPeriod" }, - "ddosProvider": { - "type": "string" + "chargeTiming": { + "$ref": "#/components/schemas/v1ChargeTiming" }, - "diskGb": { + "freeUnits": { "format": "int32", "type": "integer" }, - "organizationId": { + "maximumCharge": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "organizationName": { - "type": "string" + "metricAggregation": { + "$ref": "#/components/schemas/v1MetricAggregation" }, - "planCode": { + "metricName": { + "title": "Usage-based specific", "type": "string" }, - "planId": { + "minimumCharge": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "planPrice": { - "$ref": "#/components/schemas/v1MarketplaceSearchPlanPriceSummary" + "overagePrice": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" }, - "providerLogoUrl": { + "packagePrice": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "ramGb": { + "packageSize": { "format": "int32", + "title": "Package pricing", "type": "integer" }, - "rating": { - "format": "float", - "type": "number" + "pricingFormula": { + "title": "Pricing formula for percentage-based or complex pricing\nExample: {\"type\": \"percentage\", \"value\": 30.0, \"base\":\n\"parent_plan.total_price\"}", + "type": "object" }, - "regionCity": { - "type": "string" + "pricingModel": { + "$ref": "#/components/schemas/v1PricingModel" }, - "regionCountry": { + "productType": { + "$ref": "#/components/schemas/v1ProductType" + }, + "prorate": { + "title": "Proration", + "type": "boolean" + }, + "tiers": { + "items": { + "$ref": "#/components/schemas/v1PricingTierInput" + }, + "title": "Tiered pricing", + "type": "array" + }, + "unitAmount": { + "description": "Decimal string with 6 decimal places precision", + "title": "Fixed & usage-based pricing", "type": "string" }, - "regionId": { - "title": "Region UUID for this offer (one plan = one region after plan-model change)", + "unitName": { "type": "string" }, - "totalReviews": { + "unitQuantity": { "format": "int32", "type": "integer" - }, - "vcpus": { + } + }, + "type": "object" + }, + "v1PlanPriceOverride": { + "description": "PlanPriceOverride allows overriding specific fields for plan prices when\ncloning. Either metric_id (for usage-based pricing) or plan_price_id (for\nfixed pricing) must be provided to identify which plan price to override.", + "properties": { + "freeUnits": { "format": "int32", "type": "integer" + }, + "maximumCharge": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" + }, + "metricId": { + "type": "string" + }, + "minimumCharge": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" + }, + "planPriceId": { + "type": "string" + }, + "unitAmount": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" } }, "type": "object" }, - "v1Metadata": { + "v1PlanPricingConfig": { "properties": { - "buildBranch": { + "assetCategory": { "type": "string" }, - "buildCommit": { + "assetType": { "type": "string" }, - "buildDate": { + "currency": { "type": "string" }, - "buildTag": { + "planName": { + "title": "Plan metadata", "type": "string" }, - "name": { + "prices": { + "items": { + "$ref": "#/components/schemas/v1PlanPriceInput" + }, + "title": "Pricing models (at least one required)", + "type": "array" + } + }, + "type": "object" + }, + "v1PlanRegion": { + "description": "Plan region information (simplified for marketplace).\nUsed by ListProviders (ProviderInfo.plan_regions), GetProvider (ProviderCatalogPlan.regions),\nand encoded by the same backend helpers as plan-linked region edges.", + "properties": { + "city": { + "title": "City name from CityCountry", "type": "string" }, - "version": { + "country": { + "title": "Country name from CityCountry", "type": "string" }, - "versionDetails": { + "latitude": { + "format": "double", + "title": "Latitude from CityCountry", + "type": "number" + }, + "longitude": { + "format": "double", + "title": "Longitude from CityCountry", + "type": "number" + }, + "regionId": { + "title": "Region ID", "type": "string" } }, "type": "object" }, - "v1Metric": { + "v1PlanType": { + "default": "PLAN_TYPE_UNSPECIFIED", + "enum": [ + "PLAN_TYPE_UNSPECIFIED", + "PLAN_TYPE_FREE", + "PLAN_TYPE_TRIAL", + "PLAN_TYPE_PAID", + "PLAN_TYPE_ENTERPRISE" + ], + "type": "string" + }, + "v1Platform": { "properties": { - "aggregationType": { - "$ref": "#/components/schemas/v1AggregationType" + "agentId": { + "type": "string" }, - "billable": { - "title": "Billing configuration", + "assignCustomerIpv6": { + "description": "VirtFusion/SolusVM: guests on this platform are offered panel-assigned IPv6.\nIgnored for Proxmox (IPv6 is prefix-derived). Default false.", "type": "boolean" }, - "code": { - "type": "string" - }, - "description": { - "type": "string" + "driver": { + "$ref": "#/components/schemas/v1PlatformDriver" }, - "externalId": { - "title": "External integration", + "endpointUrl": { "type": "string" }, "id": { "title": "Fields", "type": "string" }, + "kind": { + "$ref": "#/components/schemas/v1PlatformKind" + }, "metadata": { - "title": "Metadata", "type": "object" }, - "metricType": { - "$ref": "#/components/schemas/v1MetricType" - }, "name": { - "title": "Metric identification", "type": "string" }, - "recurring": { - "type": "boolean" + "organizationId": { + "type": "string" }, - "retentionDays": { - "format": "int32", - "type": "integer" + "serviceStatus": { + "$ref": "#/components/schemas/v1ServiceStatus" }, "status": { "$ref": "#/components/schemas/protov1Status" }, "timestamps": { "$ref": "#/components/schemas/v1Timestamps" - }, - "unit": { - "type": "string" - }, - "unitPlural": { - "type": "string" } }, "type": "object" }, - "v1MetricAggregation": { - "default": "METRIC_AGGREGATION_UNSPECIFIED", + "v1PlatformDriver": { + "default": "PLATFORM_DRIVER_UNSPECIFIED", + "description": " - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver.", "enum": [ - "METRIC_AGGREGATION_UNSPECIFIED", - "METRIC_AGGREGATION_SUM", - "METRIC_AGGREGATION_MAX", - "METRIC_AGGREGATION_LAST_DURING_PERIOD", - "METRIC_AGGREGATION_COUNT" + "PLATFORM_DRIVER_UNSPECIFIED", + "PLATFORM_DRIVER_PROXMOX", + "PLATFORM_DRIVER_VIRTFUSION", + "PLATFORM_DRIVER_SOLUSVM", + "PLATFORM_DRIVER_PTERODACTYL" ], "type": "string" }, - "v1MetricType": { - "default": "METRIC_TYPE_UNSPECIFIED", + "v1PlatformKind": { + "default": "PLATFORM_KIND_UNSPECIFIED", "enum": [ - "METRIC_TYPE_UNSPECIFIED", - "METRIC_TYPE_COUNTER", - "METRIC_TYPE_GAUGE", - "METRIC_TYPE_HISTOGRAM", - "METRIC_TYPE_SUMMARY" + "PLATFORM_KIND_UNSPECIFIED", + "PLATFORM_KIND_HYPERVISOR", + "PLATFORM_KIND_PTERODACTYL" ], "type": "string" }, - "v1MetricsWriteCredential": { + "v1PlatformVersions": { + "description": "PlatformVersions is the install matrix for provider CLI tooling and cluster components.", "properties": { - "agentId": { - "type": "string" + "components": { + "items": { + "$ref": "#/components/schemas/v1ComponentVersion" + }, + "type": "array" }, - "createTime": { - "format": "date-time", + "schemaVersion": { + "description": "Schema version for forward-compatible clients (currently \"1\").", "type": "string" + } + }, + "type": "object" + }, + "v1Prefix": { + "properties": { + "allocationStrategy": { + "$ref": "#/components/schemas/v1AllocationStrategy" }, - "expiresAt": { - "format": "date-time", + "cidr": { + "title": "Network prefix in CIDR notation (e.g., 10.0.0.0/24, 2001:db8::/64)", "type": "string" }, - "id": { + "description": { "type": "string" }, - "lastUsedAt": { - "format": "date-time", + "gateway": { + "description": "Default gateway IP (e.g., 10.0.0.1). Must be within the prefix CIDR.", "type": "string" }, - "name": { + "id": { + "title": "Fields", "type": "string" }, - "organizationId": { - "type": "string" + "metadata": { + "title": "Metadata", + "type": "object" }, - "publicId": { + "networkId": { + "description": "Network this prefix belongs to (for DNS servers). Optional.", + "title": "Relations", "type": "string" }, - "revokedAt": { - "format": "date-time", + "organizationId": { "type": "string" }, - "scopes": { + "reservedIps": { + "items": { + "type": "string" + }, + "title": "List of reserved IP addresses (e.g., [\"10.0.0.1\", \"10.0.0.100\"])", + "type": "array" + }, + "reservedPrefixes": { "items": { "type": "string" }, + "title": "Reserved sub-prefix CIDRs at assignment length", "type": "array" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "vmAssignmentPrefixLength": { + "format": "int32", + "title": "IPv6 only: VM assignment length (64, 128, \u2026)", + "type": "integer" } }, "type": "object" }, - "v1MoneyAmount": { + "v1PreflightAgentView": { "properties": { - "amount": { - "title": "Decimal string, e.g. \"11.00\"", + "checks": { + "items": { + "$ref": "#/components/schemas/v1PreflightCheckView" + }, + "type": "array" + }, + "id": { "type": "string" }, - "currency": { - "title": "ISO 4217 currency code", + "name": { "type": "string" + }, + "platform": { + "$ref": "#/components/schemas/v1PreflightPlatformView" } }, "type": "object" }, - "v1MyStorefront": { + "v1PreflightCheckView": { "properties": { - "highlightAllowlist": { - "items": { - "type": "string" - }, - "type": "array" - }, - "liveRevision": { - "$ref": "#/components/schemas/v1StorefrontRevision" - }, - "liveSlug": { + "code": { "type": "string" }, - "optedIn": { - "type": "boolean" - }, - "participationStatus": { - "$ref": "#/components/schemas/v1StorefrontParticipationStatus" - }, - "slugLocked": { - "type": "boolean" - }, - "suggestedSlug": { + "note": { "type": "string" }, - "unpublishedByOps": { + "passed": { "type": "boolean" }, - "workingRevision": { - "$ref": "#/components/schemas/v1StorefrontRevision" + "subChecks": { + "items": { + "$ref": "#/components/schemas/v1PreflightCheckView" + }, + "type": "array" } }, "type": "object" }, - "v1Network": { + "v1PreflightInfrastructureView": { "properties": { - "description": { - "type": "string" + "agent": { + "$ref": "#/components/schemas/v1PreflightAgentView" }, - "dnsServers": { + "passed": { + "type": "boolean" + } + }, + "type": "object" + }, + "v1PreflightNodeView": { + "properties": { + "checks": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1PreflightCheckView" }, - "title": "DNS server IP addresses (e.g., [\"8.8.8.8\", \"1.1.1.1\"])", "type": "array" }, "id": { - "title": "Fields", - "type": "string" - }, - "macAddressPrefix": { - "description": "First 3 octets for MAC allocation within this network (e.g. BC:24:11). Default: BC:24:11.", "type": "string" }, - "metadata": { - "title": "Metadata", - "type": "object" - }, "name": { "type": "string" - }, - "nodes": { - "items": { - "$ref": "#/components/schemas/v1NetworkNode" - }, - "title": "Nodes connected to this network (only populated in ListNetworks response)", - "type": "array" - }, - "organizationId": { - "title": "Relations", - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" } }, "type": "object" }, - "v1NetworkNode": { + "v1PreflightPlatformView": { "properties": { + "checks": { + "items": { + "$ref": "#/components/schemas/v1PreflightCheckView" + }, + "type": "array" + }, "id": { "type": "string" }, "name": { "type": "string" + }, + "node": { + "$ref": "#/components/schemas/v1PreflightNodeView" } }, - "title": "NetworkNode represents a node connected to a network (simplified info)", "type": "object" }, - "v1Node": { + "v1PreviewCouponRequest": { "properties": { - "backupStorageCompression": { - "$ref": "#/components/schemas/v1BackupStorageCompression" + "billingPeriod": { + "$ref": "#/components/schemas/v1BillingPeriod" }, - "backupStorageDestination": { + "code": { "type": "string" }, - "computeType": { - "$ref": "#/components/schemas/v1NodeComputeType" - }, - "cpuCatalogSupported": { - "description": "True when the host CPU model matches a cpu_catalog row with is_supported.\nFalse when the model is missing, unmatched, or matched but not supported.", - "type": "boolean" - }, - "cpuOverallocatePercent": { - "format": "int32", - "title": "Overallocation", - "type": "integer" - }, - "hasCpuTopology": { - "description": "True when a dedicated node has a parsed CPU topology document stored\n(required before dedicated preflight can pass).", - "type": "boolean" - }, - "id": { - "title": "Identification", + "planId": { "type": "string" }, - "inventory": { - "$ref": "#/components/schemas/v1NodeInventory" - }, - "maintenanceMode": { - "title": "Maintenance mode - when enabled, reconciliation loop skips Proxmox state checks", - "type": "boolean" - }, - "memoryOverallocatePercent": { + "quantity": { "format": "int32", "type": "integer" - }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "name": { - "type": "string" - }, - "networkBridge": { - "description": "Node provisioning settings (copied into ProxmoxVM CR at generation time)\nProxmox Linux bridge for VM primary NIC (e.g. vmbr0). Default: vmbr0.", - "type": "string" - }, - "networkId": { - "description": "Network ID this node is assigned to (optional)", - "title": "Network assignment (IPAM)", - "type": "string" - }, - "networkModel": { - "description": "Proxmox NIC model for primary NIC (virtio, e1000, ...). Default: virtio.", + } + }, + "type": "object" + }, + "v1PreviewCouponResponse": { + "properties": { + "amountOff": { "type": "string" }, - "networkName": { - "description": "Proxmox net device key for primary NIC (e.g. net0). Default: net0.", + "code": { "type": "string" }, - "networkVlanId": { - "description": "802.1Q VLAN tag on primary NIC (Proxmox tag=); 0 = untagged.", - "format": "int32", - "type": "integer" - }, - "organizationId": { + "currency": { "type": "string" }, - "panelNodeId": { - "format": "int32", - "type": "integer" + "discountType": { + "$ref": "#/components/schemas/v1CouponDiscountType" }, - "platform": { - "title": "Relations", + "discountedPrice": { "type": "string" }, - "pterodactylLocationId": { - "format": "int32", - "type": "integer" - }, - "region": { + "originalPrice": { + "description": "Fixed price for the selected period, empty for usage-priced plans.", "type": "string" }, - "serviceStatus": { - "$ref": "#/components/schemas/v1ServiceStatus" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "storageOverallocatePercent": { - "format": "int32", - "type": "integer" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "vmStorageDestination": { - "description": "Proxmox storage ID for new VM root disks (e.g. local-lvm).", + "percentOff": { "type": "string" }, - "vmidSeed": { - "format": "int32", - "title": "VM ID seed - starting point for VM ID generation on this node", - "type": "integer" - }, - "wingsNodeName": { - "description": "Wings node name on a Pterodactyl platform. Empty on a hypervisor node.", + "termsSummary": { + "description": "Server-rendered disclosure; show it verbatim.", "type": "string" } }, "type": "object" }, - "v1NodeCPUMapCPU": { + "v1PreviewMyStorefrontResponse": { "properties": { - "core": { - "description": "Physical core id (unique within a socket).", - "format": "int32", - "type": "integer" - }, - "cpu": { - "description": "Host logical CPU id (the affinity bit).", - "format": "int32", - "type": "integer" - }, - "cpuStatus": { - "$ref": "#/components/schemas/v1NodeCPUStatus" - }, - "numa": { - "format": "int32", - "type": "integer" - }, - "siblings": { - "description": "Full SMT sibling set including this CPU.", - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" - }, - "socket": { - "format": "int32", - "type": "integer" - }, - "vmHostname": { - "type": "string" + "sourceStatus": { + "$ref": "#/components/schemas/v1StorefrontRevisionStatus" }, - "vmId": { - "description": "Set when cpu_status is ALLOCATED_NR.", - "type": "string" + "storefront": { + "$ref": "#/components/schemas/v1PublicStorefront" } }, "type": "object" }, - "v1NodeCPUMapNUMA": { + "v1PreviewNotificationTemplateResponse": { "properties": { - "freeCores": { - "format": "int32", - "type": "integer" - }, - "id": { - "format": "int32", - "type": "integer" - }, - "memoryAllocatedMb": { - "description": "Memory attributed to NodeRings VMs placed on this NUMA node.", - "format": "int64", + "previewEmailBody": { "type": "string" }, - "memoryEstimated": { - "type": "boolean" - }, - "memoryFreeMb": { - "format": "int64", + "previewEmailSubject": { "type": "string" }, - "memoryMb": { - "format": "int64", + "previewPushNotificationBody": { "type": "string" }, - "memoryReservedMb": { - "description": "Host reserve withheld from VMs on this NUMA node.", - "format": "int64", + "previewPushNotificationTitle": { "type": "string" }, - "sockets": { - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" + "previewSmsBody": { + "type": "string" }, - "totalCores": { - "description": "Logical CPU (vCPU) counts on this NUMA node \u2014 sellable capacity units.", - "format": "int32", - "type": "integer" + "previewWebhookBody": { + "type": "string" } }, "type": "object" }, - "v1NodeCPUStatus": { - "default": "NODE_CPU_STATUS_UNSPECIFIED", - "description": "Occupancy status of one host logical CPU (affinity bit).\n\n - NODE_CPU_STATUS_ALLOCATED_NR: Allocated to a NodeRings VM (vm_id/vm_hostname set).\n - NODE_CPU_STATUS_PINNED_FOREIGN: Pinned by a foreign (non-NodeRings) guest per exporter observation.\n - NODE_CPU_STATUS_DRIFT: DB expectation and exporter observation disagree for this CPU.", - "enum": [ - "NODE_CPU_STATUS_UNSPECIFIED", - "NODE_CPU_STATUS_AVAILABLE", - "NODE_CPU_STATUS_ALLOCATED_NR", - "NODE_CPU_STATUS_PINNED_FOREIGN", - "NODE_CPU_STATUS_DRIFT" - ], - "type": "string" - }, - "v1NodeComputeType": { - "default": "NODE_COMPUTE_TYPE_UNSPECIFIED", - "description": "Compute product hosted by a node. Exclusive: a node is shared XOR dedicated\n(docs/README-DEDICATED-CPU-CORES.md, design decision D1).\n\n - NODE_COMPUTE_TYPE_SHARED: Shared vCPU hosting (CPU oversubscription allowed). Default.\n - NODE_COMPUTE_TYPE_DEDICATED: Dedicated pinned CPU cores (no CPU overallocation).", - "enum": [ - "NODE_COMPUTE_TYPE_UNSPECIFIED", - "NODE_COMPUTE_TYPE_SHARED", - "NODE_COMPUTE_TYPE_DEDICATED" - ], - "type": "string" - }, - "v1NodeInventory": { + "v1PricingCalculationConfig": { "properties": { - "cpuCore": { - "format": "int32", - "type": "integer" - }, - "cpuCoreAllocated": { - "format": "int32", - "type": "integer" - }, - "cpuType": { - "$ref": "#/components/schemas/v1CPUType" + "capHours": { + "format": "double", + "title": "Maximum billable hours (default 730 for monthly cap)", + "type": "number" }, - "memory": { - "format": "int32", - "type": "integer" + "couponValue": { + "title": "Decimal string with 6 decimal places precision (e.g., \"5.00\" for $5.00)", + "type": "string" }, - "memoryAllocated": { - "format": "int32", - "type": "integer" + "discountPercent": { + "format": "double", + "title": "Discounts", + "type": "number" }, - "storagePools": { - "items": { - "$ref": "#/components/schemas/v1StoragePool" + "overageRates": { + "additionalProperties": { + "format": "double", + "type": "number" }, - "type": "array" - } - }, - "type": "object" - }, - "v1NodePlacementPolicy": { - "properties": { - "defaultStrategy": { - "$ref": "#/components/schemas/v1NodePlacementStrategy" + "title": "Overage rates (metric_name -> rate in minor currency units)", + "type": "object" }, - "regionOverrides": { - "items": { - "$ref": "#/components/schemas/v1NodePlacementRegionOverride" - }, - "type": "array" + "taxRate": { + "format": "double", + "title": "Tax rate (e.g., 0.10 for 10%)", + "type": "number" } }, "type": "object" }, - "v1NodePlacementRegionOverride": { + "v1PricingLineItem": { "properties": { - "regionId": { + "addons": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "strategy": { - "$ref": "#/components/schemas/v1NodePlacementStrategy" + "base": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" + }, + "currency": { + "type": "string" + }, + "instanceLabel": { + "title": "Human-readable label", + "type": "string" + }, + "quantity": { + "format": "int32", + "type": "integer" + }, + "subtotal": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" } }, "type": "object" }, - "v1NodePlacementStrategy": { - "default": "NODE_PLACEMENT_STRATEGY_UNSPECIFIED", + "v1PricingModel": { + "default": "PRICING_MODEL_UNSPECIFIED", "enum": [ - "NODE_PLACEMENT_STRATEGY_UNSPECIFIED", - "NODE_PLACEMENT_STRATEGY_FIRST_STABLE", - "NODE_PLACEMENT_STRATEGY_ROUND_ROBIN", - "NODE_PLACEMENT_STRATEGY_LEAST_ASSIGNED_VMS", - "NODE_PLACEMENT_STRATEGY_RANDOM" + "PRICING_MODEL_UNSPECIFIED", + "PRICING_MODEL_FIXED", + "PRICING_MODEL_USAGE_BASED", + "PRICING_MODEL_TIERED", + "PRICING_MODEL_VOLUME", + "PRICING_MODEL_GRADUATED", + "PRICING_MODEL_PACKAGE", + "PRICING_MODEL_HYBRID" ], "type": "string" }, - "v1NodeWithExpandedRegion": { + "v1PricingTierInput": { "properties": { - "expandedRegion": { - "$ref": "#/components/schemas/v1Region" + "endExclusive": { + "format": "double", + "title": "null = unlimited", + "type": "number" }, - "node": { - "$ref": "#/components/schemas/v1Node" - } - }, - "type": "object" - }, - "v1NotificationSetting": { - "properties": { - "enabled": { + "flatFee": { "type": "boolean" }, - "id": { - "title": "Fields", + "flatFeeAmount": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "metadata": { - "title": "Metadata", - "type": "object" + "startInclusive": { + "format": "double", + "type": "number" }, - "organization": { + "tierName": { "type": "string" }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "tierOrder": { + "format": "int32", + "type": "integer" }, - "type": { - "type": "string" + "tierType": { + "$ref": "#/components/schemas/v1TierMode" }, - "user": { - "title": "Relations", + "unitAmount": { + "title": "Decimal string with 6 decimal places precision", "type": "string" } }, "type": "object" }, - "v1NotificationTemplate": { + "v1ProductType": { + "default": "PRODUCT_TYPE_UNSPECIFIED", + "enum": [ + "PRODUCT_TYPE_UNSPECIFIED", + "PRODUCT_TYPE_PLAN", + "PRODUCT_TYPE_ADDON" + ], + "title": "- PRODUCT_TYPE_PLAN: Standalone subscription plan\n - PRODUCT_TYPE_ADDON: Addon attached to a subscription", + "type": "string" + }, + "v1PromoCreditGrant": { "properties": { - "contentType": { + "amount": { "type": "string" }, - "description": { + "code": { "type": "string" }, - "emailBodyTemplate": { + "couponName": { "type": "string" }, - "emailSubjectTemplate": { + "expiresAt": { + "format": "date-time", "type": "string" }, "id": { - "title": "Fields", "type": "string" }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "name": { + "remaining": { "type": "string" }, - "pushNotificationBodyTemplate": { + "requiredTopup": { + "description": "USD top-up needed to activate a pending grant. Empty when none is needed.", "type": "string" }, - "pushNotificationTitleTemplate": { + "reserved": { "type": "string" }, - "smsBodyTemplate": { + "source": { "type": "string" }, "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "webhookBodyTemplate": { "type": "string" } }, "type": "object" }, - "v1OAuth2Client": { + "v1ProviderCatalogPlan": { + "description": "One public plan offering for a provider (GetProvider catalog). Reuses PlanRegion + PlanPrice\nfrom the same marketplace encoding as ListProviders rows.", "properties": { - "clientId": { - "type": "string" + "assetType": { + "$ref": "#/components/schemas/v1AssetType" }, - "clientType": { + "billingType": { + "$ref": "#/components/schemas/v1BillingType" + }, + "computeCategory": { + "$ref": "#/components/schemas/v1ComputeCategory" + }, + "computeType": { + "$ref": "#/components/schemas/v1ComputeType" + }, + "planCode": { "type": "string" }, - "description": { + "planDescription": { "type": "string" }, - "isActive": { - "type": "boolean" + "planId": { + "type": "string" }, - "name": { + "planName": { "type": "string" }, - "redirectUris": { + "planPrices": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1PlanPrice" }, "type": "array" }, - "requiresPkce": { - "type": "boolean" - }, - "scopes": { + "regions": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1PlanRegion" }, "type": "array" } }, "type": "object" }, - "v1OpenConsoleResponse": { - "properties": { - "ticket": { - "type": "string" - }, - "websocketPath": { - "type": "string" - } - }, - "type": "object" - }, - "v1OperationStatus": { - "default": "OPERATION_STATUS_UNSPECIFIED", + "v1ProviderCustomerActivityFilter": { + "default": "PROVIDER_CUSTOMER_ACTIVITY_FILTER_UNSPECIFIED", + "description": "Active: at least one non-deleted VM from this provider. Inactive: all VMs from this provider are soft-deleted (delete_time set).\n\n - PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL: All customers (any VM history with this provider, including when every VM is soft-deleted).", "enum": [ - "OPERATION_STATUS_UNSPECIFIED", - "OPERATION_STATUS_CREATED", - "OPERATION_STATUS_STARTED", - "OPERATION_STATUS_STOPPED", - "OPERATION_STATUS_DELETED", - "OPERATION_STATUS_RESTARTED", - "OPERATION_STATUS_REINSTALLING" + "PROVIDER_CUSTOMER_ACTIVITY_FILTER_UNSPECIFIED", + "PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL", + "PROVIDER_CUSTOMER_ACTIVITY_FILTER_ACTIVE", + "PROVIDER_CUSTOMER_ACTIVITY_FILTER_INACTIVE" ], "type": "string" }, - "v1OrderGame": { + "v1ProviderCustomerAssetRow": { "properties": { - "eula": { - "description": "eula is true when this egg stops until the player accepts the Minecraft EULA.", + "activityStatus": { + "$ref": "#/components/schemas/v1ProviderCustomerVmActivityStatus" + }, + "assetType": { + "$ref": "#/components/schemas/v1ProviderCustomerAssetType" + }, + "complianceActor": { + "$ref": "#/components/schemas/v1ComplianceActor" + }, + "complianceHeld": { "type": "boolean" }, - "icon": { + "complianceMessage": { "type": "string" }, - "id": { + "complianceReason": { + "$ref": "#/components/schemas/v1ComplianceReason" + }, + "createdAt": { + "format": "date-time", "type": "string" }, - "name": { + "deleteTime": { + "description": "Set when the VM was deleted or terminated (soft-delete).", + "format": "date-time", "type": "string" }, - "variables": { - "items": { - "$ref": "#/components/schemas/v1EggVariable" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1Organization": { - "properties": { - "asn": { - "format": "int64", + "displayName": { "type": "string" }, - "ddosProvider": { - "description": "DDoS mitigation partner slug (e.g. \"none\"). Provider organizations only.", + "id": { "type": "string" }, - "description": { + "ipv4": { "type": "string" }, - "domains": { - "items": { - "type": "string" - }, - "type": "array" - }, - "enforceMfa": { - "type": "boolean" - }, - "enforceSso": { - "type": "boolean" - }, - "enforceVerifiedDomain": { - "type": "boolean" - }, - "groups": { - "items": { - "type": "string" - }, - "type": "array" - }, - "hypervisorDriver": { - "$ref": "#/components/schemas/v1PlatformDriver" - }, - "id": { - "title": "Fields", + "ipv6": { "type": "string" }, - "isVerified": { - "description": "Provider marketplace / admin verification (first-class fields; not part of metadata).", - "type": "boolean" - }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "name": { + "os": { + "description": "OS/distro label from the VM template (e.g. ubuntu-22).", "type": "string" }, - "onboarded": { - "description": "True after the provider has completed the self-serve onboarding checklist once.", - "type": "boolean" - }, - "organizationRoles": { - "items": { - "type": "string" - }, - "type": "array" - }, - "owner": { - "title": "Relations", + "planCode": { + "description": "Plan code (e.g. DC-HF-32C-\u2026) from the subscription plan.", "type": "string" }, - "providerLogoUrl": { - "title": "Provider marketplace logo (data URL or https URL); only used for provider organizations", + "planName": { "type": "string" }, - "providerWebsiteUrl": { - "description": "Public storefront / company website (http or https). Provider organizations only.", + "region": { + "description": "Region label, e.g. \"Frankfurt, DE\".", "type": "string" }, - "reviewRequested": { - "type": "boolean" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "subscriptions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "type": { - "$ref": "#/components/schemas/v1OrganizationType" - } - }, - "title": "Organization object for providers and clients", - "type": "object" - }, - "v1OrganizationDetails": { - "properties": { - "name": { + "regionId": { + "description": "UUID of the node's region (same dimension as ListProviderCustomerAssetsRequest.region_id filter).", "type": "string" }, - "orgType": { + "spec": { + "description": "Human-readable size, e.g. \"2 vCPU \u00b7 4096 MB RAM \u00b7 80 GB disk\".", "type": "string" } }, - "title": "OrganizationDetails contains organization information", "type": "object" }, - "v1OrganizationType": { - "default": "ORGANIZATION_TYPE_UNSPECIFIED", + "v1ProviderCustomerAssetType": { + "default": "PROVIDER_CUSTOMER_ASSET_TYPE_UNSPECIFIED", "enum": [ - "ORGANIZATION_TYPE_UNSPECIFIED", - "ORGANIZATION_TYPE_PROVIDER", - "ORGANIZATION_TYPE_CLIENT" + "PROVIDER_CUSTOMER_ASSET_TYPE_UNSPECIFIED", + "PROVIDER_CUSTOMER_ASSET_TYPE_ALL", + "PROVIDER_CUSTOMER_ASSET_TYPE_VIRTUAL_MACHINE", + "PROVIDER_CUSTOMER_ASSET_TYPE_DEDICATED_SERVER", + "PROVIDER_CUSTOMER_ASSET_TYPE_GAME_SERVER" ], "type": "string" }, - "v1PayInvoiceResponse": { + "v1ProviderCustomerRow": { "properties": { - "invoice": { - "$ref": "#/components/schemas/v1Invoice" - }, - "invoiceLines": { - "items": { - "$ref": "#/components/schemas/v1InvoiceLine" - }, - "type": "array" - }, - "paymentStatus": { + "addressSummary": { + "description": "Best-effort summary from organization metadata (billing/address keys).", "type": "string" }, - "transactionId": { + "email": { "type": "string" - } - }, - "type": "object" - }, - "v1Payment": { - "properties": { - "amount": { - "title": "Decimal string with 6 decimal places precision", + }, + "firstName": { "type": "string" }, - "createdAt": { + "lastLoginTime": { "format": "date-time", "type": "string" }, - "currency": { - "title": "Currency code (ISO 4217)", + "lastName": { "type": "string" }, - "failureCode": { - "title": "Payment provider failure code (if applicable)", + "organizationId": { "type": "string" }, - "failureReason": { - "title": "Reason for payment failure (if applicable)", + "organizationName": { "type": "string" }, - "id": { + "paymentMethodBrand": { + "description": "Default payment method brand when known (visa, mastercard, amex, paypal, \u2026).", "type": "string" }, - "invoiceId": { - "title": "Invoice this payment is for", + "paymentMethodLast4": { + "description": "Last 4 digits of the default card. Empty for non-card methods or if unknown.", "type": "string" }, - "paymentMethodId": { - "title": "Payment method used for this payment", - "type": "string" + "purchasesBlocked": { + "type": "boolean" }, - "paymentProvider": { - "title": "Payment provider name (e.g., 'stripe', 'paypal')", - "type": "string" + "purchasesBlockedActor": { + "$ref": "#/components/schemas/v1ComplianceActor" }, - "paymentStatus": { - "$ref": "#/components/schemas/v1PaymentStatus" + "vmActivityStatus": { + "$ref": "#/components/schemas/v1ProviderCustomerVmActivityStatus" + } + }, + "type": "object" + }, + "v1ProviderCustomerVmActivityStatus": { + "default": "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_UNSPECIFIED", + "enum": [ + "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_UNSPECIFIED", + "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_ACTIVE", + "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_INACTIVE" + ], + "type": "string" + }, + "v1ProviderDashboardAddonCatalogRow": { + "properties": { + "activeSubscriptionCount": { + "format": "int32", + "type": "integer" }, - "processedAt": { - "format": "date-time", - "title": "When payment was processed", + "addonId": { "type": "string" }, - "refundAmount": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" + "addonType": { + "$ref": "#/components/schemas/v1AddonType" }, - "refundReason": { - "title": "Reason for refund (if applicable)", - "type": "string" + "billingType": { + "$ref": "#/components/schemas/v1BillingType" }, - "refundedAt": { - "format": "date-time", - "title": "When payment was refunded", + "code": { "type": "string" }, - "status": { - "$ref": "#/components/schemas/protov1Status" + "distinctCustomerOrgCount": { + "format": "int32", + "type": "integer" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "distinctVmCount": { + "format": "int32", + "type": "integer" }, - "transactionId": { - "title": "Payment provider transaction ID", + "name": { "type": "string" + }, + "pricingModel": { + "$ref": "#/components/schemas/v1PricingModel" } }, - "title": "Payment represents a payment transaction for an invoice", "type": "object" }, - "v1PaymentMethod": { + "v1ProviderDashboardNodeRollup": { "properties": { - "brand": { - "description": "Card brand (for cards): \"visa\", \"mastercard\", etc.", - "type": "string" + "capacityCpuCores": { + "format": "int32", + "type": "integer" }, - "createdAt": { - "format": "date-time", - "title": "When payment method was attached", + "capacityMemoryMb": { + "format": "int64", "type": "string" }, - "customerId": { - "title": "Payment provider customer ID", + "cpuOverallocatePercent": { + "format": "int32", + "type": "integer" + }, + "hypervisorId": { + "description": "VirtFusion hypervisor_id or SolusVM compute_resource_id; used to join Prom series.", "type": "string" }, - "expiryMonth": { + "memoryOverallocatePercent": { "format": "int32", - "title": "Expiry month (for cards, 1-12)", "type": "integer" }, - "expiryYear": { + "nodeCpuCoreAllocated": { "format": "int32", - "title": "Expiry year (for cards)", "type": "integer" }, - "id": { + "nodeId": { "type": "string" }, - "isDefault": { - "title": "Whether this is the default payment method", - "type": "boolean" - }, - "last4": { - "title": "Last 4 digits (for cards)", + "nodeMemoryAllocatedMb": { + "format": "int64", "type": "string" }, - "metadata": { - "title": "Payment method metadata", - "type": "object" + "nodeName": { + "type": "string" }, - "organizationId": { - "description": "Organization that owns this payment method", - "title": "Relations", + "platformId": { "type": "string" }, - "paymentProviderPaymentMethodId": { - "title": "Payment provider payment method ID (e.g., Stripe payment method ID,", + "platformName": { "type": "string" }, - "status": { - "$ref": "#/components/schemas/protov1Status" + "regionId": { + "type": "string" }, - "subscriptionId": { - "title": "Optional: Subscription this payment method is associated with", + "soldCpuCores": { + "format": "int64", "type": "string" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "soldMemoryMb": { + "format": "int64", + "type": "string" }, - "type": { - "description": "Payment method type: \"card\", \"paypal\", etc.", - "title": "PayPal billing agreement ID)", + "soldStorageGb": { + "format": "int64", "type": "string" + }, + "storageOverallocatePercent": { + "format": "int32", + "type": "integer" + }, + "vmCount": { + "format": "int32", + "type": "integer" } }, - "title": "PaymentMethod represents a payment method attached to a customer/organization", "type": "object" }, - "v1PaymentStatus": { - "default": "PAYMENT_STATUS_UNSPECIFIED", - "enum": [ - "PAYMENT_STATUS_UNSPECIFIED", - "PAYMENT_STATUS_PENDING", - "PAYMENT_STATUS_PROCESSING", - "PAYMENT_STATUS_SUCCEEDED", - "PAYMENT_STATUS_FAILED", - "PAYMENT_STATUS_CANCELED", - "PAYMENT_STATUS_REFUNDED", - "PAYMENT_STATUS_PARTIALLY_REFUNDED" - ], - "type": "string" - }, - "v1PayoutConfiguration": { + "v1ProviderDashboardPlanSubscriptionStat": { "properties": { - "enabled": { - "title": "Whether payout configuration is enabled (default: true)", - "type": "boolean" + "activeSubscriptionCount": { + "format": "int32", + "type": "integer" }, - "scheduleTime": { - "title": "Time in HH:MM format (24-hour, UTC) - e.g., \"09:00\" for 9 AM", + "assetType": { + "$ref": "#/components/schemas/v1AssetType" + }, + "billingPeriod": { + "$ref": "#/components/schemas/v1BillingPeriod" + }, + "billingType": { + "$ref": "#/components/schemas/v1BillingType" + }, + "code": { "type": "string" }, - "scheduleTimezone": { - "title": "IANA timezone identifier (e.g., \"UTC\", \"America/New_York\") - defaults to \"UTC\"", + "distinctCustomerOrgCount": { + "format": "int32", + "type": "integer" + }, + "name": { "type": "string" }, - "scheduleType": { - "$ref": "#/components/schemas/v1PayoutScheduleType" + "planId": { + "type": "string" + }, + "vmAssetCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1PayoutHoldReason": { - "default": "PAYOUT_HOLD_REASON_UNSPECIFIED", - "description": " - PAYOUT_HOLD_REASON_COUPON_FIRST_PURCHASE: Heavily discounted first purchase from a client.\n - PAYOUT_HOLD_REASON_CREDIT_FUNDED: Paid with prepaid credits.\n - PAYOUT_HOLD_REASON_DISPUTE: The client opened a dispute; held until it closes.", - "enum": [ - "PAYOUT_HOLD_REASON_UNSPECIFIED", - "PAYOUT_HOLD_REASON_COUPON_FIRST_PURCHASE", - "PAYOUT_HOLD_REASON_CREDIT_FUNDED", - "PAYOUT_HOLD_REASON_DISPUTE" - ], - "type": "string" + "v1ProviderDashboardPlansTabStats": { + "properties": { + "kpiActiveAddonSubscriptionsSum": { + "format": "int32", + "type": "integer" + }, + "kpiActiveSubscriptionsSum": { + "format": "int32", + "type": "integer" + }, + "kpiPlanCount": { + "format": "int32", + "type": "integer" + }, + "kpiVmAssetsSum": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" }, - "v1PayoutInvoice": { + "v1ProviderDetails": { + "description": "GetProvider payload: nested ProviderInfo shares the same core fields as list rows; extended\nfields are provider-wide (website, review breakdown, catalog plans, etc.).", "properties": { - "amount": { - "title": "Payout amount (decimal string with 6 decimal places precision)", - "type": "string" + "availablePlans": { + "items": { + "$ref": "#/components/schemas/v1ProviderCatalogPlan" + }, + "type": "array" }, - "completedAt": { - "format": "date-time", - "title": "When payout transfer was completed", - "type": "string" + "availableRegions": { + "items": { + "type": "string" + }, + "type": "array" }, - "connectAccountId": { - "title": "Provider's Connect account ID", + "avgTicketResponseSeconds": { + "format": "int64", "type": "string" }, - "currency": { - "title": "Currency code (ISO 4217)", + "ddosSolution": { "type": "string" }, - "failedAt": { - "format": "date-time", - "title": "When payout transfer failed", - "type": "string" + "hasIpv6": { + "description": "True when any listed region would report ipv6_available_in_filtered_region.", + "type": "boolean" }, - "failureCode": { - "title": "Payment provider failure code (if applicable)", - "type": "string" + "provider": { + "$ref": "#/components/schemas/v1ProviderInfo" }, - "failureReason": { - "title": "Reason for payout failure (if applicable)", - "type": "string" + "reviewBreakdown": { + "$ref": "#/components/schemas/v1ProviderReviewBreakdown" }, - "id": { - "title": "PayoutInvoice ID", + "website": { "type": "string" - }, - "invoiceIds": { + } + }, + "type": "object" + }, + "v1ProviderInfo": { + "properties": { + "capabilities": { + "description": "Capability strings from platformdriver (guest_firewall, instant_apps, \u2026).", "items": { "type": "string" }, - "title": "IDs of client invoices that contributed to this payout", "type": "array" }, - "lastRetryAt": { - "format": "date-time", - "title": "Timestamp of last retry attempt", + "ddosProvider": { + "description": "DDoS mitigation partner slug; \"none\" or empty means no DDoS vendor icon in marketplace.", "type": "string" }, - "maxRetries": { - "format": "int32", - "title": "Maximum number of retry attempts", - "type": "integer" + "description": { + "type": "string" }, - "metadata": { - "title": "Additional metadata", - "type": "object" + "hasCapacityInFilteredRegion": { + "title": "True if provider has at least one node with capacity in the filtered region (plan + country + city)", + "type": "boolean" }, - "paymentProvider": { - "title": "Payment provider name (e.g., 'stripe', 'paypal')", - "type": "string" + "ipv6AvailableInFilteredRegion": { + "description": "True when customers in the filtered region (country + city) are offered IPv6:\nProxmox = active IPv6 prefix on a network attached to a node there;\nVirtFusion/SolusVM = a node there whose platform has assign_customer_ipv6.", + "type": "boolean" }, - "payoutStatus": { - "$ref": "#/components/schemas/v1PayoutStatus" + "metadata": { + "title": "Additional provider metadata", + "type": "object" }, - "platformFeeAmount": { - "title": "Platform fee deducted from this payout (decimal string with 6 decimal places precision)", + "organizationId": { "type": "string" }, - "processedAt": { - "format": "date-time", - "title": "When payout transfer was initiated/processed", + "organizationName": { "type": "string" }, - "providerOrganizationId": { - "title": "Provider organization that receives this payout", + "planId": { + "title": "The plan ID for the requested plan code", "type": "string" }, - "retryCount": { - "format": "int32", - "title": "Number of retry attempts for failed transfers", - "type": "integer" + "planPrices": { + "items": { + "$ref": "#/components/schemas/v1PlanPrice" + }, + "title": "All prices for the requested plan code (includes plan prices and addon prices, same format as price calculator)", + "type": "array" }, - "status": { - "$ref": "#/components/schemas/protov1Status" + "planRegions": { + "items": { + "$ref": "#/components/schemas/v1PlanRegion" + }, + "title": "All regions where the plan is available (region_id, country, city)", + "type": "array" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "platformDriver": { + "$ref": "#/components/schemas/v1PlatformDriver" }, - "transferTransactionId": { - "title": "Payment provider transfer transaction ID", + "providerLogoUrl": { "type": "string" + }, + "rating": { + "format": "float", + "title": "Average rating (0-5 stars)", + "type": "number" + }, + "totalReviews": { + "format": "int32", + "title": "Total number of reviews", + "type": "integer" } }, + "title": "Provider information for marketplace/discovery", "type": "object" }, - "v1PayoutScheduleType": { - "default": "PAYOUT_SCHEDULE_TYPE_UNSPECIFIED", - "description": "- PAYOUT_SCHEDULE_TYPE_IMMEDIATE: Transfer immediately when payment succeeds\n - PAYOUT_SCHEDULE_TYPE_DAILY: Transfer once per day at specified time\n - PAYOUT_SCHEDULE_TYPE_WEEKLY: Transfer once per week at specified time\n - PAYOUT_SCHEDULE_TYPE_MONTHLY: Transfer once per month at specified time", - "enum": [ - "PAYOUT_SCHEDULE_TYPE_UNSPECIFIED", - "PAYOUT_SCHEDULE_TYPE_IMMEDIATE", - "PAYOUT_SCHEDULE_TYPE_DAILY", - "PAYOUT_SCHEDULE_TYPE_WEEKLY", - "PAYOUT_SCHEDULE_TYPE_MONTHLY" - ], - "title": "Payout Configuration", - "type": "string" - }, - "v1PayoutStatus": { - "default": "PAYOUT_STATUS_UNSPECIFIED", + "v1ProviderOnboardingStep": { + "properties": { + "actionPath": { + "description": "Deep-link path in the provider console (e.g. \"/organization/settings\").", + "type": "string" + }, + "code": { + "$ref": "#/components/schemas/v1ProviderOnboardingStepCode" + }, + "completed": { + "type": "boolean" + }, + "description": { + "type": "string" + }, + "hint": { + "description": "Optional guidance when incomplete (e.g. agent/Proxmox metrics hint).", + "type": "string" + }, + "title": { + "type": "string" + } + }, + "type": "object" + }, + "v1ProviderOnboardingStepCode": { + "default": "PROVIDER_ONBOARDING_STEP_CODE_UNSPECIFIED", + "description": "Provider self-serve onboarding checklist (provider orgs only).", "enum": [ - "PAYOUT_STATUS_UNSPECIFIED", - "PAYOUT_STATUS_PENDING", - "PAYOUT_STATUS_PROCESSING", - "PAYOUT_STATUS_COMPLETED", - "PAYOUT_STATUS_FAILED", - "PAYOUT_STATUS_CANCELED" + "PROVIDER_ONBOARDING_STEP_CODE_UNSPECIFIED", + "PROVIDER_ONBOARDING_STEP_CODE_KYC", + "PROVIDER_ONBOARDING_STEP_CODE_DOMAIN", + "PROVIDER_ONBOARDING_STEP_CODE_STRIPE_CONNECT", + "PROVIDER_ONBOARDING_STEP_CODE_REGION", + "PROVIDER_ONBOARDING_STEP_CODE_PLATFORM", + "PROVIDER_ONBOARDING_STEP_CODE_NODE", + "PROVIDER_ONBOARDING_STEP_CODE_NODE_METRICS", + "PROVIDER_ONBOARDING_STEP_CODE_CLOUD_INIT", + "PROVIDER_ONBOARDING_STEP_CODE_VM_TEMPLATE", + "PROVIDER_ONBOARDING_STEP_CODE_NETWORK", + "PROVIDER_ONBOARDING_STEP_CODE_NODE_NETWORK", + "PROVIDER_ONBOARDING_STEP_CODE_PREFLIGHT", + "PROVIDER_ONBOARDING_STEP_CODE_LIVE_VALIDATION", + "PROVIDER_ONBOARDING_STEP_CODE_AGENT", + "PROVIDER_ONBOARDING_STEP_CODE_PREFIX_IPV4", + "PROVIDER_ONBOARDING_STEP_CODE_PREFIX_IPV6", + "PROVIDER_ONBOARDING_STEP_CODE_PLAN", + "PROVIDER_ONBOARDING_STEP_CODE_ADDONS", + "PROVIDER_ONBOARDING_STEP_CODE_FIXED_PRICE_ADDONS" ], - "title": "PayoutInvoice messages", "type": "string" }, - "v1Permission": { + "v1ProviderPlanPriceSort": { + "default": "PROVIDER_PLAN_PRICE_SORT_UNSPECIFIED", + "description": "Order for marketplace provider list by the plan price shown in the row (aligns with UI).\nWhen set, the first three providers from the default newest-first order stay pinned\nas Recommendations; only the remaining providers are ordered by list price.\n\n - PROVIDER_PLAN_PRICE_SORT_LEAST_EXPENSIVE_FIRST: Ascending among non-recommended providers: lowest list price first\n(usage: hourly, subscription: fixed monthly, free: 0)\n - PROVIDER_PLAN_PRICE_SORT_MOST_EXPENSIVE_FIRST: Descending among non-recommended providers: highest list price first", + "enum": [ + "PROVIDER_PLAN_PRICE_SORT_UNSPECIFIED", + "PROVIDER_PLAN_PRICE_SORT_LEAST_EXPENSIVE_FIRST", + "PROVIDER_PLAN_PRICE_SORT_MOST_EXPENSIVE_FIRST" + ], + "type": "string" + }, + "v1ProviderRevenueWaterfall": { "properties": { - "httpMethod": { + "chargeCurrency": { "type": "string" }, - "id": { - "type": "string" + "currencyConversionFee": { + "$ref": "#/components/schemas/v1MoneyAmount" }, - "methodName": { - "type": "string" + "grossSales": { + "$ref": "#/components/schemas/v1MoneyAmount" }, - "scope": { - "type": "string" + "grossSalesSettled": { + "$ref": "#/components/schemas/v1MoneyAmount" }, - "serviceName": { + "netProfit": { + "$ref": "#/components/schemas/v1MoneyAmount" + }, + "platformFee": { + "$ref": "#/components/schemas/v1MoneyAmount" + }, + "platformFeeSettled": { + "$ref": "#/components/schemas/v1MoneyAmount" + }, + "refunds": { + "$ref": "#/components/schemas/v1MoneyAmount" + }, + "refundsSettled": { + "$ref": "#/components/schemas/v1MoneyAmount" + }, + "settlementCurrency": { "type": "string" + }, + "stripeProcessingFee": { + "$ref": "#/components/schemas/v1MoneyAmount" } }, "type": "object" }, - "v1Plan": { + "v1ProviderReviewBreakdown": { "properties": { - "assetCategory": { - "$ref": "#/components/schemas/v1AssetCategory" - }, - "assetType": { - "$ref": "#/components/schemas/v1AssetType" + "fiveStar": { + "format": "int32", + "type": "integer" }, - "autoRenew": { - "type": "boolean" + "fourStar": { + "format": "int32", + "type": "integer" }, - "billingPeriod": { - "$ref": "#/components/schemas/v1BillingPeriod" + "oneStar": { + "format": "int32", + "type": "integer" }, - "billingType": { - "$ref": "#/components/schemas/v1BillingType" + "threeStar": { + "format": "int32", + "type": "integer" }, - "code": { + "twoStar": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ProviderReviewListItem": { + "description": "Provider UI: list and respond to client reviews (no VM identifiers: anonymous to provider).", + "properties": { + "comment": { "type": "string" }, - "currency": { + "createTime": { + "format": "date-time", "type": "string" }, - "description": { + "id": { "type": "string" }, - "effectiveFrom": { + "providerRepliedAt": { "format": "date-time", "type": "string" }, - "effectiveUntil": { - "format": "date-time", + "providerReply": { "type": "string" }, - "endUser": { - "$ref": "#/components/schemas/v1EndUser" + "starRating": { + "format": "int32", + "type": "integer" }, - "externalBillingId": { + "updateTime": { + "format": "date-time", "type": "string" + } + }, + "type": "object" + }, + "v1ProviderReviewStarSummary": { + "properties": { + "reviewCount": { + "format": "int32", + "type": "integer" }, - "gracePeriodDays": { + "starRating": { "format": "int32", "type": "integer" + } + }, + "type": "object" + }, + "v1ProviderStripeActivityEvent": { + "properties": { + "at": { + "format": "date-time", + "type": "string" }, - "id": { - "title": "Fields", + "label": { + "type": "string" + } + }, + "type": "object" + }, + "v1ProviderStripePaymentMethodDetails": { + "properties": { + "brand": { "type": "string" }, - "isPublic": { - "type": "boolean" + "cardType": { + "title": "e.g. visa credit card", + "type": "string" }, - "maxSubscribers": { + "expMonth": { "format": "int32", "type": "integer" }, - "metadata": { - "title": "Metadata", - "type": "object" + "expYear": { + "format": "int32", + "type": "integer" }, - "name": { + "fingerprint": { "type": "string" }, - "nodeIds": { - "description": "Nodes explicitly assigned to this plan (placement / preflight candidates).", - "items": { - "type": "string" - }, - "type": "array" - }, - "onCreditExhaustion": { - "description": "Provider choice when client prepaid credits are exhausted.\nValues: \"suspend\" (default), \"continue_with_dunning\". Relevant for usage-based Offerings.", + "id": { "type": "string" }, - "organizationName": { - "description": "Name of the organization that owns this plan", - "title": "Organization/tenant information", + "issuer": { "type": "string" }, - "planCategory": { - "$ref": "#/components/schemas/v1PlanCategory" - }, - "planPrices": { - "items": { - "$ref": "#/components/schemas/v1PlanPrice" - }, - "type": "array" + "last4": { + "type": "string" }, - "planType": { - "$ref": "#/components/schemas/v1PlanType" + "originCountry": { + "type": "string" }, - "regionIds": { + "ownerName": { + "type": "string" + } + }, + "type": "object" + }, + "v1ProviderStripeTransaction": { + "properties": { + "activity": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1ProviderStripeActivityEvent" }, "type": "array" }, - "requiresManualApproval": { - "type": "boolean" - }, - "rulesetIds": { - "items": { - "type": "string" - }, - "title": "Relations", - "type": "array" + "amount": { + "$ref": "#/components/schemas/v1MoneyAmount" }, - "setupFee": { - "title": "Decimal string with 6 decimal places", + "applicationFeeId": { "type": "string" }, - "slaHours": { - "format": "int32", - "type": "integer" + "chargeId": { + "type": "string" }, - "status": { - "$ref": "#/components/schemas/protov1Status" + "createdAt": { + "format": "date-time", + "type": "string" }, - "subscriptionIds": { - "items": { - "type": "string" - }, - "type": "array" + "currencyConversionFee": { + "$ref": "#/components/schemas/v1MoneyAmount" }, - "templatePlanId": { + "customerId": { "type": "string" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "trialAvailable": { - "type": "boolean" + "customerName": { + "type": "string" }, - "trialDays": { - "format": "int32", - "title": "precision (e.g., \"10.00\" for $10.00)", - "type": "integer" - } - }, - "type": "object" - }, - "v1PlanCategory": { - "default": "PLAN_CATEGORY_UNSPECIFIED", - "enum": [ - "PLAN_CATEGORY_UNSPECIFIED", - "PLAN_CATEGORY_FREE", - "PLAN_CATEGORY_STARTER", - "PLAN_CATEGORY_PREMIUM", - "PLAN_CATEGORY_CUSTOM" - ], - "type": "string" - }, - "v1PlanLiveValidationBenchmarkView": { - "properties": { - "cpu": { - "type": "object" + "declineReason": { + "type": "string" }, - "createTime": { - "format": "date-time", + "description": { "type": "string" }, - "id": { + "exchangeRate": { "type": "string" }, - "memory": { - "type": "object" + "feesTotalSettled": { + "$ref": "#/components/schemas/v1MoneyAmount" }, - "misc": { - "type": "object" + "netAmount": { + "$ref": "#/components/schemas/v1MoneyAmount" }, - "network": { - "type": "object" + "paymentAmountSettled": { + "$ref": "#/components/schemas/v1MoneyAmount" }, - "nodeId": { + "paymentIntentId": { "type": "string" }, - "nodeName": { + "paymentMethodBrand": { "type": "string" }, - "passed": { - "type": "boolean" + "paymentMethodDetails": { + "$ref": "#/components/schemas/v1ProviderStripePaymentMethodDetails" }, - "planCode": { + "paymentMethodLast4": { "type": "string" }, - "planId": { + "platformFee": { + "$ref": "#/components/schemas/v1MoneyAmount" + }, + "platformFeeSettled": { + "$ref": "#/components/schemas/v1MoneyAmount" + }, + "refundedAt": { + "format": "date-time", "type": "string" }, - "storage": { - "type": "object" - } - }, - "type": "object" - }, - "v1PlanLiveValidationNodeView": { - "properties": { - "nodeId": { + "settlementMerchant": { "type": "string" }, - "nodeName": { + "statementDescriptor": { "type": "string" }, - "regionId": { + "status": { "type": "string" }, - "regionName": { + "stripeProcessingFee": { + "$ref": "#/components/schemas/v1MoneyAmount" + }, + "transferredTo": { "type": "string" } }, "type": "object" }, - "v1PlanLiveValidationView": { + "v1ProviderTicketNotificationPolicy": { "properties": { - "checkedAt": { - "format": "date-time", + "destinationEmail": { "type": "string" }, - "checks": { + "effectiveDestinationEmail": { + "description": "Resolved mailbox used when destination_email is empty (support_email fallback).", + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "extraEmails": { "items": { - "$ref": "#/components/schemas/v1LiveValidationCheckView" + "type": "string" }, "type": "array" }, - "includeBenchmarking": { + "id": { + "type": "string" + }, + "inboundRepliesEnabled": { + "description": "True when NodeRings can accept helpdesk replies (inbound secret configured).", "type": "boolean" }, - "marketplaceLiveValidated": { + "includeClientContact": { "type": "boolean" }, - "nodeId": { - "type": "string" + "includeMessageBody": { + "type": "boolean" }, - "nodeName": { - "type": "string" + "minPriority": { + "$ref": "#/components/schemas/v1TicketPriority" }, - "passed": { + "notifyOnClientReplied": { "type": "boolean" }, - "phase": { - "type": "string" - }, - "planCode": { - "type": "string" + "notifyOnClosed": { + "type": "boolean" }, - "planId": { - "type": "string" + "notifyOnCreated": { + "type": "boolean" }, - "regionName": { + "notifyOnEscalated": { + "type": "boolean" + } + }, + "type": "object" + }, + "v1PublicStorefront": { + "properties": { + "aboutHtml": { "type": "string" }, - "startedAt": { + "approvedAt": { "format": "date-time", "type": "string" }, - "status": { - "type": "string" + "catalog": { + "$ref": "#/components/schemas/v1ProviderDetails" }, - "summaryNote": { + "coverImageUrl": { "type": "string" - } - }, - "type": "object" - }, - "v1PlanPreflightView": { - "properties": { - "billingType": { - "$ref": "#/components/schemas/v1BillingType" }, - "infrastructure": { + "faqs": { "items": { - "$ref": "#/components/schemas/v1PreflightInfrastructureView" + "$ref": "#/components/schemas/v1StorefrontFAQ" }, "type": "array" }, - "marketplaceReady": { - "type": "boolean" + "featuredPlanIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "planChecks": { + "highlightCustom": { + "type": "string" + }, + "highlightCustomLines": { "items": { - "$ref": "#/components/schemas/v1PreflightCheckView" + "type": "string" }, "type": "array" }, - "planCode": { + "highlightKeys": { + "items": { + "type": "string" + }, + "type": "array" + }, + "logoImageUrl": { + "description": "Approved storefront wordmark. Not the organization marketplace logo.", "type": "string" }, - "planId": { + "organizationName": { "type": "string" }, - "planName": { + "providerId": { "type": "string" }, - "regionLabels": { + "reviews": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1StorefrontPublicReview" }, "type": "array" }, - "summaryIssues": { + "slug": { + "type": "string" + }, + "socialUrls": { "items": { "type": "string" }, "type": "array" }, - "summaryNote": { + "tagline": { "type": "string" } }, "type": "object" }, - "v1PlanPrice": { + "v1PublicStorefrontCard": { "properties": { - "billingInterval": { - "format": "int32", - "type": "integer" - }, - "billingPeriod": { - "$ref": "#/components/schemas/v1BillingPeriod" - }, - "chargeTiming": { - "$ref": "#/components/schemas/v1ChargeTiming" + "cities": { + "items": { + "type": "string" + }, + "type": "array" }, - "currency": { - "title": "Pricing details", + "organizationName": { "type": "string" }, - "effectiveFrom": { - "format": "date-time", - "title": "Status and lifecycle", + "providerId": { "type": "string" }, - "effectiveUntil": { - "format": "date-time", + "providerLogoUrl": { + "description": "Approved storefront wordmark. Not the organization marketplace logo.", "type": "string" }, - "externalId": { - "title": "External integration", + "rating": { + "format": "float", + "type": "number" + }, + "slug": { "type": "string" }, - "freeAmount": { - "title": "Decimal string with 6 decimal places precision", + "tagline": { "type": "string" }, - "freeUnits": { - "format": "int32", - "title": "Free tier configuration", - "type": "integer" - }, - "id": { - "title": "Fields", - "type": "string" - }, - "maxQuantity": { + "totalReviews": { "format": "int32", - "title": "Maximum quantity (primarily for addons)", "type": "integer" }, - "maximumCharge": { - "title": "Decimal string with 6 decimal places precision", + "website": { "type": "string" - }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "metered": { - "type": "boolean" - }, - "metricAggregation": { - "$ref": "#/components/schemas/v1MetricAggregation" - }, - "metricIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "metricName": { - "title": "Usage-based pricing", + } + }, + "type": "object" + }, + "v1PurchaseCreditsRequest": { + "properties": { + "amount": { + "title": "Decimal string: USD amount to top-up", "type": "string" }, - "minQuantity": { - "format": "int32", - "title": "Minimum quantity (primarily for addons)", - "type": "integer" - }, - "minimumCharge": { - "description": "Decimal string with 6 decimal places precision", - "title": "Minimum and maximum charges", + "paymentMethodId": { + "description": "Optional: payment method ID to charge. If omitted, the org's default\npayment method is used.", "type": "string" - }, - "overagePrice": { - "title": "Decimal string with 6 decimal places precision", + } + }, + "type": "object" + }, + "v1PurchaseCreditsResponse": { + "properties": { + "clientSecret": { + "title": "Stripe PaymentIntent client_secret for 3DS confirmation", "type": "string" }, - "packagePrice": { - "title": "Decimal string with 6 decimal places precision", + "creditPurchaseId": { + "title": "CreditPurchase row id", "type": "string" }, - "packageSize": { - "format": "int32", - "title": "Package pricing", - "type": "integer" - }, - "parentPlanId": { - "title": "For addon prices: reference to parent plan (percentage-based pricing)", + "paymentIntentId": { + "title": "Stripe PaymentIntent id", "type": "string" }, - "planPrices": { - "items": { - "$ref": "#/components/schemas/v1Plan" - }, - "title": "Relations", - "type": "array" - }, - "pricingFormula": { - "title": "Pricing formula for percentage/complex calculations", - "type": "object" - }, - "pricingModel": { - "$ref": "#/components/schemas/v1PricingModel" - }, - "pricingTierIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "productType": { - "$ref": "#/components/schemas/v1ProductType" - }, - "prorate": { - "title": "Proration and billing", + "requiresAction": { + "title": "True if 3DS/SCA confirmation is needed client-side", "type": "boolean" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "subscriptionTemplateIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "tierMode": { - "$ref": "#/components/schemas/v1TierMode" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "unitAmount": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" - }, - "unitName": { - "type": "string" - }, - "unitQuantity": { - "format": "int32", - "type": "integer" } }, "type": "object" }, - "v1PlanPriceInput": { + "v1ReadFileResponse": { "properties": { - "addonCode": { - "title": "Addon code (required if product_type is PRODUCT_TYPE_ADDON)", - "type": "string" - }, - "billingInterval": { - "format": "int32", - "type": "integer" - }, - "billingPeriod": { - "$ref": "#/components/schemas/v1BillingPeriod" - }, - "chargeTiming": { - "$ref": "#/components/schemas/v1ChargeTiming" - }, - "freeUnits": { - "format": "int32", - "type": "integer" - }, - "maximumCharge": { - "title": "Decimal string with 6 decimal places precision", + "content": { + "format": "byte", "type": "string" - }, - "metricAggregation": { - "$ref": "#/components/schemas/v1MetricAggregation" - }, - "metricName": { - "title": "Usage-based specific", + } + }, + "type": "object" + }, + "v1RecordUsageRequest": { + "properties": { + "eventId": { + "description": "For idempotent writes", + "title": "Deduplication and metadata", "type": "string" }, - "minimumCharge": { - "title": "Decimal string with 6 decimal places precision", + "externalId": { + "title": "External integration", "type": "string" }, - "overagePrice": { - "title": "Decimal string with 6 decimal places precision", + "metricCode": { "type": "string" }, - "packagePrice": { - "title": "Decimal string with 6 decimal places precision", + "metricId": { + "title": "Metric reference (either metric_id or metric_code must be provided)", "type": "string" }, - "packageSize": { - "format": "int32", - "title": "Package pricing", - "type": "integer" - }, - "pricingFormula": { - "title": "Pricing formula for percentage-based or complex pricing\nExample: {\"type\": \"percentage\", \"value\": 30.0, \"base\":\n\"parent_plan.total_price\"}", + "properties": { + "title": "Additional metadata (region, instance_id, etc.)", "type": "object" }, - "pricingModel": { - "$ref": "#/components/schemas/v1PricingModel" - }, - "productType": { - "$ref": "#/components/schemas/v1ProductType" - }, - "prorate": { - "title": "Proration", - "type": "boolean" - }, - "tiers": { - "items": { - "$ref": "#/components/schemas/v1PricingTierInput" - }, - "title": "Tiered pricing", - "type": "array" - }, - "unitAmount": { - "description": "Decimal string with 6 decimal places precision", - "title": "Fixed & usage-based pricing", + "quantity": { + "description": "Decimal as string", + "title": "Usage data", "type": "string" }, - "unitName": { + "subscriptionId": { + "title": "Subscription reference", "type": "string" }, - "unitQuantity": { - "format": "int32", - "type": "integer" + "timestamp": { + "format": "date-time", + "type": "string" } }, "type": "object" }, - "v1PlanPriceOverride": { - "description": "PlanPriceOverride allows overriding specific fields for plan prices when\ncloning. Either metric_id (for usage-based pricing) or plan_price_id (for\nfixed pricing) must be provided to identify which plan price to override.", + "v1RecordUsageResponse": { "properties": { - "freeUnits": { - "format": "int32", - "type": "integer" - }, - "maximumCharge": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" - }, - "metricId": { - "type": "string" - }, - "minimumCharge": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" - }, - "planPriceId": { - "type": "string" + "isDuplicate": { + "title": "True if event_id already existed", + "type": "boolean" }, - "unitAmount": { - "title": "Decimal string with 6 decimal places precision", + "usageRecord": { + "$ref": "#/components/schemas/v1UsageRecord" + } + }, + "type": "object" + }, + "v1RedeemPromoCodeRequest": { + "properties": { + "code": { "type": "string" } }, "type": "object" }, - "v1PlanPricingConfig": { + "v1RedeemPromoCodeResponse": { "properties": { - "assetCategory": { + "amount": { "type": "string" }, - "assetType": { + "expiresAt": { + "description": "For a pending grant, the deadline for the required top-up.", + "format": "date-time", "type": "string" }, - "currency": { + "grantId": { "type": "string" }, - "planName": { - "title": "Plan metadata", + "remaining": { "type": "string" }, - "prices": { - "items": { - "$ref": "#/components/schemas/v1PlanPriceInput" - }, - "title": "Pricing models (at least one required)", - "type": "array" + "requiredTopup": { + "description": "USD top-up needed to activate a pending grant.", + "type": "string" + }, + "status": { + "description": "active, or pending when the code needs a top-up first.", + "type": "string" } }, "type": "object" }, - "v1PlanRegion": { - "description": "Plan region information (simplified for marketplace).\nUsed by ListProviders (ProviderInfo.plan_regions), GetProvider (ProviderCatalogPlan.regions),\nand encoded by the same backend helpers as plan-linked region edges.", + "v1RefreshTokenRequest": { "properties": { - "city": { - "title": "City name from CityCountry", + "clientId": { "type": "string" }, - "country": { - "title": "Country name from CityCountry", + "clientSecret": { + "title": "Optional for public clients", "type": "string" }, - "latitude": { - "format": "double", - "title": "Latitude from CityCountry", - "type": "number" - }, - "longitude": { - "format": "double", - "title": "Longitude from CityCountry", - "type": "number" - }, - "regionId": { - "title": "Region ID", + "refreshToken": { "type": "string" } }, "type": "object" }, - "v1PlanType": { - "default": "PLAN_TYPE_UNSPECIFIED", - "enum": [ - "PLAN_TYPE_UNSPECIFIED", - "PLAN_TYPE_FREE", - "PLAN_TYPE_TRIAL", - "PLAN_TYPE_PAID", - "PLAN_TYPE_ENTERPRISE" - ], - "type": "string" - }, - "v1Platform": { + "v1Refund": { "properties": { - "agentId": { + "amount": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "assignCustomerIpv6": { - "description": "VirtFusion/SolusVM: guests on this platform are offered panel-assigned IPv6.\nIgnored for Proxmox (IPv6 is prefix-derived). Default false.", - "type": "boolean" + "createdAt": { + "format": "date-time", + "type": "string" }, - "driver": { - "$ref": "#/components/schemas/v1PlatformDriver" + "currency": { + "title": "Currency code (ISO 4217)", + "type": "string" }, - "endpointUrl": { + "failureReason": { + "title": "Reason for refund failure (if applicable)", "type": "string" }, "id": { - "title": "Fields", "type": "string" }, - "kind": { - "$ref": "#/components/schemas/v1PlatformKind" + "paymentId": { + "title": "Payment this refund is for", + "type": "string" }, - "metadata": { - "type": "object" + "paymentProvider": { + "description": "Payment provider name (e.g., 'stripe', 'paypal')", + "title": "Stripe refund.id, PayPal refund.id)", + "type": "string" }, - "name": { + "processedAt": { + "format": "date-time", + "title": "When refund was processed", "type": "string" }, - "organizationId": { + "providerRefundId": { + "title": "Payment provider refund ID (e.g.,", "type": "string" }, - "serviceStatus": { - "$ref": "#/components/schemas/v1ServiceStatus" + "refundStatus": { + "$ref": "#/components/schemas/v1RefundStatus" }, "status": { "$ref": "#/components/schemas/protov1Status" @@ -14936,1267 +14094,1123 @@ "$ref": "#/components/schemas/v1Timestamps" } }, + "title": "Refund represents a refund transaction for a payment", "type": "object" }, - "v1PlatformDriver": { - "default": "PLATFORM_DRIVER_UNSPECIFIED", - "description": " - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver.", + "v1RefundStatus": { + "default": "REFUND_STATUS_UNSPECIFIED", "enum": [ - "PLATFORM_DRIVER_UNSPECIFIED", - "PLATFORM_DRIVER_PROXMOX", - "PLATFORM_DRIVER_VIRTFUSION", - "PLATFORM_DRIVER_SOLUSVM", - "PLATFORM_DRIVER_PTERODACTYL" + "REFUND_STATUS_UNSPECIFIED", + "REFUND_STATUS_PENDING", + "REFUND_STATUS_PROCESSING", + "REFUND_STATUS_SUCCEEDED", + "REFUND_STATUS_FAILED", + "REFUND_STATUS_CANCELED" ], "type": "string" }, - "v1PlatformKind": { - "default": "PLATFORM_KIND_UNSPECIFIED", - "enum": [ - "PLATFORM_KIND_UNSPECIFIED", - "PLATFORM_KIND_HYPERVISOR", - "PLATFORM_KIND_PTERODACTYL" - ], - "type": "string" + "v1RegenerateMfaBackupCodesRequest": { + "properties": { + "code": { + "type": "string" + } + }, + "type": "object" }, - "v1PlatformVersions": { - "description": "PlatformVersions is the install matrix for provider CLI tooling and cluster components.", + "v1RegenerateMfaBackupCodesResponse": { "properties": { - "components": { + "backupCodes": { "items": { - "$ref": "#/components/schemas/v1ComponentVersion" + "type": "string" }, "type": "array" - }, - "schemaVersion": { - "description": "Schema version for forward-compatible clients (currently \"1\").", - "type": "string" } }, "type": "object" }, - "v1Prefix": { + "v1Region": { "properties": { - "allocationStrategy": { - "$ref": "#/components/schemas/v1AllocationStrategy" - }, - "cidr": { - "title": "Network prefix in CIDR notation (e.g., 10.0.0.0/24, 2001:db8::/64)", - "type": "string" - }, - "description": { - "type": "string" + "cityCountry": { + "$ref": "#/components/schemas/v1CityCountry" }, - "gateway": { - "description": "Default gateway IP (e.g., 10.0.0.1). Must be within the prefix CIDR.", - "type": "string" + "datacenter": { + "$ref": "#/components/schemas/v1Datacenter" }, "id": { "title": "Fields", "type": "string" }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "networkId": { - "description": "Network this prefix belongs to (for DNS servers). Optional.", - "title": "Relations", - "type": "string" - }, "organizationId": { "type": "string" }, - "reservedIps": { - "items": { - "type": "string" - }, - "title": "List of reserved IP addresses (e.g., [\"10.0.0.1\", \"10.0.0.100\"])", - "type": "array" - }, - "reservedPrefixes": { - "items": { - "type": "string" - }, - "title": "Reserved sub-prefix CIDRs at assignment length", - "type": "array" - }, "timestamps": { "$ref": "#/components/schemas/v1Timestamps" - }, - "vmAssignmentPrefixLength": { - "format": "int32", - "title": "IPv6 only: VM assignment length (64, 128, \u2026)", - "type": "integer" } }, "type": "object" }, - "v1PreflightAgentView": { + "v1RegionLocation": { "properties": { - "checks": { - "items": { - "$ref": "#/components/schemas/v1PreflightCheckView" - }, - "type": "array" - }, - "id": { + "city": { + "title": "City name", "type": "string" }, - "name": { + "country": { + "title": "Country name", "type": "string" - }, - "platform": { - "$ref": "#/components/schemas/v1PreflightPlatformView" } }, + "title": "Region location information (deduplicated city+country combinations)", "type": "object" }, - "v1PreflightCheckView": { + "v1RegisterUserRequest": { "properties": { - "code": { + "email": { "type": "string" }, - "note": { + "firstName": { "type": "string" }, - "passed": { - "type": "boolean" + "lastName": { + "type": "string" }, - "subChecks": { - "items": { - "$ref": "#/components/schemas/v1PreflightCheckView" - }, - "type": "array" + "password": { + "type": "string" + }, + "turnstileToken": { + "description": "Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).", + "type": "string" } }, "type": "object" }, - "v1PreflightInfrastructureView": { + "v1ReinstallStatus": { + "default": "REINSTALL_STATUS_UNSPECIFIED", + "enum": [ + "REINSTALL_STATUS_UNSPECIFIED", + "REINSTALL_STATUS_NONE", + "REINSTALL_STATUS_REQUESTED", + "REINSTALL_STATUS_DELETING", + "REINSTALL_STATUS_PROVISIONING", + "REINSTALL_STATUS_COMPLETED", + "REINSTALL_STATUS_FAILED" + ], + "type": "string" + }, + "v1RemoveAddonResponse": { "properties": { - "agent": { - "$ref": "#/components/schemas/v1PreflightAgentView" - }, - "passed": { - "type": "boolean" + "addonSubscription": { + "$ref": "#/components/schemas/v1AddonSubscription" } }, "type": "object" }, - "v1PreflightNodeView": { + "v1RemovePaymentMethodResponse": { "properties": { - "checks": { - "items": { - "$ref": "#/components/schemas/v1PreflightCheckView" - }, - "type": "array" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" + "success": { + "type": "boolean" } }, "type": "object" }, - "v1PreflightPlatformView": { + "v1ReplaceRoleForGroupRequest": { "properties": { - "checks": { - "items": { - "$ref": "#/components/schemas/v1PreflightCheckView" - }, - "type": "array" - }, - "id": { + "groupId": { "type": "string" }, - "name": { + "roleId": { "type": "string" - }, - "node": { - "$ref": "#/components/schemas/v1PreflightNodeView" } }, "type": "object" }, - "v1PreviewCouponRequest": { + "v1ReplaceRoleForServiceAccountRequest": { "properties": { - "billingPeriod": { - "$ref": "#/components/schemas/v1BillingPeriod" - }, - "code": { + "roleId": { "type": "string" }, - "planId": { + "serviceAccountId": { "type": "string" - }, - "quantity": { - "format": "int32", - "type": "integer" } }, "type": "object" }, - "v1PreviewCouponResponse": { + "v1ReplaceRoleForUserRequest": { "properties": { - "amountOff": { - "type": "string" - }, - "code": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "discountType": { - "$ref": "#/components/schemas/v1CouponDiscountType" - }, - "discountedPrice": { - "type": "string" - }, - "originalPrice": { - "description": "Fixed price for the selected period, empty for usage-priced plans.", - "type": "string" - }, - "percentOff": { + "roleId": { "type": "string" }, - "termsSummary": { - "description": "Server-rendered disclosure; show it verbatim.", + "userId": { "type": "string" } }, "type": "object" }, - "v1PreviewMyStorefrontResponse": { + "v1ResendVerificationEmailRequest": { "properties": { - "sourceStatus": { - "$ref": "#/components/schemas/v1StorefrontRevisionStatus" + "email": { + "type": "string" }, - "storefront": { - "$ref": "#/components/schemas/v1PublicStorefront" + "turnstileToken": { + "description": "Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).", + "type": "string" } }, "type": "object" }, - "v1PreviewNotificationTemplateResponse": { + "v1ResetPasswordRequest": { "properties": { - "previewEmailBody": { - "type": "string" - }, - "previewEmailSubject": { - "type": "string" - }, - "previewPushNotificationBody": { - "type": "string" - }, - "previewPushNotificationTitle": { + "email": { "type": "string" }, - "previewSmsBody": { + "newPassword": { "type": "string" }, - "previewWebhookBody": { + "resetToken": { "type": "string" } }, "type": "object" }, - "v1PricingCalculationConfig": { + "v1ResourceInstanceInput": { "properties": { - "capHours": { + "addons": { + "items": { + "$ref": "#/components/schemas/v1AddonInput" + }, + "title": "Add-ons", + "type": "array" + }, + "hoursUsed": { "format": "double", - "title": "Maximum billable hours (default 730 for monthly cap)", "type": "number" }, - "couponValue": { - "title": "Decimal string with 6 decimal places precision (e.g., \"5.00\" for $5.00)", - "type": "string" + "quantity": { + "format": "int32", + "type": "integer" }, - "discountPercent": { - "format": "double", - "title": "Discounts", - "type": "number" + "region": { + "type": "string" }, - "overageRates": { + "usage": { "additionalProperties": { "format": "double", "type": "number" }, - "title": "Overage rates (metric_name -> rate in minor currency units)", + "title": "Usage metrics (e.g., {\"vCPU\": 2, \"RAM_GB\": 4, \"Egress_GB\": 1200})", "type": "object" - }, - "taxRate": { - "format": "double", - "title": "Tax rate (e.g., 0.10 for 10%)", - "type": "number" } }, "type": "object" }, - "v1PricingLineItem": { + "v1RestoreStatus": { + "default": "RESTORE_STATUS_UNSPECIFIED", + "enum": [ + "RESTORE_STATUS_UNSPECIFIED", + "RESTORE_STATUS_NONE", + "RESTORE_STATUS_REQUESTED", + "RESTORE_STATUS_RESTORING", + "RESTORE_STATUS_COMPLETED", + "RESTORE_STATUS_FAILED" + ], + "title": "RestoreStatus represents the restore status of a backup or snapshot", + "type": "string" + }, + "v1RetryPaymentRequest": { "properties": { - "addons": { - "title": "Decimal string with 6 decimal places precision", + "paymentMethodId": { + "title": "Optional: payment method ID to use for retry\nIf not provided, uses the default payment method", "type": "string" }, - "base": { - "title": "Decimal string with 6 decimal places precision", + "subscriptionId": { + "title": "Optional: subscription ID to retry payment for\nIf not provided, retries payment for the user's active subscription", + "type": "string" + } + }, + "type": "object" + }, + "v1RetryPaymentResponse": { + "properties": { + "paymentStatus": { + "title": "Payment status (available after task completes)", "type": "string" }, - "currency": { + "subscription": { + "$ref": "#/components/schemas/v1Subscription" + }, + "taskId": { + "title": "Task ID for tracking async payment retry processing", "type": "string" }, - "instanceLabel": { - "title": "Human-readable label", + "transactionId": { + "title": "Transaction ID from payment provider (available after task completes)", "type": "string" + } + }, + "type": "object" + }, + "v1RevokeCouponResponse": { + "properties": { + "coupon": { + "$ref": "#/components/schemas/v1Coupon" }, - "quantity": { + "revokedApplications": { "format": "int32", "type": "integer" - }, - "subtotal": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" } }, "type": "object" }, - "v1PricingModel": { - "default": "PRICING_MODEL_UNSPECIFIED", - "enum": [ - "PRICING_MODEL_UNSPECIFIED", - "PRICING_MODEL_FIXED", - "PRICING_MODEL_USAGE_BASED", - "PRICING_MODEL_TIERED", - "PRICING_MODEL_VOLUME", - "PRICING_MODEL_GRADUATED", - "PRICING_MODEL_PACKAGE", - "PRICING_MODEL_HYBRID" - ], - "type": "string" - }, - "v1PricingTierInput": { + "v1RevokeTokenRequest": { "properties": { - "endExclusive": { - "format": "double", - "title": "null = unlimited", - "type": "number" - }, - "flatFee": { - "type": "boolean" - }, - "flatFeeAmount": { - "title": "Decimal string with 6 decimal places precision", + "clientId": { "type": "string" }, - "startInclusive": { - "format": "double", - "type": "number" - }, - "tierName": { + "token": { "type": "string" }, - "tierOrder": { - "format": "int32", - "type": "integer" - }, - "tierType": { - "$ref": "#/components/schemas/v1TierMode" - }, - "unitAmount": { - "title": "Decimal string with 6 decimal places precision", + "tokenTypeHint": { + "title": "\"access_token\" or \"refresh_token\"", "type": "string" } }, "type": "object" }, - "v1ProductType": { - "default": "PRODUCT_TYPE_UNSPECIFIED", - "enum": [ - "PRODUCT_TYPE_UNSPECIFIED", - "PRODUCT_TYPE_PLAN", - "PRODUCT_TYPE_ADDON" - ], - "title": "- PRODUCT_TYPE_PLAN: Standalone subscription plan\n - PRODUCT_TYPE_ADDON: Addon attached to a subscription", - "type": "string" - }, - "v1PromoCreditGrant": { + "v1RoadmapFeatureRequest": { "properties": { - "amount": { + "assigneeName": { "type": "string" }, - "code": { + "authorDisplayName": { "type": "string" }, - "couponName": { - "type": "string" + "commentCount": { + "format": "int32", + "type": "integer" }, - "expiresAt": { + "createdAt": { "format": "date-time", "type": "string" }, - "id": { + "description": { "type": "string" }, - "remaining": { + "id": { "type": "string" }, - "requiredTopup": { - "description": "USD top-up needed to activate a pending grant. Empty when none is needed.", - "type": "string" + "isPinned": { + "type": "boolean" }, - "reserved": { - "type": "string" + "product": { + "$ref": "#/components/schemas/v1RoadmapProductCategory" }, - "source": { + "slug": { "type": "string" }, "status": { - "type": "string" - } - }, - "type": "object" - }, - "v1ProviderCatalogPlan": { - "description": "One public plan offering for a provider (GetProvider catalog). Reuses PlanRegion + PlanPrice\nfrom the same marketplace encoding as ListProviders rows.", - "properties": { - "assetType": { - "$ref": "#/components/schemas/v1AssetType" - }, - "billingType": { - "$ref": "#/components/schemas/v1BillingType" - }, - "computeCategory": { - "$ref": "#/components/schemas/v1ComputeCategory" - }, - "computeType": { - "$ref": "#/components/schemas/v1ComputeType" - }, - "planCode": { - "type": "string" + "$ref": "#/components/schemas/v1RoadmapRequestStatus" }, - "planDescription": { + "statusChangedAt": { + "format": "date-time", "type": "string" }, - "planId": { + "title": { "type": "string" }, - "planName": { - "type": "string" + "upvoteCount": { + "format": "int32", + "type": "integer" }, - "planPrices": { - "items": { - "$ref": "#/components/schemas/v1PlanPrice" - }, - "type": "array" + "userVote": { + "$ref": "#/components/schemas/v1RoadmapVoteType" }, - "regions": { - "items": { - "$ref": "#/components/schemas/v1PlanRegion" - }, - "type": "array" + "voteScore": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1ProviderCustomerActivityFilter": { - "default": "PROVIDER_CUSTOMER_ACTIVITY_FILTER_UNSPECIFIED", - "description": "Active: at least one non-deleted VM from this provider. Inactive: all VMs from this provider are soft-deleted (delete_time set).\n\n - PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL: All customers (any VM history with this provider, including when every VM is soft-deleted).", - "enum": [ - "PROVIDER_CUSTOMER_ACTIVITY_FILTER_UNSPECIFIED", - "PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL", - "PROVIDER_CUSTOMER_ACTIVITY_FILTER_ACTIVE", - "PROVIDER_CUSTOMER_ACTIVITY_FILTER_INACTIVE" - ], - "type": "string" - }, - "v1ProviderCustomerAssetRow": { + "v1RoadmapFeatureRequestComment": { "properties": { - "activityStatus": { - "$ref": "#/components/schemas/v1ProviderCustomerVmActivityStatus" - }, - "assetType": { - "$ref": "#/components/schemas/v1ProviderCustomerAssetType" + "authorDisplayName": { + "type": "string" }, - "complianceActor": { - "$ref": "#/components/schemas/v1ComplianceActor" + "body": { + "type": "string" }, - "complianceHeld": { + "canEdit": { "type": "boolean" }, - "complianceMessage": { + "createdAt": { + "format": "date-time", "type": "string" }, - "complianceReason": { - "$ref": "#/components/schemas/v1ComplianceReason" + "id": { + "type": "string" }, - "createdAt": { + "isEdited": { + "type": "boolean" + }, + "isOwn": { + "type": "boolean" + }, + "updatedAt": { "format": "date-time", "type": "string" + } + }, + "type": "object" + }, + "v1RoadmapProductCategory": { + "properties": { + "color": { + "type": "string" }, - "deleteTime": { - "description": "Set when the VM was deleted or terminated (soft-delete).", - "format": "date-time", + "description": { "type": "string" }, - "displayName": { + "icon": { "type": "string" }, "id": { "type": "string" }, - "ipv4": { + "name": { "type": "string" }, - "ipv6": { + "slug": { "type": "string" }, - "os": { - "description": "OS/distro label from the VM template (e.g. ubuntu-22).", - "type": "string" + "sortOrder": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1RoadmapProductStats": { + "properties": { + "completed": { + "format": "int32", + "type": "integer" }, - "planCode": { - "description": "Plan code (e.g. DC-HF-32C-\u2026) from the subscription plan.", - "type": "string" + "inProgress": { + "format": "int32", + "type": "integer" }, - "planName": { - "type": "string" + "inReview": { + "format": "int32", + "type": "integer" }, - "region": { - "description": "Region label, e.g. \"Frankfurt, DE\".", - "type": "string" + "planned": { + "format": "int32", + "type": "integer" }, - "regionId": { - "description": "UUID of the node's region (same dimension as ListProviderCustomerAssetsRequest.region_id filter).", + "productName": { "type": "string" }, - "spec": { - "description": "Human-readable size, e.g. \"2 vCPU \u00b7 4096 MB RAM \u00b7 80 GB disk\".", + "productSlug": { "type": "string" } }, "type": "object" }, - "v1ProviderCustomerAssetType": { - "default": "PROVIDER_CUSTOMER_ASSET_TYPE_UNSPECIFIED", + "v1RoadmapRequestStatus": { + "default": "ROADMAP_REQUEST_STATUS_UNSPECIFIED", "enum": [ - "PROVIDER_CUSTOMER_ASSET_TYPE_UNSPECIFIED", - "PROVIDER_CUSTOMER_ASSET_TYPE_ALL", - "PROVIDER_CUSTOMER_ASSET_TYPE_VIRTUAL_MACHINE", - "PROVIDER_CUSTOMER_ASSET_TYPE_DEDICATED_SERVER", - "PROVIDER_CUSTOMER_ASSET_TYPE_GAME_SERVER" + "ROADMAP_REQUEST_STATUS_UNSPECIFIED", + "ROADMAP_REQUEST_STATUS_IN_REVIEW", + "ROADMAP_REQUEST_STATUS_PLANNED", + "ROADMAP_REQUEST_STATUS_IN_PROGRESS", + "ROADMAP_REQUEST_STATUS_COMPLETED", + "ROADMAP_REQUEST_STATUS_DECLINED" ], "type": "string" }, - "v1ProviderCustomerRow": { + "v1RoadmapVoteType": { + "default": "ROADMAP_VOTE_TYPE_UNSPECIFIED", + "enum": [ + "ROADMAP_VOTE_TYPE_UNSPECIFIED", + "ROADMAP_VOTE_TYPE_UP" + ], + "type": "string" + }, + "v1Role": { "properties": { - "addressSummary": { - "description": "Best-effort summary from organization metadata (billing/address keys).", - "type": "string" - }, - "email": { + "description": { "type": "string" }, - "firstName": { - "type": "string" + "groupIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "lastLoginTime": { - "format": "date-time", + "id": { + "title": "Fields", "type": "string" }, - "lastName": { - "type": "string" + "isBuiltin": { + "type": "boolean" }, - "organizationId": { - "type": "string" + "metadata": { + "title": "Metadata", + "type": "object" }, - "organizationName": { + "name": { "type": "string" }, - "paymentMethodBrand": { - "description": "Default payment method brand when known (visa, mastercard, amex, paypal, \u2026).", + "organizationId": { + "title": "Relations", "type": "string" }, - "paymentMethodLast4": { - "description": "Last 4 digits of the default card. Empty for non-card methods or if unknown.", - "type": "string" + "permissions": { + "items": { + "type": "string" + }, + "type": "array" }, - "purchasesBlocked": { - "type": "boolean" + "status": { + "$ref": "#/components/schemas/protov1Status" }, - "purchasesBlockedActor": { - "$ref": "#/components/schemas/v1ComplianceActor" + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" }, - "vmActivityStatus": { - "$ref": "#/components/schemas/v1ProviderCustomerVmActivityStatus" + "users": { + "items": { + "$ref": "#/components/schemas/v1UserSummary" + }, + "type": "array" } }, "type": "object" }, - "v1ProviderCustomerVmActivityStatus": { - "default": "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_UNSPECIFIED", + "v1RotateMonitoringDatasourceTokenRequest": { + "type": "object" + }, + "v1RuleEffect": { + "default": "RULE_EFFECT_UNSPECIFIED", + "description": "- RULE_EFFECT_ENABLE: Feature toggle: true/false (use false to disable)\n - RULE_EFFECT_ENTITLE: Entitlement: granted\n - RULE_EFFECT_LIMIT: Limit: numeric ceiling", "enum": [ - "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_UNSPECIFIED", - "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_ACTIVE", - "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_INACTIVE" + "RULE_EFFECT_UNSPECIFIED", + "RULE_EFFECT_ENABLE", + "RULE_EFFECT_ENTITLE", + "RULE_EFFECT_LIMIT" ], + "title": "RuleEffect represents the effect type of a rule", "type": "string" }, - "v1ProviderDashboardAddonCatalogRow": { + "v1Rules": { "properties": { - "activeSubscriptionCount": { - "format": "int32", - "type": "integer" + "boolValue": { + "title": "Boolean value for ENABLE/ENTITLE effects", + "type": "boolean" }, - "addonId": { + "currentUsage": { + "format": "int64", + "title": "Optional: current usage count (only for LIMIT rules)", "type": "string" }, - "addonType": { - "$ref": "#/components/schemas/v1AddonType" - }, - "billingType": { - "$ref": "#/components/schemas/v1BillingType" + "effect": { + "$ref": "#/components/schemas/v1RuleEffect" }, - "code": { + "int64Value": { + "format": "int64", + "title": "Numeric value for LIMIT effect", "type": "string" }, - "distinctCustomerOrgCount": { - "format": "int32", - "type": "integer" - }, - "distinctVmCount": { - "format": "int32", - "type": "integer" - }, - "name": { + "ruleKey": { + "title": "Rule key (e.g., \"organization.max_members\", \"secrets.enabled\")", "type": "string" - }, - "pricingModel": { - "$ref": "#/components/schemas/v1PricingModel" } }, + "title": "RuleStatus represents the status of a rule from the ruleset", "type": "object" }, - "v1ProviderDashboardNodeRollup": { + "v1SSHKey": { "properties": { - "capacityCpuCores": { - "format": "int32", - "type": "integer" - }, - "capacityMemoryMb": { - "format": "int64", - "type": "string" - }, - "cpuOverallocatePercent": { - "format": "int32", - "type": "integer" - }, - "hypervisorId": { - "description": "VirtFusion hypervisor_id or SolusVM compute_resource_id; used to join Prom series.", - "type": "string" - }, - "memoryOverallocatePercent": { - "format": "int32", - "type": "integer" - }, - "nodeCpuCoreAllocated": { - "format": "int32", - "type": "integer" - }, - "nodeId": { - "type": "string" - }, - "nodeMemoryAllocatedMb": { - "format": "int64", - "type": "string" - }, - "nodeName": { + "fingerprint": { "type": "string" }, - "platformId": { + "id": { "type": "string" }, - "platformName": { + "keyType": { + "description": "rsa, ed25519, ecdsa, dsa, etc.", "type": "string" }, - "regionId": { + "name": { "type": "string" }, - "soldCpuCores": { - "format": "int64", + "organizationId": { "type": "string" }, - "soldMemoryMb": { - "format": "int64", + "publicKey": { "type": "string" }, - "soldStorageGb": { - "format": "int64", - "type": "string" + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + } + }, + "title": "SSH Key messages", + "type": "object" + }, + "v1ScanDnsZoneRecordsResponse": { + "properties": { + "records": { + "items": { + "$ref": "#/components/schemas/v1DnsRecord" + }, + "type": "array" + } + }, + "type": "object" + }, + "v1SearchMarketplaceRequest": { + "description": "Natural-language marketplace search (anonymous landing page).", + "properties": { + "filterBillingType": { + "$ref": "#/components/schemas/v1BillingType" }, - "storageOverallocatePercent": { + "page": { "format": "int32", "type": "integer" }, - "vmCount": { + "pageSize": { "format": "int32", "type": "integer" + }, + "query": { + "type": "string" + }, + "turnstileToken": { + "description": "Cloudflare Turnstile token (required for anonymous callers when auth.turnstile.requireOnAnonymousMarketplaceSearch).", + "type": "string" } }, "type": "object" }, - "v1ProviderDashboardPlanSubscriptionStat": { + "v1SearchMarketplaceResponse": { "properties": { - "activeSubscriptionCount": { - "format": "int32", - "type": "integer" - }, - "assetType": { - "$ref": "#/components/schemas/v1AssetType" - }, - "billingPeriod": { - "$ref": "#/components/schemas/v1BillingPeriod" - }, - "billingType": { + "appliedBillingType": { "$ref": "#/components/schemas/v1BillingType" }, - "code": { - "type": "string" + "page": { + "format": "int32", + "type": "integer" }, - "distinctCustomerOrgCount": { + "pageSize": { "format": "int32", "type": "integer" }, - "name": { - "type": "string" + "parsedQuery": { + "$ref": "#/components/schemas/v1MarketplaceSearchParsedQuery" }, - "planId": { - "type": "string" + "results": { + "items": { + "$ref": "#/components/schemas/v1MarketplaceSearchResult" + }, + "type": "array" }, - "vmAssetCount": { + "totalCount": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1ProviderDashboardPlansTabStats": { + "v1SearchTicketsRequest": { "properties": { - "kpiActiveAddonSubscriptionsSum": { - "format": "int32", - "type": "integer" + "filterCaseType": { + "$ref": "#/components/schemas/v1CaseType" }, - "kpiActiveSubscriptionsSum": { - "format": "int32", - "type": "integer" + "filterPriority": { + "$ref": "#/components/schemas/v1TicketPriority" }, - "kpiPlanCount": { + "filterTicketStatus": { + "$ref": "#/components/schemas/v1TicketStatus" + }, + "includeHighlights": { + "type": "boolean" + }, + "page": { "format": "int32", "type": "integer" }, - "kpiVmAssetsSum": { + "pageSize": { "format": "int32", "type": "integer" + }, + "query": { + "type": "string" } }, "type": "object" }, - "v1ProviderDetails": { - "description": "GetProvider payload: nested ProviderInfo shares the same core fields as list rows; extended\nfields are provider-wide (website, review breakdown, catalog plans, etc.).", + "v1SearchTicketsResponse": { "properties": { - "availablePlans": { - "items": { - "$ref": "#/components/schemas/v1ProviderCatalogPlan" + "highlights": { + "additionalProperties": { + "$ref": "#/components/schemas/v1TicketSearchHighlight" }, - "type": "array" + "title": "Map of ticket ID to highlighted snippets", + "type": "object" }, - "availableRegions": { + "organizationDetails": { + "additionalProperties": { + "$ref": "#/components/schemas/v1OrganizationDetails" + }, + "title": "Map of organization ID to organization name", + "type": "object" + }, + "tickets": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1Ticket" }, "type": "array" }, - "avgTicketResponseSeconds": { - "format": "int64", + "totalCount": { + "format": "int32", + "type": "integer" + }, + "userDetails": { + "additionalProperties": { + "$ref": "#/components/schemas/v1UserDetails" + }, + "title": "Map of user ID to user details (first_name, last_name)", + "type": "object" + } + }, + "type": "object" + }, + "v1Secret": { + "properties": { + "id": { + "title": "Fields", "type": "string" }, - "ddosSolution": { + "key": { "type": "string" }, - "hasIpv6": { - "description": "True when any listed region would report ipv6_available_in_filtered_region.", - "type": "boolean" + "metadata": { + "title": "Metadata", + "type": "object" }, - "provider": { - "$ref": "#/components/schemas/v1ProviderInfo" + "organization": { + "type": "string" }, - "reviewBreakdown": { - "$ref": "#/components/schemas/v1ProviderReviewBreakdown" + "status": { + "$ref": "#/components/schemas/protov1Status" }, - "website": { + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "user": { + "title": "Relations", "type": "string" } }, "type": "object" }, - "v1ProviderInfo": { + "v1ServiceAccountResponse": { "properties": { - "capabilities": { - "description": "Capability strings from platformdriver (guest_firewall, instant_apps, \u2026).", + "activeTokenCount": { + "format": "int32", + "type": "integer" + }, + "allowedIps": { "items": { "type": "string" }, "type": "array" }, - "ddosProvider": { - "description": "DDoS mitigation partner slug; \"none\" or empty means no DDoS vendor icon in marketplace.", + "createdAt": { + "format": "date-time", + "type": "string" + }, + "createdByUserId": { "type": "string" }, "description": { "type": "string" }, - "hasCapacityInFilteredRegion": { - "title": "True if provider has at least one node with capacity in the filtered region (plan + country + city)", - "type": "boolean" + "groupIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "ipv6AvailableInFilteredRegion": { - "description": "True when customers in the filtered region (country + city) are offered IPv6:\nProxmox = active IPv6 prefix on a network attached to a node there;\nVirtFusion/SolusVM = a node there whose platform has assign_customer_ipv6.", - "type": "boolean" + "id": { + "type": "string" }, - "metadata": { - "title": "Additional provider metadata", - "type": "object" + "isActive": { + "type": "boolean" }, - "organizationId": { + "lastUsedAt": { + "format": "date-time", "type": "string" }, - "organizationName": { + "name": { "type": "string" }, - "planId": { - "title": "The plan ID for the requested plan code", + "organizationId": { "type": "string" }, - "planPrices": { - "items": { - "$ref": "#/components/schemas/v1PlanPrice" - }, - "title": "All prices for the requested plan code (includes plan prices and addon prices, same format as price calculator)", - "type": "array" - }, - "planRegions": { + "roleIds": { "items": { - "$ref": "#/components/schemas/v1PlanRegion" + "type": "string" }, - "title": "All regions where the plan is available (region_id, country, city)", "type": "array" }, - "platformDriver": { - "$ref": "#/components/schemas/v1PlatformDriver" - }, - "providerLogoUrl": { + "updatedAt": { + "format": "date-time", "type": "string" - }, - "rating": { - "format": "float", - "title": "Average rating (0-5 stars)", - "type": "number" - }, - "totalReviews": { - "format": "int32", - "title": "Total number of reviews", - "type": "integer" } }, - "title": "Provider information for marketplace/discovery", "type": "object" }, - "v1ProviderOnboardingStep": { + "v1ServiceAccountTokenInfo": { "properties": { - "actionPath": { - "description": "Deep-link path in the provider console (e.g. \"/organization/settings\").", + "createdAt": { + "format": "date-time", "type": "string" }, - "code": { - "$ref": "#/components/schemas/v1ProviderOnboardingStepCode" + "createdByUserId": { + "type": "string" }, - "completed": { - "type": "boolean" + "expiresAt": { + "format": "date-time", + "type": "string" }, - "description": { + "expiresInDays": { + "format": "int32", + "type": "integer" + }, + "lastUsedAt": { + "format": "date-time", "type": "string" }, - "hint": { - "description": "Optional guidance when incomplete (e.g. agent/Proxmox metrics hint).", + "name": { "type": "string" }, - "title": { + "status": { + "type": "string" + }, + "tokenId": { "type": "string" } }, "type": "object" }, - "v1ProviderOnboardingStepCode": { - "default": "PROVIDER_ONBOARDING_STEP_CODE_UNSPECIFIED", - "description": "Provider self-serve onboarding checklist (provider orgs only).", + "v1ServiceStatus": { + "default": "SERVICE_STATUS_UNSPECIFIED", "enum": [ - "PROVIDER_ONBOARDING_STEP_CODE_UNSPECIFIED", - "PROVIDER_ONBOARDING_STEP_CODE_KYC", - "PROVIDER_ONBOARDING_STEP_CODE_DOMAIN", - "PROVIDER_ONBOARDING_STEP_CODE_STRIPE_CONNECT", - "PROVIDER_ONBOARDING_STEP_CODE_REGION", - "PROVIDER_ONBOARDING_STEP_CODE_PLATFORM", - "PROVIDER_ONBOARDING_STEP_CODE_NODE", - "PROVIDER_ONBOARDING_STEP_CODE_NODE_METRICS", - "PROVIDER_ONBOARDING_STEP_CODE_CLOUD_INIT", - "PROVIDER_ONBOARDING_STEP_CODE_VM_TEMPLATE", - "PROVIDER_ONBOARDING_STEP_CODE_NETWORK", - "PROVIDER_ONBOARDING_STEP_CODE_NODE_NETWORK", - "PROVIDER_ONBOARDING_STEP_CODE_PREFLIGHT", - "PROVIDER_ONBOARDING_STEP_CODE_LIVE_VALIDATION", - "PROVIDER_ONBOARDING_STEP_CODE_AGENT", - "PROVIDER_ONBOARDING_STEP_CODE_PREFIX_IPV4", - "PROVIDER_ONBOARDING_STEP_CODE_PREFIX_IPV6", - "PROVIDER_ONBOARDING_STEP_CODE_PLAN", - "PROVIDER_ONBOARDING_STEP_CODE_ADDONS", - "PROVIDER_ONBOARDING_STEP_CODE_FIXED_PRICE_ADDONS" + "SERVICE_STATUS_UNSPECIFIED", + "SERVICE_STATUS_ONLINE", + "SERVICE_STATUS_OFFLINE", + "SERVICE_STATUS_MAINTENANCE" ], "type": "string" }, - "v1ProviderPlanPriceSort": { - "default": "PROVIDER_PLAN_PRICE_SORT_UNSPECIFIED", - "description": "Order for marketplace provider list by the plan price shown in the row (aligns with UI).\nWhen set, the first three providers from the default newest-first order stay pinned\nas Recommendations; only the remaining providers are ordered by list price.\n\n - PROVIDER_PLAN_PRICE_SORT_LEAST_EXPENSIVE_FIRST: Ascending among non-recommended providers: lowest list price first\n(usage: hourly, subscription: fixed monthly, free: 0)\n - PROVIDER_PLAN_PRICE_SORT_MOST_EXPENSIVE_FIRST: Descending among non-recommended providers: highest list price first", + "v1ServingStatus": { + "default": "UNKNOWN", "enum": [ - "PROVIDER_PLAN_PRICE_SORT_UNSPECIFIED", - "PROVIDER_PLAN_PRICE_SORT_LEAST_EXPENSIVE_FIRST", - "PROVIDER_PLAN_PRICE_SORT_MOST_EXPENSIVE_FIRST" + "UNKNOWN", + "SERVING", + "NOT_SERVING" ], "type": "string" }, - "v1ProviderRevenueWaterfall": { + "v1SessionInfo": { "properties": { - "chargeCurrency": { + "browser": { "type": "string" }, - "currencyConversionFee": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "grossSales": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "grossSalesSettled": { - "$ref": "#/components/schemas/v1MoneyAmount" + "country": { + "type": "string" }, - "netProfit": { - "$ref": "#/components/schemas/v1MoneyAmount" + "deviceType": { + "type": "string" }, - "platformFee": { - "$ref": "#/components/schemas/v1MoneyAmount" + "id": { + "type": "string" }, - "platformFeeSettled": { - "$ref": "#/components/schemas/v1MoneyAmount" + "isCurrentSession": { + "type": "boolean" }, - "refunds": { - "$ref": "#/components/schemas/v1MoneyAmount" + "lastLogin": { + "type": "string" }, - "refundsSettled": { - "$ref": "#/components/schemas/v1MoneyAmount" + "os": { + "type": "string" }, - "settlementCurrency": { + "realIp": { "type": "string" }, - "stripeProcessingFee": { - "$ref": "#/components/schemas/v1MoneyAmount" + "requestIp": { + "type": "string" } }, "type": "object" }, - "v1ProviderReviewBreakdown": { + "v1SetDefaultPaymentMethodResponse": { "properties": { - "fiveStar": { - "format": "int32", - "type": "integer" - }, - "fourStar": { - "format": "int32", - "type": "integer" - }, - "oneStar": { - "format": "int32", - "type": "integer" - }, - "threeStar": { - "format": "int32", - "type": "integer" - }, - "twoStar": { - "format": "int32", - "type": "integer" + "paymentMethod": { + "$ref": "#/components/schemas/v1PaymentMethod" } }, "type": "object" }, - "v1ProviderReviewListItem": { - "description": "Provider UI: list and respond to client reviews (no VM identifiers: anonymous to provider).", + "v1SetGameNestOrderingRequest": { "properties": { - "comment": { - "type": "string" - }, - "createTime": { - "format": "date-time", - "type": "string" - }, - "id": { - "type": "string" - }, - "providerRepliedAt": { - "format": "date-time", - "type": "string" - }, - "providerReply": { + "catalogKey": { "type": "string" }, - "starRating": { - "format": "int32", - "type": "integer" + "orderingEnabled": { + "type": "boolean" }, - "updateTime": { - "format": "date-time", + "platformId": { "type": "string" } }, "type": "object" }, - "v1ProviderReviewStarSummary": { + "v1SetPasswordRequest": { + "description": "SetPassword is for passwordless (SSO-only) accounts that have never set a local password.", "properties": { - "reviewCount": { - "format": "int32", - "type": "integer" - }, - "starRating": { - "format": "int32", - "type": "integer" + "newPassword": { + "type": "string" } }, "type": "object" }, - "v1ProviderStripeActivityEvent": { + "v1SmtpOutboundProviderPolicy": { "properties": { - "at": { - "format": "date-time", - "type": "string" - }, - "label": { - "type": "string" + "blockByDefault": { + "type": "boolean" } }, "type": "object" }, - "v1ProviderStripePaymentMethodDetails": { + "v1SmtpOutboundVmAction": { + "default": "SMTP_OUTBOUND_VM_ACTION_UNSPECIFIED", + "enum": [ + "SMTP_OUTBOUND_VM_ACTION_UNSPECIFIED", + "SMTP_OUTBOUND_VM_ACTION_INHERIT", + "SMTP_OUTBOUND_VM_ACTION_ALLOW", + "SMTP_OUTBOUND_VM_ACTION_BLOCK" + ], + "type": "string" + }, + "v1Snapshot": { "properties": { - "brand": { + "createdAt": { + "format": "date-time", + "readOnly": true, "type": "string" }, - "cardType": { - "title": "e.g. visa credit card", + "description": { + "readOnly": true, "type": "string" }, - "expMonth": { - "format": "int32", - "type": "integer" + "id": { + "readOnly": true, + "type": "string" }, - "expYear": { - "format": "int32", - "type": "integer" + "lastRestore": { + "$ref": "#/components/schemas/v1LastRestore" }, - "fingerprint": { - "type": "string" + "metadata": { + "type": "object" }, - "id": { + "name": { + "readOnly": true, "type": "string" }, - "issuer": { - "type": "string" + "operationStatus": { + "$ref": "#/components/schemas/v1SnapshotOperationStatus" }, - "last4": { + "restoreStatus": { + "$ref": "#/components/schemas/v1RestoreStatus" + }, + "restoredAt": { + "format": "date-time", + "readOnly": true, "type": "string" }, - "originCountry": { + "snapshotId": { + "readOnly": true, "type": "string" }, - "ownerName": { + "snapshotStatus": { + "$ref": "#/components/schemas/v1SnapshotStatus" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "virtualMachineId": { + "readOnly": true, "type": "string" } }, + "title": "Snapshot represents a snapshot of a virtual machine", "type": "object" }, - "v1ProviderStripeTransaction": { + "v1SnapshotOperationStatus": { + "default": "SNAPSHOT_OPERATION_STATUS_UNSPECIFIED", + "enum": [ + "SNAPSHOT_OPERATION_STATUS_UNSPECIFIED", + "SNAPSHOT_OPERATION_STATUS_PENDING", + "SNAPSHOT_OPERATION_STATUS_PROCESSING", + "SNAPSHOT_OPERATION_STATUS_COMPLETED", + "SNAPSHOT_OPERATION_STATUS_FAILED" + ], + "title": "SnapshotOperationStatus represents the status of snapshot creation operation", + "type": "string" + }, + "v1SnapshotStatus": { + "default": "SNAPSHOT_STATUS_UNSPECIFIED", + "enum": [ + "SNAPSHOT_STATUS_UNSPECIFIED", + "SNAPSHOT_STATUS_ACTIVE", + "SNAPSHOT_STATUS_DELETED", + "SNAPSHOT_STATUS_EXPIRED", + "SNAPSHOT_STATUS_UNKNOWN" + ], + "title": "SnapshotStatus represents the status of a snapshot", + "type": "string" + }, + "v1StartConnectOAuthRequest": { + "type": "object" + }, + "v1StartConnectOAuthResponse": { "properties": { - "activity": { - "items": { - "$ref": "#/components/schemas/v1ProviderStripeActivityEvent" - }, - "type": "array" - }, - "amount": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "applicationFeeId": { - "type": "string" - }, - "chargeId": { - "type": "string" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "currencyConversionFee": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "customerId": { + "authorizeUrl": { + "title": "Stripe OAuth authorize URL (single-use state)", "type": "string" - }, - "customerName": { + } + }, + "type": "object" + }, + "v1StartPlanLiveValidationResponse": { + "properties": { + "runId": { "type": "string" }, - "declineReason": { + "status": { "type": "string" - }, + } + }, + "type": "object" + }, + "v1StartupVariable": { + "properties": { "description": { "type": "string" }, - "exchangeRate": { + "envVariable": { "type": "string" }, - "feesTotalSettled": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "netAmount": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "paymentAmountSettled": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "paymentIntentId": { + "name": { "type": "string" }, - "paymentMethodBrand": { + "rules": { "type": "string" }, - "paymentMethodDetails": { - "$ref": "#/components/schemas/v1ProviderStripePaymentMethodDetails" - }, - "paymentMethodLast4": { + "serverValue": { "type": "string" }, - "platformFee": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "platformFeeSettled": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "refundedAt": { - "format": "date-time", - "type": "string" + "userEditable": { + "type": "boolean" }, - "settlementMerchant": { + "userViewable": { + "type": "boolean" + } + }, + "type": "object" + }, + "v1StoragePool": { + "properties": { + "name": { "type": "string" }, - "statementDescriptor": { - "type": "string" + "storage": { + "format": "int32", + "type": "integer" }, - "status": { + "storageAllocated": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1StorefrontFAQ": { + "properties": { + "answer": { "type": "string" }, - "stripeProcessingFee": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "transferredTo": { + "question": { "type": "string" } }, "type": "object" }, - "v1ProviderTicketNotificationPolicy": { + "v1StorefrontParticipationStatus": { + "default": "STOREFRONT_PARTICIPATION_STATUS_UNSPECIFIED", + "enum": [ + "STOREFRONT_PARTICIPATION_STATUS_UNSPECIFIED", + "STOREFRONT_PARTICIPATION_STATUS_NOT_PARTICIPATING", + "STOREFRONT_PARTICIPATION_STATUS_DRAFT", + "STOREFRONT_PARTICIPATION_STATUS_PENDING_APPROVAL", + "STOREFRONT_PARTICIPATION_STATUS_LIVE", + "STOREFRONT_PARTICIPATION_STATUS_LIVE_CHANGES_PENDING", + "STOREFRONT_PARTICIPATION_STATUS_OPTED_OUT" + ], + "type": "string" + }, + "v1StorefrontPublicReview": { "properties": { - "destinationEmail": { + "comment": { "type": "string" }, - "effectiveDestinationEmail": { - "description": "Resolved mailbox used when destination_email is empty (support_email fallback).", + "createdAt": { + "format": "date-time", "type": "string" }, - "enabled": { - "type": "boolean" - }, - "extraEmails": { - "items": { - "type": "string" - }, - "type": "array" - }, "id": { "type": "string" }, - "inboundRepliesEnabled": { - "description": "True when NodeRings can accept helpdesk replies (inbound secret configured).", - "type": "boolean" - }, - "includeClientContact": { - "type": "boolean" - }, - "includeMessageBody": { - "type": "boolean" - }, - "minPriority": { - "$ref": "#/components/schemas/v1TicketPriority" - }, - "notifyOnClientReplied": { - "type": "boolean" - }, - "notifyOnClosed": { - "type": "boolean" - }, - "notifyOnCreated": { - "type": "boolean" + "providerRepliedAt": { + "format": "date-time", + "type": "string" }, - "notifyOnEscalated": { - "type": "boolean" - } - }, - "type": "object" - }, - "v1PublicProductCount": { - "description": "One product's provisioning counters.", - "properties": { - "last30Days": { - "description": "Provisioned in the last 30 days.", - "format": "int32", - "type": "integer" + "providerReply": { + "type": "string" }, - "total": { - "description": "Provisioned since launch, including ones deleted since.", + "starRating": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1PublicStorefront": { + "v1StorefrontRevision": { "properties": { "aboutHtml": { "type": "string" }, + "aboutMarkdown": { + "type": "string" + }, "approvedAt": { "format": "date-time", "type": "string" }, - "catalog": { - "$ref": "#/components/schemas/v1ProviderDetails" - }, "coverImageUrl": { "type": "string" }, @@ -16227,1850 +15241,1300 @@ }, "type": "array" }, - "logoImageUrl": { - "description": "Approved storefront wordmark. Not the organization marketplace logo.", - "type": "string" - }, - "organizationName": { - "type": "string" - }, - "providerId": { - "type": "string" - }, - "reviews": { - "items": { - "$ref": "#/components/schemas/v1StorefrontPublicReview" - }, - "type": "array" - }, - "slug": { - "type": "string" - }, - "socialUrls": { - "items": { - "type": "string" - }, - "type": "array" - }, - "tagline": { + "id": { "type": "string" - } - }, - "type": "object" - }, - "v1PublicStorefrontCard": { - "properties": { - "cities": { - "items": { - "type": "string" - }, - "type": "array" }, - "organizationName": { + "logoImageUrl": { "type": "string" }, - "providerId": { + "proposedSlug": { "type": "string" }, - "providerLogoUrl": { - "description": "Approved storefront wordmark. Not the organization marketplace logo.", + "rejectReason": { "type": "string" }, - "rating": { - "format": "float", - "type": "number" + "status": { + "$ref": "#/components/schemas/v1StorefrontRevisionStatus" }, - "slug": { + "submittedAt": { + "format": "date-time", "type": "string" }, "tagline": { "type": "string" - }, - "totalReviews": { - "format": "int32", - "type": "integer" - }, - "website": { - "type": "string" } }, "type": "object" }, - "v1PurchaseCreditsRequest": { - "properties": { - "amount": { - "title": "Decimal string: USD amount to top-up", - "type": "string" - }, - "paymentMethodId": { - "description": "Optional: payment method ID to charge. If omitted, the org's default\npayment method is used.", - "type": "string" - } - }, - "type": "object" + "v1StorefrontRevisionStatus": { + "default": "STOREFRONT_REVISION_STATUS_UNSPECIFIED", + "description": "Public provider storefront (anonymous). Copy is always the latest approved revision.", + "enum": [ + "STOREFRONT_REVISION_STATUS_UNSPECIFIED", + "STOREFRONT_REVISION_STATUS_DRAFT", + "STOREFRONT_REVISION_STATUS_PENDING_REVIEW", + "STOREFRONT_REVISION_STATUS_APPROVED", + "STOREFRONT_REVISION_STATUS_REJECTED", + "STOREFRONT_REVISION_STATUS_SUPERSEDED" + ], + "type": "string" }, - "v1PurchaseCreditsResponse": { + "v1SubmitRoadmapFeatureRequestRequest": { "properties": { - "clientSecret": { - "title": "Stripe PaymentIntent client_secret for 3DS confirmation", + "description": { "type": "string" }, - "creditPurchaseId": { - "title": "CreditPurchase row id", + "productSlug": { "type": "string" }, - "paymentIntentId": { - "title": "Stripe PaymentIntent id", + "title": { "type": "string" - }, - "requiresAction": { - "title": "True if 3DS/SCA confirmation is needed client-side", - "type": "boolean" } }, "type": "object" }, - "v1ReadFileResponse": { + "v1SubmitRoadmapFeatureRequestResponse": { "properties": { - "content": { - "format": "byte", + "message": { "type": "string" + }, + "success": { + "type": "boolean" } }, "type": "object" }, - "v1ReauthenticateUserRequest": { + "v1SubscribeResponse": { "properties": { - "code": { - "description": "Current TOTP or an unused recovery code; required when 2FA is enabled.", - "type": "string" - }, - "password": { - "description": "Required when the account has a local password.", - "type": "string" + "subscription": { + "$ref": "#/components/schemas/v1Subscription" } }, "type": "object" }, - "v1ReauthenticateUserResponse": { + "v1Subscription": { "properties": { - "expiresAt": { - "format": "date-time", + "activatedByServiceAccount": { + "description": "Service account that started this subscription. Empty when a user did, or when neither is recorded.", "type": "string" }, - "method": { - "description": "What was re-checked: \"password\", \"mfa\" or \"password+mfa\".", + "activatedByUser": { "type": "string" }, - "reauthToken": { - "description": "Step-up token; pass it as reauth_token to sensitive actions.", - "type": "string" - } - }, - "type": "object" - }, - "v1RecordUsageRequest": { - "properties": { - "eventId": { - "description": "For idempotent writes", - "title": "Deduplication and metadata", - "type": "string" + "addonSubscriptions": { + "description": "Active add-on subscriptions on this subscription (name, quantity, and catalog price).", + "items": { + "$ref": "#/components/schemas/v1AddonSubscription" + }, + "type": "array" }, - "externalId": { - "title": "External integration", - "type": "string" + "billingType": { + "$ref": "#/components/schemas/v1BillingType" }, - "metricCode": { - "type": "string" + "cancelAtPeriodEnd": { + "type": "boolean" }, - "metricId": { - "title": "Metric reference (either metric_id or metric_code must be provided)", + "canceledAt": { + "format": "date-time", "type": "string" }, - "properties": { - "title": "Additional metadata (region, instance_id, etc.)", - "type": "object" - }, - "quantity": { - "description": "Decimal as string", - "title": "Usage data", + "currency": { + "description": "ISO currency for recurring_amount (e.g. USD).", "type": "string" }, - "subscriptionId": { - "title": "Subscription reference", + "currentPeriodEnd": { + "format": "date-time", "type": "string" }, - "timestamp": { + "currentPeriodStart": { "format": "date-time", "type": "string" - } - }, - "type": "object" - }, - "v1RecordUsageResponse": { - "properties": { - "isDuplicate": { - "title": "True if event_id already existed", + }, + "hasUsageCharges": { + "description": "True when the bound plan also has metered/usage prices (bandwidth, compute hours, etc.).", "type": "boolean" }, - "usageRecord": { - "$ref": "#/components/schemas/v1UsageRecord" - } - }, - "type": "object" - }, - "v1RedeemPromoCodeRequest": { - "properties": { - "code": { - "type": "string" - } - }, - "type": "object" - }, - "v1RedeemPromoCodeResponse": { - "properties": { - "amount": { + "id": { + "title": "Fields", "type": "string" }, - "expiresAt": { - "description": "For a pending grant, the deadline for the required top-up.", - "format": "date-time", - "type": "string" + "metadata": { + "title": "Metadata", + "type": "object" }, - "grantId": { + "organization": { + "title": "Relations", "type": "string" }, - "remaining": { + "organizationName": { "type": "string" }, - "requiredTopup": { - "description": "USD top-up needed to activate a pending grant.", + "plan": { "type": "string" }, - "status": { - "description": "active, or pending when the code needs a top-up first.", - "type": "string" - } - }, - "type": "object" - }, - "v1RefreshTokenRequest": { - "properties": { - "clientId": { - "type": "string" + "planBillingPeriod": { + "$ref": "#/components/schemas/v1BillingPeriod" }, - "clientSecret": { - "title": "Optional for public clients", + "planCode": { + "description": "Plan catalog code (e.g. SC-GC-1C-1G-20) for display alongside plan_name.", "type": "string" }, - "refreshToken": { - "type": "string" - } - }, - "type": "object" - }, - "v1Refund": { - "properties": { - "amount": { - "title": "Decimal string with 6 decimal places precision", + "planName": { "type": "string" }, - "createdAt": { - "format": "date-time", + "platformFeeCurrency": { + "title": "Currency for platform fee", "type": "string" }, - "currency": { - "title": "Currency code (ISO 4217)", + "platformFeeId": { + "description": "Platform fee ID if applicable", + "title": "Platform fee (only for provider organizations)", "type": "string" }, - "failureReason": { - "title": "Reason for refund failure (if applicable)", - "type": "string" + "platformFeePercent": { + "format": "double", + "title": "Platform fee percentage (e.g., 10.0 for 10%)", + "type": "number" }, - "id": { + "platformFeeType": { + "title": "Platform fee type (percentage, fixed, etc.)", "type": "string" }, - "paymentId": { - "title": "Payment this refund is for", + "pricingModel": { + "$ref": "#/components/schemas/v1PricingModel" + }, + "quantity": { + "format": "int32", + "title": "Quantity of this subscription item (e.g., number of VMs,", + "type": "integer" + }, + "recurringAmount": { + "description": "Bound catalog amount for the current period (plan unit price \u00d7 quantity). Empty when unknown.", "type": "string" }, - "paymentProvider": { - "description": "Payment provider name (e.g., 'stripe', 'paypal')", - "title": "Stripe refund.id, PayPal refund.id)", + "resourceCpu": { + "description": "Linked VM resource snapshot for display (0 when not applicable).", + "format": "int32", + "type": "integer" + }, + "resourceHostname": { + "description": "Primary linked VM hostname for client compute subscriptions (empty otherwise).", "type": "string" }, - "processedAt": { - "format": "date-time", - "title": "When refund was processed", + "resourceMemory": { + "format": "int32", + "type": "integer" + }, + "resourceProviderName": { + "description": "Provider organization name for the linked VM (empty when not applicable).", "type": "string" }, - "providerRefundId": { - "title": "Payment provider refund ID (e.g.,", + "resourceRegionName": { + "description": "Region label for the linked VM (e.g. city and country, or datacenter name).", "type": "string" }, - "refundStatus": { - "$ref": "#/components/schemas/v1RefundStatus" + "resourceStorage": { + "format": "int32", + "type": "integer" + }, + "resourceVmId": { + "description": "Linked VM id for navigation (empty when not applicable).", + "type": "string" + }, + "startDate": { + "format": "date-time", + "type": "string" }, "status": { "$ref": "#/components/schemas/protov1Status" }, + "subscriptionStatus": { + "$ref": "#/components/schemas/v1SubscriptionStatus" + }, "timestamps": { "$ref": "#/components/schemas/v1Timestamps" + }, + "trialEndDate": { + "format": "date-time", + "type": "string" } }, - "title": "Refund represents a refund transaction for a payment", "type": "object" }, - "v1RefundStatus": { - "default": "REFUND_STATUS_UNSPECIFIED", - "enum": [ - "REFUND_STATUS_UNSPECIFIED", - "REFUND_STATUS_PENDING", - "REFUND_STATUS_PROCESSING", - "REFUND_STATUS_SUCCEEDED", - "REFUND_STATUS_FAILED", - "REFUND_STATUS_CANCELED" - ], - "type": "string" - }, - "v1RegenerateMfaBackupCodesRequest": { + "v1SubscriptionCoupon": { + "description": "The coupon attached to one subscription.", "properties": { + "applicationId": { + "type": "string" + }, + "appliedAt": { + "format": "date-time", + "type": "string" + }, "code": { "type": "string" - } - }, - "type": "object" - }, - "v1RegenerateMfaBackupCodesResponse": { - "properties": { - "backupCodes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1Region": { - "properties": { - "cityCountry": { - "$ref": "#/components/schemas/v1CityCountry" }, - "datacenter": { - "$ref": "#/components/schemas/v1Datacenter" + "periodsRemaining": { + "format": "int32", + "type": "integer" }, - "id": { - "title": "Fields", + "status": { + "$ref": "#/components/schemas/v1CouponApplicationStatus" + }, + "subscriptionId": { "type": "string" }, - "organizationId": { + "termsSummary": { + "description": "Disclosure text the customer accepted.", "type": "string" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "windowEndsAt": { + "format": "date-time", + "type": "string" } }, "type": "object" }, - "v1RegionLocation": { + "v1SubscriptionStatus": { + "default": "SUBSCRIPTION_STATUS_UNSPECIFIED", + "enum": [ + "SUBSCRIPTION_STATUS_UNSPECIFIED", + "SUBSCRIPTION_STATUS_TRIALING", + "SUBSCRIPTION_STATUS_ACTIVE", + "SUBSCRIPTION_STATUS_PAST_DUE", + "SUBSCRIPTION_STATUS_CANCELED", + "SUBSCRIPTION_STATUS_PAUSED" + ], + "type": "string" + }, + "v1SuccessResponse": { "properties": { - "city": { - "title": "City name", - "type": "string" - }, - "country": { - "title": "Country name", - "type": "string" + "success": { + "type": "boolean" } }, - "title": "Region location information (deduplicated city+country combinations)", "type": "object" }, - "v1RegisterUserRequest": { + "v1Ticket": { "properties": { - "email": { + "assignedToUser": { "type": "string" }, - "firstName": { - "type": "string" + "caseType": { + "$ref": "#/components/schemas/v1CaseType" }, - "lastName": { + "firstResponseAt": { + "format": "date-time", "type": "string" }, - "password": { + "firstResponseTimeSeconds": { + "format": "int64", "type": "string" }, - "turnstileToken": { - "description": "Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).", + "fromOrganization": { "type": "string" - } - }, - "type": "object" - }, - "v1RegisteredDomain": { - "properties": { - "adminContact": { - "$ref": "#/components/schemas/v1DomainContact" }, - "autoRenew": { - "type": "boolean" + "fromUser": { + "type": "string" }, - "dnsZoneId": { - "description": "NodeRings DNS zone for this domain, if any.", + "id": { + "title": "Fields", "type": "string" }, - "dnssec": { - "$ref": "#/components/schemas/v1DomainDnssec" + "lastActivityAt": { + "format": "date-time", + "type": "string" }, - "expiresAt": { + "lockedAt": { "format": "date-time", "type": "string" }, - "holds": { - "items": { - "$ref": "#/components/schemas/v1DomainHold" - }, - "type": "array" + "lockedByUser": { + "type": "string" }, - "id": { - "readOnly": true, + "message": { "type": "string" }, - "lastSyncedAt": { - "format": "date-time", + "metadata": { + "title": "Metadata", + "type": "object" + }, + "priority": { + "$ref": "#/components/schemas/v1TicketPriority" + }, + "replies": { + "title": "Relations", "type": "string" }, - "name": { + "resolutionTimeSeconds": { + "format": "int64", + "type": "string" + }, + "resolvedAt": { + "format": "date-time", "type": "string" }, - "nameservers": { + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "tags": { "items": { "type": "string" }, "type": "array" }, - "nsMode": { - "$ref": "#/components/schemas/v1DomainNsMode" + "ticketId": { + "format": "int64", + "type": "string" }, - "operationPending": { - "description": "A registrar update is in progress (\"Updating at the registry\u2026\").", - "type": "boolean" + "ticketStatus": { + "$ref": "#/components/schemas/v1TicketStatus" }, - "organizationId": { - "readOnly": true, - "type": "string" + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" }, - "privacyAllowed": { - "type": "boolean" + "title": { + "type": "string" }, - "registeredAt": { - "format": "date-time", + "toOrganization": { "type": "string" }, - "registrant": { - "$ref": "#/components/schemas/v1DomainContact" + "toUser": { + "type": "string" }, - "registrantChange": { - "$ref": "#/components/schemas/v1RegistrantChange" + "virtualMachines": { + "type": "string" + } + }, + "type": "object" + }, + "v1TicketAttachment": { + "properties": { + "fileName": { + "type": "string" }, - "registrantContactId": { - "description": "Registrant contact id and display name (company, else \"First Last\");\nalso set in list responses, where the full contacts are not loaded.", - "readOnly": true, + "fileSize": { + "format": "int64", "type": "string" }, - "registrantDisplayName": { - "readOnly": true, + "id": { "type": "string" }, - "registrarName": { - "description": "Sponsoring registrar shown on the domain page (RAA reseller duty).", + "mimeType": { "type": "string" }, - "renewBy": { - "description": "Date the domain stops working if not renewed (registrar renewal date).", - "format": "date-time", + "ticketId": { "type": "string" }, - "renewal": { - "$ref": "#/components/schemas/v1DomainRenewalInfo" + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "uploadedByUserId": { + "type": "string" + } + }, + "type": "object" + }, + "v1TicketInternalComment": { + "properties": { + "comment": { + "type": "string" }, - "renewalPaymentMethodId": { + "createdByUserId": { "type": "string" }, - "state": { - "$ref": "#/components/schemas/v1RegisteredDomainState" + "id": { + "type": "string" }, - "techContact": { - "$ref": "#/components/schemas/v1DomainContact" + "ticketId": { + "type": "string" }, "timestamps": { "$ref": "#/components/schemas/v1Timestamps" + } + }, + "type": "object" + }, + "v1TicketMessage": { + "properties": { + "fromOrganization": { + "title": "Organization of the user who sent this message", + "type": "string" }, - "tld": { + "fromUser": { + "title": "User who sent this message", "type": "string" }, - "transferIn": { - "$ref": "#/components/schemas/v1DomainTransferIn" + "id": { + "title": "Ticket ID (same for original, different for each reply)", + "type": "string" }, - "transferLock": { + "isReply": { + "title": "True if this is a reply, false if it's the original message", "type": "boolean" }, - "transferLockUntil": { - "format": "date-time", + "message": { + "title": "The message content", "type": "string" }, - "transferOut": { - "$ref": "#/components/schemas/v1DomainTransferOut" - }, - "verification": { - "$ref": "#/components/schemas/v1DomainVerification" + "sequence": { + "format": "int64", + "title": "Order in the thread (0 for original, 1+ for replies, based on creation time)", + "type": "string" }, - "whoisPrivacy": { - "type": "boolean" + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" }, - "whoisPrivacyAutoRenew": { - "type": "boolean" + "toOrganization": { + "title": "Organization of the recipient", + "type": "string" }, - "whoisPrivacyPaidUntil": { - "format": "date-time", + "toUser": { + "title": "User who should receive this message", "type": "string" } }, + "title": "TicketMessage represents a single message in a ticket thread\nThis includes both the original ticket message and all replies", "type": "object" }, - "v1RegisteredDomainState": { - "default": "REGISTERED_DOMAIN_STATE_UNSPECIFIED", - "description": "Lifecycle state of a registered domain.", + "v1TicketPriority": { + "default": "TICKET_PRIORITY_UNSPECIFIED", "enum": [ - "REGISTERED_DOMAIN_STATE_UNSPECIFIED", - "REGISTERED_DOMAIN_STATE_REGISTERING", - "REGISTERED_DOMAIN_STATE_ACTIVE", - "REGISTERED_DOMAIN_STATE_TRANSFER_IN_PENDING", - "REGISTERED_DOMAIN_STATE_TRANSFER_OUT_PENDING", - "REGISTERED_DOMAIN_STATE_EXPIRING", - "REGISTERED_DOMAIN_STATE_EXPIRED", - "REGISTERED_DOMAIN_STATE_REDEMPTION", - "REGISTERED_DOMAIN_STATE_PENDING_DELETE", - "REGISTERED_DOMAIN_STATE_TRANSFERRED_OUT", - "REGISTERED_DOMAIN_STATE_DELETED", - "REGISTERED_DOMAIN_STATE_FAILED" + "TICKET_PRIORITY_UNSPECIFIED", + "TICKET_PRIORITY_LOW", + "TICKET_PRIORITY_NORMAL", + "TICKET_PRIORITY_HIGH", + "TICKET_PRIORITY_URGENT", + "TICKET_PRIORITY_CRITICAL" ], "type": "string" }, - "v1RegistrantChange": { + "v1TicketSearchHighlight": { "properties": { - "expiresAt": { - "format": "date-time", + "message": { "type": "string" }, - "newContactId": { + "ticketId": { "type": "string" }, - "state": { - "$ref": "#/components/schemas/v1RegistrantChangeState" + "title": { + "type": "string" } }, "type": "object" }, - "v1RegistrantChangeState": { - "default": "REGISTRANT_CHANGE_STATE_UNSPECIFIED", - "enum": [ - "REGISTRANT_CHANGE_STATE_UNSPECIFIED", - "REGISTRANT_CHANGE_STATE_PENDING", - "REGISTRANT_CHANGE_STATE_APPROVED", - "REGISTRANT_CHANGE_STATE_REJECTED", - "REGISTRANT_CHANGE_STATE_EXPIRED" - ], - "type": "string" - }, - "v1ReinstallStatus": { - "default": "REINSTALL_STATUS_UNSPECIFIED", + "v1TicketStatus": { + "default": "TICKET_STATUS_UNSPECIFIED", "enum": [ - "REINSTALL_STATUS_UNSPECIFIED", - "REINSTALL_STATUS_NONE", - "REINSTALL_STATUS_REQUESTED", - "REINSTALL_STATUS_DELETING", - "REINSTALL_STATUS_PROVISIONING", - "REINSTALL_STATUS_COMPLETED", - "REINSTALL_STATUS_FAILED" + "TICKET_STATUS_UNSPECIFIED", + "TICKET_STATUS_IN_PROGRESS", + "TICKET_STATUS_ESCALATED", + "TICKET_STATUS_PENDING", + "TICKET_STATUS_AWAITING_REPLY", + "TICKET_STATUS_RESOLVED", + "TICKET_STATUS_WONT_FIX", + "TICKET_STATUS_DUPLICATE", + "TICKET_STATUS_NOT_REPRODUCIBLE" ], "type": "string" }, - "v1RemoveAddonResponse": { - "properties": { - "addonSubscription": { - "$ref": "#/components/schemas/v1AddonSubscription" - } - }, - "type": "object" - }, - "v1RemovePaymentMethodResponse": { - "properties": { - "success": { - "type": "boolean" - } - }, - "type": "object" - }, - "v1ReplaceRoleForGroupRequest": { + "v1TicketTemplate": { "properties": { - "groupId": { - "type": "string" + "caseType": { + "$ref": "#/components/schemas/v1CaseType" }, - "roleId": { + "createdByUserId": { "type": "string" - } - }, - "type": "object" - }, - "v1ReplaceRoleForServiceAccountRequest": { - "properties": { - "roleId": { + }, + "id": { "type": "string" }, - "serviceAccountId": { + "isActive": { + "type": "boolean" + }, + "messageTemplate": { "type": "string" - } - }, - "type": "object" - }, - "v1ReplaceRoleForUserRequest": { - "properties": { - "roleId": { + }, + "name": { "type": "string" }, - "userId": { + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "titleTemplate": { "type": "string" + }, + "variables": { + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "v1ResendRegistrantVerificationResponse": { - "properties": { - "verification": { - "$ref": "#/components/schemas/v1DomainVerification" - } - }, - "type": "object" - }, - "v1ResendVerificationEmailRequest": { + "v1TicketTemplateInput": { "properties": { - "email": { + "caseType": { + "$ref": "#/components/schemas/v1CaseType" + }, + "isActive": { + "type": "boolean" + }, + "messageTemplate": { "type": "string" }, - "turnstileToken": { - "description": "Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).", + "name": { + "type": "string" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "titleTemplate": { "type": "string" } }, "type": "object" }, - "v1ResetPasswordRequest": { + "v1TicketTemplateVariableDefinition": { "properties": { - "email": { + "description": { "type": "string" }, - "newPassword": { + "example": { "type": "string" }, - "resetToken": { + "name": { "type": "string" - } - }, - "type": "object" - }, - "v1ResourceInstanceInput": { - "properties": { - "addons": { - "items": { - "$ref": "#/components/schemas/v1AddonInput" - }, - "title": "Add-ons", - "type": "array" - }, - "hoursUsed": { - "format": "double", - "type": "number" }, - "quantity": { - "format": "int32", - "type": "integer" + "required": { + "type": "boolean" }, - "region": { + "source": { "type": "string" - }, - "usage": { - "additionalProperties": { - "format": "double", - "type": "number" - }, - "title": "Usage metrics (e.g., {\"vCPU\": 2, \"RAM_GB\": 4, \"Egress_GB\": 1200})", - "type": "object" } }, "type": "object" }, - "v1RestoreStatus": { - "default": "RESTORE_STATUS_UNSPECIFIED", + "v1TierMode": { + "default": "TIER_MODE_UNSPECIFIED", "enum": [ - "RESTORE_STATUS_UNSPECIFIED", - "RESTORE_STATUS_NONE", - "RESTORE_STATUS_REQUESTED", - "RESTORE_STATUS_RESTORING", - "RESTORE_STATUS_COMPLETED", - "RESTORE_STATUS_FAILED" + "TIER_MODE_UNSPECIFIED", + "TIER_MODE_NONE", + "TIER_MODE_VOLUME", + "TIER_MODE_TIERED", + "TIER_MODE_GRADUATED" ], - "title": "RestoreStatus represents the restore status of a backup or snapshot", "type": "string" }, - "v1RetryPaymentRequest": { + "v1Timestamps": { "properties": { - "paymentMethodId": { - "title": "Optional: payment method ID to use for retry\nIf not provided, uses the default payment method", + "createTime": { + "format": "date-time", "type": "string" }, - "subscriptionId": { - "title": "Optional: subscription ID to retry payment for\nIf not provided, retries payment for the user's active subscription", + "updateTime": { + "format": "date-time", "type": "string" } }, + "title": "Object details", "type": "object" }, - "v1RetryPaymentResponse": { + "v1TokenRequest": { "properties": { - "paymentStatus": { - "title": "Payment status (available after task completes)", + "clientId": { "type": "string" }, - "subscription": { - "$ref": "#/components/schemas/v1Subscription" - }, - "taskId": { - "title": "Task ID for tracking async payment retry processing", + "clientSecret": { + "title": "Optional for public clients", "type": "string" }, - "transactionId": { - "title": "Transaction ID from payment provider (available after task completes)", + "code": { + "title": "Required for authorization_code grant", "type": "string" - } - }, - "type": "object" - }, - "v1RetryRegistrarOperationRequest": { - "properties": { - "orderItemId": { - "description": "Exactly one of order_item_id / renewal_id.", + }, + "codeVerifier": { + "title": "Required for PKCE", "type": "string" }, - "reason": { - "type": "string" - }, - "renewalId": { - "type": "string" - } - }, - "type": "object" - }, - "v1RevokeCouponResponse": { - "properties": { - "coupon": { - "$ref": "#/components/schemas/v1Coupon" - }, - "revokedApplications": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1RevokeTokenRequest": { - "properties": { - "clientId": { + "grantType": { "type": "string" }, - "token": { + "redirectUri": { + "title": "Required for authorization_code grant", "type": "string" }, - "tokenTypeHint": { - "title": "\"access_token\" or \"refresh_token\"", + "refreshToken": { + "title": "Required for refresh_token grant", "type": "string" } }, "type": "object" }, - "v1RoadmapFeatureRequest": { + "v1TokenResponse": { "properties": { - "assigneeName": { - "type": "string" - }, - "authorDisplayName": { - "type": "string" - }, - "commentCount": { - "format": "int32", - "type": "integer" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "description": { + "accessToken": { "type": "string" }, - "id": { + "expiresIn": { + "format": "int64", + "title": "Seconds until expiry", "type": "string" }, - "isPinned": { - "type": "boolean" - }, - "product": { - "$ref": "#/components/schemas/v1RoadmapProductCategory" - }, - "slug": { + "refreshToken": { "type": "string" }, - "status": { - "$ref": "#/components/schemas/v1RoadmapRequestStatus" - }, - "statusChangedAt": { - "format": "date-time", + "scope": { "type": "string" }, - "title": { + "tokenType": { + "title": "\"Bearer\"", "type": "string" - }, - "upvoteCount": { - "format": "int32", - "type": "integer" - }, - "userVote": { - "$ref": "#/components/schemas/v1RoadmapVoteType" - }, - "voteScore": { - "format": "int32", - "type": "integer" } }, "type": "object" }, - "v1RoadmapFeatureRequestComment": { + "v1UndoCancelRenewalRequest": { "properties": { - "authorDisplayName": { - "type": "string" - }, - "body": { - "type": "string" - }, - "canEdit": { - "type": "boolean" - }, - "createdAt": { - "format": "date-time", - "type": "string" - }, - "id": { - "type": "string" - }, - "isEdited": { - "type": "boolean" - }, - "isOwn": { - "type": "boolean" - }, - "updatedAt": { - "format": "date-time", + "subscriptionId": { "type": "string" } }, "type": "object" }, - "v1RoadmapProductCategory": { + "v1UpdateAgentResponse": { "properties": { - "color": { - "type": "string" - }, - "description": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "sortOrder": { - "format": "int32", - "type": "integer" + "agent": { + "$ref": "#/components/schemas/v1Agent" } }, "type": "object" }, - "v1RoadmapProductStats": { + "v1UpdateClientReviewResponse": { "properties": { - "completed": { - "format": "int32", - "type": "integer" - }, - "inProgress": { - "format": "int32", - "type": "integer" - }, - "inReview": { - "format": "int32", - "type": "integer" - }, - "planned": { - "format": "int32", - "type": "integer" - }, - "productName": { - "type": "string" - }, - "productSlug": { - "type": "string" + "review": { + "$ref": "#/components/schemas/v1ClientProviderReview" } }, "type": "object" }, - "v1RoadmapRequestStatus": { - "default": "ROADMAP_REQUEST_STATUS_UNSPECIFIED", - "enum": [ - "ROADMAP_REQUEST_STATUS_UNSPECIFIED", - "ROADMAP_REQUEST_STATUS_IN_REVIEW", - "ROADMAP_REQUEST_STATUS_PLANNED", - "ROADMAP_REQUEST_STATUS_IN_PROGRESS", - "ROADMAP_REQUEST_STATUS_COMPLETED", - "ROADMAP_REQUEST_STATUS_DECLINED" - ], - "type": "string" - }, - "v1RoadmapVoteType": { - "default": "ROADMAP_VOTE_TYPE_UNSPECIFIED", - "enum": [ - "ROADMAP_VOTE_TYPE_UNSPECIFIED", - "ROADMAP_VOTE_TYPE_UP" - ], - "type": "string" + "v1UpdateCloudInitTemplateResponse": { + "properties": { + "cloudInitTemplate": { + "$ref": "#/components/schemas/v1CloudInitTemplate" + } + }, + "type": "object" }, - "v1Role": { + "v1UpdateConnectTaxSettingsRequest": { "properties": { - "description": { - "type": "string" - }, - "groupIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "title": "Fields", - "type": "string" - }, - "isBuiltin": { - "type": "boolean" - }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "name": { + "defaultTaxBehavior": { "type": "string" }, - "organizationId": { - "title": "Relations", + "defaultTaxCode": { "type": "string" }, - "permissions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "users": { - "items": { - "$ref": "#/components/schemas/v1UserSummary" - }, - "type": "array" + "headOffice": { + "$ref": "#/components/schemas/v1ConnectTaxAddress" } }, "type": "object" }, - "v1RotateMonitoringDatasourceTokenRequest": { + "v1UpdateConnectTaxSettingsResponse": { + "properties": { + "settings": { + "$ref": "#/components/schemas/v1ConnectTaxSettingsDetails" + } + }, "type": "object" }, - "v1RuleEffect": { - "default": "RULE_EFFECT_UNSPECIFIED", - "description": "- RULE_EFFECT_ENABLE: Feature toggle: true/false (use false to disable)\n - RULE_EFFECT_ENTITLE: Entitlement: granted\n - RULE_EFFECT_LIMIT: Limit: numeric ceiling", - "enum": [ - "RULE_EFFECT_UNSPECIFIED", - "RULE_EFFECT_ENABLE", - "RULE_EFFECT_ENTITLE", - "RULE_EFFECT_LIMIT" - ], - "title": "RuleEffect represents the effect type of a rule", - "type": "string" + "v1UpdateGroupResponse": { + "properties": { + "group": { + "$ref": "#/components/schemas/v1Group" + } + }, + "type": "object" }, - "v1Rules": { + "v1UpdateInviteRequest": { "properties": { - "boolValue": { - "title": "Boolean value for ENABLE/ENTITLE effects", - "type": "boolean" - }, - "currentUsage": { - "format": "int64", - "title": "Optional: current usage count (only for LIMIT rules)", + "groupId": { "type": "string" }, - "effect": { - "$ref": "#/components/schemas/v1RuleEffect" - }, - "int64Value": { - "format": "int64", - "title": "Numeric value for LIMIT effect", + "inviteId": { "type": "string" }, - "ruleKey": { - "title": "Rule key (e.g., \"organization.max_members\", \"secrets.enabled\")", + "roleId": { "type": "string" } }, - "title": "RuleStatus represents the status of a rule from the ruleset", "type": "object" }, - "v1SSHKey": { + "v1UpdateMyStorefrontRequest": { "properties": { - "fingerprint": { - "type": "string" - }, - "id": { + "aboutMarkdown": { "type": "string" }, - "keyType": { - "description": "rsa, ed25519, ecdsa, dsa, etc.", + "coverImageUrl": { "type": "string" }, - "name": { - "type": "string" + "faqs": { + "items": { + "$ref": "#/components/schemas/v1StorefrontFAQ" + }, + "type": "array" }, - "organizationId": { - "type": "string" + "featuredPlanIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "publicKey": { + "highlightCustom": { "type": "string" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - } - }, - "title": "SSH Key messages", - "type": "object" - }, - "v1ScanDnsZoneRecordsResponse": { - "properties": { - "records": { + "highlightCustomLines": { "items": { - "$ref": "#/components/schemas/v1DnsRecord" + "type": "string" }, "type": "array" - } - }, - "type": "object" - }, - "v1SearchDomainsRequest": { - "properties": { - "category": { - "$ref": "#/components/schemas/v1TldCategory" - }, - "exactOnly": { - "description": "Check only the exact name, served from the availability cache (type-ahead).", - "type": "boolean" - }, - "includeSuggestions": { - "description": "Include registrar name suggestions (when the adapter supports them).", - "type": "boolean" - }, - "query": { - "description": "A name (evergreen-coffee.com), a label (evergreencoffee) or short keywords.", - "type": "string" }, - "tlds": { - "description": "Restrict results to these TLDs (without leading dot). Empty = featured TLDs.", + "highlightKeys": { "items": { "type": "string" }, "type": "array" }, - "turnstileToken": { - "description": "Turnstile token; required for anonymous callers.", + "logoImageUrl": { + "type": "string" + }, + "proposedSlug": { + "type": "string" + }, + "tagline": { "type": "string" } }, "type": "object" }, - "v1SearchDomainsResponse": { + "v1UpdateNetworkResponse": { "properties": { - "normalizedLabel": { - "description": "Label extracted from the query (LDH, lower case).", - "type": "string" - }, - "query": { - "type": "string" + "network": { + "$ref": "#/components/schemas/v1Network" + } + }, + "type": "object" + }, + "v1UpdateNodePlacementPolicyRequest": { + "properties": { + "defaultStrategy": { + "$ref": "#/components/schemas/v1NodePlacementStrategy" }, - "results": { - "description": "Exact match first, then featured TLDs, then suggestions (max 25).", + "regionOverrides": { "items": { - "$ref": "#/components/schemas/v1DomainSearchResult" + "$ref": "#/components/schemas/v1NodePlacementRegionOverride" }, "type": "array" } }, "type": "object" }, - "v1SearchMarketplaceRequest": { - "description": "Natural-language marketplace search (anonymous landing page).", + "v1UpdateNodePlacementPolicyResponse": { "properties": { - "filterBillingType": { - "$ref": "#/components/schemas/v1BillingType" - }, - "page": { - "format": "int32", - "type": "integer" - }, - "pageSize": { - "format": "int32", - "type": "integer" - }, - "query": { - "type": "string" - }, - "turnstileToken": { - "description": "Cloudflare Turnstile token (required for anonymous callers when auth.turnstile.requireOnAnonymousMarketplaceSearch).", - "type": "string" + "policy": { + "$ref": "#/components/schemas/v1NodePlacementPolicy" } }, "type": "object" }, - "v1SearchMarketplaceResponse": { + "v1UpdateNodeResponse": { "properties": { - "appliedBillingType": { - "$ref": "#/components/schemas/v1BillingType" - }, - "page": { - "format": "int32", - "type": "integer" - }, - "pageSize": { - "format": "int32", - "type": "integer" - }, - "parsedQuery": { - "$ref": "#/components/schemas/v1MarketplaceSearchParsedQuery" - }, - "results": { - "items": { - "$ref": "#/components/schemas/v1MarketplaceSearchResult" - }, - "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" + "node": { + "$ref": "#/components/schemas/v1Node" } }, "type": "object" }, - "v1SearchTicketsRequest": { + "v1UpdateNotificationSettingResponse": { "properties": { - "filterCaseType": { - "$ref": "#/components/schemas/v1CaseType" - }, - "filterPriority": { - "$ref": "#/components/schemas/v1TicketPriority" - }, - "filterTicketStatus": { - "$ref": "#/components/schemas/v1TicketStatus" - }, - "includeHighlights": { - "type": "boolean" - }, - "page": { - "format": "int32", - "type": "integer" - }, - "pageSize": { - "format": "int32", - "type": "integer" - }, - "query": { - "type": "string" + "notificationSetting": { + "$ref": "#/components/schemas/v1NotificationSetting" } }, "type": "object" }, - "v1SearchTicketsResponse": { + "v1UpdateNotificationTemplateResponse": { "properties": { - "highlights": { - "additionalProperties": { - "$ref": "#/components/schemas/v1TicketSearchHighlight" - }, - "title": "Map of ticket ID to highlighted snippets", - "type": "object" - }, - "organizationDetails": { - "additionalProperties": { - "$ref": "#/components/schemas/v1OrganizationDetails" - }, - "title": "Map of organization ID to organization name", - "type": "object" - }, - "tickets": { - "items": { - "$ref": "#/components/schemas/v1Ticket" - }, - "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" - }, - "userDetails": { - "additionalProperties": { - "$ref": "#/components/schemas/v1UserDetails" - }, - "title": "Map of user ID to user details (first_name, last_name)", - "type": "object" + "notificationTemplate": { + "$ref": "#/components/schemas/v1NotificationTemplate" } }, "type": "object" }, - "v1Secret": { + "v1UpdateOrganizationRequest": { "properties": { - "id": { - "title": "Fields", + "accountHolderName": { "type": "string" }, - "key": { + "address": { "type": "string" }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "organization": { + "addressCity": { "type": "string" }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "addressCountry": { + "description": "ISO 3166-1 alpha-2 (e.g. US, DE).", + "type": "string" }, - "user": { - "title": "Relations", + "addressLine1": { "type": "string" - } - }, - "type": "object" - }, - "v1ServiceAccountResponse": { - "properties": { - "activeTokenCount": { - "format": "int32", - "type": "integer" }, - "allowedIps": { - "items": { - "type": "string" - }, - "type": "array" + "addressLine2": { + "type": "string" }, - "createdAt": { - "format": "date-time", + "addressPostcode": { "type": "string" }, - "createdByUserId": { + "addressRegion": { "type": "string" }, - "description": { + "asn": { + "format": "int64", "type": "string" }, - "groupIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { + "billingEmail": { "type": "string" }, - "isActive": { - "type": "boolean" - }, - "lastUsedAt": { - "format": "date-time", + "ddosProvider": { "type": "string" }, - "name": { + "description": { "type": "string" }, - "organizationId": { - "type": "string" + "enforceMfa": { + "type": "boolean" }, - "roleIds": { - "items": { - "type": "string" - }, - "type": "array" + "enforceSso": { + "type": "boolean" }, - "updatedAt": { - "format": "date-time", - "type": "string" - } - }, - "type": "object" - }, - "v1ServiceAccountTokenInfo": { - "properties": { - "createdAt": { - "format": "date-time", + "enforceVerifiedDomain": { + "type": "boolean" + }, + "name": { "type": "string" }, - "createdByUserId": { + "providerLogoUrl": { "type": "string" }, - "expiresAt": { - "format": "date-time", + "providerWebsiteUrl": { "type": "string" }, - "expiresInDays": { - "format": "int32", - "type": "integer" + "socialAccountsJson": { + "description": "JSON array of up to 4 objects: [{\"platform\":\"x\",\"url\":\"https://...\"}, ...].\nplatform must be one of: x, linkedin, instagram, facebook (Facebook/Meta).", + "type": "string" }, - "lastUsedAt": { - "format": "date-time", + "supportEmail": { "type": "string" }, - "name": { + "supportPhone": { "type": "string" }, - "status": { + "taxId": { "type": "string" }, - "tokenId": { + "vatId": { "type": "string" } }, "type": "object" }, - "v1ServiceStatus": { - "default": "SERVICE_STATUS_UNSPECIFIED", - "enum": [ - "SERVICE_STATUS_UNSPECIFIED", - "SERVICE_STATUS_ONLINE", - "SERVICE_STATUS_OFFLINE", - "SERVICE_STATUS_MAINTENANCE" - ], - "type": "string" - }, - "v1ServingStatus": { - "default": "UNKNOWN", - "enum": [ - "UNKNOWN", - "SERVING", - "NOT_SERVING" - ], - "type": "string" + "v1UpdateOrganizationResponse": { + "properties": { + "organization": { + "$ref": "#/components/schemas/v1Organization" + } + }, + "type": "object" }, - "v1SessionInfo": { + "v1UpdatePayoutConfigurationRequest": { "properties": { - "browser": { - "type": "string" - }, - "country": { - "type": "string" - }, - "deviceType": { - "type": "string" - }, - "id": { - "type": "string" - }, - "isCurrentSession": { + "enabled": { + "title": "Whether to enable/disable payout configuration", "type": "boolean" }, - "lastLogin": { - "type": "string" - }, - "os": { + "scheduleTime": { + "title": "Required for daily/weekly/monthly, ignored for immediate. Format: HH:MM (24-hour)", "type": "string" }, - "realIp": { + "scheduleTimezone": { + "title": "IANA timezone - defaults to \"UTC\"", "type": "string" }, - "requestIp": { - "type": "string" + "scheduleType": { + "$ref": "#/components/schemas/v1PayoutScheduleType" } }, "type": "object" }, - "v1SetDefaultPaymentMethodResponse": { + "v1UpdatePlatformResponse": { "properties": { - "paymentMethod": { - "$ref": "#/components/schemas/v1PaymentMethod" + "platform": { + "$ref": "#/components/schemas/v1Platform" } }, "type": "object" }, - "v1SetDomainPrivacyResponse": { + "v1UpdatePrefixResponse": { "properties": { - "domain": { - "$ref": "#/components/schemas/v1RegisteredDomain" - }, - "orderId": { - "description": "Set when enabling privacy needs payment: continue at /domains/checkout/.", - "type": "string" + "prefix": { + "$ref": "#/components/schemas/v1Prefix" } }, "type": "object" }, - "v1SetGameNestOrderingRequest": { + "v1UpdateProviderReviewReplyResponse": { "properties": { - "catalogKey": { - "type": "string" - }, - "orderingEnabled": { - "type": "boolean" - }, - "platformId": { - "type": "string" + "review": { + "$ref": "#/components/schemas/v1ProviderReviewListItem" } }, "type": "object" }, - "v1SetPasswordRequest": { - "description": "SetPassword is for passwordless (SSO-only) accounts that have never set a local password.", + "v1UpdateProviderTicketNotificationPolicyRequest": { "properties": { - "newPassword": { - "type": "string" + "policy": { + "$ref": "#/components/schemas/v1ProviderTicketNotificationPolicy" } }, "type": "object" }, - "v1SmtpOutboundProviderPolicy": { + "v1UpdateRoadmapFeatureRequestCommentResponse": { "properties": { - "blockByDefault": { - "type": "boolean" + "comment": { + "$ref": "#/components/schemas/v1RoadmapFeatureRequestComment" } }, "type": "object" }, - "v1SmtpOutboundVmAction": { - "default": "SMTP_OUTBOUND_VM_ACTION_UNSPECIFIED", - "enum": [ - "SMTP_OUTBOUND_VM_ACTION_UNSPECIFIED", - "SMTP_OUTBOUND_VM_ACTION_INHERIT", - "SMTP_OUTBOUND_VM_ACTION_ALLOW", - "SMTP_OUTBOUND_VM_ACTION_BLOCK" - ], - "type": "string" - }, - "v1Snapshot": { + "v1UpdateRoleResponse": { "properties": { - "createdAt": { - "format": "date-time", - "readOnly": true, - "type": "string" - }, - "description": { - "readOnly": true, - "type": "string" - }, - "id": { - "readOnly": true, - "type": "string" - }, - "lastRestore": { - "$ref": "#/components/schemas/v1LastRestore" - }, - "metadata": { - "type": "object" - }, - "name": { - "readOnly": true, - "type": "string" - }, - "operationStatus": { - "$ref": "#/components/schemas/v1SnapshotOperationStatus" - }, - "restoreStatus": { - "$ref": "#/components/schemas/v1RestoreStatus" - }, - "restoredAt": { - "format": "date-time", - "readOnly": true, - "type": "string" - }, - "snapshotId": { - "readOnly": true, - "type": "string" - }, - "snapshotStatus": { - "$ref": "#/components/schemas/v1SnapshotStatus" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "virtualMachineId": { - "readOnly": true, - "type": "string" + "role": { + "$ref": "#/components/schemas/v1Role" } }, - "title": "Snapshot represents a snapshot of a virtual machine", "type": "object" }, - "v1SnapshotOperationStatus": { - "default": "SNAPSHOT_OPERATION_STATUS_UNSPECIFIED", - "enum": [ - "SNAPSHOT_OPERATION_STATUS_UNSPECIFIED", - "SNAPSHOT_OPERATION_STATUS_PENDING", - "SNAPSHOT_OPERATION_STATUS_PROCESSING", - "SNAPSHOT_OPERATION_STATUS_COMPLETED", - "SNAPSHOT_OPERATION_STATUS_FAILED" - ], - "title": "SnapshotOperationStatus represents the status of snapshot creation operation", - "type": "string" - }, - "v1SnapshotStatus": { - "default": "SNAPSHOT_STATUS_UNSPECIFIED", - "enum": [ - "SNAPSHOT_STATUS_UNSPECIFIED", - "SNAPSHOT_STATUS_ACTIVE", - "SNAPSHOT_STATUS_DELETED", - "SNAPSHOT_STATUS_EXPIRED", - "SNAPSHOT_STATUS_UNKNOWN" - ], - "title": "SnapshotStatus represents the status of a snapshot", - "type": "string" - }, - "v1StartConnectOAuthRequest": { + "v1UpdateSmtpOutboundProviderPolicyRequest": { + "properties": { + "blockByDefault": { + "description": "Must accept false (allow-by-default). Proto3 required on bool rejects the\nzero value because there is no field presence without `optional`.", + "type": "boolean" + } + }, "type": "object" }, - "v1StartConnectOAuthResponse": { + "v1UpdateUserResponse": { "properties": { - "authorizeUrl": { - "title": "Stripe OAuth authorize URL (single-use state)", - "type": "string" + "user": { + "$ref": "#/components/schemas/v1User" } }, "type": "object" }, - "v1StartPlanLiveValidationResponse": { + "v1UpdateVMTemplateResponse": { "properties": { - "runId": { - "type": "string" - }, - "status": { - "type": "string" + "vmTemplate": { + "$ref": "#/components/schemas/v1VMTemplate" } }, "type": "object" }, - "v1StartupVariable": { + "v1UploadInboundPeeringConfigResponse": { "properties": { - "description": { - "type": "string" - }, - "envVariable": { - "type": "string" - }, - "name": { - "type": "string" - }, - "rules": { - "type": "string" - }, - "serverValue": { - "type": "string" - }, - "userEditable": { - "type": "boolean" - }, - "userViewable": { - "type": "boolean" + "inboundPeeringState": { + "$ref": "#/components/schemas/v1InboundPeeringState" } }, "type": "object" }, - "v1StoragePool": { + "v1UploadTicketAttachmentContentRequest": { "properties": { - "name": { + "fileContent": { + "format": "byte", "type": "string" }, - "storage": { - "format": "int32", - "type": "integer" - }, - "storageAllocated": { - "format": "int32", - "type": "integer" + "uploadToken": { + "type": "string" } }, "type": "object" }, - "v1StorefrontFAQ": { + "v1UpsertHookScriptRequest": { "properties": { - "answer": { - "type": "string" + "enabled": { + "title": "Omit to keep the stored value; create defaults to true", + "type": "boolean" }, - "question": { + "hook": { + "$ref": "#/components/schemas/v1LifecycleHook" + }, + "script": { "type": "string" + }, + "subject": { + "$ref": "#/components/schemas/v1HookSubject" } }, "type": "object" }, - "v1StorefrontParticipationStatus": { - "default": "STOREFRONT_PARTICIPATION_STATUS_UNSPECIFIED", - "enum": [ - "STOREFRONT_PARTICIPATION_STATUS_UNSPECIFIED", - "STOREFRONT_PARTICIPATION_STATUS_NOT_PARTICIPATING", - "STOREFRONT_PARTICIPATION_STATUS_DRAFT", - "STOREFRONT_PARTICIPATION_STATUS_PENDING_APPROVAL", - "STOREFRONT_PARTICIPATION_STATUS_LIVE", - "STOREFRONT_PARTICIPATION_STATUS_LIVE_CHANGES_PENDING", - "STOREFRONT_PARTICIPATION_STATUS_OPTED_OUT" - ], - "type": "string" - }, - "v1StorefrontPublicReview": { + "v1UsageAggregate": { "properties": { - "comment": { + "aggregationType": { + "$ref": "#/components/schemas/v1AggregationType" + }, + "billingPeriodEnd": { + "format": "date-time", "type": "string" }, - "createdAt": { + "billingPeriodStart": { "format": "date-time", + "title": "Billing period", "type": "string" }, - "id": { + "firstTimestamp": { + "format": "date-time", "type": "string" }, - "providerRepliedAt": { + "lastTimestamp": { "format": "date-time", "type": "string" }, - "providerReply": { + "metricCode": { "type": "string" }, - "starRating": { + "metricId": { + "type": "string" + }, + "metricName": { + "type": "string" + }, + "recordCount": { "format": "int32", "type": "integer" + }, + "subscriptionId": { + "type": "string" + }, + "totalQuantity": { + "description": "Decimal as string", + "title": "Aggregated values", + "type": "string" } }, "type": "object" }, - "v1StorefrontRevision": { + "v1UsageRecord": { "properties": { - "aboutHtml": { + "billingPeriodEnd": { + "format": "date-time", "type": "string" }, - "aboutMarkdown": { + "billingPeriodStart": { + "format": "date-time", "type": "string" }, - "approvedAt": { - "format": "date-time", + "errorMessage": { "type": "string" }, - "coverImageUrl": { + "eventId": { + "description": "For deduplication", + "title": "Usage metadata", "type": "string" }, - "faqs": { - "items": { - "$ref": "#/components/schemas/v1StorefrontFAQ" - }, - "type": "array" + "externalId": { + "title": "External integration", + "type": "string" }, - "featuredPlanIds": { - "items": { - "type": "string" - }, - "type": "array" + "id": { + "title": "Fields", + "type": "string" }, - "highlightCustom": { + "invoiceId": { "type": "string" }, - "highlightCustomLines": { - "items": { - "type": "string" - }, - "type": "array" + "invoiceLineId": { + "type": "string" }, - "highlightKeys": { - "items": { - "type": "string" - }, - "type": "array" + "metadata": { + "title": "Metadata", + "type": "object" }, - "id": { + "metricCode": { "type": "string" }, - "logoImageUrl": { + "metricId": { "type": "string" }, - "proposedSlug": { + "metricName": { "type": "string" }, - "rejectReason": { + "processedAt": { + "format": "date-time", + "type": "string" + }, + "properties": { + "title": "Additional metadata (region, instance_id, etc.)", + "type": "object" + }, + "quantity": { + "description": "Stored as string for decimal precision", + "title": "Usage data", "type": "string" }, "status": { - "$ref": "#/components/schemas/v1StorefrontRevisionStatus" + "$ref": "#/components/schemas/protov1Status" }, - "submittedAt": { - "format": "date-time", + "subscriptionId": { + "title": "Relations", "type": "string" }, - "tagline": { + "subscriptionName": { + "title": "Relation details (populated in responses)", + "type": "string" + }, + "timestamp": { + "format": "date-time", "type": "string" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "usageRecordStatus": { + "$ref": "#/components/schemas/v1UsageRecordStatus" } }, "type": "object" }, - "v1StorefrontRevisionStatus": { - "default": "STOREFRONT_REVISION_STATUS_UNSPECIFIED", - "description": "Public provider storefront (anonymous). Copy is always the latest approved revision.", + "v1UsageRecordStatus": { + "default": "USAGE_RECORD_STATUS_UNSPECIFIED", "enum": [ - "STOREFRONT_REVISION_STATUS_UNSPECIFIED", - "STOREFRONT_REVISION_STATUS_DRAFT", - "STOREFRONT_REVISION_STATUS_PENDING_REVIEW", - "STOREFRONT_REVISION_STATUS_APPROVED", - "STOREFRONT_REVISION_STATUS_REJECTED", - "STOREFRONT_REVISION_STATUS_SUPERSEDED" + "USAGE_RECORD_STATUS_UNSPECIFIED", + "USAGE_RECORD_STATUS_PENDING", + "USAGE_RECORD_STATUS_PROCESSED", + "USAGE_RECORD_STATUS_BILLED", + "USAGE_RECORD_STATUS_FAILED" ], "type": "string" }, - "v1SubmitRoadmapFeatureRequestRequest": { + "v1User": { "properties": { - "description": { - "type": "string" + "allowOrgInvites": { + "type": "boolean" }, - "productSlug": { + "email": { "type": "string" }, - "title": { + "firstName": { "type": "string" - } - }, - "type": "object" - }, - "v1SubmitRoadmapFeatureRequestResponse": { - "properties": { - "message": { + }, + "groupIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "title": "Fields", "type": "string" }, - "success": { + "isVerified": { "type": "boolean" - } - }, - "type": "object" - }, - "v1SubscribeResponse": { - "properties": { - "subscription": { - "$ref": "#/components/schemas/v1Subscription" - } - }, - "type": "object" - }, - "v1SubscribeToBlogRequest": { - "properties": { - "email": { - "description": "Address that should receive new posts.", + }, + "lastName": { "type": "string" }, - "source": { - "description": "Where the form was shown, for example \"blog_index\" or \"post:what-noderings-is\".", - "type": "string" + "metadata": { + "title": "Metadata", + "type": "object" }, - "turnstileToken": { - "description": "Cloudflare Turnstile token from the widget. Required when the backend enables Turnstile for blog sign-ups.", + "organization": { + "title": "Relations", "type": "string" }, - "website": { - "description": "Honeypot. Real readers never see or fill this field.", + "password": { "type": "string" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "subscriptionIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "userRoles": { + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "v1SubscribeToBlogResponse": { + "v1UserDetails": { "properties": { - "message": { + "firstName": { "type": "string" }, - "success": { - "description": "Always true when the request was accepted. The same answer is returned for new, pending and already confirmed addresses so the API does not reveal who is subscribed.", - "type": "boolean" + "lastName": { + "type": "string" } }, + "title": "UserDetails contains user information", "type": "object" }, - "v1Subscription": { + "v1UserSummary": { "properties": { - "activatedByServiceAccount": { - "description": "Service account that started this subscription. Empty when a user did, or when neither is recorded.", + "email": { "type": "string" }, - "activatedByUser": { + "firstName": { "type": "string" }, - "addonSubscriptions": { - "description": "Active add-on subscriptions on this subscription (name, quantity, and catalog price).", - "items": { - "$ref": "#/components/schemas/v1AddonSubscription" - }, - "type": "array" - }, - "billingType": { - "$ref": "#/components/schemas/v1BillingType" - }, - "cancelAtPeriodEnd": { - "type": "boolean" - }, - "canceledAt": { - "format": "date-time", + "id": { + "title": "Fields", "type": "string" }, - "currency": { - "description": "ISO currency for recurring_amount (e.g. USD).", + "lastName": { "type": "string" - }, - "currentPeriodEnd": { - "format": "date-time", + } + }, + "type": "object" + }, + "v1VMTemplate": { + "properties": { + "cloudInitTemplateId": { "type": "string" }, - "currentPeriodStart": { - "format": "date-time", + "cloudInitTemplateName": { "type": "string" }, - "hasUsageCharges": { - "description": "True when the bound plan also has metered/usage prices (bandwidth, compute hours, etc.).", - "type": "boolean" + "distro": { + "$ref": "#/components/schemas/v1Distro" }, "id": { "title": "Fields", @@ -18080,3412 +16544,511 @@ "title": "Metadata", "type": "object" }, - "organization": { - "title": "Relations", - "type": "string" - }, - "organizationName": { + "name": { "type": "string" }, - "plan": { + "nodeId": { "type": "string" }, - "planBillingPeriod": { - "$ref": "#/components/schemas/v1BillingPeriod" - }, - "planCode": { - "description": "Plan catalog code (e.g. SC-GC-1C-1G-20) for display alongside plan_name.", + "nodeName": { "type": "string" }, - "planName": { + "platformName": { "type": "string" }, - "platformFeeCurrency": { - "title": "Currency for platform fee", + "proxmoxCpuType": { + "description": "Proxmox cpu= guest CPU model for VMs cloned from this template. Default: host.", "type": "string" }, - "platformFeeId": { - "description": "Platform fee ID if applicable", - "title": "Platform fee (only for provider organizations)", - "type": "string" + "status": { + "$ref": "#/components/schemas/protov1Status" }, - "platformFeePercent": { - "format": "double", - "title": "Platform fee percentage (e.g., 10.0 for 10%)", - "type": "number" + "templateId": { + "format": "int32", + "type": "integer" }, - "platformFeeType": { - "title": "Platform fee type (percentage, fixed, etc.)", + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + } + }, + "type": "object" + }, + "v1ValidateNodeTopologyRequest": { + "properties": { + "nodeId": { + "description": "Optional node to cross-check the paste against (edit flow). When set, the\nparsed totals are compared with the node's Proxmox-reported CPU inventory\n(metadata.proxmox_cpu) and mismatches are returned as warnings.", "type": "string" }, - "pricingModel": { - "$ref": "#/components/schemas/v1PricingModel" + "topologyPaste": { + "description": "Raw topology paste to validate without persisting.", + "type": "string" + } + }, + "type": "object" + }, + "v1ValidateNodeTopologyResponse": { + "properties": { + "error": { + "description": "Parse/validation error when valid is false.", + "type": "string" }, - "quantity": { + "logicalCpus": { "format": "int32", - "title": "Quantity of this subscription item (e.g., number of VMs,", "type": "integer" }, - "recurringAmount": { - "description": "Bound catalog amount for the current period (plan unit price \u00d7 quantity). Empty when unknown.", + "modelName": { "type": "string" }, - "resourceCpu": { - "description": "Linked VM resource snapshot for display (0 when not applicable).", + "numaNodes": { "format": "int32", "type": "integer" }, - "resourceHostname": { - "description": "Primary linked VM hostname for client compute subscriptions (empty otherwise).", - "type": "string" + "numaSummary": { + "description": "Per-NUMA memory in MB, indexed by NUMA node id order.", + "items": { + "$ref": "#/components/schemas/v1NodeCPUMapNUMA" + }, + "type": "array" }, - "resourceMemory": { + "physicalCores": { "format": "int32", "type": "integer" }, - "resourceProviderName": { - "description": "Provider organization name for the linked VM (empty when not applicable).", - "type": "string" - }, - "resourceRegionName": { - "description": "Region label for the linked VM (e.g. city and country, or datacenter name).", - "type": "string" + "smtEnabled": { + "type": "boolean" }, - "resourceStorage": { + "sockets": { "format": "int32", "type": "integer" }, - "resourceVmId": { - "description": "Linked VM id for navigation (empty when not applicable).", - "type": "string" - }, - "startDate": { - "format": "date-time", - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "subscriptionStatus": { - "$ref": "#/components/schemas/v1SubscriptionStatus" + "threadsPerCore": { + "format": "int32", + "type": "integer" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "valid": { + "type": "boolean" }, - "trialEndDate": { - "format": "date-time", - "type": "string" + "warnings": { + "items": { + "$ref": "#/components/schemas/v1ValidateNodeTopologyWarning" + }, + "type": "array" } }, "type": "object" }, - "v1SubscriptionCoupon": { - "description": "The coupon attached to one subscription.", + "v1ValidateNodeTopologyWarning": { "properties": { - "applicationId": { - "type": "string" - }, - "appliedAt": { - "format": "date-time", - "type": "string" - }, "code": { "type": "string" }, - "periodsRemaining": { - "format": "int32", - "type": "integer" - }, - "status": { - "$ref": "#/components/schemas/v1CouponApplicationStatus" - }, - "subscriptionId": { - "type": "string" - }, - "termsSummary": { - "description": "Disclosure text the customer accepted.", - "type": "string" - }, - "windowEndsAt": { - "format": "date-time", + "message": { "type": "string" } }, "type": "object" }, - "v1SubscriptionStatus": { - "default": "SUBSCRIPTION_STATUS_UNSPECIFIED", + "v1VerificationType": { + "default": "VERIFICATION_TYPE_UNSPECIFIED", "enum": [ - "SUBSCRIPTION_STATUS_UNSPECIFIED", - "SUBSCRIPTION_STATUS_TRIALING", - "SUBSCRIPTION_STATUS_ACTIVE", - "SUBSCRIPTION_STATUS_PAST_DUE", - "SUBSCRIPTION_STATUS_CANCELED", - "SUBSCRIPTION_STATUS_PAUSED" + "VERIFICATION_TYPE_UNSPECIFIED", + "VERIFICATION_TYPE_DNS", + "VERIFICATION_TYPE_HTTPS" ], "type": "string" }, - "v1SuccessResponse": { + "v1VerifyMfaEnrollmentRequest": { "properties": { - "success": { - "type": "boolean" + "code": { + "type": "string" } }, "type": "object" }, - "v1SyncTldCatalogRequest": { + "v1VerifyMfaEnrollmentResponse": { "properties": { - "provider": { - "description": "Empty = every configured provider.", - "type": "string" - }, - "reason": { - "type": "string" + "backupCodes": { + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "v1SyncTldCatalogResponse": { + "v1VirtualMachine": { + "description": "VirtualMachine represents a managed virtual machine resource.", "properties": { - "queued": { - "description": "The sync was queued on the registrar task queue.", + "activeBackupSubscriptionName": { + "description": "Display name of the active backup addon (empty when has_active_backup_subscription is false).", + "readOnly": true, + "type": "string" + }, + "additionalIpv4": { + "description": "Extra IPv4 addresses purchased via the ADDITIONAL-IP addon (same prefix as primary).", + "items": { + "$ref": "#/components/schemas/v1AdditionalIPAddress" + }, + "readOnly": true, + "type": "array" + }, + "addonSubscriptions": { + "items": { + "$ref": "#/components/schemas/v1AddonSubscription" + }, + "readOnly": true, + "title": "Active addon subscriptions for this VM (backup, etc.)", + "type": "array" + }, + "bandwidthEgress": { + "$ref": "#/components/schemas/v1VirtualMachineBandwidthQuota" + }, + "bandwidthIngress": { + "$ref": "#/components/schemas/v1VirtualMachineBandwidthQuota" + }, + "capabilities": { + "description": "Features that hypervisor supports (same strings as marketplace ProviderInfo).", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "complianceActor": { + "$ref": "#/components/schemas/v1ComplianceActor" + }, + "complianceHeld": { + "description": "True when the VM is seized for fraud, abuse, copyright, or related reasons.", + "readOnly": true, "type": "boolean" }, - "taskId": { + "complianceHeldAt": { + "format": "date-time", + "readOnly": true, "type": "string" - } - }, - "type": "object" - }, - "v1Ticket": { - "properties": { - "assignedToUser": { + }, + "complianceMessage": { + "readOnly": true, "type": "string" }, - "caseType": { - "$ref": "#/components/schemas/v1CaseType" + "complianceReason": { + "$ref": "#/components/schemas/v1ComplianceReason" }, - "firstResponseAt": { + "cpu": { + "description": "The number of CPU cores allocated to the virtual machine.", + "format": "int32", + "type": "integer" + }, + "crStatus": { + "$ref": "#/components/schemas/v1CRStatus" + }, + "createTime": { + "description": "The creation timestamp of the virtual machine.", "format": "date-time", + "readOnly": true, "type": "string" }, - "firstResponseTimeSeconds": { - "format": "int64", - "type": "string" + "distro": { + "$ref": "#/components/schemas/v1Distro" }, - "fromOrganization": { + "firewallRulesetId": { + "description": "Firewall ruleset attached to this VM (contains both ingress and egress rules).\nManaged via attach/detach firewall endpoints.", + "readOnly": true, "type": "string" }, - "fromUser": { + "hasActiveBackupSubscription": { + "description": "True when this VM has an active backup-class addon subscription (derived from subscription add-ons).", + "readOnly": true, + "type": "boolean" + }, + "hostname": { + "description": "The name of the virtual machine.", "type": "string" }, "id": { - "title": "Fields", + "description": "The unique identifier for the virtual machine. This is a read-only field.", + "readOnly": true, "type": "string" }, - "lastActivityAt": { - "format": "date-time", + "instantAppFamily": { + "description": "Family key used for icons under /icons/instant-apps/{family}.svg (e.g. portainer).", + "readOnly": true, "type": "string" }, - "lockedAt": { - "format": "date-time", + "instantAppIconUrl": { + "description": "Optional override; when empty, clients fall back to the family icon path.", + "readOnly": true, "type": "string" }, - "lockedByUser": { + "instantAppId": { + "description": "Platform Instant App used when this VM was created/reinstalled (empty when OS-only).", + "readOnly": true, "type": "string" }, - "message": { + "instantAppName": { + "readOnly": true, "type": "string" }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "priority": { - "$ref": "#/components/schemas/v1TicketPriority" + "instantAppSlug": { + "readOnly": true, + "type": "string" }, - "replies": { - "title": "Relations", + "instantAppVersion": { + "readOnly": true, "type": "string" }, - "resolutionTimeSeconds": { - "format": "int64", + "ipv4": { + "description": "Primary IPv4 from active IPAM allocations (when available).", + "readOnly": true, "type": "string" }, - "resolvedAt": { - "format": "date-time", + "ipv6": { + "description": "Primary IPv6 from active IPAM allocations (when available).", + "readOnly": true, "type": "string" }, - "status": { - "$ref": "#/components/schemas/protov1Status" + "memory": { + "description": "The amount of memory in MB allocated to the virtual machine.", + "format": "int32", + "type": "integer" }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" + "operationStatus": { + "$ref": "#/components/schemas/v1OperationStatus" }, - "ticketId": { - "format": "int64", + "planBillingType": { + "$ref": "#/components/schemas/v1BillingType" + }, + "planCode": { + "description": "Marketplace plan code for this VM's subscription (e.g. \"DC-CPU-4C-4G-160\").", + "readOnly": true, "type": "string" }, - "ticketStatus": { - "$ref": "#/components/schemas/v1TicketStatus" + "planId": { + "description": "Marketplace plan this VM was purchased with (from its subscription).", + "readOnly": true, + "type": "string" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "platformDriver": { + "$ref": "#/components/schemas/v1PlatformDriver" }, - "title": { + "providerName": { + "description": "The name of the provider organization that owns the node where the virtual machine is located.", + "readOnly": true, "type": "string" }, - "toOrganization": { + "providerOrganizationId": { + "description": "The ID of the service provider organization for the virtual machine.", "type": "string" }, - "toUser": { + "regionCity": { + "description": "The city of the region where the virtual machine is located.", + "readOnly": true, "type": "string" }, - "virtualMachines": { - "type": "string" - } - }, - "type": "object" - }, - "v1TicketAttachment": { - "properties": { - "fileName": { + "regionCountry": { + "description": "The country of the region where the virtual machine is located.", + "readOnly": true, "type": "string" }, - "fileSize": { - "format": "int64", + "regionId": { + "description": "Region of the node hosting this VM.", + "readOnly": true, "type": "string" }, - "id": { - "type": "string" + "reinstallStatus": { + "$ref": "#/components/schemas/v1ReinstallStatus" }, - "mimeType": { + "reinstalledAt": { + "format": "date-time", + "readOnly": true, "type": "string" }, - "ticketId": { - "type": "string" + "storage": { + "description": "Target storage for full clone.", + "format": "int32", + "type": "integer" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "tags": { + "items": { + "type": "string" + }, + "title": "Tags for categorizing the virtual machine (e.g., \"database\", \"webserver\")", + "type": "array" }, - "uploadedByUserId": { + "updateTime": { + "description": "The last update timestamp of the virtual machine.", + "format": "date-time", + "readOnly": true, "type": "string" } }, "type": "object" }, - "v1TicketInternalComment": { + "v1VirtualMachineBandwidthQuota": { + "description": "VirtualMachineBandwidthQuota summarizes plan bandwidth allowance and metered usage for graphs/billing UX.\nShared by both bandwidth_egress and bandwidth_ingress on VirtualMachine.", "properties": { - "comment": { - "type": "string" + "billableBlocks": { + "description": "Whole overage blocks currently billable (ceil(overage_gb / block_size_gb)).", + "format": "int32", + "readOnly": true, + "type": "integer" }, - "createdByUserId": { + "billingEnabled": { + "description": "False when usage is shown for visibility only (e.g. ingress not billed on this plan).", + "readOnly": true, + "type": "boolean" + }, + "blockPrice": { + "description": "Price per overage block (decimal string, e.g. \"2.00\").", + "readOnly": true, "type": "string" }, - "id": { + "blockSizeGb": { + "description": "Overage block size (GB). Zero when unlimited or linear pricing.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "currency": { + "readOnly": true, "type": "string" }, - "ticketId": { + "estimatedOverageAmount": { + "description": "Estimated overage charge for the current period (decimal string).", + "readOnly": true, "type": "string" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - } - }, - "type": "object" - }, - "v1TicketMessage": { - "properties": { - "fromOrganization": { - "title": "Organization of the user who sent this message", - "type": "string" - }, - "fromUser": { - "title": "User who sent this message", - "type": "string" - }, - "id": { - "title": "Ticket ID (same for original, different for each reply)", - "type": "string" - }, - "isReply": { - "title": "True if this is a reply, false if it's the original message", - "type": "boolean" - }, - "message": { - "title": "The message content", - "type": "string" - }, - "sequence": { - "format": "int64", - "title": "Order in the thread (0 for original, 1+ for replies, based on creation time)", - "type": "string" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "toOrganization": { - "title": "Organization of the recipient", - "type": "string" - }, - "toUser": { - "title": "User who should receive this message", - "type": "string" - } - }, - "title": "TicketMessage represents a single message in a ticket thread\nThis includes both the original ticket message and all replies", - "type": "object" - }, - "v1TicketPriority": { - "default": "TICKET_PRIORITY_UNSPECIFIED", - "enum": [ - "TICKET_PRIORITY_UNSPECIFIED", - "TICKET_PRIORITY_LOW", - "TICKET_PRIORITY_NORMAL", - "TICKET_PRIORITY_HIGH", - "TICKET_PRIORITY_URGENT", - "TICKET_PRIORITY_CRITICAL" - ], - "type": "string" - }, - "v1TicketSearchHighlight": { - "properties": { - "message": { - "type": "string" - }, - "ticketId": { - "type": "string" - }, - "title": { - "type": "string" - } - }, - "type": "object" - }, - "v1TicketStatus": { - "default": "TICKET_STATUS_UNSPECIFIED", - "enum": [ - "TICKET_STATUS_UNSPECIFIED", - "TICKET_STATUS_IN_PROGRESS", - "TICKET_STATUS_ESCALATED", - "TICKET_STATUS_PENDING", - "TICKET_STATUS_AWAITING_REPLY", - "TICKET_STATUS_RESOLVED", - "TICKET_STATUS_WONT_FIX", - "TICKET_STATUS_DUPLICATE", - "TICKET_STATUS_NOT_REPRODUCIBLE" - ], - "type": "string" - }, - "v1TicketTemplate": { - "properties": { - "caseType": { - "$ref": "#/components/schemas/v1CaseType" - }, - "createdByUserId": { - "type": "string" - }, - "id": { - "type": "string" - }, - "isActive": { - "type": "boolean" - }, - "messageTemplate": { - "type": "string" - }, - "name": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "titleTemplate": { - "type": "string" - }, - "variables": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1TicketTemplateInput": { - "properties": { - "caseType": { - "$ref": "#/components/schemas/v1CaseType" - }, - "isActive": { - "type": "boolean" - }, - "messageTemplate": { - "type": "string" - }, - "name": { - "type": "string" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "titleTemplate": { - "type": "string" - } - }, - "type": "object" - }, - "v1TicketTemplateVariableDefinition": { - "properties": { - "description": { - "type": "string" - }, - "example": { - "type": "string" - }, - "name": { - "type": "string" - }, - "required": { - "type": "boolean" - }, - "source": { - "type": "string" - } - }, - "type": "object" - }, - "v1TierMode": { - "default": "TIER_MODE_UNSPECIFIED", - "enum": [ - "TIER_MODE_UNSPECIFIED", - "TIER_MODE_NONE", - "TIER_MODE_VOLUME", - "TIER_MODE_TIERED", - "TIER_MODE_GRADUATED" - ], - "type": "string" - }, - "v1Timestamps": { - "properties": { - "createTime": { - "format": "date-time", - "type": "string" - }, - "updateTime": { - "format": "date-time", - "type": "string" - } - }, - "title": "Object details", - "type": "object" - }, - "v1TldCategory": { - "default": "TLD_CATEGORY_UNSPECIFIED", - "description": "Grouping for \"Show more extensions\" in search and the pricing page (\u00a78.2).", - "enum": [ - "TLD_CATEGORY_UNSPECIFIED", - "TLD_CATEGORY_GENERIC", - "TLD_CATEGORY_COUNTRY", - "TLD_CATEGORY_TECH", - "TLD_CATEGORY_BUSINESS", - "TLD_CATEGORY_CREATIVE", - "TLD_CATEGORY_COMMUNITY", - "TLD_CATEGORY_GEOGRAPHIC", - "TLD_CATEGORY_LIFESTYLE", - "TLD_CATEGORY_SHOPPING", - "TLD_CATEGORY_OTHER" - ], - "type": "string" - }, - "v1TldEligibility": { - "default": "TLD_ELIGIBILITY_UNSPECIFIED", - "description": "Who may register under a TLD (\u00a78.2).\n\n - TLD_ELIGIBILITY_RESIDENTS_ONLY: Registrant must be in one of eligible_countries (or meet the nexus rule in eligibility_note).", - "enum": [ - "TLD_ELIGIBILITY_UNSPECIFIED", - "TLD_ELIGIBILITY_ANYONE", - "TLD_ELIGIBILITY_RESIDENTS_ONLY" - ], - "type": "string" - }, - "v1TldOffering": { - "description": "Catalog row with costs (ops only).", - "properties": { - "blocked": { - "type": "boolean" - }, - "blockedReason": { - "type": "string" - }, - "costCurrency": { - "type": "string" - }, - "costPrivacy": { - "type": "string" - }, - "costRegister": { - "type": "string" - }, - "costRenew": { - "type": "string" - }, - "costRestore": { - "type": "string" - }, - "costTransfer": { - "type": "string" - }, - "disabledReason": { - "description": "Why the catalog sync left or switched the TLD off (no USD price, manual docs, unrenderable fields, ...).", - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "price": { - "$ref": "#/components/schemas/v1TldPrice" - }, - "priceOverride": { - "type": "object" - }, - "provider": { - "type": "string" - }, - "syncedAt": { - "format": "date-time", - "type": "string" - }, - "tld": { - "type": "string" - } - }, - "type": "object" - }, - "v1TldPrice": { - "description": "Public price row (also the ICANN ERRP fee schedule).", - "properties": { - "category": { - "$ref": "#/components/schemas/v1TldCategory" - }, - "currency": { - "type": "string" - }, - "displayOrder": { - "format": "int32", - "type": "integer" - }, - "dnssecAllowed": { - "type": "boolean" - }, - "eligibility": { - "$ref": "#/components/schemas/v1TldEligibility" - }, - "eligibilityNote": { - "type": "string" - }, - "eligibleCountries": { - "description": "ISO 3166-1 alpha-2 countries allowed when eligibility is RESIDENTS_ONLY.", - "items": { - "type": "string" - }, - "type": "array" - }, - "featured": { - "type": "boolean" - }, - "isPromotion": { - "type": "boolean" - }, - "maxYears": { - "format": "int32", - "type": "integer" - }, - "minYears": { + "freeUnitsGb": { + "description": "Included free bandwidth per period (GB). Zero when unlimited or not configured.", "format": "int32", + "readOnly": true, "type": "integer" }, - "privacyAllowed": { - "type": "boolean" - }, - "privacyPrice": { - "type": "string" - }, - "registerPrice": { - "type": "string" - }, - "renewPrice": { - "type": "string" - }, - "requiresExtensionData": { - "type": "boolean" - }, - "restorePrice": { - "type": "string" - }, - "riskNote": { - "type": "string" + "nextBlockGb": { + "description": "Total usage GB at which the next overage block would begin (0 when unlimited).", + "format": "double", + "readOnly": true, + "type": "number" }, - "riskTier": { - "$ref": "#/components/schemas/v1TldRiskTier" + "overageGb": { + "description": "GB above the free allowance (0 when within free tier).", + "format": "double", + "readOnly": true, + "type": "number" }, - "tld": { + "periodEnd": { + "format": "date-time", + "readOnly": true, "type": "string" }, - "transferPrice": { + "periodStart": { + "format": "date-time", + "readOnly": true, "type": "string" }, - "transferSupported": { + "unlimited": { + "description": "True when bandwidth is effectively unlimited ($0 overage) for this direction.", + "readOnly": true, "type": "boolean" - } - }, - "type": "object" - }, - "v1TldRiskTier": { - "default": "TLD_RISK_TIER_UNSPECIFIED", - "description": " - TLD_RISK_TIER_HIGH: Cheap, frequently abused TLD: stricter checks at checkout.", - "enum": [ - "TLD_RISK_TIER_UNSPECIFIED", - "TLD_RISK_TIER_NORMAL", - "TLD_RISK_TIER_HIGH" - ], - "type": "string" - }, - "v1TokenRequest": { - "properties": { - "clientId": { - "type": "string" - }, - "clientSecret": { - "title": "Optional for public clients", - "type": "string" - }, - "code": { - "title": "Required for authorization_code grant", - "type": "string" - }, - "codeVerifier": { - "title": "Required for PKCE", - "type": "string" - }, - "grantType": { - "type": "string" - }, - "redirectUri": { - "title": "Required for authorization_code grant", - "type": "string" - }, - "refreshToken": { - "title": "Required for refresh_token grant", - "type": "string" - } - }, - "type": "object" - }, - "v1TokenResponse": { - "properties": { - "accessToken": { - "type": "string" - }, - "expiresIn": { - "format": "int64", - "title": "Seconds until expiry", - "type": "string" - }, - "refreshToken": { - "type": "string" }, - "scope": { - "type": "string" - }, - "tokenType": { - "title": "\"Bearer\"", - "type": "string" + "usedGb": { + "description": "Total bandwidth used this billing period (decimal GB, 1000^3 bytes).", + "format": "double", + "readOnly": true, + "type": "number" } }, "type": "object" }, - "v1TransferCheckResult": { + "v1VirtualMachineSmtpOutboundPolicyView": { "properties": { - "authCodeRequired": { - "type": "boolean" - }, - "currency": { - "type": "string" - }, - "currentNameservers": { - "items": { - "type": "string" - }, - "type": "array" - }, - "eligibility": { - "$ref": "#/components/schemas/v1TldEligibility" - }, - "eligibilityNote": { - "type": "string" - }, - "eligibleCountries": { - "items": { - "type": "string" - }, - "type": "array" - }, - "includesRenewalYear": { - "description": "The transfer adds one year to the registration.", - "type": "boolean" + "action": { + "$ref": "#/components/schemas/v1SmtpOutboundVmAction" }, - "name": { + "clientContactEmail": { + "description": "Contact email of that owner (when resolved).", "type": "string" }, - "reason": { - "description": "Why it cannot be transferred (product copy).", + "clientOrganizationId": { + "description": "Client organization that owns the VM (grouping key for provider UI).", "type": "string" }, - "transferPrice": { + "clientOwnerUserId": { + "description": "First owner user of that client organization (when resolved).", "type": "string" }, - "transferable": { + "effectiveBlocked": { "type": "boolean" }, - "warnings": { - "description": "Warnings to show (unlock at the old registrar, disable DNSSEC, 60-day rules).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1UndoCancelRenewalRequest": { - "properties": { - "subscriptionId": { - "type": "string" - } - }, - "type": "object" - }, - "v1UnsubscribeFromBlogRequest": { - "properties": { - "token": { - "description": "Token from the unsubscribe link in any blog email.", - "type": "string" - } - }, - "type": "object" - }, - "v1UnsubscribeFromBlogResponse": { - "properties": { - "maskedEmail": { - "type": "string" - }, - "message": { + "hostname": { "type": "string" }, - "status": { - "$ref": "#/components/schemas/v1BlogSubscriptionStatus" - } - }, - "type": "object" - }, - "v1UpdateAgentResponse": { - "properties": { - "agent": { - "$ref": "#/components/schemas/v1Agent" - } - }, - "type": "object" - }, - "v1UpdateClientReviewResponse": { - "properties": { - "review": { - "$ref": "#/components/schemas/v1ClientProviderReview" - } - }, - "type": "object" - }, - "v1UpdateCloudInitTemplateResponse": { - "properties": { - "cloudInitTemplate": { - "$ref": "#/components/schemas/v1CloudInitTemplate" - } - }, - "type": "object" - }, - "v1UpdateConnectTaxSettingsRequest": { - "properties": { - "defaultTaxBehavior": { + "ipv4": { + "description": "Primary active IPv4 / IPv6 from IPAM allocations (empty when none).", "type": "string" }, - "defaultTaxCode": { + "ipv6": { "type": "string" }, - "headOffice": { - "$ref": "#/components/schemas/v1ConnectTaxAddress" - } - }, - "type": "object" - }, - "v1UpdateConnectTaxSettingsResponse": { - "properties": { - "settings": { - "$ref": "#/components/schemas/v1ConnectTaxSettingsDetails" - } - }, - "type": "object" - }, - "v1UpdateDomainContactResponse": { - "properties": { - "affectedDomains": { - "items": { - "type": "string" - }, - "type": "array" - }, - "contact": { - "$ref": "#/components/schemas/v1DomainContact" - }, - "registrantChangeRequired": { - "description": "Name, organization or email changed on a registrant of live domains:\na change-of-registrant confirmation was started for these domains.", - "type": "boolean" - } - }, - "type": "object" - }, - "v1UpdateDomainContactsResponse": { - "properties": { - "domain": { - "$ref": "#/components/schemas/v1RegisteredDomain" - }, - "registrantChangeExpiresAt": { - "format": "date-time", + "virtualMachineId": { "type": "string" - }, - "registrantChangePending": { - "description": "A change of registrant was started; it waits for email approval.", - "type": "boolean" } }, "type": "object" }, - "v1UpdateGroupResponse": { + "v1VoteRoadmapFeatureRequestResponse": { "properties": { - "group": { - "$ref": "#/components/schemas/v1Group" + "request": { + "$ref": "#/components/schemas/v1RoadmapFeatureRequest" } }, "type": "object" + } + }, + "securitySchemes": { + "BearerAuth": { + "description": "Bearer token", + "in": "header", + "name": "Authorization", + "type": "apiKey" }, - "v1UpdateInviteRequest": { - "properties": { - "groupId": { - "type": "string" - }, - "inviteId": { - "type": "string" - }, - "roleId": { - "type": "string" - } - }, - "type": "object" - }, - "v1UpdateMyStorefrontRequest": { - "properties": { - "aboutMarkdown": { - "type": "string" - }, - "coverImageUrl": { - "type": "string" - }, - "faqs": { - "items": { - "$ref": "#/components/schemas/v1StorefrontFAQ" - }, - "type": "array" - }, - "featuredPlanIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "highlightCustom": { - "type": "string" - }, - "highlightCustomLines": { - "items": { - "type": "string" - }, - "type": "array" - }, - "highlightKeys": { - "items": { - "type": "string" - }, - "type": "array" - }, - "logoImageUrl": { - "type": "string" - }, - "proposedSlug": { - "type": "string" - }, - "tagline": { - "type": "string" - } - }, - "type": "object" - }, - "v1UpdateNetworkResponse": { - "properties": { - "network": { - "$ref": "#/components/schemas/v1Network" - } - }, - "type": "object" - }, - "v1UpdateNodePlacementPolicyRequest": { - "properties": { - "defaultStrategy": { - "$ref": "#/components/schemas/v1NodePlacementStrategy" - }, - "regionOverrides": { - "items": { - "$ref": "#/components/schemas/v1NodePlacementRegionOverride" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1UpdateNodePlacementPolicyResponse": { - "properties": { - "policy": { - "$ref": "#/components/schemas/v1NodePlacementPolicy" - } - }, - "type": "object" - }, - "v1UpdateNodeResponse": { - "properties": { - "node": { - "$ref": "#/components/schemas/v1Node" - } - }, - "type": "object" - }, - "v1UpdateNotificationSettingResponse": { - "properties": { - "notificationSetting": { - "$ref": "#/components/schemas/v1NotificationSetting" - } - }, - "type": "object" - }, - "v1UpdateNotificationTemplateResponse": { - "properties": { - "notificationTemplate": { - "$ref": "#/components/schemas/v1NotificationTemplate" - } - }, - "type": "object" - }, - "v1UpdateOrganizationRequest": { - "properties": { - "accountHolderName": { - "type": "string" - }, - "address": { - "type": "string" - }, - "addressCity": { - "type": "string" - }, - "addressCountry": { - "description": "ISO 3166-1 alpha-2 (e.g. US, DE).", - "type": "string" - }, - "addressLine1": { - "type": "string" - }, - "addressLine2": { - "type": "string" - }, - "addressPostcode": { - "type": "string" - }, - "addressRegion": { - "type": "string" - }, - "asn": { - "format": "int64", - "type": "string" - }, - "billingEmail": { - "type": "string" - }, - "ddosProvider": { - "type": "string" - }, - "description": { - "type": "string" - }, - "enforceMfa": { - "type": "boolean" - }, - "enforceSso": { - "type": "boolean" - }, - "enforceVerifiedDomain": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "providerLogoUrl": { - "type": "string" - }, - "providerWebsiteUrl": { - "type": "string" - }, - "socialAccountsJson": { - "description": "JSON array of up to 4 objects: [{\"platform\":\"x\",\"url\":\"https://...\"}, ...].\nplatform must be one of: x, linkedin, instagram, facebook (Facebook/Meta).", - "type": "string" - }, - "supportEmail": { - "type": "string" - }, - "supportPhone": { - "type": "string" - }, - "taxId": { - "type": "string" - }, - "vatId": { - "type": "string" - } - }, - "type": "object" - }, - "v1UpdateOrganizationResponse": { - "properties": { - "organization": { - "$ref": "#/components/schemas/v1Organization" - } - }, - "type": "object" - }, - "v1UpdatePayoutConfigurationRequest": { - "properties": { - "enabled": { - "title": "Whether to enable/disable payout configuration", - "type": "boolean" - }, - "scheduleTime": { - "title": "Required for daily/weekly/monthly, ignored for immediate. Format: HH:MM (24-hour)", - "type": "string" - }, - "scheduleTimezone": { - "title": "IANA timezone - defaults to \"UTC\"", - "type": "string" - }, - "scheduleType": { - "$ref": "#/components/schemas/v1PayoutScheduleType" - } - }, - "type": "object" - }, - "v1UpdatePlatformResponse": { - "properties": { - "platform": { - "$ref": "#/components/schemas/v1Platform" - } - }, - "type": "object" - }, - "v1UpdatePrefixResponse": { - "properties": { - "prefix": { - "$ref": "#/components/schemas/v1Prefix" - } - }, - "type": "object" - }, - "v1UpdateProviderReviewReplyResponse": { - "properties": { - "review": { - "$ref": "#/components/schemas/v1ProviderReviewListItem" - } - }, - "type": "object" - }, - "v1UpdateProviderTicketNotificationPolicyRequest": { - "properties": { - "policy": { - "$ref": "#/components/schemas/v1ProviderTicketNotificationPolicy" - } - }, - "type": "object" - }, - "v1UpdateRoadmapFeatureRequestCommentResponse": { - "properties": { - "comment": { - "$ref": "#/components/schemas/v1RoadmapFeatureRequestComment" - } - }, - "type": "object" - }, - "v1UpdateRoleResponse": { - "properties": { - "role": { - "$ref": "#/components/schemas/v1Role" - } - }, - "type": "object" - }, - "v1UpdateSmtpOutboundProviderPolicyRequest": { - "properties": { - "blockByDefault": { - "description": "Must accept false (allow-by-default). Proto3 required on bool rejects the\nzero value because there is no field presence without `optional`.", - "type": "boolean" - } - }, - "type": "object" - }, - "v1UpdateUserResponse": { - "properties": { - "user": { - "$ref": "#/components/schemas/v1User" - } - }, - "type": "object" - }, - "v1UpdateVMTemplateResponse": { - "properties": { - "vmTemplate": { - "$ref": "#/components/schemas/v1VMTemplate" - } - }, - "type": "object" - }, - "v1UploadInboundPeeringConfigResponse": { - "properties": { - "inboundPeeringState": { - "$ref": "#/components/schemas/v1InboundPeeringState" - } - }, - "type": "object" - }, - "v1UploadTicketAttachmentContentRequest": { - "properties": { - "fileContent": { - "format": "byte", - "type": "string" - }, - "uploadToken": { - "type": "string" - } - }, - "type": "object" - }, - "v1UpsertHookScriptRequest": { - "properties": { - "enabled": { - "title": "Omit to keep the stored value; create defaults to true", - "type": "boolean" - }, - "hook": { - "$ref": "#/components/schemas/v1LifecycleHook" - }, - "script": { - "type": "string" - }, - "subject": { - "$ref": "#/components/schemas/v1HookSubject" - } - }, - "type": "object" - }, - "v1UsageAggregate": { - "properties": { - "aggregationType": { - "$ref": "#/components/schemas/v1AggregationType" - }, - "billingPeriodEnd": { - "format": "date-time", - "type": "string" - }, - "billingPeriodStart": { - "format": "date-time", - "title": "Billing period", - "type": "string" - }, - "firstTimestamp": { - "format": "date-time", - "type": "string" - }, - "lastTimestamp": { - "format": "date-time", - "type": "string" - }, - "metricCode": { - "type": "string" - }, - "metricId": { - "type": "string" - }, - "metricName": { - "type": "string" - }, - "recordCount": { - "format": "int32", - "type": "integer" - }, - "subscriptionId": { - "type": "string" - }, - "totalQuantity": { - "description": "Decimal as string", - "title": "Aggregated values", - "type": "string" - } - }, - "type": "object" - }, - "v1UsageRecord": { - "properties": { - "billingPeriodEnd": { - "format": "date-time", - "type": "string" - }, - "billingPeriodStart": { - "format": "date-time", - "type": "string" - }, - "errorMessage": { - "type": "string" - }, - "eventId": { - "description": "For deduplication", - "title": "Usage metadata", - "type": "string" - }, - "externalId": { - "title": "External integration", - "type": "string" - }, - "id": { - "title": "Fields", - "type": "string" - }, - "invoiceId": { - "type": "string" - }, - "invoiceLineId": { - "type": "string" - }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "metricCode": { - "type": "string" - }, - "metricId": { - "type": "string" - }, - "metricName": { - "type": "string" - }, - "processedAt": { - "format": "date-time", - "type": "string" - }, - "properties": { - "title": "Additional metadata (region, instance_id, etc.)", - "type": "object" - }, - "quantity": { - "description": "Stored as string for decimal precision", - "title": "Usage data", - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "subscriptionId": { - "title": "Relations", - "type": "string" - }, - "subscriptionName": { - "title": "Relation details (populated in responses)", - "type": "string" - }, - "timestamp": { - "format": "date-time", - "type": "string" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "usageRecordStatus": { - "$ref": "#/components/schemas/v1UsageRecordStatus" - } - }, - "type": "object" - }, - "v1UsageRecordStatus": { - "default": "USAGE_RECORD_STATUS_UNSPECIFIED", - "enum": [ - "USAGE_RECORD_STATUS_UNSPECIFIED", - "USAGE_RECORD_STATUS_PENDING", - "USAGE_RECORD_STATUS_PROCESSED", - "USAGE_RECORD_STATUS_BILLED", - "USAGE_RECORD_STATUS_FAILED" - ], - "type": "string" - }, - "v1User": { - "properties": { - "allowOrgInvites": { - "type": "boolean" - }, - "email": { - "type": "string" - }, - "firstName": { - "type": "string" - }, - "groupIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "title": "Fields", - "type": "string" - }, - "isVerified": { - "type": "boolean" - }, - "lastName": { - "type": "string" - }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "organization": { - "title": "Relations", - "type": "string" - }, - "password": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "subscriptionIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "userRoles": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1UserDetails": { - "properties": { - "firstName": { - "type": "string" - }, - "lastName": { - "type": "string" - } - }, - "title": "UserDetails contains user information", - "type": "object" - }, - "v1UserSummary": { - "properties": { - "email": { - "type": "string" - }, - "firstName": { - "type": "string" - }, - "id": { - "title": "Fields", - "type": "string" - }, - "lastName": { - "type": "string" - } - }, - "type": "object" - }, - "v1VMTemplate": { - "properties": { - "cloudInitTemplateId": { - "type": "string" - }, - "cloudInitTemplateName": { - "type": "string" - }, - "distro": { - "$ref": "#/components/schemas/v1Distro" - }, - "id": { - "title": "Fields", - "type": "string" - }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "name": { - "type": "string" - }, - "nodeId": { - "type": "string" - }, - "nodeName": { - "type": "string" - }, - "platformName": { - "type": "string" - }, - "proxmoxCpuType": { - "description": "Proxmox cpu= guest CPU model for VMs cloned from this template. Default: host.", - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "templateId": { - "format": "int32", - "type": "integer" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - } - }, - "type": "object" - }, - "v1ValidateDomainContactRequest": { - "properties": { - "contact": { - "$ref": "#/components/schemas/v1DomainContactInput" - }, - "tlds": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1ValidateDomainContactResponse": { - "properties": { - "errors": { - "items": { - "$ref": "#/components/schemas/v1ContactFieldError" - }, - "type": "array" - }, - "normalized": { - "$ref": "#/components/schemas/v1DomainContactInput" - }, - "valid": { - "type": "boolean" - }, - "warnings": { - "description": "Non-blocking (e.g. role address for an individual).", - "items": { - "$ref": "#/components/schemas/v1ContactFieldError" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1ValidateNodeTopologyRequest": { - "properties": { - "nodeId": { - "description": "Optional node to cross-check the paste against (edit flow). When set, the\nparsed totals are compared with the node's Proxmox-reported CPU inventory\n(metadata.proxmox_cpu) and mismatches are returned as warnings.", - "type": "string" - }, - "topologyPaste": { - "description": "Raw topology paste to validate without persisting.", - "type": "string" - } - }, - "type": "object" - }, - "v1ValidateNodeTopologyResponse": { - "properties": { - "error": { - "description": "Parse/validation error when valid is false.", - "type": "string" - }, - "logicalCpus": { - "format": "int32", - "type": "integer" - }, - "modelName": { - "type": "string" - }, - "numaNodes": { - "format": "int32", - "type": "integer" - }, - "numaSummary": { - "description": "Per-NUMA memory in MB, indexed by NUMA node id order.", - "items": { - "$ref": "#/components/schemas/v1NodeCPUMapNUMA" - }, - "type": "array" - }, - "physicalCores": { - "format": "int32", - "type": "integer" - }, - "smtEnabled": { - "type": "boolean" - }, - "sockets": { - "format": "int32", - "type": "integer" - }, - "threadsPerCore": { - "format": "int32", - "type": "integer" - }, - "valid": { - "type": "boolean" - }, - "warnings": { - "items": { - "$ref": "#/components/schemas/v1ValidateNodeTopologyWarning" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1ValidateNodeTopologyWarning": { - "properties": { - "code": { - "type": "string" - }, - "message": { - "type": "string" - } - }, - "type": "object" - }, - "v1VerificationType": { - "default": "VERIFICATION_TYPE_UNSPECIFIED", - "enum": [ - "VERIFICATION_TYPE_UNSPECIFIED", - "VERIFICATION_TYPE_DNS", - "VERIFICATION_TYPE_HTTPS" - ], - "type": "string" - }, - "v1VerifyMfaEnrollmentRequest": { - "properties": { - "code": { - "type": "string" - } - }, - "type": "object" - }, - "v1VerifyMfaEnrollmentResponse": { - "properties": { - "backupCodes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1VirtualMachine": { - "description": "VirtualMachine represents a managed virtual machine resource.", - "properties": { - "activeBackupSubscriptionName": { - "description": "Display name of the active backup addon (empty when has_active_backup_subscription is false).", - "readOnly": true, - "type": "string" - }, - "additionalIpv4": { - "description": "Extra IPv4 addresses purchased via the ADDITIONAL-IP addon (same prefix as primary).", - "items": { - "$ref": "#/components/schemas/v1AdditionalIPAddress" - }, - "readOnly": true, - "type": "array" - }, - "addonSubscriptions": { - "items": { - "$ref": "#/components/schemas/v1AddonSubscription" - }, - "readOnly": true, - "title": "Active addon subscriptions for this VM (backup, etc.)", - "type": "array" - }, - "bandwidthEgress": { - "$ref": "#/components/schemas/v1VirtualMachineBandwidthQuota" - }, - "bandwidthIngress": { - "$ref": "#/components/schemas/v1VirtualMachineBandwidthQuota" - }, - "capabilities": { - "description": "Features that hypervisor supports (same strings as marketplace ProviderInfo).", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "complianceActor": { - "$ref": "#/components/schemas/v1ComplianceActor" - }, - "complianceHeld": { - "description": "True when the VM is seized for fraud, abuse, copyright, or related reasons.", - "readOnly": true, - "type": "boolean" - }, - "complianceHeldAt": { - "format": "date-time", - "readOnly": true, - "type": "string" - }, - "complianceMessage": { - "readOnly": true, - "type": "string" - }, - "complianceReason": { - "$ref": "#/components/schemas/v1ComplianceReason" - }, - "cpu": { - "description": "The number of CPU cores allocated to the virtual machine.", - "format": "int32", - "type": "integer" - }, - "crStatus": { - "$ref": "#/components/schemas/v1CRStatus" - }, - "createTime": { - "description": "The creation timestamp of the virtual machine.", - "format": "date-time", - "readOnly": true, - "type": "string" - }, - "distro": { - "$ref": "#/components/schemas/v1Distro" - }, - "firewallRulesetId": { - "description": "Firewall ruleset attached to this VM (contains both ingress and egress rules).\nManaged via attach/detach firewall endpoints.", - "readOnly": true, - "type": "string" - }, - "hasActiveBackupSubscription": { - "description": "True when this VM has an active backup-class addon subscription (derived from subscription add-ons).", - "readOnly": true, - "type": "boolean" - }, - "hostname": { - "description": "The name of the virtual machine.", - "type": "string" - }, - "id": { - "description": "The unique identifier for the virtual machine. This is a read-only field.", - "readOnly": true, - "type": "string" - }, - "instantAppFamily": { - "description": "Family key used for icons under /icons/instant-apps/{family}.svg (e.g. portainer).", - "readOnly": true, - "type": "string" - }, - "instantAppIconUrl": { - "description": "Optional override; when empty, clients fall back to the family icon path.", - "readOnly": true, - "type": "string" - }, - "instantAppId": { - "description": "Platform Instant App used when this VM was created/reinstalled (empty when OS-only).", - "readOnly": true, - "type": "string" - }, - "instantAppName": { - "readOnly": true, - "type": "string" - }, - "instantAppSlug": { - "readOnly": true, - "type": "string" - }, - "instantAppVersion": { - "readOnly": true, - "type": "string" - }, - "ipv4": { - "description": "Primary IPv4 from active IPAM allocations (when available).", - "readOnly": true, - "type": "string" - }, - "ipv6": { - "description": "Primary IPv6 from active IPAM allocations (when available).", - "readOnly": true, - "type": "string" - }, - "memory": { - "description": "The amount of memory in MB allocated to the virtual machine.", - "format": "int32", - "type": "integer" - }, - "operationStatus": { - "$ref": "#/components/schemas/v1OperationStatus" - }, - "planBillingType": { - "$ref": "#/components/schemas/v1BillingType" - }, - "planCode": { - "description": "Marketplace plan code for this VM's subscription (e.g. \"DC-CPU-4C-4G-160\").", - "readOnly": true, - "type": "string" - }, - "planId": { - "description": "Marketplace plan this VM was purchased with (from its subscription).", - "readOnly": true, - "type": "string" - }, - "platformDriver": { - "$ref": "#/components/schemas/v1PlatformDriver" - }, - "providerName": { - "description": "The name of the provider organization that owns the node where the virtual machine is located.", - "readOnly": true, - "type": "string" - }, - "providerOrganizationId": { - "description": "The ID of the service provider organization for the virtual machine.", - "type": "string" - }, - "regionCity": { - "description": "The city of the region where the virtual machine is located.", - "readOnly": true, - "type": "string" - }, - "regionCountry": { - "description": "The country of the region where the virtual machine is located.", - "readOnly": true, - "type": "string" - }, - "regionId": { - "description": "Region of the node hosting this VM.", - "readOnly": true, - "type": "string" - }, - "reinstallStatus": { - "$ref": "#/components/schemas/v1ReinstallStatus" - }, - "reinstalledAt": { - "format": "date-time", - "readOnly": true, - "type": "string" - }, - "storage": { - "description": "Target storage for full clone.", - "format": "int32", - "type": "integer" - }, - "tags": { - "items": { - "type": "string" - }, - "title": "Tags for categorizing the virtual machine (e.g., \"database\", \"webserver\")", - "type": "array" - }, - "updateTime": { - "description": "The last update timestamp of the virtual machine.", - "format": "date-time", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "v1VirtualMachineBandwidthQuota": { - "description": "VirtualMachineBandwidthQuota summarizes plan bandwidth allowance and metered usage for graphs/billing UX.\nShared by both bandwidth_egress and bandwidth_ingress on VirtualMachine.", - "properties": { - "billableBlocks": { - "description": "Whole overage blocks currently billable (ceil(overage_gb / block_size_gb)).", - "format": "int32", - "readOnly": true, - "type": "integer" - }, - "billingEnabled": { - "description": "False when usage is shown for visibility only (e.g. ingress not billed on this plan).", - "readOnly": true, - "type": "boolean" - }, - "blockPrice": { - "description": "Price per overage block (decimal string, e.g. \"2.00\").", - "readOnly": true, - "type": "string" - }, - "blockSizeGb": { - "description": "Overage block size (GB). Zero when unlimited or linear pricing.", - "format": "int32", - "readOnly": true, - "type": "integer" - }, - "currency": { - "readOnly": true, - "type": "string" - }, - "estimatedOverageAmount": { - "description": "Estimated overage charge for the current period (decimal string).", - "readOnly": true, - "type": "string" - }, - "freeUnitsGb": { - "description": "Included free bandwidth per period (GB). Zero when unlimited or not configured.", - "format": "int32", - "readOnly": true, - "type": "integer" - }, - "nextBlockGb": { - "description": "Total usage GB at which the next overage block would begin (0 when unlimited).", - "format": "double", - "readOnly": true, - "type": "number" - }, - "overageGb": { - "description": "GB above the free allowance (0 when within free tier).", - "format": "double", - "readOnly": true, - "type": "number" - }, - "periodEnd": { - "format": "date-time", - "readOnly": true, - "type": "string" - }, - "periodStart": { - "format": "date-time", - "readOnly": true, - "type": "string" - }, - "unlimited": { - "description": "True when bandwidth is effectively unlimited ($0 overage) for this direction.", - "readOnly": true, - "type": "boolean" - }, - "usedGb": { - "description": "Total bandwidth used this billing period (decimal GB, 1000^3 bytes).", - "format": "double", - "readOnly": true, - "type": "number" - } - }, - "type": "object" - }, - "v1VirtualMachineSmtpOutboundPolicyView": { - "properties": { - "action": { - "$ref": "#/components/schemas/v1SmtpOutboundVmAction" - }, - "clientContactEmail": { - "description": "Contact email of that owner (when resolved).", - "type": "string" - }, - "clientOrganizationId": { - "description": "Client organization that owns the VM (grouping key for provider UI).", - "type": "string" - }, - "clientOwnerUserId": { - "description": "First owner user of that client organization (when resolved).", - "type": "string" - }, - "effectiveBlocked": { - "type": "boolean" - }, - "hostname": { - "type": "string" - }, - "ipv4": { - "description": "Primary active IPv4 / IPv6 from IPAM allocations (empty when none).", - "type": "string" - }, - "ipv6": { - "type": "string" - }, - "virtualMachineId": { - "type": "string" - } - }, - "type": "object" - }, - "v1VoteRoadmapFeatureRequestResponse": { - "properties": { - "request": { - "$ref": "#/components/schemas/v1RoadmapFeatureRequest" - } - }, - "type": "object" - } - }, - "securitySchemes": { - "BearerAuth": { - "description": "Bearer token", - "in": "header", - "name": "Authorization", - "type": "apiKey" - }, - "OrgIDHeader": { - "description": "Tenant or organization identifier", - "in": "header", - "name": "X-Organization-ID", - "type": "apiKey" - } - } - }, - "info": { - "contact": { - "name": "NodeRings", - "url": "https://noderings.com" - }, - "title": "NodeRings API", - "version": "1.0" - }, - "openapi": "3.0.0", - "paths": { - "/api/v1/webhooks/{provider}": { - "post": { - "operationId": "WebhookService_HandleWebhook", - "parameters": [ - { - "description": "Payment provider identifier (e.g., \"stripe\", \"paypal\")\nValidated in implementation to ensure supported providers", - "in": "path", - "name": "provider", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookServiceHandleWebhookBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1HandleWebhookResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "Handle webhook events from payment providers (Stripe, PayPal, etc.)\nThis endpoint receives webhook payloads and processes payment/subscription\nevents Note: The actual implementation will read raw HTTP body and headers\ndirectly to support webhook signature verification", - "tags": [ - "WebhookService" - ] - } - }, - "/v1/addon-subscriptions/{addonSubscriptionId}": { - "delete": { - "operationId": "AddonService_RemoveAddon", - "parameters": [ - { - "in": "path", - "name": "addonSubscriptionId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "If false, cancels at period end", - "in": "query", - "name": "cancelImmediately", - "required": false, - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1RemoveAddonResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "Remove an addon from a subscription.\ncancel_immediately=false keeps the add-on (and IP/backup) until the parent\nsubscription period ends; the renewal task then deprovisions it.", - "tags": [ - "AddonService" - ] - } - }, - "/v1/addon-subscriptions/{addonSubscriptionId}:undo-cancel": { - "post": { - "operationId": "AddonService_UndoCancelAddon", - "parameters": [ - { - "in": "path", - "name": "addonSubscriptionId", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddonServiceUndoCancelAddonBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1RemoveAddonResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "UndoCancelAddon clears cancel_at_period_end so the add-on renews with the VM.", - "tags": [ - "AddonService" - ] - } - }, - "/v1/addons": { - "get": { - "operationId": "AddonService_ListAddons", - "parameters": [ - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "description": "Filter by compatible with subscription", - "in": "query", - "name": "subscriptionId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Filter by type", - "in": "query", - "name": "addonType", - "required": false, - "schema": { - "default": "ADDON_TYPE_UNSPECIFIED", - "enum": [ - "ADDON_TYPE_UNSPECIFIED", - "ADDON_TYPE_BACKUP", - "ADDON_TYPE_SNAPSHOT", - "ADDON_TYPE_ADDITIONAL_IP" - ], - "type": "string" - } - }, - { - "description": "Filter by template status", - "in": "query", - "name": "isTemplate", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "description": "Filter by billing type (usage-based or fixed/subscription)\n\n - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan)", - "in": "query", - "name": "billingType", - "required": false, - "schema": { - "default": "BILLING_TYPE_UNSPECIFIED", - "enum": [ - "BILLING_TYPE_UNSPECIFIED", - "BILLING_TYPE_SUBSCRIPTION", - "BILLING_TYPE_USAGE", - "BILLING_TYPE_FREE", - "BILLING_TYPE_PERCENTAGE" - ], - "type": "string" - } - }, - { - "description": "Search filter for addon name, code, or description", - "in": "query", - "name": "search", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListAddonsResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "List available addons", - "tags": [ - "AddonService" - ] - }, - "post": { - "operationId": "AddonService_CreateAddon", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1CreateAddonRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "Create an addon from a template addon", - "tags": [ - "AddonService" - ] - } - }, - "/v1/addons/{id}": { - "delete": { - "operationId": "AddonService_DeleteAddon", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "Delete an addon (soft delete)", - "tags": [ - "AddonService" - ] - }, - "get": { - "operationId": "AddonService_GetAddon", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetAddonResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "Get a specific addon with its prices", - "tags": [ - "AddonService" - ] - }, - "patch": { - "operationId": "AddonService_UpdateAddon", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddonServiceUpdateAddonBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "Update an addon (allows changing price and currency)", - "tags": [ - "AddonService" - ] - } - }, - "/v1/admin/coupons/high-risk": { - "get": { - "operationId": "CouponService_ListHighRiskCoupons", - "parameters": [ - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "providerOrganizationId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Also list inactive and banned coupons.", - "in": "query", - "name": "includeInactive", - "required": false, - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListHighRiskCouponsResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "Platform admins only: high-risk coupons across all providers, most redeemed first.", - "tags": [ - "CouponService" - ] - } - }, - "/v1/agents": { - "get": { - "operationId": "AgentService_ListAgents", - "parameters": [ - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "gatewayRegion", - "required": false, - "schema": { - "default": "AGENT_GATEWAY_REGION_UNSPECIFIED", - "enum": [ - "AGENT_GATEWAY_REGION_UNSPECIFIED", - "AGENT_GATEWAY_REGION_AMS01" - ], - "type": "string" - } - }, - { - "in": "query", - "name": "search", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListAgentsResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "AgentService" - ] - }, - "post": { - "operationId": "AgentService_CreateAgent", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1CreateAgentRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetAgentResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "AgentService" - ] - } - }, - "/v1/agents/{id}": { - "delete": { - "operationId": "AgentService_DeleteAgent", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "AgentService" - ] - }, - "get": { - "operationId": "AgentService_GetAgent", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetAgentResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "AgentService" - ] - }, - "patch": { - "operationId": "AgentService_UpdateAgent", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentServiceUpdateAgentBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1UpdateAgentResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "AgentService" - ] - } - }, - "/v1/agents/{id}:generateInstallCommand": { - "post": { - "operationId": "AgentService_GenerateInstallCommand", - "parameters": [ - { - "description": "The ID of the agent to generate the install command for", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentServiceGenerateInstallCommandBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GenerateInstallCommandResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "AgentService" - ] - } - }, - "/v1/agents/{id}:generatePeeringConfig": { - "post": { - "operationId": "AgentService_GeneratePeeringConfig", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentServiceGeneratePeeringConfigBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GeneratePeeringConfigResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "AgentService" - ] - } - }, - "/v1/agents/{id}:uploadInboundPeeringConfig": { - "post": { - "operationId": "AgentService_UploadInboundPeeringConfig", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentServiceUploadInboundPeeringConfigBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1UploadInboundPeeringConfigResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "AgentService" - ] - } - }, - "/v1/auth/change-password": { - "post": { - "operationId": "UserService_ChangePassword", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ChangePasswordRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/forgot-password": { - "post": { - "operationId": "UserService_ForgotPassword", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ForgotPasswordRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/identities": { - "get": { - "operationId": "UserService_ListLinkedIdentities", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListLinkedIdentitiesResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/identities/{provider}": { - "delete": { - "operationId": "UserService_UnlinkIdentity", - "parameters": [ - { - "in": "path", - "name": "provider", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/login": { - "post": { - "operationId": "UserService_Login", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1LoginRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1LoginResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/login/mfa": { - "post": { - "operationId": "UserService_LoginMfaVerify", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1LoginMfaVerifyRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1LoginResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/logout": { - "post": { - "operationId": "UserService_Logout", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1LogoutRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/mfa/backup-codes/regenerate": { - "post": { - "operationId": "UserService_RegenerateMfaBackupCodes", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1RegenerateMfaBackupCodesRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1RegenerateMfaBackupCodesResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/mfa/disable": { - "post": { - "operationId": "UserService_DisableMfa", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1DisableMfaRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/mfa/enroll": { - "post": { - "operationId": "UserService_EnrollMfaTotp", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1EnrollMfaTotpRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1EnrollMfaTotpResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/mfa/status": { - "get": { - "operationId": "UserService_GetMfaStatus", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetMfaStatusResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/mfa/verify-enrollment": { - "post": { - "operationId": "UserService_VerifyMfaEnrollment", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1VerifyMfaEnrollmentRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1VerifyMfaEnrollmentResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/reauthenticate": { - "post": { - "operationId": "UserService_ReauthenticateUser", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ReauthenticateUserRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ReauthenticateUserResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "Step-up re-authentication: re-checks the password and/or the 2FA code and\nreturns a 10-minute token bound to the session. Required by sensitive actions\n(domain auth code, transfer unlock, registrant change, domain delete).\nService accounts cannot obtain it.", - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/register": { - "post": { - "operationId": "UserService_RegisterUser", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1RegisterUserRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/resend-verification-email": { - "post": { - "operationId": "UserService_ResendVerificationEmail", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ResendVerificationEmailRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/reset-password": { - "post": { - "operationId": "UserService_ResetPassword", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ResetPasswordRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/sessions": { - "get": { - "operationId": "UserService_GetActiveSessions", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetActiveSessionsResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/set-password": { - "post": { - "operationId": "UserService_SetPassword", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SetPasswordRequest" - } - } - }, - "description": "SetPassword is for passwordless (SSO-only) accounts that have never set a local password.", - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/sso/exchange": { - "post": { - "operationId": "UserService_ExchangeSSOCode", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ExchangeSSOCodeRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1LoginResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/sso/link": { - "post": { - "operationId": "UserService_CompleteSSOLink", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1CompleteSSOLinkRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1LoginResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/auth/verify-email": { - "get": { - "operationId": "UserService_VerifyEmail", - "parameters": [ - { - "in": "query", - "name": "userId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "code", - "required": false, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/v1/blog/subscriptions": { - "post": { - "operationId": "BlogSubscriptionService_SubscribeToBlog", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SubscribeToBlogRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SubscribeToBlogResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "Start a subscription and send the confirmation email.", - "tags": [ - "BlogSubscriptionService" - ] - } - }, - "/v1/blog/subscriptions/confirm": { - "post": { - "operationId": "BlogSubscriptionService_ConfirmBlogSubscription", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ConfirmBlogSubscriptionRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ConfirmBlogSubscriptionResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "Confirm an address with the token from the confirmation email.", - "tags": [ - "BlogSubscriptionService" - ] + "OrgIDHeader": { + "description": "Tenant or organization identifier", + "in": "header", + "name": "X-Organization-ID", + "type": "apiKey" } + } + }, + "info": { + "contact": { + "name": "NodeRings", + "url": "https://noderings.com" }, - "/v1/blog/subscriptions/unsubscribe": { + "title": "NodeRings API", + "version": "1.0" + }, + "openapi": "3.0.0", + "paths": { + "/api/v1/webhooks/{provider}": { "post": { - "operationId": "BlogSubscriptionService_UnsubscribeFromBlog", + "operationId": "WebhookService_HandleWebhook", + "parameters": [ + { + "description": "Payment provider identifier (e.g., \"stripe\", \"paypal\")\nValidated in implementation to ensure supported providers", + "in": "path", + "name": "provider", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UnsubscribeFromBlogRequest" + "$ref": "#/components/schemas/WebhookServiceHandleWebhookBody" } } }, @@ -21496,100 +17059,39 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UnsubscribeFromBlogResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "Stop emails with the token from an unsubscribe link.", - "tags": [ - "BlogSubscriptionService" - ] - } - }, - "/v1/chat": { - "post": { - "operationId": "ChatService_Chat", - "requestBody": { - "$ref": "#/components/requestBodies/v1ChatRequest" - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ChatResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "Chat provides a non-streaming chat endpoint", - "tags": [ - "ChatService" - ] - } - }, - "/v1/chat/anonymous": { - "post": { - "operationId": "ChatService_ChatAnonymous", - "requestBody": { - "$ref": "#/components/requestBodies/v1ChatRequest" - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ChatResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "ChatAnonymous provides a non-streaming chat endpoint for anonymous users\nSession ID is extracted from the cookie header (managed by the frontend)", - "tags": [ - "ChatService" - ] - } - }, - "/v1/chat/conversations": { - "get": { - "operationId": "ChatService_ListConversations", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListConversationsResponse" + "$ref": "#/components/schemas/v1HandleWebhookResponse" } } }, "description": "A successful response." } }, - "summary": "ListConversations returns all conversation IDs for the authenticated user", + "summary": "Handle webhook events from payment providers (Stripe, PayPal, etc.)\nThis endpoint receives webhook payloads and processes payment/subscription\nevents Note: The actual implementation will read raw HTTP body and headers\ndirectly to support webhook signature verification", "tags": [ - "ChatService" + "WebhookService" ] } }, - "/v1/chat/conversations/{conversationId}": { + "/v1/addon-subscriptions/{addonSubscriptionId}": { "delete": { - "operationId": "ChatService_DeleteConversation", + "operationId": "AddonService_RemoveAddon", "parameters": [ { - "description": "Conversation ID", "in": "path", - "name": "conversationId", + "name": "addonSubscriptionId", "required": true, "schema": { "type": "string" } + }, + { + "description": "If false, cancels at period end", + "in": "query", + "name": "cancelImmediately", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -21597,94 +17099,63 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1RemoveAddonResponse" } } }, "description": "A successful response." } }, - "summary": "DeleteConversation marks a conversation as deleted (soft delete)", + "summary": "Remove an addon from a subscription.\ncancel_immediately=false keeps the add-on (and IP/backup) until the parent\nsubscription period ends; the renewal task then deprovisions it.", "tags": [ - "ChatService" + "AddonService" ] } }, - "/v1/chat/conversations/{conversationId}/history": { - "get": { - "operationId": "ChatService_GetConversationHistory", + "/v1/addon-subscriptions/{addonSubscriptionId}:undo-cancel": { + "post": { + "operationId": "AddonService_UndoCancelAddon", "parameters": [ { - "description": "Conversation ID", "in": "path", - "name": "conversationId", + "name": "addonSubscriptionId", "required": true, "schema": { "type": "string" } } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetConversationHistoryResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "GetConversationHistory returns the full message history for a conversation", - "tags": [ - "ChatService" - ] - } - }, - "/v1/client/dashboard/billing": { - "get": { - "operationId": "ClientDashboardService_GetClientDashboardBilling", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetClientDashboardBillingResponse" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddonServiceUndoCancelAddonBody" } - }, - "description": "A successful response." - } + } + }, + "required": true }, - "tags": [ - "ClientDashboardService" - ] - } - }, - "/v1/client/dashboard/summary": { - "get": { - "operationId": "ClientDashboardService_GetClientDashboardSummary", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetClientDashboardSummaryResponse" + "$ref": "#/components/schemas/v1RemoveAddonResponse" } } }, "description": "A successful response." } }, + "summary": "UndoCancelAddon clears cancel_at_period_end so the add-on renews with the VM.", "tags": [ - "ClientDashboardService" + "AddonService" ] } }, - "/v1/client/provider-review-assets": { + "/v1/addons": { "get": { - "operationId": "ClientProviderReviewService_ListClientProviderReviewAssets", + "operationId": "AddonService_ListAddons", "parameters": [ { "in": "query", @@ -21705,7 +17176,58 @@ } }, { - "description": "Optional filter (hostname / provider name), case-insensitive substring.", + "description": "Filter by compatible with subscription", + "in": "query", + "name": "subscriptionId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Filter by type", + "in": "query", + "name": "addonType", + "required": false, + "schema": { + "default": "ADDON_TYPE_UNSPECIFIED", + "enum": [ + "ADDON_TYPE_UNSPECIFIED", + "ADDON_TYPE_BACKUP", + "ADDON_TYPE_SNAPSHOT", + "ADDON_TYPE_ADDITIONAL_IP" + ], + "type": "string" + } + }, + { + "description": "Filter by template status", + "in": "query", + "name": "isTemplate", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "description": "Filter by billing type (usage-based or fixed/subscription)\n\n - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan)", + "in": "query", + "name": "billingType", + "required": false, + "schema": { + "default": "BILLING_TYPE_UNSPECIFIED", + "enum": [ + "BILLING_TYPE_UNSPECIFIED", + "BILLING_TYPE_SUBSCRIPTION", + "BILLING_TYPE_USAGE", + "BILLING_TYPE_FREE", + "BILLING_TYPE_PERCENTAGE" + ], + "type": "string" + } + }, + { + "description": "Search filter for addon name, code, or description", "in": "query", "name": "search", "required": false, @@ -21719,26 +17241,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListClientProviderReviewAssetsResponse" + "$ref": "#/components/schemas/v1ListAddonsResponse" } } }, "description": "A successful response." } }, + "summary": "List available addons", "tags": [ - "ClientProviderReviewService" + "AddonService" ] - } - }, - "/v1/cloudinittemplate": { + }, "post": { - "operationId": "CloudInitTemplateService_CreateCloudInitTemplate", + "operationId": "AddonService_CreateAddon", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateCloudInitTemplateRequest" + "$ref": "#/components/schemas/v1CreateAddonRequest" } } }, @@ -21756,14 +17277,15 @@ "description": "A successful response." } }, + "summary": "Create an addon from a template addon", "tags": [ - "CloudInitTemplateService" + "AddonService" ] } }, - "/v1/cloudinittemplate/{id}": { + "/v1/addons/{id}": { "delete": { - "operationId": "CloudInitTemplateService_DeleteCloudInitTemplate", + "operationId": "AddonService_DeleteAddon", "parameters": [ { "in": "path", @@ -21786,12 +17308,13 @@ "description": "A successful response." } }, + "summary": "Delete an addon (soft delete)", "tags": [ - "CloudInitTemplateService" + "AddonService" ] }, "get": { - "operationId": "CloudInitTemplateService_GetCloudInitTemplate", + "operationId": "AddonService_GetAddon", "parameters": [ { "in": "path", @@ -21807,19 +17330,20 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetCloudInitTemplateResponse" + "$ref": "#/components/schemas/v1GetAddonResponse" } } }, "description": "A successful response." } }, + "summary": "Get a specific addon with its prices", "tags": [ - "CloudInitTemplateService" + "AddonService" ] }, "patch": { - "operationId": "CloudInitTemplateService_UpdateCloudInitTemplate", + "operationId": "AddonService_UpdateAddon", "parameters": [ { "in": "path", @@ -21834,7 +17358,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CloudInitTemplateServiceUpdateCloudInitTemplateBody" + "$ref": "#/components/schemas/AddonServiceUpdateAddonBody" } } }, @@ -21845,21 +17369,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateCloudInitTemplateResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, + "summary": "Update an addon (allows changing price and currency)", "tags": [ - "CloudInitTemplateService" + "AddonService" ] } }, - "/v1/cloudinittemplates": { + "/v1/admin/coupons/high-risk": { "get": { - "operationId": "CloudInitTemplateService_ListCloudInitTemplates", + "operationId": "CouponService_ListHighRiskCoupons", "parameters": [ { "in": "query", @@ -21880,9 +17405,17 @@ } }, { - "description": "If not set, returns both template and non-template. If true, returns only templates. If false, returns only non-templates.", "in": "query", - "name": "filterIsTemplate", + "name": "providerOrganizationId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Also list inactive and banned coupons.", + "in": "query", + "name": "includeInactive", "required": false, "schema": { "type": "boolean" @@ -21894,21 +17427,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListCloudInitTemplatesResponse" + "$ref": "#/components/schemas/v1ListHighRiskCouponsResponse" } } }, "description": "A successful response." } }, + "summary": "Platform admins only: high-risk coupons across all providers, most redeemed first.", "tags": [ - "CloudInitTemplateService" + "CouponService" ] } }, - "/v1/cloudinituserdata": { + "/v1/agents": { "get": { - "operationId": "CloudInitUserDataService_ListCloudInitUserData", + "operationId": "AgentService_ListAgents", "parameters": [ { "in": "query", @@ -21927,6 +17461,27 @@ "format": "int32", "type": "integer" } + }, + { + "in": "query", + "name": "gatewayRegion", + "required": false, + "schema": { + "default": "AGENT_GATEWAY_REGION_UNSPECIFIED", + "enum": [ + "AGENT_GATEWAY_REGION_UNSPECIFIED", + "AGENT_GATEWAY_REGION_AMS01" + ], + "type": "string" + } + }, + { + "in": "query", + "name": "search", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -21934,7 +17489,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListCloudInitUserDataResponse" + "$ref": "#/components/schemas/v1ListAgentsResponse" } } }, @@ -21942,16 +17497,16 @@ } }, "tags": [ - "CloudInitUserDataService" + "AgentService" ] }, "post": { - "operationId": "CloudInitUserDataService_CreateCloudInitUserData", + "operationId": "AgentService_CreateAgent", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateCloudInitUserDataRequest" + "$ref": "#/components/schemas/v1CreateAgentRequest" } } }, @@ -21962,7 +17517,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CloudInitUserData" + "$ref": "#/components/schemas/v1GetAgentResponse" } } }, @@ -21970,13 +17525,13 @@ } }, "tags": [ - "CloudInitUserDataService" + "AgentService" ] } }, - "/v1/cloudinituserdata/{id}": { + "/v1/agents/{id}": { "delete": { - "operationId": "CloudInitUserDataService_DeleteCloudInitUserData", + "operationId": "AgentService_DeleteAgent", "parameters": [ { "in": "path", @@ -22000,11 +17555,11 @@ } }, "tags": [ - "CloudInitUserDataService" + "AgentService" ] }, "get": { - "operationId": "CloudInitUserDataService_GetCloudInitUserData", + "operationId": "AgentService_GetAgent", "parameters": [ { "in": "path", @@ -22020,7 +17575,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CloudInitUserData" + "$ref": "#/components/schemas/v1GetAgentResponse" } } }, @@ -22028,11 +17583,11 @@ } }, "tags": [ - "CloudInitUserDataService" + "AgentService" ] }, "patch": { - "operationId": "CloudInitUserDataService_UpdateCloudInitUserData", + "operationId": "AgentService_UpdateAgent", "parameters": [ { "in": "path", @@ -22047,7 +17602,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CloudInitUserDataServiceUpdateCloudInitUserDataBody" + "$ref": "#/components/schemas/AgentServiceUpdateAgentBody" } } }, @@ -22058,7 +17613,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CloudInitUserData" + "$ref": "#/components/schemas/v1UpdateAgentResponse" } } }, @@ -22066,47 +17621,40 @@ } }, "tags": [ - "CloudInitUserDataService" + "AgentService" ] } }, - "/v1/countries-cities": { - "get": { - "operationId": "RegionService_ListCountriesCities", + "/v1/agents/{id}:generateInstallCommand": { + "post": { + "operationId": "AgentService_GenerateInstallCommand", "parameters": [ { - "in": "query", - "name": "query", - "required": false, + "description": "The ID of the agent to generate the install command for", + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentServiceGenerateInstallCommandBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListCountriesCitiesResponse" + "$ref": "#/components/schemas/v1GenerateInstallCommandResponse" } } }, @@ -22114,13 +17662,13 @@ } }, "tags": [ - "RegionService" + "AgentService" ] } }, - "/v1/coupon-codes/{id}": { - "patch": { - "operationId": "CouponService_UpdateCouponCode", + "/v1/agents/{id}:generatePeeringConfig": { + "post": { + "operationId": "AgentService_GeneratePeeringConfig", "parameters": [ { "in": "path", @@ -22135,7 +17683,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CouponServiceUpdateCouponCodeBody" + "$ref": "#/components/schemas/AgentServiceGeneratePeeringConfigBody" } } }, @@ -22146,7 +17694,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CouponCode" + "$ref": "#/components/schemas/v1GeneratePeeringConfigResponse" } } }, @@ -22154,64 +17702,39 @@ } }, "tags": [ - "CouponService" + "AgentService" ] } }, - "/v1/coupons": { - "get": { - "operationId": "CouponService_ListCoupons", + "/v1/agents/{id}:uploadInboundPeeringConfig": { + "post": { + "operationId": "AgentService_UploadInboundPeeringConfig", "parameters": [ { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "assetType", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Only coupons whose validity ends within 14 days.", - "in": "query", - "name": "expiringSoon", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "search", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AgentServiceUploadInboundPeeringConfigBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListCouponsResponse" + "$ref": "#/components/schemas/v1UploadInboundPeeringConfigResponse" } } }, @@ -22219,16 +17742,18 @@ } }, "tags": [ - "CouponService" + "AgentService" ] - }, + } + }, + "/v1/auth/change-password": { "post": { - "operationId": "CouponService_CreateCoupon", + "operationId": "UserService_ChangePassword", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateCouponRequest" + "$ref": "#/components/schemas/v1ChangePasswordRequest" } } }, @@ -22239,7 +17764,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateCouponResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -22247,47 +17772,29 @@ } }, "tags": [ - "CouponService" + "UserService" ] } }, - "/v1/coupons/{couponId}/code-batches": { - "get": { - "operationId": "CouponService_ListCouponCodeBatches", - "parameters": [ - { - "in": "path", - "name": "couponId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" + "/v1/auth/forgot-password": { + "post": { + "operationId": "UserService_ForgotPassword", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ForgotPasswordRequest" + } } }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListCouponCodeBatchesResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -22295,37 +17802,19 @@ } }, "tags": [ - "CouponService" + "UserService" ] } }, - "/v1/coupons/{couponId}/code-batches/{batchId}": { + "/v1/auth/identities": { "get": { - "operationId": "CouponService_GetCouponCodeBatch", - "parameters": [ - { - "in": "path", - "name": "couponId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "batchId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "UserService_ListLinkedIdentities", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CouponCodeBatch" + "$ref": "#/components/schemas/v1ListLinkedIdentitiesResponse" } } }, @@ -22333,63 +17822,21 @@ } }, "tags": [ - "CouponService" + "UserService" ] } }, - "/v1/coupons/{couponId}/codes": { - "get": { - "operationId": "CouponService_ListCouponCodes", + "/v1/auth/identities/{provider}": { + "delete": { + "operationId": "UserService_UnlinkIdentity", "parameters": [ { "in": "path", - "name": "couponId", + "name": "provider", "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "batchId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "campaign", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "channel", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { @@ -22397,7 +17844,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListCouponCodesResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -22405,26 +17852,18 @@ } }, "tags": [ - "CouponService" + "UserService" ] - }, + } + }, + "/v1/auth/login": { "post": { - "operationId": "CouponService_CreateCouponCode", - "parameters": [ - { - "in": "path", - "name": "couponId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "UserService_Login", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CouponServiceCreateCouponCodeBody" + "$ref": "#/components/schemas/v1LoginRequest" } } }, @@ -22435,7 +17874,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CouponCode" + "$ref": "#/components/schemas/v1LoginResponse" } } }, @@ -22443,37 +17882,29 @@ } }, "tags": [ - "CouponService" + "UserService" ] } }, - "/v1/coupons/{couponId}/codes:export": { - "get": { - "operationId": "CouponService_ExportCouponCodes", - "parameters": [ - { - "in": "path", - "name": "couponId", - "required": true, - "schema": { - "type": "string" + "/v1/auth/login/mfa": { + "post": { + "operationId": "UserService_LoginMfaVerify", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1LoginMfaVerifyRequest" + } } }, - { - "in": "query", - "name": "batchId", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ExportCouponCodesResponse" + "$ref": "#/components/schemas/v1LoginResponse" } } }, @@ -22481,28 +17912,18 @@ } }, "tags": [ - "CouponService" + "UserService" ] } }, - "/v1/coupons/{couponId}/codes:generate": { + "/v1/auth/logout": { "post": { - "operationId": "CouponService_GenerateCouponCodes", - "parameters": [ - { - "in": "path", - "name": "couponId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "UserService_Logout", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CouponServiceGenerateCouponCodesBody" + "$ref": "#/components/schemas/v1LogoutRequest" } } }, @@ -22513,7 +17934,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GenerateCouponCodesResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -22521,55 +17942,29 @@ } }, "tags": [ - "CouponService" + "UserService" ] } }, - "/v1/coupons/{couponId}/redemptions": { - "get": { - "operationId": "CouponService_ListCouponRedemptions", - "parameters": [ - { - "in": "path", - "name": "couponId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" + "/v1/auth/mfa/backup-codes/regenerate": { + "post": { + "operationId": "UserService_RegenerateMfaBackupCodes", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1RegenerateMfaBackupCodesRequest" + } } }, - { - "in": "query", - "name": "assetType", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListCouponRedemptionsResponse" + "$ref": "#/components/schemas/v1RegenerateMfaBackupCodesResponse" } } }, @@ -22577,120 +17972,59 @@ } }, "tags": [ - "CouponService" + "UserService" ] } }, - "/v1/coupons/{couponId}/report": { - "get": { - "operationId": "CouponService_GetCouponReport", - "parameters": [ - { - "in": "path", - "name": "couponId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "groupBy", - "required": false, - "schema": { - "default": "COUPON_REPORT_GROUP_BY_UNSPECIFIED", - "enum": [ - "COUPON_REPORT_GROUP_BY_UNSPECIFIED", - "COUPON_REPORT_GROUP_BY_CODE", - "COUPON_REPORT_GROUP_BY_CAMPAIGN", - "COUPON_REPORT_GROUP_BY_CHANNEL", - "COUPON_REPORT_GROUP_BY_ASSET_TYPE" - ], - "type": "string" - } - }, - { - "description": "Narrow the report to one code, campaign, or channel.", - "in": "query", - "name": "code", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "campaign", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "channel", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Applications created in [start_time, end_time); open ends are unbounded.", - "in": "query", - "name": "startTime", - "required": false, - "schema": { - "format": "date-time", - "type": "string" + "/v1/auth/mfa/disable": { + "post": { + "operationId": "UserService_DisableMfa", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1DisableMfaRequest" + } } }, - { - "in": "query", - "name": "endTime", - "required": false, - "schema": { - "format": "date-time", - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetCouponReportResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "Attribution and ROI figures, grouped by code, campaign, channel, or asset type.", "tags": [ - "CouponService" + "UserService" ] } }, - "/v1/coupons/{id}": { - "get": { - "operationId": "CouponService_GetCoupon", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" + "/v1/auth/mfa/enroll": { + "post": { + "operationId": "UserService_EnrollMfaTotp", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1EnrollMfaTotpRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1Coupon" + "$ref": "#/components/schemas/v1EnrollMfaTotpResponse" } } }, @@ -22698,37 +18032,19 @@ } }, "tags": [ - "CouponService" + "UserService" ] - }, - "patch": { - "operationId": "CouponService_UpdateCoupon", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CouponServiceUpdateCouponBody" - } - } - }, - "required": true - }, + } + }, + "/v1/auth/mfa/status": { + "get": { + "operationId": "UserService_GetMfaStatus", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1Coupon" + "$ref": "#/components/schemas/v1GetMfaStatusResponse" } } }, @@ -22736,28 +18052,18 @@ } }, "tags": [ - "CouponService" + "UserService" ] } }, - "/v1/coupons/{id}:deactivate": { + "/v1/auth/mfa/verify-enrollment": { "post": { - "operationId": "CouponService_DeactivateCoupon", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "UserService_VerifyMfaEnrollment", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CouponServiceDeactivateCouponBody" + "$ref": "#/components/schemas/v1VerifyMfaEnrollmentRequest" } } }, @@ -22768,37 +18074,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1Coupon" + "$ref": "#/components/schemas/v1VerifyMfaEnrollmentResponse" } } }, "description": "A successful response." } }, - "summary": "Blocks new attachments; customers keep the periods they were promised.", "tags": [ - "CouponService" + "UserService" ] } }, - "/v1/coupons/{id}:revoke": { + "/v1/auth/register": { "post": { - "operationId": "CouponService_RevokeCoupon", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "UserService_RegisterUser", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CouponServiceRevokeCouponBody" + "$ref": "#/components/schemas/v1RegisterUserRequest" } } }, @@ -22809,27 +18104,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1RevokeCouponResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "Ends the discount for every customer from their next invoice.", "tags": [ - "CouponService" + "UserService" ] } }, - "/v1/coupons:preview": { + "/v1/auth/resend-verification-email": { "post": { - "operationId": "CouponService_PreviewCoupon", + "operationId": "UserService_ResendVerificationEmail", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1PreviewCouponRequest" + "$ref": "#/components/schemas/v1ResendVerificationEmailRequest" } } }, @@ -22840,28 +18134,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1PreviewCouponResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "Checks a code against a plan without attaching it.", "tags": [ - "CouponService" + "UserService" ] } }, - "/v1/credits/balance": { - "get": { - "operationId": "CreditService_GetCreditBalance", + "/v1/auth/reset-password": { + "post": { + "operationId": "UserService_ResetPassword", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ResetPasswordRequest" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetCreditBalanceResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -22869,62 +18172,19 @@ } }, "tags": [ - "CreditService" + "UserService" ] } }, - "/v1/credits/ledger": { + "/v1/auth/sessions": { "get": { - "operationId": "CreditService_ListCreditLedgerEntries", - "parameters": [ - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "entryType", - "required": false, - "schema": { - "default": "CREDIT_LEDGER_ENTRY_TYPE_UNSPECIFIED", - "enum": [ - "CREDIT_LEDGER_ENTRY_TYPE_UNSPECIFIED", - "CREDIT_LEDGER_ENTRY_TYPE_PURCHASE", - "CREDIT_LEDGER_ENTRY_TYPE_PROMOTIONAL", - "CREDIT_LEDGER_ENTRY_TYPE_PROVISION_RESERVE", - "CREDIT_LEDGER_ENTRY_TYPE_PROVISION_RELEASE", - "CREDIT_LEDGER_ENTRY_TYPE_USAGE_HOLD", - "CREDIT_LEDGER_ENTRY_TYPE_HOLD_RELEASE", - "CREDIT_LEDGER_ENTRY_TYPE_INVOICE_SETTLEMENT", - "CREDIT_LEDGER_ENTRY_TYPE_CHARGEBACK_REVERSAL", - "CREDIT_LEDGER_ENTRY_TYPE_EXPIRY", - "CREDIT_LEDGER_ENTRY_TYPE_FORFEITURE", - "CREDIT_LEDGER_ENTRY_TYPE_MANUAL_ADJUSTMENT" - ], - "type": "string" - } - } - ], + "operationId": "UserService_GetActiveSessions", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListCreditLedgerEntriesResponse" + "$ref": "#/components/schemas/v1GetActiveSessionsResponse" } } }, @@ -22932,39 +18192,30 @@ } }, "tags": [ - "CreditService" + "UserService" ] } }, - "/v1/credits/promo": { - "get": { - "operationId": "CreditService_ListPromoCreditGrants", - "parameters": [ - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" + "/v1/auth/set-password": { + "post": { + "operationId": "UserService_SetPassword", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1SetPasswordRequest" + } } - } - ], + }, + "description": "SetPassword is for passwordless (SSO-only) accounts that have never set a local password.", + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPromoCreditGrantsResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -22972,18 +18223,18 @@ } }, "tags": [ - "CreditService" + "UserService" ] } }, - "/v1/credits:purchase": { + "/v1/auth/sso/exchange": { "post": { - "operationId": "CreditService_PurchaseCredits", + "operationId": "UserService_ExchangeSSOCode", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1PurchaseCreditsRequest" + "$ref": "#/components/schemas/v1ExchangeSSOCodeRequest" } } }, @@ -22994,7 +18245,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1PurchaseCreditsResponse" + "$ref": "#/components/schemas/v1LoginResponse" } } }, @@ -23002,18 +18253,18 @@ } }, "tags": [ - "CreditService" + "UserService" ] } }, - "/v1/credits:redeemPromoCode": { + "/v1/auth/sso/link": { "post": { - "operationId": "CreditService_RedeemPromoCode", + "operationId": "UserService_CompleteSSOLink", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1RedeemPromoCodeRequest" + "$ref": "#/components/schemas/v1CompleteSSOLinkRequest" } } }, @@ -23024,7 +18275,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1RedeemPromoCodeResponse" + "$ref": "#/components/schemas/v1LoginResponse" } } }, @@ -23032,17 +18283,17 @@ } }, "tags": [ - "CreditService" + "UserService" ] } }, - "/v1/datacenters": { + "/v1/auth/verify-email": { "get": { - "operationId": "RegionService_ListDatacenters", + "operationId": "UserService_VerifyEmail", "parameters": [ { "in": "query", - "name": "query", + "name": "userId", "required": false, "schema": { "type": "string" @@ -23050,20 +18301,10 @@ }, { "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", + "name": "code", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } } ], @@ -23072,7 +18313,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDatacentersResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -23080,40 +18321,88 @@ } }, "tags": [ - "RegionService" + "UserService" ] } }, - "/v1/distros": { - "get": { - "operationId": "MetadataService_ListDistros", + "/v1/chat": { + "post": { + "operationId": "ChatService_Chat", + "requestBody": { + "$ref": "#/components/requestBodies/v1ChatRequest" + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDistrosResponse" + "$ref": "#/components/schemas/v1ChatResponse" } } }, "description": "A successful response." } }, - "summary": "ListDistros returns the guest OS catalog used by the virtual machine image picker.", + "summary": "Chat provides a non-streaming chat endpoint", "tags": [ - "MetadataService" + "ChatService" ] } }, - "/v1/dns/geo-locations": { + "/v1/chat/anonymous": { + "post": { + "operationId": "ChatService_ChatAnonymous", + "requestBody": { + "$ref": "#/components/requestBodies/v1ChatRequest" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ChatResponse" + } + } + }, + "description": "A successful response." + } + }, + "summary": "ChatAnonymous provides a non-streaming chat endpoint for anonymous users\nSession ID is extracted from the cookie header (managed by the frontend)", + "tags": [ + "ChatService" + ] + } + }, + "/v1/chat/conversations": { "get": { - "operationId": "DnsRecordService_ListDnsGeoLocations", + "operationId": "ChatService_ListConversations", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ListConversationsResponse" + } + } + }, + "description": "A successful response." + } + }, + "summary": "ListConversations returns all conversation IDs for the authenticated user", + "tags": [ + "ChatService" + ] + } + }, + "/v1/chat/conversations/{conversationId}": { + "delete": { + "operationId": "ChatService_DeleteConversation", "parameters": [ { - "description": "Optional filter: continent, country, region, or group.", - "in": "query", - "name": "kind", - "required": false, + "description": "Conversation ID", + "in": "path", + "name": "conversationId", + "required": true, "schema": { "type": "string" } @@ -23124,34 +18413,28 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDnsGeoLocationsResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, + "summary": "DeleteConversation marks a conversation as deleted (soft delete)", "tags": [ - "DnsRecordService" + "ChatService" ] } }, - "/v1/dns/scan": { + "/v1/chat/conversations/{conversationId}/history": { "get": { - "operationId": "DnsZoneService_ScanDnsZoneRecords", + "operationId": "ChatService_GetConversationHistory", "parameters": [ { - "in": "query", - "name": "name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "zoneId", - "required": false, + "description": "Conversation ID", + "in": "path", + "name": "conversationId", + "required": true, "schema": { "type": "string" } @@ -23162,21 +18445,62 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ScanDnsZoneRecordsResponse" + "$ref": "#/components/schemas/v1GetConversationHistoryResponse" } } }, "description": "A successful response." } }, + "summary": "GetConversationHistory returns the full message history for a conversation", "tags": [ - "DnsZoneService" + "ChatService" ] } }, - "/v1/dns/zones": { + "/v1/client/dashboard/billing": { "get": { - "operationId": "DnsZoneService_ListDnsZones", + "operationId": "ClientDashboardService_GetClientDashboardBilling", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1GetClientDashboardBillingResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "ClientDashboardService" + ] + } + }, + "/v1/client/dashboard/summary": { + "get": { + "operationId": "ClientDashboardService_GetClientDashboardSummary", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1GetClientDashboardSummaryResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "ClientDashboardService" + ] + } + }, + "/v1/client/provider-review-assets": { + "get": { + "operationId": "ClientProviderReviewService_ListClientProviderReviewAssets", "parameters": [ { "in": "query", @@ -23195,6 +18519,15 @@ "format": "int32", "type": "integer" } + }, + { + "description": "Optional filter (hostname / provider name), case-insensitive substring.", + "in": "query", + "name": "search", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -23202,7 +18535,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDnsZonesResponse" + "$ref": "#/components/schemas/v1ListClientProviderReviewAssetsResponse" } } }, @@ -23210,16 +18543,18 @@ } }, "tags": [ - "DnsZoneService" + "ClientProviderReviewService" ] - }, + } + }, + "/v1/cloudinittemplate": { "post": { - "operationId": "DnsZoneService_CreateDnsZone", + "operationId": "CloudInitTemplateService_CreateCloudInitTemplate", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateDnsZoneRequest" + "$ref": "#/components/schemas/v1CreateCloudInitTemplateRequest" } } }, @@ -23230,7 +18565,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateDnsZoneResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -23238,13 +18573,13 @@ } }, "tags": [ - "DnsZoneService" + "CloudInitTemplateService" ] } }, - "/v1/dns/zones/{id}": { + "/v1/cloudinittemplate/{id}": { "delete": { - "operationId": "DnsZoneService_DeleteDnsZone", + "operationId": "CloudInitTemplateService_DeleteCloudInitTemplate", "parameters": [ { "in": "path", @@ -23253,14 +18588,6 @@ "schema": { "type": "string" } - }, - { - "in": "query", - "name": "force", - "required": false, - "schema": { - "type": "boolean" - } } ], "responses": { @@ -23276,11 +18603,11 @@ } }, "tags": [ - "DnsZoneService" + "CloudInitTemplateService" ] }, "get": { - "operationId": "DnsZoneService_GetDnsZone", + "operationId": "CloudInitTemplateService_GetCloudInitTemplate", "parameters": [ { "in": "path", @@ -23296,7 +18623,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetDnsZoneResponse" + "$ref": "#/components/schemas/v1GetCloudInitTemplateResponse" } } }, @@ -23304,13 +18631,11 @@ } }, "tags": [ - "DnsZoneService" + "CloudInitTemplateService" ] - } - }, - "/v1/dns/zones/{id}/check-delegation": { - "post": { - "operationId": "DnsZoneService_CheckDnsZoneDelegation", + }, + "patch": { + "operationId": "CloudInitTemplateService_UpdateCloudInitTemplate", "parameters": [ { "in": "path", @@ -23325,7 +18650,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DnsZoneServiceCheckDnsZoneDelegationBody" + "$ref": "#/components/schemas/CloudInitTemplateServiceUpdateCloudInitTemplateBody" } } }, @@ -23336,7 +18661,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetDnsZoneResponse" + "$ref": "#/components/schemas/v1UpdateCloudInitTemplateResponse" } } }, @@ -23344,20 +18669,39 @@ } }, "tags": [ - "DnsZoneService" + "CloudInitTemplateService" ] } }, - "/v1/dns/zones/{id}/export": { + "/v1/cloudinittemplates": { "get": { - "operationId": "DnsZoneService_ExportDnsZone", + "operationId": "CloudInitTemplateService_ListCloudInitTemplates", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "description": "If not set, returns both template and non-template. If true, returns only templates. If false, returns only non-templates.", + "in": "query", + "name": "filterIsTemplate", + "required": false, + "schema": { + "type": "boolean" } } ], @@ -23366,7 +18710,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ExportDnsZoneResponse" + "$ref": "#/components/schemas/v1ListCloudInitTemplatesResponse" } } }, @@ -23374,39 +18718,39 @@ } }, "tags": [ - "DnsZoneService" + "CloudInitTemplateService" ] } }, - "/v1/dns/zones/{id}/import": { - "post": { - "operationId": "DnsZoneService_ImportDnsZone", + "/v1/cloudinituserdata": { + "get": { + "operationId": "CloudInitUserDataService_ListCloudInitUserData", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DnsZoneServiceImportDnsZoneBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListCloudInitUserDataResponse" } } }, @@ -23414,29 +18758,27 @@ } }, "tags": [ - "DnsZoneService" + "CloudInitUserDataService" ] - } - }, - "/v1/dns/zones/{zoneId}/dnssec": { - "get": { - "operationId": "DnssecService_GetDnssec", - "parameters": [ - { - "in": "path", - "name": "zoneId", - "required": true, - "schema": { - "type": "string" + }, + "post": { + "operationId": "CloudInitUserDataService_CreateCloudInitUserData", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1CreateCloudInitUserDataRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DnssecInfo" + "$ref": "#/components/schemas/v1CloudInitUserData" } } }, @@ -23444,39 +18786,29 @@ } }, "tags": [ - "DnssecService" + "CloudInitUserDataService" ] } }, - "/v1/dns/zones/{zoneId}/dnssec/check-ds": { - "post": { - "operationId": "DnssecService_CheckDnssecDs", + "/v1/cloudinituserdata/{id}": { + "delete": { + "operationId": "CloudInitUserDataService_DeleteCloudInitUserData", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "id", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DnssecServiceCheckDnssecDsBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DnssecInfo" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -23484,39 +18816,27 @@ } }, "tags": [ - "DnssecService" + "CloudInitUserDataService" ] - } - }, - "/v1/dns/zones/{zoneId}/dnssec/disable": { - "post": { - "operationId": "DnssecService_DisableDnssec", + }, + "get": { + "operationId": "CloudInitUserDataService_GetCloudInitUserData", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "id", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DnssecServiceDisableDnssecBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DnssecInfo" + "$ref": "#/components/schemas/v1CloudInitUserData" } } }, @@ -23524,17 +18844,15 @@ } }, "tags": [ - "DnssecService" + "CloudInitUserDataService" ] - } - }, - "/v1/dns/zones/{zoneId}/dnssec/enable": { - "post": { - "operationId": "DnssecService_EnableDnssec", + }, + "patch": { + "operationId": "CloudInitUserDataService_UpdateCloudInitUserData", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "id", "required": true, "schema": { "type": "string" @@ -23545,7 +18863,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DnssecServiceEnableDnssecBody" + "$ref": "#/components/schemas/CloudInitUserDataServiceUpdateCloudInitUserDataBody" } } }, @@ -23556,7 +18874,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DnssecInfo" + "$ref": "#/components/schemas/v1CloudInitUserData" } } }, @@ -23564,36 +18882,38 @@ } }, "tags": [ - "DnssecService" + "CloudInitUserDataService" ] } }, - "/v1/dns/zones/{zoneId}/geo-records": { - "delete": { - "operationId": "DnsRecordService_DeleteDnsGeoRecord", + "/v1/countries-cities": { + "get": { + "operationId": "RegionService_ListCountriesCities", "parameters": [ { - "in": "path", - "name": "zoneId", - "required": true, + "in": "query", + "name": "query", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "name", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "type", + "name": "pageSize", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ], @@ -23602,7 +18922,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListCountriesCitiesResponse" } } }, @@ -23610,27 +18930,39 @@ } }, "tags": [ - "DnsRecordService" + "RegionService" ] - }, - "get": { - "operationId": "DnsRecordService_ListDnsGeoRecords", + } + }, + "/v1/coupon-codes/{id}": { + "patch": { + "operationId": "CouponService_UpdateCouponCode", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "id", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CouponServiceUpdateCouponCodeBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDnsGeoRecordsResponse" + "$ref": "#/components/schemas/v1CouponCode" } } }, @@ -23638,37 +18970,64 @@ } }, "tags": [ - "DnsRecordService" + "CouponService" ] - }, - "put": { - "operationId": "DnsRecordService_UpsertDnsGeoRecord", + } + }, + "/v1/coupons": { + "get": { + "operationId": "CouponService_ListCoupons", "parameters": [ { - "in": "path", - "name": "zoneId", - "required": true, + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "assetType", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Only coupons whose validity ends within 14 days.", + "in": "query", + "name": "expiringSoon", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "search", + "required": false, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DnsRecordServiceUpsertDnsGeoRecordBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DnsGeoRecord" + "$ref": "#/components/schemas/v1ListCouponsResponse" } } }, @@ -23676,28 +19035,16 @@ } }, "tags": [ - "DnsRecordService" + "CouponService" ] - } - }, - "/v1/dns/zones/{zoneId}/geo-records:check": { + }, "post": { - "operationId": "DnsRecordService_CheckDnsGeoRecord", - "parameters": [ - { - "in": "path", - "name": "zoneId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "CouponService_CreateCoupon", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DnsRecordServiceCheckDnsGeoRecordBody" + "$ref": "#/components/schemas/v1CreateCouponRequest" } } }, @@ -23708,7 +19055,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CheckDnsGeoRecordResponse" + "$ref": "#/components/schemas/v1CreateCouponResponse" } } }, @@ -23716,17 +19063,17 @@ } }, "tags": [ - "DnsRecordService" + "CouponService" ] } }, - "/v1/dns/zones/{zoneId}/geo-records:get": { + "/v1/coupons/{couponId}/code-batches": { "get": { - "operationId": "DnsRecordService_GetDnsGeoRecord", + "operationId": "CouponService_ListCouponCodeBatches", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "couponId", "required": true, "schema": { "type": "string" @@ -23734,18 +19081,20 @@ }, { "in": "query", - "name": "name", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "type", + "name": "pageSize", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ], @@ -23754,7 +19103,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DnsGeoRecord" + "$ref": "#/components/schemas/v1ListCouponCodeBatchesResponse" } } }, @@ -23762,34 +19111,26 @@ } }, "tags": [ - "DnsRecordService" + "CouponService" ] } }, - "/v1/dns/zones/{zoneId}/records": { - "delete": { - "operationId": "DnsRecordService_DeleteDnsRecord", + "/v1/coupons/{couponId}/code-batches/{batchId}": { + "get": { + "operationId": "CouponService_GetCouponCodeBatch", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "couponId", "required": true, "schema": { "type": "string" } }, { - "in": "query", - "name": "name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "type", - "required": false, + "in": "path", + "name": "batchId", + "required": true, "schema": { "type": "string" } @@ -23800,7 +19141,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1CouponCodeBatch" } } }, @@ -23808,15 +19149,17 @@ } }, "tags": [ - "DnsRecordService" + "CouponService" ] - }, + } + }, + "/v1/coupons/{couponId}/codes": { "get": { - "operationId": "DnsRecordService_ListDnsRecords", + "operationId": "CouponService_ListCouponCodes", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "couponId", "required": true, "schema": { "type": "string" @@ -23824,83 +19167,53 @@ }, { "in": "query", - "name": "name", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "type", + "name": "pageSize", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "page", + "name": "batchId", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "pageSize", + "name": "campaign", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListDnsRecordsResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "DnsRecordService" - ] - }, - "put": { - "operationId": "DnsRecordService_UpsertDnsRecord", - "parameters": [ + }, { - "in": "path", - "name": "zoneId", - "required": true, + "in": "query", + "name": "channel", + "required": false, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DnsRecordServiceUpsertDnsRecordBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DnsRecord" + "$ref": "#/components/schemas/v1ListCouponCodesResponse" } } }, @@ -23908,17 +19221,15 @@ } }, "tags": [ - "DnsRecordService" + "CouponService" ] - } - }, - "/v1/dns/zones/{zoneId}/records:import": { + }, "post": { - "operationId": "DnsZoneService_ImportDnsRecords", + "operationId": "CouponService_CreateCouponCode", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "couponId", "required": true, "schema": { "type": "string" @@ -23929,7 +19240,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DnsZoneServiceImportDnsRecordsBody" + "$ref": "#/components/schemas/CouponServiceCreateCouponCodeBody" } } }, @@ -23940,7 +19251,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1CouponCode" } } }, @@ -23948,17 +19259,17 @@ } }, "tags": [ - "DnsZoneService" + "CouponService" ] } }, - "/v1/dns/zones/{zoneId}/scan": { + "/v1/coupons/{couponId}/codes:export": { "get": { - "operationId": "DnsZoneService_ScanDnsZoneRecords2", + "operationId": "CouponService_ExportCouponCodes", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "couponId", "required": true, "schema": { "type": "string" @@ -23966,7 +19277,7 @@ }, { "in": "query", - "name": "name", + "name": "batchId", "required": false, "schema": { "type": "string" @@ -23978,7 +19289,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ScanDnsZoneRecordsResponse" + "$ref": "#/components/schemas/v1ExportCouponCodesResponse" } } }, @@ -23986,36 +19297,28 @@ } }, "tags": [ - "DnsZoneService" + "CouponService" ] } }, - "/v1/domain": { - "get": { - "operationId": "DomainService_GetDomain", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetDomainResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "DomainService" - ] - }, + "/v1/coupons/{couponId}/codes:generate": { "post": { - "operationId": "DomainService_CreateDomain", + "operationId": "CouponService_GenerateCouponCodes", + "parameters": [ + { + "in": "path", + "name": "couponId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateDomainRequest" + "$ref": "#/components/schemas/CouponServiceGenerateCouponCodesBody" } } }, @@ -24026,7 +19329,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GenerateCouponCodesResponse" } } }, @@ -24034,21 +19337,47 @@ } }, "tags": [ - "DomainService" + "CouponService" ] } }, - "/v1/domain/verify/{id}": { + "/v1/coupons/{couponId}/redemptions": { "get": { - "operationId": "DomainService_VerifyDomain", + "operationId": "CouponService_ListCouponRedemptions", "parameters": [ { "in": "path", - "name": "id", + "name": "couponId", "required": true, "schema": { "type": "string" } + }, + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "assetType", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -24056,7 +19385,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListCouponRedemptionsResponse" } } }, @@ -24064,67 +19393,79 @@ } }, "tags": [ - "DomainService" + "CouponService" ] } }, - "/v1/domain/{id}": { - "delete": { - "operationId": "DomainService_DeleteDomain", + "/v1/coupons/{couponId}/report": { + "get": { + "operationId": "CouponService_GetCouponReport", "parameters": [ { "in": "path", - "name": "id", + "name": "couponId", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "DomainService" - ] - } - }, - "/v1/environment-variables": { - "get": { - "operationId": "EnvironmentVariableService_ListEnvironmentVariables", - "parameters": [ + }, { "in": "query", - "name": "page", + "name": "groupBy", "required": false, "schema": { - "format": "int32", - "type": "integer" + "default": "COUPON_REPORT_GROUP_BY_UNSPECIFIED", + "enum": [ + "COUPON_REPORT_GROUP_BY_UNSPECIFIED", + "COUPON_REPORT_GROUP_BY_CODE", + "COUPON_REPORT_GROUP_BY_CAMPAIGN", + "COUPON_REPORT_GROUP_BY_CHANNEL", + "COUPON_REPORT_GROUP_BY_ASSET_TYPE" + ], + "type": "string" } }, { + "description": "Narrow the report to one code, campaign, or channel.", "in": "query", - "name": "pageSize", + "name": "code", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "filterKey", + "name": "campaign", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "channel", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Applications created in [start_time, end_time); open ends are unbounded.", + "in": "query", + "name": "startTime", + "required": false, + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "in": "query", + "name": "endTime", "required": false, "schema": { + "format": "date-time", "type": "string" } } @@ -24134,35 +19475,38 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListEnvironmentVariablesResponse" + "$ref": "#/components/schemas/v1GetCouponReportResponse" } } }, "description": "A successful response." } }, + "summary": "Attribution and ROI figures, grouped by code, campaign, channel, or asset type.", "tags": [ - "EnvironmentVariableService" + "CouponService" ] - }, - "post": { - "operationId": "EnvironmentVariableService_CreateEnvironmentVariable", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1CreateEnvironmentVariableRequest" - } + } + }, + "/v1/coupons/{id}": { + "get": { + "operationId": "CouponService_GetCoupon", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateEnvironmentVariableResponse" + "$ref": "#/components/schemas/v1Coupon" } } }, @@ -24170,13 +19514,11 @@ } }, "tags": [ - "EnvironmentVariableService" + "CouponService" ] - } - }, - "/v1/environment-variables/{id}": { - "delete": { - "operationId": "EnvironmentVariableService_DeleteEnvironmentVariable", + }, + "patch": { + "operationId": "CouponService_UpdateCoupon", "parameters": [ { "in": "path", @@ -24187,12 +19529,22 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CouponServiceUpdateCouponBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1Coupon" } } }, @@ -24200,11 +19552,13 @@ } }, "tags": [ - "EnvironmentVariableService" + "CouponService" ] - }, - "get": { - "operationId": "EnvironmentVariableService_GetEnvironmentVariable", + } + }, + "/v1/coupons/{id}:deactivate": { + "post": { + "operationId": "CouponService_DeactivateCoupon", "parameters": [ { "in": "path", @@ -24215,24 +19569,37 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CouponServiceDeactivateCouponBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetEnvironmentVariableResponse" + "$ref": "#/components/schemas/v1Coupon" } } }, "description": "A successful response." } }, + "summary": "Blocks new attachments; customers keep the periods they were promised.", "tags": [ - "EnvironmentVariableService" + "CouponService" ] - }, - "patch": { - "operationId": "EnvironmentVariableService_UpdateEnvironmentVariable", + } + }, + "/v1/coupons/{id}:revoke": { + "post": { + "operationId": "CouponService_RevokeCoupon", "parameters": [ { "in": "path", @@ -24247,7 +19614,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnvironmentVariableServiceUpdateEnvironmentVariableBody" + "$ref": "#/components/schemas/CouponServiceRevokeCouponBody" } } }, @@ -24258,26 +19625,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1RevokeCouponResponse" } } }, "description": "A successful response." } }, + "summary": "Ends the discount for every customer from their next invoice.", "tags": [ - "EnvironmentVariableService" + "CouponService" ] } }, - "/v1/exchange-rate/convert": { + "/v1/coupons:preview": { "post": { - "operationId": "ExchangeRateService_ConvertCurrency", + "operationId": "CouponService_PreviewCoupon", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ConvertCurrencyRequest" + "$ref": "#/components/schemas/v1PreviewCouponRequest" } } }, @@ -24288,96 +19656,105 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ConvertCurrencyResponse" + "$ref": "#/components/schemas/v1PreviewCouponResponse" } } }, "description": "A successful response." } }, - "summary": "Convert an amount from USD to a target currency", + "summary": "Checks a code against a plan without attaching it.", "tags": [ - "ExchangeRateService" + "CouponService" ] } }, - "/v1/exchange-rate/currencies": { + "/v1/credits/balance": { "get": { - "operationId": "ExchangeRateService_ListSupportedCurrencies", + "operationId": "CreditService_GetCreditBalance", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListSupportedCurrenciesResponse" + "$ref": "#/components/schemas/v1GetCreditBalanceResponse" } } }, "description": "A successful response." } }, - "summary": "List all supported currency codes", "tags": [ - "ExchangeRateService" + "CreditService" ] } }, - "/v1/exchange-rate/rate/{currencyCode}": { + "/v1/credits/ledger": { "get": { - "operationId": "ExchangeRateService_GetExchangeRate", + "operationId": "CreditService_ListCreditLedgerEntries", "parameters": [ { - "description": "Currency code to get exchange rate for (from USD)", - "in": "path", - "name": "currencyCode", - "required": true, + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "entryType", + "required": false, + "schema": { + "default": "CREDIT_LEDGER_ENTRY_TYPE_UNSPECIFIED", + "enum": [ + "CREDIT_LEDGER_ENTRY_TYPE_UNSPECIFIED", + "CREDIT_LEDGER_ENTRY_TYPE_PURCHASE", + "CREDIT_LEDGER_ENTRY_TYPE_PROMOTIONAL", + "CREDIT_LEDGER_ENTRY_TYPE_PROVISION_RESERVE", + "CREDIT_LEDGER_ENTRY_TYPE_PROVISION_RELEASE", + "CREDIT_LEDGER_ENTRY_TYPE_USAGE_HOLD", + "CREDIT_LEDGER_ENTRY_TYPE_HOLD_RELEASE", + "CREDIT_LEDGER_ENTRY_TYPE_INVOICE_SETTLEMENT", + "CREDIT_LEDGER_ENTRY_TYPE_CHARGEBACK_REVERSAL", + "CREDIT_LEDGER_ENTRY_TYPE_EXPIRY", + "CREDIT_LEDGER_ENTRY_TYPE_FORFEITURE", + "CREDIT_LEDGER_ENTRY_TYPE_MANUAL_ADJUSTMENT" + ], + "type": "string" } } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetExchangeRateResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "Get the current exchange rate for a specific currency (from USD)", - "tags": [ - "ExchangeRateService" - ] - } - }, - "/v1/exchange-rate/rates": { - "get": { - "operationId": "ExchangeRateService_GetAllExchangeRates", + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetAllExchangeRatesResponse" + "$ref": "#/components/schemas/v1ListCreditLedgerEntriesResponse" } } }, "description": "A successful response." } }, - "summary": "Get all exchange rates at once (returns map of currency codes to rates)", "tags": [ - "ExchangeRateService" + "CreditService" ] } }, - "/v1/firewall/address-groups": { + "/v1/credits/promo": { "get": { - "operationId": "FirewallService_ListFirewallAddressGroups", + "operationId": "CreditService_ListPromoCreditGrants", "parameters": [ { "in": "query", @@ -24396,15 +19773,6 @@ "format": "int32", "type": "integer" } - }, - { - "description": "Note: family filter removed as address groups can now contain mixed IPv4/IPv6", - "in": "query", - "name": "name", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { @@ -24412,7 +19780,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListFirewallAddressGroupsResponse" + "$ref": "#/components/schemas/v1ListPromoCreditGrantsResponse" } } }, @@ -24420,16 +19788,18 @@ } }, "tags": [ - "FirewallService" + "CreditService" ] - }, + } + }, + "/v1/credits:purchase": { "post": { - "operationId": "FirewallService_CreateFirewallAddressGroup", + "operationId": "CreditService_PurchaseCredits", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateFirewallAddressGroupRequest" + "$ref": "#/components/schemas/v1PurchaseCreditsRequest" } } }, @@ -24440,7 +19810,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateFirewallAddressGroupResponse" + "$ref": "#/components/schemas/v1PurchaseCreditsResponse" } } }, @@ -24448,29 +19818,29 @@ } }, "tags": [ - "FirewallService" + "CreditService" ] } }, - "/v1/firewall/address-groups/{id}": { - "delete": { - "operationId": "FirewallService_DeleteFirewallAddressGroup", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" + "/v1/credits:redeemPromoCode": { + "post": { + "operationId": "CreditService_RedeemPromoCode", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1RedeemPromoCodeRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1RedeemPromoCodeResponse" } } }, @@ -24478,65 +19848,47 @@ } }, "tags": [ - "FirewallService" + "CreditService" ] - }, + } + }, + "/v1/datacenters": { "get": { - "operationId": "FirewallService_GetFirewallAddressGroup", + "operationId": "RegionService_ListDatacenters", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "query", + "required": false, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1FirewallAddressGroup" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "FirewallService" - ] - }, - "patch": { - "operationId": "FirewallService_UpdateFirewallAddressGroup", - "parameters": [ + }, { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FirewallServiceUpdateFirewallAddressGroupBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1FirewallAddressGroup" + "$ref": "#/components/schemas/v1ListDatacentersResponse" } } }, @@ -24544,62 +19896,41 @@ } }, "tags": [ - "FirewallService" + "RegionService" ] } }, - "/v1/firewall/rules/{id}": { - "delete": { - "operationId": "FirewallService_DeleteFirewallRule", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "/v1/distros": { + "get": { + "operationId": "MetadataService_ListDistros", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListDistrosResponse" } } }, "description": "A successful response." } }, + "summary": "ListDistros returns the guest OS catalog used by the virtual machine image picker.", "tags": [ - "FirewallService" + "MetadataService" ] - }, + } + }, + "/v1/dns/geo-locations": { "get": { - "operationId": "FirewallService_GetFirewallRule", + "operationId": "DnsRecordService_ListDnsGeoLocations", "parameters": [ { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Optional: Filter by direction. If not specified, returns the rule regardless of direction.", + "description": "Optional filter: continent, country, region, or group.", "in": "query", - "name": "direction", + "name": "kind", "required": false, "schema": { - "default": "FIREWALL_DIRECTION_UNSPECIFIED", - "enum": [ - "FIREWALL_DIRECTION_UNSPECIFIED", - "FIREWALL_DIRECTION_INGRESS", - "FIREWALL_DIRECTION_EGRESS" - ], "type": "string" } } @@ -24609,7 +19940,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1FirewallRuleResource" + "$ref": "#/components/schemas/v1ListDnsGeoLocationsResponse" } } }, @@ -24617,78 +19948,37 @@ } }, "tags": [ - "FirewallService" + "DnsRecordService" ] - }, - "patch": { - "operationId": "FirewallService_UpdateFirewallRule", + } + }, + "/v1/dns/scan": { + "get": { + "operationId": "DnsZoneService_ScanDnsZoneRecords", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "name", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FirewallServiceUpdateFirewallRuleBody" - } - } }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1FirewallRuleResource" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "FirewallService" - ] - } - }, - "/v1/firewall/rules/{id}/move": { - "post": { - "operationId": "FirewallService_MoveFirewallRule", - "parameters": [ { - "description": "ID of the rule to move", - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "zoneId", + "required": false, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FirewallServiceMoveFirewallRuleBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1FirewallRuleResource" + "$ref": "#/components/schemas/v1ScanDnsZoneRecordsResponse" } } }, @@ -24696,13 +19986,13 @@ } }, "tags": [ - "FirewallService" + "DnsZoneService" ] } }, - "/v1/firewall/rulesets": { + "/v1/dns/zones": { "get": { - "operationId": "FirewallService_ListFirewallRuleSets", + "operationId": "DnsZoneService_ListDnsZones", "parameters": [ { "in": "query", @@ -24721,29 +20011,6 @@ "format": "int32", "type": "integer" } - }, - { - "in": "query", - "name": "name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Optional: Filter by whether any virtual machine is attached to the ruleset.\n\n - FIREWALL_RULESET_ATTACHMENT_FILTER_UNSPECIFIED: All rulesets\n - FIREWALL_RULESET_ATTACHMENT_FILTER_ATTACHED: Rulesets with at least one VM attached\n - FIREWALL_RULESET_ATTACHMENT_FILTER_UNATTACHED: Rulesets with no VMs attached", - "in": "query", - "name": "filterAttachment", - "required": false, - "schema": { - "default": "FIREWALL_RULESET_ATTACHMENT_FILTER_UNSPECIFIED", - "enum": [ - "FIREWALL_RULESET_ATTACHMENT_FILTER_UNSPECIFIED", - "FIREWALL_RULESET_ATTACHMENT_FILTER_ATTACHED", - "FIREWALL_RULESET_ATTACHMENT_FILTER_UNATTACHED" - ], - "type": "string" - } } ], "responses": { @@ -24751,7 +20018,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListFirewallRuleSetsResponse" + "$ref": "#/components/schemas/v1ListDnsZonesResponse" } } }, @@ -24759,16 +20026,16 @@ } }, "tags": [ - "FirewallService" + "DnsZoneService" ] }, "post": { - "operationId": "FirewallService_CreateFirewallRuleSet", + "operationId": "DnsZoneService_CreateDnsZone", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateFirewallRuleSetRequest" + "$ref": "#/components/schemas/v1CreateDnsZoneRequest" } } }, @@ -24779,7 +20046,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateFirewallRuleSetResponse" + "$ref": "#/components/schemas/v1CreateDnsZoneResponse" } } }, @@ -24787,13 +20054,13 @@ } }, "tags": [ - "FirewallService" + "DnsZoneService" ] } }, - "/v1/firewall/rulesets/{id}": { + "/v1/dns/zones/{id}": { "delete": { - "operationId": "FirewallService_DeleteFirewallRuleSet", + "operationId": "DnsZoneService_DeleteDnsZone", "parameters": [ { "in": "path", @@ -24825,11 +20092,11 @@ } }, "tags": [ - "FirewallService" + "DnsZoneService" ] }, "get": { - "operationId": "FirewallService_GetFirewallRuleSet", + "operationId": "DnsZoneService_GetDnsZone", "parameters": [ { "in": "path", @@ -24845,7 +20112,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1FirewallRuleSet" + "$ref": "#/components/schemas/v1GetDnsZoneResponse" } } }, @@ -24853,11 +20120,13 @@ } }, "tags": [ - "FirewallService" + "DnsZoneService" ] - }, - "patch": { - "operationId": "FirewallService_UpdateFirewallRuleSet", + } + }, + "/v1/dns/zones/{id}/check-delegation": { + "post": { + "operationId": "DnsZoneService_CheckDnsZoneDelegation", "parameters": [ { "in": "path", @@ -24872,7 +20141,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FirewallServiceUpdateFirewallRuleSetBody" + "$ref": "#/components/schemas/DnsZoneServiceCheckDnsZoneDelegationBody" } } }, @@ -24883,7 +20152,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1FirewallRuleSet" + "$ref": "#/components/schemas/v1GetDnsZoneResponse" } } }, @@ -24891,54 +20160,21 @@ } }, "tags": [ - "FirewallService" + "DnsZoneService" ] } }, - "/v1/firewall/rulesets/{rulesetId}/rules": { + "/v1/dns/zones/{id}/export": { "get": { - "operationId": "FirewallService_ListFirewallRules", + "operationId": "DnsZoneService_ExportDnsZone", "parameters": [ { "in": "path", - "name": "rulesetId", + "name": "id", "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "description": "Optional: Filter by direction. If not specified, returns all rules regardless of direction.", - "in": "query", - "name": "direction", - "required": false, - "schema": { - "default": "FIREWALL_DIRECTION_UNSPECIFIED", - "enum": [ - "FIREWALL_DIRECTION_UNSPECIFIED", - "FIREWALL_DIRECTION_INGRESS", - "FIREWALL_DIRECTION_EGRESS" - ], - "type": "string" - } } ], "responses": { @@ -24946,7 +20182,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListFirewallRulesResponse" + "$ref": "#/components/schemas/v1ExportDnsZoneResponse" } } }, @@ -24954,15 +20190,17 @@ } }, "tags": [ - "FirewallService" + "DnsZoneService" ] - }, + } + }, + "/v1/dns/zones/{id}/import": { "post": { - "operationId": "FirewallService_CreateFirewallRule", + "operationId": "DnsZoneService_ImportDnsZone", "parameters": [ { "in": "path", - "name": "rulesetId", + "name": "id", "required": true, "schema": { "type": "string" @@ -24973,7 +20211,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FirewallServiceCreateFirewallRuleBody" + "$ref": "#/components/schemas/DnsZoneServiceImportDnsZoneBody" } } }, @@ -24984,7 +20222,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateFirewallRuleResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -24992,18 +20230,18 @@ } }, "tags": [ - "FirewallService" + "DnsZoneService" ] } }, - "/v1/game-server-templates": { + "/v1/dns/zones/{zoneId}/dnssec": { "get": { - "operationId": "GameServerTemplateService_ListGameServerTemplates", + "operationId": "DnssecService_GetDnssec", "parameters": [ { - "in": "query", - "name": "platformId", - "required": false, + "in": "path", + "name": "zoneId", + "required": true, "schema": { "type": "string" } @@ -25014,7 +20252,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListGameServerTemplatesResponse" + "$ref": "#/components/schemas/v1DnssecInfo" } } }, @@ -25022,17 +20260,17 @@ } }, "tags": [ - "GameServerTemplateService" + "DnssecService" ] } }, - "/v1/game-server-templates/{id}": { - "patch": { - "operationId": "GameServerTemplateService_UpdateGameServerTemplate", + "/v1/dns/zones/{zoneId}/dnssec/check-ds": { + "post": { + "operationId": "DnssecService_CheckDnssecDs", "parameters": [ { "in": "path", - "name": "id", + "name": "zoneId", "required": true, "schema": { "type": "string" @@ -25043,7 +20281,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerTemplateServiceUpdateGameServerTemplateBody" + "$ref": "#/components/schemas/DnssecServiceCheckDnssecDsBody" } } }, @@ -25054,7 +20292,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerTemplate" + "$ref": "#/components/schemas/v1DnssecInfo" } } }, @@ -25062,17 +20300,17 @@ } }, "tags": [ - "GameServerTemplateService" + "DnssecService" ] } }, - "/v1/game-server-templates/{id}:duplicate": { + "/v1/dns/zones/{zoneId}/dnssec/disable": { "post": { - "operationId": "GameServerTemplateService_DuplicateGameServerTemplate", + "operationId": "DnssecService_DisableDnssec", "parameters": [ { "in": "path", - "name": "id", + "name": "zoneId", "required": true, "schema": { "type": "string" @@ -25083,109 +20321,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerTemplateServiceDuplicateGameServerTemplateBody" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GameServerTemplate" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "GameServerTemplateService" - ] - } - }, - "/v1/game-server-templates:import": { - "post": { - "operationId": "GameServerTemplateService_ImportGameServerTemplate", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ImportGameServerTemplateRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GameServerTemplate" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "GameServerTemplateService" - ] - } - }, - "/v1/game-server-templates:nest-ordering": { - "post": { - "operationId": "GameServerTemplateService_SetGameNestOrdering", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SetGameNestOrderingRequest" + "$ref": "#/components/schemas/DnssecServiceDisableDnssecBody" } } }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "GameServerTemplateService" - ] - } - }, - "/v1/game-servers": { - "get": { - "operationId": "GameServerService_ListGameServers", - "parameters": [ - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListGameServersResponse" + "$ref": "#/components/schemas/v1DnssecInfo" } } }, @@ -25193,16 +20340,28 @@ } }, "tags": [ - "GameServerService" + "DnssecService" ] - }, + } + }, + "/v1/dns/zones/{zoneId}/dnssec/enable": { "post": { - "operationId": "GameServerService_CreateGameServer", + "operationId": "DnssecService_EnableDnssec", + "parameters": [ + { + "in": "path", + "name": "zoneId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateGameServerRequest" + "$ref": "#/components/schemas/DnssecServiceEnableDnssecBody" } } }, @@ -25213,7 +20372,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServer" + "$ref": "#/components/schemas/v1DnssecInfo" } } }, @@ -25221,21 +20380,37 @@ } }, "tags": [ - "GameServerService" + "DnssecService" ] } }, - "/v1/game-servers/{id}": { + "/v1/dns/zones/{zoneId}/geo-records": { "delete": { - "operationId": "GameServerService_DeleteGameServer", + "operationId": "DnsRecordService_DeleteDnsGeoRecord", "parameters": [ { "in": "path", - "name": "id", + "name": "zoneId", "required": true, "schema": { "type": "string" } + }, + { + "in": "query", + "name": "name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "type", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -25251,15 +20426,15 @@ } }, "tags": [ - "GameServerService" + "DnsRecordService" ] }, "get": { - "operationId": "GameServerService_GetGameServer", + "operationId": "DnsRecordService_ListDnsGeoRecords", "parameters": [ { "in": "path", - "name": "id", + "name": "zoneId", "required": true, "schema": { "type": "string" @@ -25271,7 +20446,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServer" + "$ref": "#/components/schemas/v1ListDnsGeoRecordsResponse" } } }, @@ -25279,29 +20454,37 @@ } }, "tags": [ - "GameServerService" + "DnsRecordService" ] - } - }, - "/v1/game-servers/{id}/allocations": { - "get": { - "operationId": "GameServerService_ListAllocations", + }, + "put": { + "operationId": "DnsRecordService_UpsertDnsGeoRecord", "parameters": [ { "in": "path", - "name": "id", + "name": "zoneId", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DnsRecordServiceUpsertDnsGeoRecordBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListGameServerAllocationsResponse" + "$ref": "#/components/schemas/v1DnsGeoRecord" } } }, @@ -25309,15 +20492,17 @@ } }, "tags": [ - "GameServerService" + "DnsRecordService" ] - }, + } + }, + "/v1/dns/zones/{zoneId}/geo-records:check": { "post": { - "operationId": "GameServerService_CreateAllocation", + "operationId": "DnsRecordService_CheckDnsGeoRecord", "parameters": [ { "in": "path", - "name": "id", + "name": "zoneId", "required": true, "schema": { "type": "string" @@ -25328,7 +20513,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceCreateAllocationBody" + "$ref": "#/components/schemas/DnsRecordServiceCheckDnsGeoRecordBody" } } }, @@ -25339,7 +20524,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerAllocation" + "$ref": "#/components/schemas/v1CheckDnsGeoRecordResponse" } } }, @@ -25347,29 +20532,82 @@ } }, "tags": [ - "GameServerService" + "DnsRecordService" ] } }, - "/v1/game-servers/{id}/allocations/{allocationId}": { - "delete": { - "operationId": "GameServerService_DeleteAllocation", + "/v1/dns/zones/{zoneId}/geo-records:get": { + "get": { + "operationId": "DnsRecordService_GetDnsGeoRecord", "parameters": [ { "in": "path", - "name": "id", + "name": "zoneId", "required": true, "schema": { "type": "string" } }, + { + "in": "query", + "name": "name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "type", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1DnsGeoRecord" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "DnsRecordService" + ] + } + }, + "/v1/dns/zones/{zoneId}/records": { + "delete": { + "operationId": "DnsRecordService_DeleteDnsRecord", + "parameters": [ { "in": "path", - "name": "allocationId", + "name": "zoneId", "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" + } + }, + { + "in": "query", + "name": "name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "type", + "required": false, + "schema": { + "type": "string" } } ], @@ -25386,35 +20624,88 @@ } }, "tags": [ - "GameServerService" + "DnsRecordService" ] }, - "post": { - "operationId": "GameServerService_UpdateAllocation", + "get": { + "operationId": "DnsRecordService_ListDnsRecords", "parameters": [ { "in": "path", - "name": "id", + "name": "zoneId", "required": true, "schema": { "type": "string" } }, { - "in": "path", - "name": "allocationId", - "required": true, + "in": "query", + "name": "name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "type", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, "schema": { "format": "int32", "type": "integer" } } ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ListDnsRecordsResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "DnsRecordService" + ] + }, + "put": { + "operationId": "DnsRecordService_UpsertDnsRecord", + "parameters": [ + { + "in": "path", + "name": "zoneId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceUpdateAllocationBody" + "$ref": "#/components/schemas/DnsRecordServiceUpsertDnsRecordBody" } } }, @@ -25425,7 +20716,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerAllocation" + "$ref": "#/components/schemas/v1DnsRecord" } } }, @@ -25433,37 +20724,28 @@ } }, "tags": [ - "GameServerService" + "DnsRecordService" ] } }, - "/v1/game-servers/{id}/allocations/{allocationId}:primary": { + "/v1/dns/zones/{zoneId}/records:import": { "post": { - "operationId": "GameServerService_SetPrimaryAllocation", + "operationId": "DnsZoneService_ImportDnsRecords", "parameters": [ { "in": "path", - "name": "id", + "name": "zoneId", "required": true, "schema": { "type": "string" } - }, - { - "in": "path", - "name": "allocationId", - "required": true, - "schema": { - "format": "int32", - "type": "integer" - } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceSetPrimaryAllocationBody" + "$ref": "#/components/schemas/DnsZoneServiceImportDnsRecordsBody" } } }, @@ -25482,21 +20764,29 @@ } }, "tags": [ - "GameServerService" + "DnsZoneService" ] } }, - "/v1/game-servers/{id}/backups": { + "/v1/dns/zones/{zoneId}/scan": { "get": { - "operationId": "GameServerService_ListBackups", + "operationId": "DnsZoneService_ScanDnsZoneRecords2", "parameters": [ { "in": "path", - "name": "id", + "name": "zoneId", "required": true, "schema": { "type": "string" } + }, + { + "in": "query", + "name": "name", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -25504,7 +20794,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListGameServerBackupsResponse" + "$ref": "#/components/schemas/v1ScanDnsZoneRecordsResponse" } } }, @@ -25512,26 +20802,36 @@ } }, "tags": [ - "GameServerService" + "DnsZoneService" + ] + } + }, + "/v1/domain": { + "get": { + "operationId": "DomainService_GetDomain", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1GetDomainResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "DomainService" ] }, "post": { - "operationId": "GameServerService_CreateBackup", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "DomainService_CreateDomain", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceCreateBackupBody" + "$ref": "#/components/schemas/v1CreateDomainRequest" } } }, @@ -25542,7 +20842,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerBackup" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -25550,13 +20850,13 @@ } }, "tags": [ - "GameServerService" + "DomainService" ] } }, - "/v1/game-servers/{id}/backups/{backupUuid}": { - "delete": { - "operationId": "GameServerService_DeleteBackup", + "/v1/domain/verify/{id}": { + "get": { + "operationId": "DomainService_VerifyDomain", "parameters": [ { "in": "path", @@ -25565,23 +20865,6 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "backupUuid", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Restore only. When true, the panel deletes every file before extracting the backup.", - "in": "query", - "name": "truncate", - "required": false, - "schema": { - "type": "boolean" - } } ], "responses": { @@ -25597,13 +20880,13 @@ } }, "tags": [ - "GameServerService" + "DomainService" ] } }, - "/v1/game-servers/{id}/backups/{backupUuid}:lock": { - "post": { - "operationId": "GameServerService_LockBackup", + "/v1/domain/{id}": { + "delete": { + "operationId": "DomainService_DeleteDomain", "parameters": [ { "in": "path", @@ -25612,26 +20895,8 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "backupUuid", - "required": true, - "schema": { - "type": "string" - } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerServiceLockBackupBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -25645,36 +20910,64 @@ } }, "tags": [ - "GameServerService" + "DomainService" ] } }, - "/v1/game-servers/{id}/backups/{backupUuid}:restore": { - "post": { - "operationId": "GameServerService_RestoreBackup", + "/v1/environment-variables": { + "get": { + "operationId": "EnvironmentVariableService_ListEnvironmentVariables", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { - "in": "path", - "name": "backupUuid", - "required": true, + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "filterKey", + "required": false, "schema": { "type": "string" } } ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ListEnvironmentVariablesResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "EnvironmentVariableService" + ] + }, + "post": { + "operationId": "EnvironmentVariableService_CreateEnvironmentVariable", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerServiceRestoreBackupBody" + "$ref": "#/components/schemas/v1CreateEnvironmentVariableRequest" } } }, @@ -25685,7 +20978,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1CreateEnvironmentVariableResponse" } } }, @@ -25693,13 +20986,13 @@ } }, "tags": [ - "GameServerService" + "EnvironmentVariableService" ] } }, - "/v1/game-servers/{id}/databases": { - "get": { - "operationId": "GameServerService_ListDatabases", + "/v1/environment-variables/{id}": { + "delete": { + "operationId": "EnvironmentVariableService_DeleteEnvironmentVariable", "parameters": [ { "in": "path", @@ -25715,7 +21008,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDatabasesResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -25723,11 +21016,11 @@ } }, "tags": [ - "GameServerService" + "EnvironmentVariableService" ] }, - "post": { - "operationId": "GameServerService_CreateDatabase", + "get": { + "operationId": "EnvironmentVariableService_GetEnvironmentVariable", "parameters": [ { "in": "path", @@ -25738,22 +21031,12 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerServiceCreateDatabaseBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerDatabase" + "$ref": "#/components/schemas/v1GetEnvironmentVariableResponse" } } }, @@ -25761,13 +21044,11 @@ } }, "tags": [ - "GameServerService" + "EnvironmentVariableService" ] - } - }, - "/v1/game-servers/{id}/databases/{databaseId}": { - "delete": { - "operationId": "GameServerService_DeleteDatabase", + }, + "patch": { + "operationId": "EnvironmentVariableService_UpdateEnvironmentVariable", "parameters": [ { "in": "path", @@ -25776,16 +21057,18 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "databaseId", - "required": true, - "schema": { - "type": "string" - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnvironmentVariableServiceUpdateEnvironmentVariableBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { @@ -25799,36 +21082,18 @@ } }, "tags": [ - "GameServerService" + "EnvironmentVariableService" ] } }, - "/v1/game-servers/{id}/databases/{databaseId}:rotate": { + "/v1/exchange-rate/convert": { "post": { - "operationId": "GameServerService_RotateDatabasePassword", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "databaseId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "ExchangeRateService_ConvertCurrency", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceRotateDatabasePasswordBody" + "$ref": "#/components/schemas/v1ConvertCurrencyRequest" } } }, @@ -25839,73 +21104,119 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerDatabase" + "$ref": "#/components/schemas/v1ConvertCurrencyResponse" + } + } + }, + "description": "A successful response." + } + }, + "summary": "Convert an amount from USD to a target currency", + "tags": [ + "ExchangeRateService" + ] + } + }, + "/v1/exchange-rate/currencies": { + "get": { + "operationId": "ExchangeRateService_ListSupportedCurrencies", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ListSupportedCurrenciesResponse" } } }, "description": "A successful response." } }, + "summary": "List all supported currency codes", "tags": [ - "GameServerService" + "ExchangeRateService" ] } }, - "/v1/game-servers/{id}/docker-image": { - "put": { - "operationId": "GameServerService_UpdateDockerImage", + "/v1/exchange-rate/rate/{currencyCode}": { + "get": { + "operationId": "ExchangeRateService_GetExchangeRate", "parameters": [ { + "description": "Currency code to get exchange rate for (from USD)", "in": "path", - "name": "id", + "name": "currencyCode", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerServiceUpdateDockerImageBody" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1GetExchangeRateResponse" + } } - } - }, - "required": true + }, + "description": "A successful response." + } }, + "summary": "Get the current exchange rate for a specific currency (from USD)", + "tags": [ + "ExchangeRateService" + ] + } + }, + "/v1/exchange-rate/rates": { + "get": { + "operationId": "ExchangeRateService_GetAllExchangeRates", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetAllExchangeRatesResponse" } } }, "description": "A successful response." } }, + "summary": "Get all exchange rates at once (returns map of currency codes to rates)", "tags": [ - "GameServerService" + "ExchangeRateService" ] } }, - "/v1/game-servers/{id}/files": { + "/v1/firewall/address-groups": { "get": { - "operationId": "GameServerService_ListFiles", + "operationId": "FirewallService_ListFirewallAddressGroups", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "directory", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "description": "Note: family filter removed as address groups can now contain mixed IPv4/IPv6", + "in": "query", + "name": "name", "required": false, "schema": { "type": "string" @@ -25917,7 +21228,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListFilesResponse" + "$ref": "#/components/schemas/v1ListFirewallAddressGroupsResponse" } } }, @@ -25925,26 +21236,16 @@ } }, "tags": [ - "GameServerService" + "FirewallService" ] }, - "put": { - "operationId": "GameServerService_WriteFile", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "post": { + "operationId": "FirewallService_CreateFirewallAddressGroup", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceWriteFileBody" + "$ref": "#/components/schemas/v1CreateFirewallAddressGroupRequest" } } }, @@ -25955,7 +21256,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1CreateFirewallAddressGroupResponse" } } }, @@ -25963,13 +21264,13 @@ } }, "tags": [ - "GameServerService" + "FirewallService" ] } }, - "/v1/game-servers/{id}/files/content": { - "get": { - "operationId": "GameServerService_ReadFile", + "/v1/firewall/address-groups/{id}": { + "delete": { + "operationId": "FirewallService_DeleteFirewallAddressGroup", "parameters": [ { "in": "path", @@ -25978,14 +21279,6 @@ "schema": { "type": "string" } - }, - { - "in": "query", - "name": "path", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { @@ -25993,7 +21286,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ReadFileResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -26001,13 +21294,11 @@ } }, "tags": [ - "GameServerService" + "FirewallService" ] - } - }, - "/v1/game-servers/{id}/files/download": { + }, "get": { - "operationId": "GameServerService_DownloadFile", + "operationId": "FirewallService_GetFirewallAddressGroup", "parameters": [ { "in": "path", @@ -26016,14 +21307,6 @@ "schema": { "type": "string" } - }, - { - "in": "query", - "name": "path", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { @@ -26031,7 +21314,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DownloadFileResponse" + "$ref": "#/components/schemas/v1FirewallAddressGroup" } } }, @@ -26039,13 +21322,11 @@ } }, "tags": [ - "GameServerService" + "FirewallService" ] - } - }, - "/v1/game-servers/{id}/files:archive": { - "post": { - "operationId": "GameServerService_ArchiveFiles", + }, + "patch": { + "operationId": "FirewallService_UpdateFirewallAddressGroup", "parameters": [ { "in": "path", @@ -26060,7 +21341,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceArchiveFilesBody" + "$ref": "#/components/schemas/FirewallServiceUpdateFirewallAddressGroupBody" } } }, @@ -26071,7 +21352,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ArchiveFilesResponse" + "$ref": "#/components/schemas/v1FirewallAddressGroup" } } }, @@ -26079,13 +21360,13 @@ } }, "tags": [ - "GameServerService" + "FirewallService" ] } }, - "/v1/game-servers/{id}/files:copy": { - "post": { - "operationId": "GameServerService_CopyFile", + "/v1/firewall/rules/{id}": { + "delete": { + "operationId": "FirewallService_DeleteFirewallRule", "parameters": [ { "in": "path", @@ -26096,16 +21377,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerServiceCopyFileBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -26119,13 +21390,11 @@ } }, "tags": [ - "GameServerService" + "FirewallService" ] - } - }, - "/v1/game-servers/{id}/files:delete": { - "post": { - "operationId": "GameServerService_DeleteFiles", + }, + "get": { + "operationId": "FirewallService_GetFirewallRule", "parameters": [ { "in": "path", @@ -26134,24 +21403,29 @@ "schema": { "type": "string" } + }, + { + "description": "Optional: Filter by direction. If not specified, returns the rule regardless of direction.", + "in": "query", + "name": "direction", + "required": false, + "schema": { + "default": "FIREWALL_DIRECTION_UNSPECIFIED", + "enum": [ + "FIREWALL_DIRECTION_UNSPECIFIED", + "FIREWALL_DIRECTION_INGRESS", + "FIREWALL_DIRECTION_EGRESS" + ], + "type": "string" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerServiceDeleteFilesBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1FirewallRuleResource" } } }, @@ -26159,13 +21433,11 @@ } }, "tags": [ - "GameServerService" + "FirewallService" ] - } - }, - "/v1/game-servers/{id}/files:folder": { - "post": { - "operationId": "GameServerService_CreateFolder", + }, + "patch": { + "operationId": "FirewallService_UpdateFirewallRule", "parameters": [ { "in": "path", @@ -26180,7 +21452,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceCreateFolderBody" + "$ref": "#/components/schemas/FirewallServiceUpdateFirewallRuleBody" } } }, @@ -26191,7 +21463,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1FirewallRuleResource" } } }, @@ -26199,15 +21471,16 @@ } }, "tags": [ - "GameServerService" + "FirewallService" ] } }, - "/v1/game-servers/{id}/files:rename": { + "/v1/firewall/rules/{id}/move": { "post": { - "operationId": "GameServerService_RenameFile", + "operationId": "FirewallService_MoveFirewallRule", "parameters": [ { + "description": "ID of the rule to move", "in": "path", "name": "id", "required": true, @@ -26220,7 +21493,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceRenameFileBody" + "$ref": "#/components/schemas/FirewallServiceMoveFirewallRuleBody" } } }, @@ -26231,7 +21504,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1FirewallRuleResource" } } }, @@ -26239,28 +21512,79 @@ } }, "tags": [ - "GameServerService" + "FirewallService" ] } }, - "/v1/game-servers/{id}/files:upload": { - "post": { - "operationId": "GameServerService_UploadFile", + "/v1/firewall/rulesets": { + "get": { + "operationId": "FirewallService_ListFirewallRuleSets", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Optional: Filter by whether any virtual machine is attached to the ruleset.\n\n - FIREWALL_RULESET_ATTACHMENT_FILTER_UNSPECIFIED: All rulesets\n - FIREWALL_RULESET_ATTACHMENT_FILTER_ATTACHED: Rulesets with at least one VM attached\n - FIREWALL_RULESET_ATTACHMENT_FILTER_UNATTACHED: Rulesets with no VMs attached", + "in": "query", + "name": "filterAttachment", + "required": false, "schema": { + "default": "FIREWALL_RULESET_ATTACHMENT_FILTER_UNSPECIFIED", + "enum": [ + "FIREWALL_RULESET_ATTACHMENT_FILTER_UNSPECIFIED", + "FIREWALL_RULESET_ATTACHMENT_FILTER_ATTACHED", + "FIREWALL_RULESET_ATTACHMENT_FILTER_UNATTACHED" + ], "type": "string" } } ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ListFirewallRuleSetsResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "FirewallService" + ] + }, + "post": { + "operationId": "FirewallService_CreateFirewallRuleSet", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceUploadFileBody" + "$ref": "#/components/schemas/v1CreateFirewallRuleSetRequest" } } }, @@ -26271,7 +21595,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1CreateFirewallRuleSetResponse" } } }, @@ -26279,13 +21603,13 @@ } }, "tags": [ - "GameServerService" + "FirewallService" ] } }, - "/v1/game-servers/{id}/resources": { - "get": { - "operationId": "GameServerService_GetGameServerResources", + "/v1/firewall/rulesets/{id}": { + "delete": { + "operationId": "FirewallService_DeleteFirewallRuleSet", "parameters": [ { "in": "path", @@ -26294,6 +21618,14 @@ "schema": { "type": "string" } + }, + { + "in": "query", + "name": "force", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -26301,7 +21633,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerResources" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -26309,13 +21641,11 @@ } }, "tags": [ - "GameServerService" + "FirewallService" ] - } - }, - "/v1/game-servers/{id}/schedules": { + }, "get": { - "operationId": "GameServerService_ListSchedules", + "operationId": "FirewallService_GetFirewallRuleSet", "parameters": [ { "in": "path", @@ -26331,7 +21661,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListSchedulesResponse" + "$ref": "#/components/schemas/v1FirewallRuleSet" } } }, @@ -26339,11 +21669,11 @@ } }, "tags": [ - "GameServerService" + "FirewallService" ] }, - "post": { - "operationId": "GameServerService_CreateSchedule", + "patch": { + "operationId": "FirewallService_UpdateFirewallRuleSet", "parameters": [ { "in": "path", @@ -26358,7 +21688,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceCreateScheduleBody" + "$ref": "#/components/schemas/FirewallServiceUpdateFirewallRuleSetBody" } } }, @@ -26369,7 +21699,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerSchedule" + "$ref": "#/components/schemas/v1FirewallRuleSet" } } }, @@ -26377,27 +21707,52 @@ } }, "tags": [ - "GameServerService" + "FirewallService" ] } }, - "/v1/game-servers/{id}/schedules/{scheduleId}": { - "delete": { - "operationId": "GameServerService_DeleteSchedule", + "/v1/firewall/rulesets/{rulesetId}/rules": { + "get": { + "operationId": "FirewallService_ListFirewallRules", "parameters": [ { "in": "path", - "name": "id", + "name": "rulesetId", "required": true, "schema": { "type": "string" } }, { - "in": "path", - "name": "scheduleId", - "required": true, + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "description": "Optional: Filter by direction. If not specified, returns all rules regardless of direction.", + "in": "query", + "name": "direction", + "required": false, "schema": { + "default": "FIREWALL_DIRECTION_UNSPECIFIED", + "enum": [ + "FIREWALL_DIRECTION_UNSPECIFIED", + "FIREWALL_DIRECTION_INGRESS", + "FIREWALL_DIRECTION_EGRESS" + ], "type": "string" } } @@ -26407,7 +21762,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListFirewallRulesResponse" } } }, @@ -26415,23 +21770,15 @@ } }, "tags": [ - "GameServerService" + "FirewallService" ] }, "post": { - "operationId": "GameServerService_UpdateSchedule", + "operationId": "FirewallService_CreateFirewallRule", "parameters": [ { "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "scheduleId", + "name": "rulesetId", "required": true, "schema": { "type": "string" @@ -26442,7 +21789,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceUpdateScheduleBody" + "$ref": "#/components/schemas/FirewallServiceCreateFirewallRuleBody" } } }, @@ -26453,7 +21800,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerSchedule" + "$ref": "#/components/schemas/v1CreateFirewallRuleResponse" } } }, @@ -26461,25 +21808,47 @@ } }, "tags": [ - "GameServerService" + "FirewallService" ] } }, - "/v1/game-servers/{id}/schedules/{scheduleId}/tasks": { - "post": { - "operationId": "GameServerService_CreateScheduleTask", + "/v1/game-server-templates": { + "get": { + "operationId": "GameServerTemplateService_ListGameServerTemplates", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "platformId", + "required": false, "schema": { "type": "string" } - }, + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ListGameServerTemplatesResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "GameServerTemplateService" + ] + } + }, + "/v1/game-server-templates/{id}": { + "patch": { + "operationId": "GameServerTemplateService_UpdateGameServerTemplate", + "parameters": [ { "in": "path", - "name": "scheduleId", + "name": "id", "required": true, "schema": { "type": "string" @@ -26490,7 +21859,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceCreateScheduleTaskBody" + "$ref": "#/components/schemas/GameServerTemplateServiceUpdateGameServerTemplateBody" } } }, @@ -26501,7 +21870,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GameServerTemplate" } } }, @@ -26509,13 +21878,13 @@ } }, "tags": [ - "GameServerService" + "GameServerTemplateService" ] } }, - "/v1/game-servers/{id}/schedules/{scheduleId}/tasks/{taskId}": { - "delete": { - "operationId": "GameServerService_DeleteScheduleTask", + "/v1/game-server-templates/{id}:duplicate": { + "post": { + "operationId": "GameServerTemplateService_DuplicateGameServerTemplate", "parameters": [ { "in": "path", @@ -26524,30 +21893,24 @@ "schema": { "type": "string" } - }, - { - "in": "path", - "name": "scheduleId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "taskId", - "required": true, - "schema": { - "type": "string" - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerTemplateServiceDuplicateGameServerTemplateBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GameServerTemplate" } } }, @@ -26555,42 +21918,18 @@ } }, "tags": [ - "GameServerService" + "GameServerTemplateService" ] - }, - "post": { - "operationId": "GameServerService_UpdateScheduleTask", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "scheduleId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "taskId", - "required": true, - "schema": { - "type": "string" - } - } - ], + } + }, + "/v1/game-server-templates:import": { + "post": { + "operationId": "GameServerTemplateService_ImportGameServerTemplate", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceUpdateScheduleTaskBody" + "$ref": "#/components/schemas/v1ImportGameServerTemplateRequest" } } }, @@ -26601,7 +21940,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GameServerTemplate" } } }, @@ -26609,36 +21948,18 @@ } }, "tags": [ - "GameServerService" + "GameServerTemplateService" ] } }, - "/v1/game-servers/{id}/schedules/{scheduleId}:execute": { + "/v1/game-server-templates:nest-ordering": { "post": { - "operationId": "GameServerService_ExecuteSchedule", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "scheduleId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "GameServerTemplateService_SetGameNestOrdering", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceExecuteScheduleBody" + "$ref": "#/components/schemas/v1SetGameNestOrderingRequest" } } }, @@ -26657,20 +21978,21 @@ } }, "tags": [ - "GameServerService" + "GameServerTemplateService" ] } }, - "/v1/game-servers/{id}/startup": { + "/v1/game-servers": { "get": { - "operationId": "GameServerService_GetStartup", + "operationId": "GameServerService_ListGameServers", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "pageSize", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ], @@ -26679,7 +22001,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetStartupResponse" + "$ref": "#/components/schemas/v1ListGameServersResponse" } } }, @@ -26690,23 +22012,13 @@ "GameServerService" ] }, - "put": { - "operationId": "GameServerService_UpdateStartupVariable", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "post": { + "operationId": "GameServerService_CreateGameServer", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceUpdateStartupVariableBody" + "$ref": "#/components/schemas/v1CreateGameServerRequest" } } }, @@ -26717,7 +22029,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GameServer" } } }, @@ -26729,9 +22041,9 @@ ] } }, - "/v1/game-servers/{id}:changeGame": { - "post": { - "operationId": "GameServerService_ChangeGameServerGame", + "/v1/game-servers/{id}": { + "delete": { + "operationId": "GameServerService_DeleteGameServer", "parameters": [ { "in": "path", @@ -26742,22 +22054,12 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerServiceChangeGameServerGameBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServer" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -26767,11 +22069,9 @@ "tags": [ "GameServerService" ] - } - }, - "/v1/game-servers/{id}:console": { - "post": { - "operationId": "GameServerService_OpenConsole", + }, + "get": { + "operationId": "GameServerService_GetGameServer", "parameters": [ { "in": "path", @@ -26782,22 +22082,12 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerServiceOpenConsoleBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1OpenConsoleResponse" + "$ref": "#/components/schemas/v1GameServer" } } }, @@ -26809,9 +22099,9 @@ ] } }, - "/v1/game-servers/{id}:power": { - "post": { - "operationId": "GameServerService_PowerGameServer", + "/v1/game-servers/{id}/allocations": { + "get": { + "operationId": "GameServerService_ListAllocations", "parameters": [ { "in": "path", @@ -26822,22 +22112,12 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerServicePowerGameServerBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServer" + "$ref": "#/components/schemas/v1ListGameServerAllocationsResponse" } } }, @@ -26847,11 +22127,9 @@ "tags": [ "GameServerService" ] - } - }, - "/v1/game-servers/{id}:reinstall": { + }, "post": { - "operationId": "GameServerService_ReinstallGameServer", + "operationId": "GameServerService_CreateAllocation", "parameters": [ { "in": "path", @@ -26866,7 +22144,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceReinstallGameServerBody" + "$ref": "#/components/schemas/GameServerServiceCreateAllocationBody" } } }, @@ -26877,7 +22155,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServer" + "$ref": "#/components/schemas/v1GameServerAllocation" } } }, @@ -26889,9 +22167,9 @@ ] } }, - "/v1/game-servers/{id}:rename": { - "post": { - "operationId": "GameServerService_RenameGameServer", + "/v1/game-servers/{id}/allocations/{allocationId}": { + "delete": { + "operationId": "GameServerService_DeleteAllocation", "parameters": [ { "in": "path", @@ -26900,24 +22178,23 @@ "schema": { "type": "string" } + }, + { + "in": "path", + "name": "allocationId", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerServiceRenameGameServerBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServer" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -26927,27 +22204,44 @@ "tags": [ "GameServerService" ] - } - }, - "/v1/game-servers:order-games": { - "get": { - "operationId": "GameServerService_ListOrderGames", + }, + "post": { + "operationId": "GameServerService_UpdateAllocation", "parameters": [ { - "in": "query", - "name": "planId", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } + }, + { + "in": "path", + "name": "allocationId", + "required": true, + "schema": { + "format": "int32", + "type": "integer" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceUpdateAllocationBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListOrderGamesResponse" + "$ref": "#/components/schemas/v1GameServerAllocation" } } }, @@ -26959,84 +22253,33 @@ ] } }, - "/v1/groups": { - "get": { - "operationId": "GroupService_ListGroups", + "/v1/game-servers/{id}/allocations/{allocationId}:primary": { + "post": { + "operationId": "GameServerService_SetPrimaryAllocation", "parameters": [ { - "in": "query", - "name": "page", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { - "in": "query", - "name": "pageSize", - "required": false, + "in": "path", + "name": "allocationId", + "required": true, "schema": { "format": "int32", "type": "integer" } - }, - { - "in": "query", - "name": "filterName", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "filterStatus", - "required": false, - "schema": { - "default": "STATUS_UNSPECIFIED", - "enum": [ - "STATUS_UNSPECIFIED", - "STATUS_ACTIVE", - "STATUS_INACTIVE", - "STATUS_BANNED", - "STATUS_SOFT_DELETED" - ], - "type": "string" - } - }, - { - "in": "query", - "name": "search", - "required": false, - "schema": { - "type": "string" - } } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListGroupsResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "GroupService" - ] - }, - "post": { - "operationId": "GroupService_CreateGroup", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateGroupRequest" + "$ref": "#/components/schemas/GameServerServiceSetPrimaryAllocationBody" } } }, @@ -27047,7 +22290,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateGroupResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -27055,29 +22298,29 @@ } }, "tags": [ - "GroupService" + "GameServerService" ] } }, - "/v1/groups/add-service-account": { - "post": { - "operationId": "GroupService_AddServiceAccountToGroup", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1AddServiceAccountToGroupRequest" - } + "/v1/game-servers/{id}/backups": { + "get": { + "operationId": "GameServerService_ListBackups", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListGameServerBackupsResponse" } } }, @@ -27085,18 +22328,26 @@ } }, "tags": [ - "GroupService" + "GameServerService" ] - } - }, - "/v1/groups/add-user": { + }, "post": { - "operationId": "GroupService_AddUserToGroup", + "operationId": "GameServerService_CreateBackup", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1AddUserToGroupRequest" + "$ref": "#/components/schemas/GameServerServiceCreateBackupBody" } } }, @@ -27107,7 +22358,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GameServerBackup" } } }, @@ -27115,32 +22366,37 @@ } }, "tags": [ - "GroupService" + "GameServerService" ] } }, - "/v1/groups/remove-service-account": { + "/v1/game-servers/{id}/backups/{backupUuid}": { "delete": { - "operationId": "GroupService_RemoveServiceAccountFromGroup", + "operationId": "GameServerService_DeleteBackup", "parameters": [ { - "in": "query", - "name": "groupId", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } }, { - "explode": true, + "in": "path", + "name": "backupUuid", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Restore only. When true, the panel deletes every file before extracting the backup.", "in": "query", - "name": "serviceAccountIds", + "name": "truncate", "required": false, "schema": { - "items": { - "type": "string" - }, - "type": "array" + "type": "boolean" } } ], @@ -27157,35 +22413,41 @@ } }, "tags": [ - "GroupService" + "GameServerService" ] } }, - "/v1/groups/remove-user": { - "delete": { - "operationId": "GroupService_RemoveUserFromGroup", + "/v1/game-servers/{id}/backups/{backupUuid}:lock": { + "post": { + "operationId": "GameServerService_LockBackup", "parameters": [ { - "in": "query", - "name": "groupId", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } }, { - "explode": true, - "in": "query", - "name": "userIds", - "required": false, + "in": "path", + "name": "backupUuid", + "required": true, "schema": { - "items": { - "type": "string" - }, - "type": "array" + "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceLockBackupBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { @@ -27199,13 +22461,13 @@ } }, "tags": [ - "GroupService" + "GameServerService" ] } }, - "/v1/groups/{id}": { - "delete": { - "operationId": "GroupService_DeleteGroup", + "/v1/game-servers/{id}/backups/{backupUuid}:restore": { + "post": { + "operationId": "GameServerService_RestoreBackup", "parameters": [ { "in": "path", @@ -27214,8 +22476,26 @@ "schema": { "type": "string" } + }, + { + "in": "path", + "name": "backupUuid", + "required": true, + "schema": { + "type": "string" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1GameServerServiceRestoreBackupBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { @@ -27229,11 +22509,13 @@ } }, "tags": [ - "GroupService" + "GameServerService" ] - }, + } + }, + "/v1/game-servers/{id}/databases": { "get": { - "operationId": "GroupService_GetGroup", + "operationId": "GameServerService_ListDatabases", "parameters": [ { "in": "path", @@ -27249,7 +22531,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetGroupResponse" + "$ref": "#/components/schemas/v1ListDatabasesResponse" } } }, @@ -27257,11 +22539,11 @@ } }, "tags": [ - "GroupService" + "GameServerService" ] }, - "patch": { - "operationId": "GroupService_UpdateGroup", + "post": { + "operationId": "GameServerService_CreateDatabase", "parameters": [ { "in": "path", @@ -27276,7 +22558,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GroupServiceUpdateGroupBody" + "$ref": "#/components/schemas/GameServerServiceCreateDatabaseBody" } } }, @@ -27287,7 +22569,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateGroupResponse" + "$ref": "#/components/schemas/v1GameServerDatabase" } } }, @@ -27295,19 +22577,37 @@ } }, "tags": [ - "GroupService" + "GameServerService" ] } }, - "/v1/healthz": { - "get": { - "operationId": "MetadataService_HealthCheck", + "/v1/game-servers/{id}/databases/{databaseId}": { + "delete": { + "operationId": "GameServerService_DeleteDatabase", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "databaseId", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1HealthCheckResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -27315,71 +22615,36 @@ } }, "tags": [ - "MetadataService" + "GameServerService" ] } }, - "/v1/hook-scripts": { - "get": { - "operationId": "HookScriptService_ListHookScripts", + "/v1/game-servers/{id}/databases/{databaseId}:rotate": { + "post": { + "operationId": "GameServerService_RotateDatabasePassword", "parameters": [ { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { - "description": "Unspecified lists VM scripts, which is the previous behavior.", - "in": "query", - "name": "subject", - "required": false, - "schema": { - "default": "HOOK_SUBJECT_UNSPECIFIED", - "enum": [ - "HOOK_SUBJECT_UNSPECIFIED", - "HOOK_SUBJECT_VM", - "HOOK_SUBJECT_GAMESERVER" - ], - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListHookScriptsResponse" - } - } - }, - "description": "A successful response." + "in": "path", + "name": "databaseId", + "required": true, + "schema": { + "type": "string" + } } - }, - "tags": [ - "HookScriptService" - ] - }, - "put": { - "operationId": "HookScriptService_UpsertHookScript", + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpsertHookScriptRequest" + "$ref": "#/components/schemas/GameServerServiceRotateDatabasePasswordBody" } } }, @@ -27390,7 +22655,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1HookScript" + "$ref": "#/components/schemas/v1GameServerDatabase" } } }, @@ -27398,13 +22663,13 @@ } }, "tags": [ - "HookScriptService" + "GameServerService" ] } }, - "/v1/hook-scripts/{id}": { - "delete": { - "operationId": "HookScriptService_DeleteHookScript", + "/v1/game-servers/{id}/docker-image": { + "put": { + "operationId": "GameServerService_UpdateDockerImage", "parameters": [ { "in": "path", @@ -27415,6 +22680,16 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceUpdateDockerImageBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { @@ -27428,78 +22703,27 @@ } }, "tags": [ - "HookScriptService" + "GameServerService" ] } }, - "/v1/instantapps": { + "/v1/game-servers/{id}/files": { "get": { - "operationId": "InstantAppService_ListInstantApps", + "operationId": "GameServerService_ListFiles", "parameters": [ { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "description": "-1 returns all apps (create/reinstall picker); otherwise 1..100.", - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "description": "Case-insensitive match on name or slug.", - "in": "query", - "name": "query", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } }, { - "description": "Filter: app must include all listed categories when non-empty.", - "explode": true, - "in": "query", - "name": "categories", - "required": false, - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - { - "description": " - DISTRO_UBUNTU_22_04: Ubuntu distributions\n - DISTRO_FEDORA_43: Fedora distributions\n - DISTRO_DEBIAN_12: Debian distributions\n - DISTRO_CENTOS_9: CentOS distributions\n - DISTRO_ROCKY_9: Rocky Linux distributions\n - DISTRO_ALMALINUX_9: AlmaLinux distributions", "in": "query", - "name": "distro", + "name": "directory", "required": false, "schema": { - "default": "DISTRO_UNSPECIFIED", - "enum": [ - "DISTRO_UNSPECIFIED", - "DISTRO_UBUNTU_22_04", - "DISTRO_UBUNTU_24_04", - "DISTRO_UBUNTU_26_04", - "DISTRO_FEDORA_43", - "DISTRO_FEDORA_44", - "DISTRO_DEBIAN_12", - "DISTRO_DEBIAN_13", - "DISTRO_CENTOS_9", - "DISTRO_CENTOS_10", - "DISTRO_ROCKY_9", - "DISTRO_ROCKY_10", - "DISTRO_ALMALINUX_9", - "DISTRO_ALMALINUX_10" - ], "type": "string" } } @@ -27509,7 +22733,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListInstantAppsResponse" + "$ref": "#/components/schemas/v1ListFilesResponse" } } }, @@ -27517,38 +22741,37 @@ } }, "tags": [ - "InstantAppService" + "GameServerService" ] - } - }, - "/v1/instantapps/slug/{slug}": { - "get": { - "operationId": "InstantAppService_GetInstantApp2", + }, + "put": { + "operationId": "GameServerService_WriteFile", "parameters": [ { "in": "path", - "name": "slug", - "required": true, - "schema": { - "type": "string" - } - }, - { - "description": "Exactly one of id or slug must be set.", - "in": "query", "name": "id", - "required": false, + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceWriteFileBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1InstantApp" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -27556,16 +22779,15 @@ } }, "tags": [ - "InstantAppService" + "GameServerService" ] } }, - "/v1/instantapps/{id}": { + "/v1/game-servers/{id}/files/content": { "get": { - "operationId": "InstantAppService_GetInstantApp", + "operationId": "GameServerService_ReadFile", "parameters": [ { - "description": "Exactly one of id or slug must be set.", "in": "path", "name": "id", "required": true, @@ -27575,7 +22797,7 @@ }, { "in": "query", - "name": "slug", + "name": "path", "required": false, "schema": { "type": "string" @@ -27587,7 +22809,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1InstantApp" + "$ref": "#/components/schemas/v1ReadFileResponse" } } }, @@ -27595,43 +22817,25 @@ } }, "tags": [ - "InstantAppService" + "GameServerService" ] } }, - "/v1/invites": { + "/v1/game-servers/{id}/files/download": { "get": { - "operationId": "InviteService_ListInvites", + "operationId": "GameServerService_DownloadFile", "parameters": [ { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "filterEmail", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } }, { "in": "query", - "name": "search", + "name": "path", "required": false, "schema": { "type": "string" @@ -27643,7 +22847,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListInvitesResponse" + "$ref": "#/components/schemas/v1DownloadFileResponse" } } }, @@ -27651,16 +22855,28 @@ } }, "tags": [ - "InviteService" + "GameServerService" ] - }, - "patch": { - "operationId": "InviteService_UpdateInvite", + } + }, + "/v1/game-servers/{id}/files:archive": { + "post": { + "operationId": "GameServerService_ArchiveFiles", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateInviteRequest" + "$ref": "#/components/schemas/GameServerServiceArchiveFilesBody" } } }, @@ -27671,7 +22887,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ArchiveFilesResponse" } } }, @@ -27679,16 +22895,28 @@ } }, "tags": [ - "InviteService" + "GameServerService" ] - }, + } + }, + "/v1/game-servers/{id}/files:copy": { "post": { - "operationId": "InviteService_CreateInvite", + "operationId": "GameServerService_CopyFile", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateInviteRequest" + "$ref": "#/components/schemas/GameServerServiceCopyFileBody" } } }, @@ -27707,23 +22935,33 @@ } }, "tags": [ - "InviteService" + "GameServerService" ] } }, - "/v1/invites/accept": { - "get": { - "operationId": "InviteService_AcceptInvite", + "/v1/game-servers/{id}/files:delete": { + "post": { + "operationId": "GameServerService_DeleteFiles", "parameters": [ { - "in": "query", - "name": "inviteId", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceDeleteFilesBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { @@ -27737,23 +22975,33 @@ } }, "tags": [ - "InviteService" + "GameServerService" ] } }, - "/v1/invites/decline": { - "get": { - "operationId": "InviteService_DeclineInvite", + "/v1/game-servers/{id}/files:folder": { + "post": { + "operationId": "GameServerService_CreateFolder", "parameters": [ { - "in": "query", - "name": "inviteId", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceCreateFolderBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { @@ -27767,39 +23015,39 @@ } }, "tags": [ - "InviteService" + "GameServerService" ] } }, - "/v1/invites/me": { - "get": { - "operationId": "InviteService_ListMyInvites", + "/v1/game-servers/{id}/files:rename": { + "post": { + "operationId": "GameServerService_RenameFile", "parameters": [ { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceRenameFileBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListMyInvitesResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -27807,23 +23055,33 @@ } }, "tags": [ - "InviteService" + "GameServerService" ] } }, - "/v1/invites/resend/{inviteId}": { + "/v1/game-servers/{id}/files:upload": { "post": { - "operationId": "InviteService_ResendInvite", + "operationId": "GameServerService_UploadFile", "parameters": [ { "in": "path", - "name": "inviteId", + "name": "id", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceUploadFileBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { @@ -27837,13 +23095,13 @@ } }, "tags": [ - "InviteService" + "GameServerService" ] } }, - "/v1/invites/{id}": { - "delete": { - "operationId": "InviteService_DeleteInvite", + "/v1/game-servers/{id}/resources": { + "get": { + "operationId": "GameServerService_GetGameServerResources", "parameters": [ { "in": "path", @@ -27859,7 +23117,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GameServerResources" } } }, @@ -27867,92 +23125,93 @@ } }, "tags": [ - "InviteService" + "GameServerService" ] } }, - "/v1/invoices": { + "/v1/game-servers/{id}/schedules": { "get": { - "operationId": "InvoiceService_ListInvoices", + "operationId": "GameServerService_ListSchedules", "parameters": [ { - "in": "query", - "name": "subscriptionId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "status", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { - "default": "INVOICE_STATUS_UNSPECIFIED", - "enum": [ - "INVOICE_STATUS_UNSPECIFIED", - "INVOICE_STATUS_DRAFT", - "INVOICE_STATUS_OPEN", - "INVOICE_STATUS_PAID", - "INVOICE_STATUS_PAST_DUE", - "INVOICE_STATUS_VOID", - "INVOICE_STATUS_UNCOLLECTIBLE" - ], "type": "string" } - }, - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ListSchedulesResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "GameServerService" + ] + }, + "post": { + "operationId": "GameServerService_CreateSchedule", + "parameters": [ { - "in": "query", - "name": "orderBy", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceCreateScheduleBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListInvoicesResponse" + "$ref": "#/components/schemas/v1GameServerSchedule" } } }, "description": "A successful response." } }, - "summary": "ListInvoices lists invoices for a subscription or organization", "tags": [ - "InvoiceService" + "GameServerService" ] } }, - "/v1/invoices/{invoiceId}": { - "get": { - "operationId": "InvoiceService_GetInvoice", + "/v1/game-servers/{id}/schedules/{scheduleId}": { + "delete": { + "operationId": "GameServerService_DeleteSchedule", "parameters": [ { "in": "path", - "name": "invoiceId", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "scheduleId", "required": true, "schema": { "type": "string" @@ -27964,26 +23223,31 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetInvoiceResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "GetInvoice retrieves a single invoice with line items", "tags": [ - "InvoiceService" + "GameServerService" ] - } - }, - "/v1/invoices/{invoiceId}:pay": { + }, "post": { - "operationId": "InvoiceService_PayInvoice", + "operationId": "GameServerService_UpdateSchedule", "parameters": [ { "in": "path", - "name": "invoiceId", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "scheduleId", "required": true, "schema": { "type": "string" @@ -27994,7 +23258,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvoiceServicePayInvoiceBody" + "$ref": "#/components/schemas/GameServerServiceUpdateScheduleBody" } } }, @@ -28005,89 +23269,92 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1PayInvoiceResponse" + "$ref": "#/components/schemas/v1GameServerSchedule" } } }, "description": "A successful response." } }, - "summary": "PayInvoice charges the organization's default card for an open or past-due\ninvoice and returns the updated invoice. Idempotent when the invoice is\nalready paid.", "tags": [ - "InvoiceService" + "GameServerService" ] } }, - "/v1/ipam/allocations": { - "get": { - "operationId": "IPAMService_ListAllocations", + "/v1/game-servers/{id}/schedules/{scheduleId}/tasks": { + "post": { + "operationId": "GameServerService_CreateScheduleTask", "parameters": [ { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { - "description": "Filter by prefix ID (required for filtering allocations)", - "in": "query", - "name": "prefixId", - "required": false, + "in": "path", + "name": "scheduleId", + "required": true, "schema": { "type": "string" } - } - ], + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceCreateScheduleTaskBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListAllocationsResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "IP Allocation (read-only - allocations are managed automatically)", "tags": [ - "IPAMService" + "GameServerService" ] } }, - "/v1/ipam/networks": { - "get": { - "operationId": "IPAMService_ListNetworks", + "/v1/game-servers/{id}/schedules/{scheduleId}/tasks/{taskId}": { + "delete": { + "operationId": "GameServerService_DeleteScheduleTask", "parameters": [ { - "in": "query", - "name": "page", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { - "in": "query", - "name": "pageSize", - "required": false, + "in": "path", + "name": "scheduleId", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" + } + }, + { + "in": "path", + "name": "taskId", + "required": true, + "schema": { + "type": "string" } } ], @@ -28096,7 +23363,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListNetworksResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -28104,16 +23371,42 @@ } }, "tags": [ - "IPAMService" + "GameServerService" ] }, "post": { - "operationId": "IPAMService_CreateNetwork", + "operationId": "GameServerService_UpdateScheduleTask", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "scheduleId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "taskId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateNetworkRequest" + "$ref": "#/components/schemas/GameServerServiceUpdateScheduleTaskBody" } } }, @@ -28131,15 +23424,14 @@ "description": "A successful response." } }, - "summary": "IPAM Network management", "tags": [ - "IPAMService" + "GameServerService" ] } }, - "/v1/ipam/networks/{id}": { - "delete": { - "operationId": "IPAMService_DeleteNetwork", + "/v1/game-servers/{id}/schedules/{scheduleId}:execute": { + "post": { + "operationId": "GameServerService_ExecuteSchedule", "parameters": [ { "in": "path", @@ -28148,8 +23440,26 @@ "schema": { "type": "string" } + }, + { + "in": "path", + "name": "scheduleId", + "required": true, + "schema": { + "type": "string" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceExecuteScheduleBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { @@ -28163,11 +23473,13 @@ } }, "tags": [ - "IPAMService" + "GameServerService" ] - }, + } + }, + "/v1/game-servers/{id}/startup": { "get": { - "operationId": "IPAMService_GetNetwork", + "operationId": "GameServerService_GetStartup", "parameters": [ { "in": "path", @@ -28183,7 +23495,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetNetworkResponse" + "$ref": "#/components/schemas/v1GetStartupResponse" } } }, @@ -28191,11 +23503,11 @@ } }, "tags": [ - "IPAMService" + "GameServerService" ] }, - "patch": { - "operationId": "IPAMService_UpdateNetwork", + "put": { + "operationId": "GameServerService_UpdateStartupVariable", "parameters": [ { "in": "path", @@ -28210,7 +23522,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IPAMServiceUpdateNetworkBody" + "$ref": "#/components/schemas/GameServerServiceUpdateStartupVariableBody" } } }, @@ -28221,7 +23533,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateNetworkResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -28229,17 +23541,17 @@ } }, "tags": [ - "IPAMService" + "GameServerService" ] } }, - "/v1/ipam/networks/{networkId}/assign-node": { + "/v1/game-servers/{id}:changeGame": { "post": { - "operationId": "IPAMService_AssignNetworkToNode", + "operationId": "GameServerService_ChangeGameServerGame", "parameters": [ { "in": "path", - "name": "networkId", + "name": "id", "required": true, "schema": { "type": "string" @@ -28250,7 +23562,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IPAMServiceAssignNetworkToNodeBody" + "$ref": "#/components/schemas/GameServerServiceChangeGameServerGameBody" } } }, @@ -28261,38 +23573,47 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GameServer" } } }, "description": "A successful response." } }, - "summary": "Node-Network assignment", "tags": [ - "IPAMService" + "GameServerService" ] } }, - "/v1/ipam/networks/{networkId}/nodes": { - "get": { - "operationId": "IPAMService_ListNetworkNodes", + "/v1/game-servers/{id}:console": { + "post": { + "operationId": "GameServerService_OpenConsole", "parameters": [ { "in": "path", - "name": "networkId", + "name": "id", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceOpenConsoleBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListNetworkNodesResponse" + "$ref": "#/components/schemas/v1OpenConsoleResponse" } } }, @@ -28300,29 +23621,39 @@ } }, "tags": [ - "IPAMService" + "GameServerService" ] } }, - "/v1/ipam/nodes/{nodeId}/network": { - "get": { - "operationId": "IPAMService_GetNodeNetwork", + "/v1/game-servers/{id}:power": { + "post": { + "operationId": "GameServerService_PowerGameServer", "parameters": [ { "in": "path", - "name": "nodeId", + "name": "id", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServicePowerGameServerBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetNodeNetworkResponse" + "$ref": "#/components/schemas/v1GameServer" } } }, @@ -28330,29 +23661,39 @@ } }, "tags": [ - "IPAMService" + "GameServerService" ] } }, - "/v1/ipam/nodes/{nodeId}/unassign-network": { + "/v1/game-servers/{id}:reinstall": { "post": { - "operationId": "IPAMService_UnassignNetworkFromNode", + "operationId": "GameServerService_ReinstallGameServer", "parameters": [ { "in": "path", - "name": "nodeId", + "name": "id", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceReinstallGameServerBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GameServer" } } }, @@ -28360,64 +23701,28 @@ } }, "tags": [ - "IPAMService" + "GameServerService" ] } }, - "/v1/ipam/prefixes": { - "get": { - "operationId": "IPAMService_ListPrefixes", + "/v1/game-servers/{id}:rename": { + "post": { + "operationId": "GameServerService_RenameGameServer", "parameters": [ { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "filterNetworkId", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListPrefixesResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "IPAMService" - ] - }, - "post": { - "operationId": "IPAMService_CreatePrefix", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreatePrefixRequest" + "$ref": "#/components/schemas/GameServerServiceRenameGameServerBody" } } }, @@ -28428,27 +23733,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GameServer" } } }, "description": "A successful response." } }, - "summary": "Prefix management", "tags": [ - "IPAMService" + "GameServerService" ] } }, - "/v1/ipam/prefixes/{id}": { - "delete": { - "operationId": "IPAMService_DeletePrefix", + "/v1/game-servers:order-games": { + "get": { + "operationId": "GameServerService_ListOrderGames", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "planId", + "required": false, "schema": { "type": "string" } @@ -28459,7 +23763,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListOrderGamesResponse" } } }, @@ -28467,16 +23771,60 @@ } }, "tags": [ - "IPAMService" + "GameServerService" ] - }, + } + }, + "/v1/groups": { "get": { - "operationId": "IPAMService_GetPrefix", + "operationId": "GroupService_ListGroups", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "filterName", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "filterStatus", + "required": false, + "schema": { + "default": "STATUS_UNSPECIFIED", + "enum": [ + "STATUS_UNSPECIFIED", + "STATUS_ACTIVE", + "STATUS_INACTIVE", + "STATUS_BANNED", + "STATUS_SOFT_DELETED" + ], + "type": "string" + } + }, + { + "in": "query", + "name": "search", + "required": false, "schema": { "type": "string" } @@ -28487,7 +23835,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPrefixResponse" + "$ref": "#/components/schemas/v1ListGroupsResponse" } } }, @@ -28495,26 +23843,16 @@ } }, "tags": [ - "IPAMService" + "GroupService" ] }, - "patch": { - "operationId": "IPAMService_UpdatePrefix", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "post": { + "operationId": "GroupService_CreateGroup", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IPAMServiceUpdatePrefixBody" + "$ref": "#/components/schemas/v1CreateGroupRequest" } } }, @@ -28525,7 +23863,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdatePrefixResponse" + "$ref": "#/components/schemas/v1CreateGroupResponse" } } }, @@ -28533,39 +23871,29 @@ } }, "tags": [ - "IPAMService" + "GroupService" ] } }, - "/v1/ipam/prefixes/{prefixId}/available-ips": { - "get": { - "operationId": "IPAMService_ListAvailableIPs", - "parameters": [ - { - "in": "path", - "name": "prefixId", - "required": true, - "schema": { - "type": "string" + "/v1/groups/add-service-account": { + "post": { + "operationId": "GroupService_AddServiceAccountToGroup", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1AddServiceAccountToGroupRequest" + } } }, - { - "description": "Limit number of IPs returned (default: 100)", - "in": "query", - "name": "limit", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListAvailableIPsResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -28573,28 +23901,18 @@ } }, "tags": [ - "IPAMService" + "GroupService" ] } }, - "/v1/ipam/prefixes/{prefixId}/reserved-ips": { + "/v1/groups/add-user": { "post": { - "operationId": "IPAMService_AddReservedIP", - "parameters": [ - { - "in": "path", - "name": "prefixId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "GroupService_AddUserToGroup", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IPAMServiceAddReservedIPBody" + "$ref": "#/components/schemas/v1AddUserToGroupRequest" } } }, @@ -28612,35 +23930,36 @@ "description": "A successful response." } }, - "summary": "IP Reservation (manage reserved_ips array in prefix)", "tags": [ - "IPAMService" + "GroupService" ] } }, - "/v1/ipam/prefixes/{prefixId}/reserved-ips/clear-all": { - "post": { - "operationId": "IPAMService_ClearAllPrefixReservedIPs", + "/v1/groups/remove-service-account": { + "delete": { + "operationId": "GroupService_RemoveServiceAccountFromGroup", "parameters": [ { - "in": "path", - "name": "prefixId", - "required": true, + "in": "query", + "name": "groupId", + "required": false, "schema": { "type": "string" } + }, + { + "explode": true, + "in": "query", + "name": "serviceAccountIds", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPAMServiceClearAllPrefixReservedIPsBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -28654,33 +23973,35 @@ } }, "tags": [ - "IPAMService" + "GroupService" ] } }, - "/v1/ipam/prefixes/{prefixId}/reserved-ips/reserve-all": { - "post": { - "operationId": "IPAMService_ReserveAllPrefixIPs", + "/v1/groups/remove-user": { + "delete": { + "operationId": "GroupService_RemoveUserFromGroup", "parameters": [ { - "in": "path", - "name": "prefixId", - "required": true, + "in": "query", + "name": "groupId", + "required": false, "schema": { "type": "string" } + }, + { + "explode": true, + "in": "query", + "name": "userIds", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPAMServiceReserveAllPrefixIPsBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -28694,25 +24015,17 @@ } }, "tags": [ - "IPAMService" + "GroupService" ] } }, - "/v1/ipam/prefixes/{prefixId}/reserved-ips/{ipAddress}": { + "/v1/groups/{id}": { "delete": { - "operationId": "IPAMService_RemoveReservedIP", + "operationId": "GroupService_DeleteGroup", "parameters": [ { "in": "path", - "name": "prefixId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "ipAddress", + "name": "id", "required": true, "schema": { "type": "string" @@ -28732,29 +24045,19 @@ } }, "tags": [ - "IPAMService" + "GroupService" ] - } - }, - "/v1/ipam/prefixes/{prefixId}/reserved-prefixes": { - "delete": { - "operationId": "IPAMService_RemoveReservedPrefix", + }, + "get": { + "operationId": "GroupService_GetGroup", "parameters": [ { "in": "path", - "name": "prefixId", + "name": "id", "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "cidr", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { @@ -28762,7 +24065,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetGroupResponse" } } }, @@ -28770,15 +24073,15 @@ } }, "tags": [ - "IPAMService" + "GroupService" ] }, - "post": { - "operationId": "IPAMService_AddReservedPrefix", + "patch": { + "operationId": "GroupService_UpdateGroup", "parameters": [ { "in": "path", - "name": "prefixId", + "name": "id", "required": true, "schema": { "type": "string" @@ -28789,7 +24092,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IPAMServiceAddReservedPrefixBody" + "$ref": "#/components/schemas/GroupServiceUpdateGroupBody" } } }, @@ -28800,7 +24103,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1UpdateGroupResponse" } } }, @@ -28808,101 +24111,34 @@ } }, "tags": [ - "IPAMService" + "GroupService" ] } }, - "/v1/ipam/prefixes/{prefixId}/utilization": { + "/v1/healthz": { "get": { - "operationId": "IPAMService_GetPrefixUtilization", - "parameters": [ - { - "in": "path", - "name": "prefixId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "MetadataService_HealthCheck", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPrefixUtilizationResponse" + "$ref": "#/components/schemas/v1HealthCheckResponse" } } }, "description": "A successful response." } }, - "summary": "Utility", "tags": [ - "IPAMService" + "MetadataService" ] } }, - "/v1/marketplace/addons": { + "/v1/hook-scripts": { "get": { - "operationId": "MarketplaceService_ListAvailableAddons", + "operationId": "HookScriptService_ListHookScripts", "parameters": [ - { - "in": "query", - "name": "filterProviderId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "vmId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "filterAddonType", - "required": false, - "schema": { - "default": "ADDON_TYPE_UNSPECIFIED", - "enum": [ - "ADDON_TYPE_UNSPECIFIED", - "ADDON_TYPE_BACKUP", - "ADDON_TYPE_SNAPSHOT", - "ADDON_TYPE_ADDITIONAL_IP" - ], - "type": "string" - } - }, - { - "description": " - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan)", - "in": "query", - "name": "filterBillingType", - "required": false, - "schema": { - "default": "BILLING_TYPE_UNSPECIFIED", - "enum": [ - "BILLING_TYPE_UNSPECIFIED", - "BILLING_TYPE_SUBSCRIPTION", - "BILLING_TYPE_USAGE", - "BILLING_TYPE_FREE", - "BILLING_TYPE_PERCENTAGE" - ], - "type": "string" - } - }, - { - "in": "query", - "name": "search", - "required": false, - "schema": { - "type": "string" - } - }, { "in": "query", "name": "page", @@ -28920,118 +24156,18 @@ "format": "int32", "type": "integer" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListAvailableAddonsResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "MarketplaceService" - ] - } - }, - "/v1/marketplace/plans": { - "get": { - "operationId": "MarketplaceService_ListAvailablePlans", - "parameters": [ - { - "description": "Optional filters\n\nFilter by country name (case-insensitive)", - "in": "query", - "name": "filterCountry", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Filter by city name (case-insensitive)", - "in": "query", - "name": "filterCity", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Filter by billing type\n\n - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan)", - "in": "query", - "name": "filterBillingType", - "required": false, - "schema": { - "default": "BILLING_TYPE_UNSPECIFIED", - "enum": [ - "BILLING_TYPE_UNSPECIFIED", - "BILLING_TYPE_SUBSCRIPTION", - "BILLING_TYPE_USAGE", - "BILLING_TYPE_FREE", - "BILLING_TYPE_PERCENTAGE" - ], - "type": "string" - } - }, - { - "description": "Filter by compute type\n\n - COMPUTE_TYPE_GENERAL_COMPUTE: GC - General Compute (balanced performance)\n - COMPUTE_TYPE_HIGH_FREQUENCY: HF - High Frequency (CPU-optimized, high clock speeds)\n - COMPUTE_TYPE_HIGH_PERFORMANCE: HP - High Performance (next-gen CPUs, NVMe storage)\n - COMPUTE_TYPE_GENERAL_PURPOSE: GP - General Purpose (balanced dedicated resources)\n - COMPUTE_TYPE_CPU_OPTIMIZED: CPU - CPU Optimized (high CPU-to-memory ratio)\n - COMPUTE_TYPE_MEMORY_OPTIMIZED: MEM - Memory Optimized (high memory-to-CPU ratio)\n - COMPUTE_TYPE_STORAGE_OPTIMIZED: STO - Storage Optimized (high storage capacity)\n - COMPUTE_TYPE_VERY_HIGH_FREQUENCY: VHF - Very High Frequency (highest clock dedicated CPUs)\n - COMPUTE_TYPE_GAME_SERVER: GS - Game Server (per-CPU SKU dedicated plans, e.g. DC-GS-9950X-*)", - "in": "query", - "name": "filterComputeType", - "required": false, - "schema": { - "default": "COMPUTE_TYPE_UNSPECIFIED", - "enum": [ - "COMPUTE_TYPE_UNSPECIFIED", - "COMPUTE_TYPE_GENERAL_COMPUTE", - "COMPUTE_TYPE_HIGH_FREQUENCY", - "COMPUTE_TYPE_HIGH_PERFORMANCE", - "COMPUTE_TYPE_GENERAL_PURPOSE", - "COMPUTE_TYPE_CPU_OPTIMIZED", - "COMPUTE_TYPE_MEMORY_OPTIMIZED", - "COMPUTE_TYPE_STORAGE_OPTIMIZED", - "COMPUTE_TYPE_VERY_HIGH_FREQUENCY", - "COMPUTE_TYPE_GAME_SERVER" - ], - "type": "string" - } - }, - { - "description": "Filter by compute category\n\n - COMPUTE_CATEGORY_SHARED_COMPUTE: Shared compute (shared resources, cost-effective)\n - COMPUTE_CATEGORY_DEDICATED_COMPUTE: Dedicated compute (dedicated resources, higher performance)", - "in": "query", - "name": "filterComputeCategory", - "required": false, - "schema": { - "default": "COMPUTE_CATEGORY_UNSPECIFIED", - "enum": [ - "COMPUTE_CATEGORY_UNSPECIFIED", - "COMPUTE_CATEGORY_SHARED_COMPUTE", - "COMPUTE_CATEGORY_DEDICATED_COMPUTE" - ], - "type": "string" - } }, { + "description": "Unspecified lists VM scripts, which is the previous behavior.", "in": "query", - "name": "filterAssetType", + "name": "subject", "required": false, "schema": { - "default": "ASSET_TYPE_UNSPECIFIED", + "default": "HOOK_SUBJECT_UNSPECIFIED", "enum": [ - "ASSET_TYPE_UNSPECIFIED", - "ASSET_TYPE_VM", - "ASSET_TYPE_CONTAINER", - "ASSET_TYPE_STORAGE", - "ASSET_TYPE_GAMESERVER", - "ASSET_TYPE_CDN", - "ASSET_TYPE_IP_ADDRESS", - "ASSET_TYPE_DNS", - "ASSET_TYPE_GPU", - "ASSET_TYPE_GENERIC" + "HOOK_SUBJECT_UNSPECIFIED", + "HOOK_SUBJECT_VM", + "HOOK_SUBJECT_GAMESERVER" ], "type": "string" } @@ -29042,7 +24178,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListAvailablePlansResponse" + "$ref": "#/components/schemas/v1ListHookScriptsResponse" } } }, @@ -29050,29 +24186,27 @@ } }, "tags": [ - "MarketplaceService" + "HookScriptService" ] - } - }, - "/v1/marketplace/plans/{planId}": { - "get": { - "operationId": "MarketplaceService_GetMarketplacePlan", - "parameters": [ - { - "in": "path", - "name": "planId", - "required": true, - "schema": { - "type": "string" + }, + "put": { + "operationId": "HookScriptService_UpsertHookScript", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1UpsertHookScriptRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetMarketplacePlanResponse" + "$ref": "#/components/schemas/v1HookScript" } } }, @@ -29080,58 +24214,19 @@ } }, "tags": [ - "MarketplaceService" + "HookScriptService" ] } }, - "/v1/marketplace/provider-directory": { - "get": { - "operationId": "MarketplaceService_ListMarketplaceProviderDirectory", + "/v1/hook-scripts/{id}": { + "delete": { + "operationId": "HookScriptService_DeleteHookScript", "parameters": [ { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "search", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "filterAssetType", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { - "default": "ASSET_TYPE_UNSPECIFIED", - "enum": [ - "ASSET_TYPE_UNSPECIFIED", - "ASSET_TYPE_VM", - "ASSET_TYPE_CONTAINER", - "ASSET_TYPE_STORAGE", - "ASSET_TYPE_GAMESERVER", - "ASSET_TYPE_CDN", - "ASSET_TYPE_IP_ADDRESS", - "ASSET_TYPE_DNS", - "ASSET_TYPE_GPU", - "ASSET_TYPE_GENERIC" - ], "type": "string" } } @@ -29141,7 +24236,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListMarketplaceProviderDirectoryResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -29149,13 +24244,13 @@ } }, "tags": [ - "MarketplaceService" + "HookScriptService" ] } }, - "/v1/marketplace/providers": { + "/v1/instantapps": { "get": { - "operationId": "MarketplaceService_ListProviders", + "operationId": "InstantAppService_ListInstantApps", "parameters": [ { "in": "query", @@ -29167,6 +24262,7 @@ } }, { + "description": "-1 returns all apps (create/reinstall picker); otherwise 1..100.", "in": "query", "name": "pageSize", "required": false, @@ -29176,102 +24272,52 @@ } }, { - "description": "Filter providers that offer this plan code (required)", - "in": "query", - "name": "filterPlanCode", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Filter by country name (required, case-insensitive)", - "in": "query", - "name": "filterCountry", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Filter by city name (required, case-insensitive)", - "in": "query", - "name": "filterCity", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Filter by billing type (subscription/fixed or usage-based)\n\n - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan)", - "in": "query", - "name": "filterBillingType", - "required": false, - "schema": { - "default": "BILLING_TYPE_UNSPECIFIED", - "enum": [ - "BILLING_TYPE_UNSPECIFIED", - "BILLING_TYPE_SUBSCRIPTION", - "BILLING_TYPE_USAGE", - "BILLING_TYPE_FREE", - "BILLING_TYPE_PERCENTAGE" - ], - "type": "string" - } - }, - { - "description": "Search by organization name or description", + "description": "Case-insensitive match on name or slug.", "in": "query", - "name": "search", + "name": "query", "required": false, "schema": { "type": "string" } }, { + "description": "Filter: app must include all listed categories when non-empty.", + "explode": true, "in": "query", - "name": "filterIpv6AvailableOnly", + "name": "categories", "required": false, "schema": { - "type": "boolean" + "items": { + "type": "string" + }, + "type": "array" } }, { - "description": "How to order providers: default is newest first. When set, Recommendations (first\nthree in newest-first order) stay pinned; the rest are ordered by the displayed\nlist price for the selected plan and billing type.\n\n - PROVIDER_PLAN_PRICE_SORT_LEAST_EXPENSIVE_FIRST: Ascending among non-recommended providers: lowest list price first\n(usage: hourly, subscription: fixed monthly, free: 0)\n - PROVIDER_PLAN_PRICE_SORT_MOST_EXPENSIVE_FIRST: Descending among non-recommended providers: highest list price first", + "description": " - DISTRO_UBUNTU_22_04: Ubuntu distributions\n - DISTRO_FEDORA_43: Fedora distributions\n - DISTRO_DEBIAN_12: Debian distributions\n - DISTRO_CENTOS_9: CentOS distributions\n - DISTRO_ROCKY_9: Rocky Linux distributions\n - DISTRO_ALMALINUX_9: AlmaLinux distributions", "in": "query", - "name": "planPriceSort", + "name": "distro", "required": false, "schema": { - "default": "PROVIDER_PLAN_PRICE_SORT_UNSPECIFIED", + "default": "DISTRO_UNSPECIFIED", "enum": [ - "PROVIDER_PLAN_PRICE_SORT_UNSPECIFIED", - "PROVIDER_PLAN_PRICE_SORT_LEAST_EXPENSIVE_FIRST", - "PROVIDER_PLAN_PRICE_SORT_MOST_EXPENSIVE_FIRST" + "DISTRO_UNSPECIFIED", + "DISTRO_UBUNTU_22_04", + "DISTRO_UBUNTU_24_04", + "DISTRO_UBUNTU_26_04", + "DISTRO_FEDORA_43", + "DISTRO_FEDORA_44", + "DISTRO_DEBIAN_12", + "DISTRO_DEBIAN_13", + "DISTRO_CENTOS_9", + "DISTRO_CENTOS_10", + "DISTRO_ROCKY_9", + "DISTRO_ROCKY_10", + "DISTRO_ALMALINUX_9", + "DISTRO_ALMALINUX_10" ], "type": "string" } - }, - { - "description": "Only include providers where bandwidth egress is effectively unlimited for the selected plan\n(same basis as UI badge: overage_price if > 0 else unit_amount; unlimited when effective $/GB == 0).", - "in": "query", - "name": "filterUnlimitedBandwidthOnly", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "description": "When set, only organizations whose ddos_provider is one of these slugs are included.\nWhen empty, do not filter by DDoS. Mirrored by marketplace UI: all slugs \"selected\" = omit this.", - "explode": true, - "in": "query", - "name": "filterDdosProviders", - "required": false, - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } } ], "responses": { @@ -29279,7 +24325,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListProvidersResponse" + "$ref": "#/components/schemas/v1ListInstantAppsResponse" } } }, @@ -29287,63 +24333,28 @@ } }, "tags": [ - "MarketplaceService" + "InstantAppService" ] } }, - "/v1/marketplace/providers/{providerId}": { + "/v1/instantapps/slug/{slug}": { "get": { - "operationId": "MarketplaceService_GetProvider", + "operationId": "InstantAppService_GetInstantApp2", "parameters": [ { "in": "path", - "name": "providerId", + "name": "slug", "required": true, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetProviderResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "MarketplaceService" - ] - } - }, - "/v1/marketplace/regions": { - "get": { - "operationId": "MarketplaceService_ListAvailableRegions", - "parameters": [ + }, { - "description": "When set, only cities that sell a marketplace-listable plan of this asset type.\nUnspecified keeps every marketplace city (virtual machines and game servers).", + "description": "Exactly one of id or slug must be set.", "in": "query", - "name": "filterAssetType", + "name": "id", "required": false, "schema": { - "default": "ASSET_TYPE_UNSPECIFIED", - "enum": [ - "ASSET_TYPE_UNSPECIFIED", - "ASSET_TYPE_VM", - "ASSET_TYPE_CONTAINER", - "ASSET_TYPE_STORAGE", - "ASSET_TYPE_GAMESERVER", - "ASSET_TYPE_CDN", - "ASSET_TYPE_IP_ADDRESS", - "ASSET_TYPE_DNS", - "ASSET_TYPE_GPU", - "ASSET_TYPE_GENERIC" - ], "type": "string" } } @@ -29353,38 +24364,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListAvailableRegionsResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "MarketplaceService" - ] - } - }, - "/v1/marketplace/search": { - "post": { - "operationId": "MarketplaceService_SearchMarketplace", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SearchMarketplaceRequest" - } - } - }, - "description": "Natural-language marketplace search (anonymous landing page).", - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SearchMarketplaceResponse" + "$ref": "#/components/schemas/v1InstantApp" } } }, @@ -29392,38 +24372,29 @@ } }, "tags": [ - "MarketplaceService" + "InstantAppService" ] } }, - "/v1/metrics": { + "/v1/instantapps/{id}": { "get": { - "operationId": "MetricService_ListMetrics", + "operationId": "InstantAppService_GetInstantApp", "parameters": [ { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, + "description": "Exactly one of id or slug must be set.", + "in": "path", + "name": "id", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "billableOnly", + "name": "slug", "required": false, "schema": { - "type": "boolean" + "type": "string" } } ], @@ -29432,57 +24403,54 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListMetricsResponse" + "$ref": "#/components/schemas/v1InstantApp" } } }, "description": "A successful response." } }, - "summary": "List all available metrics", "tags": [ - "MetricService" + "InstantAppService" ] } }, - "/v1/metrics-write-credentials": { + "/v1/invites": { "get": { - "operationId": "MetricsCredentialService_ListMetricsWriteCredentials", + "operationId": "InviteService_ListInvites", "parameters": [ { - "description": "Optional: omit or leave empty to list credentials for the whole organization.", "in": "query", - "name": "agentId", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "includeRevoked", + "name": "pageSize", "required": false, "schema": { - "type": "boolean" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "page", + "name": "filterEmail", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { - "description": "-1 means fetch all; otherwise 1..100.", "in": "query", - "name": "pageSize", + "name": "search", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } } ], @@ -29491,7 +24459,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListMetricsWriteCredentialsResponse" + "$ref": "#/components/schemas/v1ListInvitesResponse" } } }, @@ -29499,16 +24467,16 @@ } }, "tags": [ - "MetricsCredentialService" + "InviteService" ] }, - "post": { - "operationId": "MetricsCredentialService_CreateMetricsWriteCredential", + "patch": { + "operationId": "InviteService_UpdateInvite", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateMetricsWriteCredentialRequest" + "$ref": "#/components/schemas/v1UpdateInviteRequest" } } }, @@ -29519,7 +24487,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateMetricsWriteCredentialResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -29527,28 +24495,16 @@ } }, "tags": [ - "MetricsCredentialService" + "InviteService" ] - } - }, - "/v1/metrics-write-credentials/{id}:revoke": { + }, "post": { - "operationId": "MetricsCredentialService_RevokeMetricsWriteCredential", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "InviteService_CreateInvite", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MetricsCredentialServiceRevokeMetricsWriteCredentialBody" + "$ref": "#/components/schemas/v1CreateInviteRequest" } } }, @@ -29567,39 +24523,59 @@ } }, "tags": [ - "MetricsCredentialService" + "InviteService" ] } }, - "/v1/metrics-write-credentials/{id}:rotate": { - "post": { - "operationId": "MetricsCredentialService_RotateMetricsWriteCredential", + "/v1/invites/accept": { + "get": { + "operationId": "InviteService_AcceptInvite", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "inviteId", + "required": false, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MetricsCredentialServiceRotateMetricsWriteCredentialBody" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1SuccessResponse" + } } - } - }, - "required": true + }, + "description": "A successful response." + } }, + "tags": [ + "InviteService" + ] + } + }, + "/v1/invites/decline": { + "get": { + "operationId": "InviteService_DeclineInvite", + "parameters": [ + { + "in": "query", + "name": "inviteId", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateMetricsWriteCredentialResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -29607,29 +24583,30 @@ } }, "tags": [ - "MetricsCredentialService" + "InviteService" ] } }, - "/v1/metrics/{id}": { + "/v1/invites/me": { "get": { - "operationId": "MetricService_GetMetric", + "operationId": "InviteService_ListMyInvites", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { - "description": "Alternative to id", "in": "query", - "name": "code", + "name": "pageSize", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ], @@ -29638,25 +24615,31 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetMetricResponse" + "$ref": "#/components/schemas/v1ListMyInvitesResponse" } } }, "description": "A successful response." } }, - "summary": "Get a specific metric by ID or code", "tags": [ - "MetricService" + "InviteService" ] } }, - "/v1/monitoring/business/datasource-token:rotate": { + "/v1/invites/resend/{inviteId}": { "post": { - "operationId": "BusinessMonitoringService_RotateBusinessMonitoringDatasourceToken", - "requestBody": { - "$ref": "#/components/requestBodies/v1RotateMonitoringDatasourceTokenRequest" - }, + "operationId": "InviteService_ResendInvite", + "parameters": [ + { + "in": "path", + "name": "inviteId", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { @@ -29670,22 +24653,29 @@ } }, "tags": [ - "BusinessMonitoringService" + "InviteService" ] } }, - "/v1/monitoring/business/launch": { - "post": { - "operationId": "BusinessMonitoringService_CreateBusinessMonitoringLaunch", - "requestBody": { - "$ref": "#/components/requestBodies/v1CreateMonitoringLaunchRequest" - }, + "/v1/invites/{id}": { + "delete": { + "operationId": "InviteService_DeleteInvite", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateMonitoringLaunchResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -29693,66 +24683,134 @@ } }, "tags": [ - "BusinessMonitoringService" + "InviteService" ] } }, - "/v1/monitoring/datasource-token:rotate": { - "post": { - "operationId": "MonitoringService_RotateMonitoringDatasourceToken", - "requestBody": { - "$ref": "#/components/requestBodies/v1RotateMonitoringDatasourceTokenRequest" - }, + "/v1/invoices": { + "get": { + "operationId": "InvoiceService_ListInvoices", + "parameters": [ + { + "in": "query", + "name": "subscriptionId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "status", + "required": false, + "schema": { + "default": "INVOICE_STATUS_UNSPECIFIED", + "enum": [ + "INVOICE_STATUS_UNSPECIFIED", + "INVOICE_STATUS_DRAFT", + "INVOICE_STATUS_OPEN", + "INVOICE_STATUS_PAID", + "INVOICE_STATUS_PAST_DUE", + "INVOICE_STATUS_VOID", + "INVOICE_STATUS_UNCOLLECTIBLE" + ], + "type": "string" + } + }, + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "orderBy", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListInvoicesResponse" } } }, "description": "A successful response." } }, - "summary": "RotateMonitoringDatasourceToken replaces the organization's Grafana datasource token.", + "summary": "ListInvoices lists invoices for a subscription or organization", "tags": [ - "MonitoringService" + "InvoiceService" ] } }, - "/v1/monitoring/launch": { - "post": { - "operationId": "MonitoringService_CreateMonitoringLaunch", - "requestBody": { - "$ref": "#/components/requestBodies/v1CreateMonitoringLaunchRequest" - }, + "/v1/invoices/{invoiceId}": { + "get": { + "operationId": "InvoiceService_GetInvoice", + "parameters": [ + { + "in": "path", + "name": "invoiceId", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateMonitoringLaunchResponse" + "$ref": "#/components/schemas/v1GetInvoiceResponse" } } }, "description": "A successful response." } }, - "summary": "CreateMonitoringLaunch returns a one-time URL (valid for about a minute) that signs\nthe caller into the organization's Grafana. Grafana role: Editor when the caller\nmay also rotate the monitoring token, otherwise Viewer.", + "summary": "GetInvoice retrieves a single invoice with line items", "tags": [ - "MonitoringService" + "InvoiceService" ] } }, - "/v1/node": { + "/v1/invoices/{invoiceId}:pay": { "post": { - "operationId": "NodeService_CreateNode", + "operationId": "InvoiceService_PayInvoice", + "parameters": [ + { + "in": "path", + "name": "invoiceId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateNodeRequest" + "$ref": "#/components/schemas/InvoiceServicePayInvoiceBody" } } }, @@ -29763,55 +24821,98 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1PayInvoiceResponse" } } }, "description": "A successful response." } }, + "summary": "PayInvoice charges the organization's default card for an open or past-due\ninvoice and returns the updated invoice. Idempotent when the invoice is\nalready paid.", "tags": [ - "NodeService" + "InvoiceService" ] } }, - "/v1/node-placement-policy": { + "/v1/ipam/allocations": { "get": { - "operationId": "NodePlacementService_GetNodePlacementPolicy", + "operationId": "IPAMService_ListAllocations", + "parameters": [ + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "description": "Filter by prefix ID (required for filtering allocations)", + "in": "query", + "name": "prefixId", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetNodePlacementPolicyResponse" + "$ref": "#/components/schemas/v1ListAllocationsResponse" } } }, "description": "A successful response." } }, + "summary": "IP Allocation (read-only - allocations are managed automatically)", "tags": [ - "NodePlacementService" + "IPAMService" ] - }, - "put": { - "operationId": "NodePlacementService_UpdateNodePlacementPolicy", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1UpdateNodePlacementPolicyRequest" - } + } + }, + "/v1/ipam/networks": { + "get": { + "operationId": "IPAMService_ListNetworks", + "parameters": [ + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" } }, - "required": true - }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateNodePlacementPolicyResponse" + "$ref": "#/components/schemas/v1ListNetworksResponse" } } }, @@ -29819,18 +24920,16 @@ } }, "tags": [ - "NodePlacementService" + "IPAMService" ] - } - }, - "/v1/node/topology/validate": { + }, "post": { - "operationId": "NodeService_ValidateNodeTopology", + "operationId": "IPAMService_CreateNetwork", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ValidateNodeTopologyRequest" + "$ref": "#/components/schemas/v1CreateNetworkRequest" } } }, @@ -29841,22 +24940,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ValidateNodeTopologyResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "Dedicated CPU cores: parse-preview of a topology paste without persisting.", + "summary": "IPAM Network management", "tags": [ - "NodeService" + "IPAMService" ] } }, - "/v1/node/{id}": { + "/v1/ipam/networks/{id}": { "delete": { - "operationId": "NodeService_DeleteNode", + "operationId": "IPAMService_DeleteNetwork", "parameters": [ { "in": "path", @@ -29880,11 +24979,11 @@ } }, "tags": [ - "NodeService" + "IPAMService" ] }, "get": { - "operationId": "NodeService_GetNode", + "operationId": "IPAMService_GetNetwork", "parameters": [ { "in": "path", @@ -29900,7 +24999,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetNodeResponse" + "$ref": "#/components/schemas/v1GetNetworkResponse" } } }, @@ -29908,11 +25007,11 @@ } }, "tags": [ - "NodeService" + "IPAMService" ] }, "patch": { - "operationId": "NodeService_UpdateNode", + "operationId": "IPAMService_UpdateNetwork", "parameters": [ { "in": "path", @@ -29927,7 +25026,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NodeServiceUpdateNodeBody" + "$ref": "#/components/schemas/IPAMServiceUpdateNetworkBody" } } }, @@ -29938,7 +25037,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateNodeResponse" + "$ref": "#/components/schemas/v1UpdateNetworkResponse" } } }, @@ -29946,111 +25045,89 @@ } }, "tags": [ - "NodeService" + "IPAMService" ] } }, - "/v1/node/{id}/cpu-map": { - "get": { - "operationId": "NodeService_GetNodeCPUMap", + "/v1/ipam/networks/{networkId}/assign-node": { + "post": { + "operationId": "IPAMService_AssignNetworkToNode", "parameters": [ { "in": "path", - "name": "id", + "name": "networkId", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IPAMServiceAssignNetworkToNodeBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetNodeCPUMapResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "Dedicated CPU cores: full topology + per-CPU occupancy for the node\ntopology board (docs/README-DEDICATED-CPU-CORES.md \u00a76.3/\u00a78.3).", + "summary": "Node-Network assignment", "tags": [ - "NodeService" + "IPAMService" ] } }, - "/v1/nodes": { + "/v1/ipam/networks/{networkId}/nodes": { "get": { - "operationId": "NodeService_ListNodes", + "operationId": "IPAMService_ListNetworkNodes", "parameters": [ { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "description": "Optional filter; UUID format validated in ListNodes when set.", - "in": "query", - "name": "platformId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "serviceStatus", - "required": false, - "schema": { - "default": "SERVICE_STATUS_UNSPECIFIED", - "enum": [ - "SERVICE_STATUS_UNSPECIFIED", - "SERVICE_STATUS_ONLINE", - "SERVICE_STATUS_OFFLINE", - "SERVICE_STATUS_MAINTENANCE" - ], - "type": "string" - } - }, - { - "explode": true, - "in": "query", - "name": "expand", - "required": false, - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - { - "in": "query", - "name": "search", - "required": false, + "in": "path", + "name": "networkId", + "required": true, "schema": { "type": "string" } - }, + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ListNetworkNodesResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "IPAMService" + ] + } + }, + "/v1/ipam/nodes/{nodeId}/network": { + "get": { + "operationId": "IPAMService_GetNodeNetwork", + "parameters": [ { - "in": "query", - "name": "regionId", - "required": false, + "in": "path", + "name": "nodeId", + "required": true, "schema": { "type": "string" } @@ -30061,7 +25138,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListNodesResponse" + "$ref": "#/components/schemas/v1GetNodeNetworkResponse" } } }, @@ -30069,69 +25146,18 @@ } }, "tags": [ - "NodeService" + "IPAMService" ] } }, - "/v1/oauth2/authorize": { - "get": { - "operationId": "OAuth2Service_Authorize", + "/v1/ipam/nodes/{nodeId}/unassign-network": { + "post": { + "operationId": "IPAMService_UnassignNetworkFromNode", "parameters": [ { - "in": "query", - "name": "clientId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "responseType", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "redirectUri", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "scope", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "CSRF protection", - "in": "query", - "name": "state", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "PKCE challenge", - "in": "query", - "name": "codeChallenge", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Only S256, not plain", - "in": "query", - "name": "codeChallengeMethod", - "required": false, + "in": "path", + "name": "nodeId", + "required": true, "schema": { "type": "string" } @@ -30142,22 +25168,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1AuthorizeResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "Authorize initiates the OAuth2 authorization flow", "tags": [ - "OAuth2Service" + "IPAMService" ] } }, - "/v1/oauth2/clients": { + "/v1/ipam/prefixes": { "get": { - "operationId": "OAuth2Service_ListClients", + "operationId": "IPAMService_ListPrefixes", "parameters": [ { "in": "query", @@ -30176,6 +25201,14 @@ "format": "int32", "type": "integer" } + }, + { + "in": "query", + "name": "filterNetworkId", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -30183,25 +25216,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListOAuth2ClientsResponse" + "$ref": "#/components/schemas/v1ListPrefixesResponse" } } }, "description": "A successful response." } }, - "summary": "ListClients lists OAuth2 clients for the organization", "tags": [ - "OAuth2Service" + "IPAMService" ] }, "post": { - "operationId": "OAuth2Service_CreateClient", + "operationId": "IPAMService_CreatePrefix", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateOAuth2ClientRequest" + "$ref": "#/components/schemas/v1CreatePrefixRequest" } } }, @@ -30212,26 +25244,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateOAuth2ClientResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "CreateClient creates a new OAuth2 client", + "summary": "Prefix management", "tags": [ - "OAuth2Service" + "IPAMService" ] } }, - "/v1/oauth2/clients/{clientId}": { + "/v1/ipam/prefixes/{id}": { "delete": { - "operationId": "OAuth2Service_DeleteClient", + "operationId": "IPAMService_DeletePrefix", "parameters": [ { "in": "path", - "name": "clientId", + "name": "id", "required": true, "schema": { "type": "string" @@ -30243,59 +25275,62 @@ "content": { "application/json": { "schema": { - "properties": {}, - "type": "object" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "DeleteClient deletes an OAuth2 client", "tags": [ - "OAuth2Service" + "IPAMService" ] - } - }, - "/v1/oauth2/refresh": { - "post": { - "operationId": "OAuth2Service_RefreshToken", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1RefreshTokenRequest" - } + }, + "get": { + "operationId": "IPAMService_GetPrefix", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1TokenResponse" + "$ref": "#/components/schemas/v1GetPrefixResponse" } } }, "description": "A successful response." } }, - "summary": "RefreshToken exchanges refresh token for new access token", "tags": [ - "OAuth2Service" + "IPAMService" ] - } - }, - "/v1/oauth2/revoke": { - "post": { - "operationId": "OAuth2Service_RevokeToken", + }, + "patch": { + "operationId": "IPAMService_UpdatePrefix", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1RevokeTokenRequest" + "$ref": "#/components/schemas/IPAMServiceUpdatePrefixBody" } } }, @@ -30306,74 +25341,81 @@ "content": { "application/json": { "schema": { - "properties": {}, - "type": "object" + "$ref": "#/components/schemas/v1UpdatePrefixResponse" } } }, "description": "A successful response." } }, - "summary": "RevokeToken revokes an access or refresh token", "tags": [ - "OAuth2Service" + "IPAMService" ] } }, - "/v1/oauth2/token": { - "post": { - "operationId": "OAuth2Service_Token", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1TokenRequest" - } + "/v1/ipam/prefixes/{prefixId}/available-ips": { + "get": { + "operationId": "IPAMService_ListAvailableIPs", + "parameters": [ + { + "in": "path", + "name": "prefixId", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "description": "Limit number of IPs returned (default: 100)", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1TokenResponse" + "$ref": "#/components/schemas/v1ListAvailableIPsResponse" } } }, "description": "A successful response." } }, - "summary": "Token exchanges authorization code for access token", "tags": [ - "OAuth2Service" + "IPAMService" ] } }, - "/v1/organization": { - "get": { - "operationId": "OrganizationService_GetOrganization", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetOrganizationResponse" - } - } - }, - "description": "A successful response." + "/v1/ipam/prefixes/{prefixId}/reserved-ips": { + "post": { + "operationId": "IPAMService_AddReservedIP", + "parameters": [ + { + "in": "path", + "name": "prefixId", + "required": true, + "schema": { + "type": "string" + } } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IPAMServiceAddReservedIPBody" + } + } + }, + "required": true }, - "tags": [ - "OrganizationService" - ] - } - }, - "/v1/organizations": { - "delete": { - "operationId": "OrganizationService_DeleteOrganization", "responses": { "200": { "content": { @@ -30386,55 +25428,30 @@ "description": "A successful response." } }, + "summary": "IP Reservation (manage reserved_ips array in prefix)", "tags": [ - "OrganizationService" + "IPAMService" ] - }, - "get": { - "operationId": "OrganizationService_ListOrganizations", + } + }, + "/v1/ipam/prefixes/{prefixId}/reserved-ips/clear-all": { + "post": { + "operationId": "IPAMService_ClearAllPrefixReservedIPs", "parameters": [ { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, + "in": "path", + "name": "prefixId", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListOrganizationsResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "OrganizationService" - ] - }, - "patch": { - "operationId": "OrganizationService_UpdateOrganization", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateOrganizationRequest" + "$ref": "#/components/schemas/IPAMServiceClearAllPrefixReservedIPsBody" } } }, @@ -30445,7 +25462,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateOrganizationResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -30453,16 +25470,28 @@ } }, "tags": [ - "OrganizationService" + "IPAMService" ] - }, + } + }, + "/v1/ipam/prefixes/{prefixId}/reserved-ips/reserve-all": { "post": { - "operationId": "OrganizationService_CreateOrganization", + "operationId": "IPAMService_ReserveAllPrefixIPs", + "parameters": [ + { + "in": "path", + "name": "prefixId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateOrganizationRequest" + "$ref": "#/components/schemas/IPAMServiceReserveAllPrefixIPsBody" } } }, @@ -30481,49 +25510,66 @@ } }, "tags": [ - "OrganizationService" + "IPAMService" ] } }, - "/v1/payment-methods": { - "get": { - "operationId": "PaymentMethodService_ListPaymentMethods", + "/v1/ipam/prefixes/{prefixId}/reserved-ips/{ipAddress}": { + "delete": { + "operationId": "IPAMService_RemoveReservedIP", "parameters": [ { - "description": "Filters\n\nFilter by subscription", - "in": "query", - "name": "subscriptionId", - "required": false, + "in": "path", + "name": "prefixId", + "required": true, "schema": { "type": "string" } }, { - "description": "Only return default payment method", - "in": "query", - "name": "onlyDefault", - "required": false, + "in": "path", + "name": "ipAddress", + "required": true, "schema": { - "type": "boolean" + "type": "string" } - }, + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1SuccessResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "IPAMService" + ] + } + }, + "/v1/ipam/prefixes/{prefixId}/reserved-prefixes": { + "delete": { + "operationId": "IPAMService_RemoveReservedPrefix", + "parameters": [ { - "description": "Pagination", - "in": "query", - "name": "page", - "required": false, + "in": "path", + "name": "prefixId", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "pageSize", + "name": "cidr", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } } ], @@ -30532,25 +25578,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPaymentMethodsResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "List payment methods for an organization/subscription\nReturns payment method details (type, last4, brand, expiry, is_default)", "tags": [ - "PaymentMethodService" + "IPAMService" ] }, "post": { - "operationId": "PaymentMethodService_AttachPaymentMethod", + "operationId": "IPAMService_AddReservedPrefix", + "parameters": [ + { + "in": "path", + "name": "prefixId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1AttachPaymentMethodRequest" + "$ref": "#/components/schemas/IPAMServiceAddReservedPrefixBody" } } }, @@ -30561,26 +25616,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1AttachPaymentMethodResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "Attach a payment method to a subscription/organization\nWorks for both providers (platform subscriptions) and clients (provider\nplan subscriptions) Authorization: Check organization type and rule engine\n(subscription.payment_method.manage.enabled)", "tags": [ - "PaymentMethodService" + "IPAMService" ] } }, - "/v1/payment-methods/{paymentMethodId}": { - "delete": { - "operationId": "PaymentMethodService_RemovePaymentMethod", + "/v1/ipam/prefixes/{prefixId}/utilization": { + "get": { + "operationId": "IPAMService_GetPrefixUtilization", "parameters": [ { "in": "path", - "name": "paymentMethodId", + "name": "prefixId", "required": true, "schema": { "type": "string" @@ -30592,107 +25646,210 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1RemovePaymentMethodResponse" + "$ref": "#/components/schemas/v1GetPrefixUtilizationResponse" } } }, "description": "A successful response." } }, - "summary": "Remove a payment method\nValidation:\n- Providers: Cannot remove if only one method exists (except on free plan)\n- Clients: Cannot remove if only one method exists\n- Cannot remove if payment method is currently in use for active\nsubscriptions", + "summary": "Utility", "tags": [ - "PaymentMethodService" + "IPAMService" ] } }, - "/v1/payment-methods/{paymentMethodId}:set-default": { - "post": { - "operationId": "PaymentMethodService_SetDefaultPaymentMethod", + "/v1/marketplace/addons": { + "get": { + "operationId": "MarketplaceService_ListAvailableAddons", "parameters": [ { - "in": "path", - "name": "paymentMethodId", - "required": true, + "in": "query", + "name": "filterProviderId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "vmId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "filterAddonType", + "required": false, + "schema": { + "default": "ADDON_TYPE_UNSPECIFIED", + "enum": [ + "ADDON_TYPE_UNSPECIFIED", + "ADDON_TYPE_BACKUP", + "ADDON_TYPE_SNAPSHOT", + "ADDON_TYPE_ADDITIONAL_IP" + ], + "type": "string" + } + }, + { + "description": " - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan)", + "in": "query", + "name": "filterBillingType", + "required": false, + "schema": { + "default": "BILLING_TYPE_UNSPECIFIED", + "enum": [ + "BILLING_TYPE_UNSPECIFIED", + "BILLING_TYPE_SUBSCRIPTION", + "BILLING_TYPE_USAGE", + "BILLING_TYPE_FREE", + "BILLING_TYPE_PERCENTAGE" + ], + "type": "string" + } + }, + { + "in": "query", + "name": "search", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PaymentMethodServiceSetDefaultPaymentMethodBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SetDefaultPaymentMethodResponse" + "$ref": "#/components/schemas/v1ListAvailableAddonsResponse" } } }, "description": "A successful response." } }, - "summary": "Set a payment method as the default payment method\nValidates payment method belongs to organization/subscription", "tags": [ - "PaymentMethodService" + "MarketplaceService" ] } }, - "/v1/payments": { + "/v1/marketplace/plans": { "get": { - "operationId": "PaymentService_ListPayments", + "operationId": "MarketplaceService_ListAvailablePlans", "parameters": [ { + "description": "Optional filters\n\nFilter by country name (case-insensitive)", "in": "query", - "name": "invoiceId", + "name": "filterCountry", "required": false, "schema": { "type": "string" } }, { + "description": "Filter by city name (case-insensitive)", "in": "query", - "name": "status", + "name": "filterCity", "required": false, "schema": { - "default": "PAYMENT_STATUS_UNSPECIFIED", + "type": "string" + } + }, + { + "description": "Filter by billing type\n\n - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan)", + "in": "query", + "name": "filterBillingType", + "required": false, + "schema": { + "default": "BILLING_TYPE_UNSPECIFIED", "enum": [ - "PAYMENT_STATUS_UNSPECIFIED", - "PAYMENT_STATUS_PENDING", - "PAYMENT_STATUS_PROCESSING", - "PAYMENT_STATUS_SUCCEEDED", - "PAYMENT_STATUS_FAILED", - "PAYMENT_STATUS_CANCELED", - "PAYMENT_STATUS_REFUNDED", - "PAYMENT_STATUS_PARTIALLY_REFUNDED" + "BILLING_TYPE_UNSPECIFIED", + "BILLING_TYPE_SUBSCRIPTION", + "BILLING_TYPE_USAGE", + "BILLING_TYPE_FREE", + "BILLING_TYPE_PERCENTAGE" ], "type": "string" } }, { + "description": "Filter by compute type\n\n - COMPUTE_TYPE_GENERAL_COMPUTE: GC - General Compute (balanced performance)\n - COMPUTE_TYPE_HIGH_FREQUENCY: HF - High Frequency (CPU-optimized, high clock speeds)\n - COMPUTE_TYPE_HIGH_PERFORMANCE: HP - High Performance (next-gen CPUs, NVMe storage)\n - COMPUTE_TYPE_GENERAL_PURPOSE: GP - General Purpose (balanced dedicated resources)\n - COMPUTE_TYPE_CPU_OPTIMIZED: CPU - CPU Optimized (high CPU-to-memory ratio)\n - COMPUTE_TYPE_MEMORY_OPTIMIZED: MEM - Memory Optimized (high memory-to-CPU ratio)\n - COMPUTE_TYPE_STORAGE_OPTIMIZED: STO - Storage Optimized (high storage capacity)\n - COMPUTE_TYPE_VERY_HIGH_FREQUENCY: VHF - Very High Frequency (highest clock dedicated CPUs)\n - COMPUTE_TYPE_GAME_SERVER: GS - Game Server (per-CPU SKU dedicated plans, e.g. DC-GS-9950X-*)", "in": "query", - "name": "page", + "name": "filterComputeType", "required": false, "schema": { - "format": "int32", - "type": "integer" + "default": "COMPUTE_TYPE_UNSPECIFIED", + "enum": [ + "COMPUTE_TYPE_UNSPECIFIED", + "COMPUTE_TYPE_GENERAL_COMPUTE", + "COMPUTE_TYPE_HIGH_FREQUENCY", + "COMPUTE_TYPE_HIGH_PERFORMANCE", + "COMPUTE_TYPE_GENERAL_PURPOSE", + "COMPUTE_TYPE_CPU_OPTIMIZED", + "COMPUTE_TYPE_MEMORY_OPTIMIZED", + "COMPUTE_TYPE_STORAGE_OPTIMIZED", + "COMPUTE_TYPE_VERY_HIGH_FREQUENCY", + "COMPUTE_TYPE_GAME_SERVER" + ], + "type": "string" } }, { + "description": "Filter by compute category\n\n - COMPUTE_CATEGORY_SHARED_COMPUTE: Shared compute (shared resources, cost-effective)\n - COMPUTE_CATEGORY_DEDICATED_COMPUTE: Dedicated compute (dedicated resources, higher performance)", "in": "query", - "name": "pageSize", + "name": "filterComputeCategory", "required": false, "schema": { - "format": "int32", - "type": "integer" + "default": "COMPUTE_CATEGORY_UNSPECIFIED", + "enum": [ + "COMPUTE_CATEGORY_UNSPECIFIED", + "COMPUTE_CATEGORY_SHARED_COMPUTE", + "COMPUTE_CATEGORY_DEDICATED_COMPUTE" + ], + "type": "string" + } + }, + { + "in": "query", + "name": "filterAssetType", + "required": false, + "schema": { + "default": "ASSET_TYPE_UNSPECIFIED", + "enum": [ + "ASSET_TYPE_UNSPECIFIED", + "ASSET_TYPE_VM", + "ASSET_TYPE_CONTAINER", + "ASSET_TYPE_STORAGE", + "ASSET_TYPE_GAMESERVER", + "ASSET_TYPE_CDN", + "ASSET_TYPE_IP_ADDRESS", + "ASSET_TYPE_DNS", + "ASSET_TYPE_GPU", + "ASSET_TYPE_GENERIC" + ], + "type": "string" } } ], @@ -30701,26 +25858,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPaymentsResponse" + "$ref": "#/components/schemas/v1ListAvailablePlansResponse" } } }, "description": "A successful response." } }, - "summary": "ListPayments lists payments for an invoice or organization", "tags": [ - "PaymentService" + "MarketplaceService" ] } }, - "/v1/payments/{paymentId}": { + "/v1/marketplace/plans/{planId}": { "get": { - "operationId": "PaymentService_GetPayment", + "operationId": "MarketplaceService_GetMarketplacePlan", "parameters": [ { "in": "path", - "name": "paymentId", + "name": "planId", "required": true, "schema": { "type": "string" @@ -30732,22 +25888,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPaymentResponse" + "$ref": "#/components/schemas/v1GetMarketplacePlanResponse" } } }, "description": "A successful response." } }, - "summary": "GetPayment retrieves a single payment with refunds", "tags": [ - "PaymentService" + "MarketplaceService" ] } }, - "/v1/permissions": { + "/v1/marketplace/provider-directory": { "get": { - "operationId": "PermissionService_ListPermissions", + "operationId": "MarketplaceService_ListMarketplaceProviderDirectory", "parameters": [ { "in": "query", @@ -30769,74 +25924,31 @@ }, { "in": "query", - "name": "filterName", + "name": "search", "required": false, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListPermissionsResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "PermissionService" - ] - } - }, - "/v1/permissions/assign-to-role": { - "post": { - "operationId": "PermissionService_AssignPermissionToRole", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1AssignPermissionToRoleRequest" - } - } }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "PermissionService" - ] - } - }, - "/v1/permissions/effective": { - "get": { - "operationId": "PermissionService_ListEffectivePermissions", - "parameters": [ { - "explode": true, "in": "query", - "name": "userIds", + "name": "filterAssetType", "required": false, "schema": { - "items": { - "type": "string" - }, - "type": "array" + "default": "ASSET_TYPE_UNSPECIFIED", + "enum": [ + "ASSET_TYPE_UNSPECIFIED", + "ASSET_TYPE_VM", + "ASSET_TYPE_CONTAINER", + "ASSET_TYPE_STORAGE", + "ASSET_TYPE_GAMESERVER", + "ASSET_TYPE_CDN", + "ASSET_TYPE_IP_ADDRESS", + "ASSET_TYPE_DNS", + "ASSET_TYPE_GPU", + "ASSET_TYPE_GENERIC" + ], + "type": "string" } } ], @@ -30845,7 +25957,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListEffectivePermissionsResponse" + "$ref": "#/components/schemas/v1ListMarketplaceProviderDirectoryResponse" } } }, @@ -30853,102 +25965,78 @@ } }, "tags": [ - "PermissionService" + "MarketplaceService" ] } }, - "/v1/permissions/remove-from-role": { - "delete": { - "operationId": "PermissionService_RemovePermissionFromRole", + "/v1/marketplace/providers": { + "get": { + "operationId": "MarketplaceService_ListProviders", "parameters": [ { - "explode": true, "in": "query", - "name": "permissionIds", + "name": "page", "required": false, "schema": { - "items": { - "type": "string" - }, - "type": "array" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "roleId", + "name": "pageSize", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "PermissionService" - ] - } - }, - "/v1/plans": { - "get": { - "operationId": "PlanService_ListPlans", - "parameters": [ + }, { + "description": "Filter providers that offer this plan code (required)", "in": "query", - "name": "page", + "name": "filterPlanCode", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { + "description": "Filter by country name (required, case-insensitive)", "in": "query", - "name": "pageSize", + "name": "filterCountry", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { - "description": "Filter to show only template plans (true) or only non-template plans\n(false) If not specified, shows both template and non-template plans", + "description": "Filter by city name (required, case-insensitive)", "in": "query", - "name": "isTemplate", + "name": "filterCity", "required": false, "schema": { - "type": "boolean" + "type": "string" } }, { - "description": "Filter by end user type (client, provider, or all)\nIf not specified, shows plans for all end user types based on organization\npermissions", + "description": "Filter by billing type (subscription/fixed or usage-based)\n\n - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan)", "in": "query", - "name": "endUser", + "name": "filterBillingType", "required": false, "schema": { - "default": "END_USER_UNSPECIFIED", + "default": "BILLING_TYPE_UNSPECIFIED", "enum": [ - "END_USER_UNSPECIFIED", - "END_USER_CLIENT", - "END_USER_PROVIDER", - "END_USER_ALL", - "END_USER_USER" + "BILLING_TYPE_UNSPECIFIED", + "BILLING_TYPE_SUBSCRIPTION", + "BILLING_TYPE_USAGE", + "BILLING_TYPE_FREE", + "BILLING_TYPE_PERCENTAGE" ], "type": "string" } }, { - "description": "Search filter for plan name, code, or description", + "description": "Search by organization name or description", "in": "query", "name": "search", "required": false, @@ -30957,60 +26045,48 @@ } }, { - "description": "Filter by asset type (vm, gameserver, etc.)", "in": "query", - "name": "assetType", + "name": "filterIpv6AvailableOnly", "required": false, "schema": { - "default": "ASSET_TYPE_UNSPECIFIED", - "enum": [ - "ASSET_TYPE_UNSPECIFIED", - "ASSET_TYPE_VM", - "ASSET_TYPE_CONTAINER", - "ASSET_TYPE_STORAGE", - "ASSET_TYPE_GAMESERVER", - "ASSET_TYPE_CDN", - "ASSET_TYPE_IP_ADDRESS", - "ASSET_TYPE_DNS", - "ASSET_TYPE_GPU", - "ASSET_TYPE_GENERIC" - ], - "type": "string" + "type": "boolean" } }, { - "description": "Filter by billing type (subscription, usage, etc.)\nIf not specified, shows plans for all billing types\n\n - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan)", + "description": "How to order providers: default is newest first. When set, Recommendations (first\nthree in newest-first order) stay pinned; the rest are ordered by the displayed\nlist price for the selected plan and billing type.\n\n - PROVIDER_PLAN_PRICE_SORT_LEAST_EXPENSIVE_FIRST: Ascending among non-recommended providers: lowest list price first\n(usage: hourly, subscription: fixed monthly, free: 0)\n - PROVIDER_PLAN_PRICE_SORT_MOST_EXPENSIVE_FIRST: Descending among non-recommended providers: highest list price first", "in": "query", - "name": "billingType", + "name": "planPriceSort", "required": false, "schema": { - "default": "BILLING_TYPE_UNSPECIFIED", + "default": "PROVIDER_PLAN_PRICE_SORT_UNSPECIFIED", "enum": [ - "BILLING_TYPE_UNSPECIFIED", - "BILLING_TYPE_SUBSCRIPTION", - "BILLING_TYPE_USAGE", - "BILLING_TYPE_FREE", - "BILLING_TYPE_PERCENTAGE" + "PROVIDER_PLAN_PRICE_SORT_UNSPECIFIED", + "PROVIDER_PLAN_PRICE_SORT_LEAST_EXPENSIVE_FIRST", + "PROVIDER_PLAN_PRICE_SORT_MOST_EXPENSIVE_FIRST" ], "type": "string" } }, { - "description": "Filter by compute type (optional). If provided, only plans with matching compute type in their name are returned.\nExamples: \"high performance\", \"high frequency\", \"general compute\", \"general purpose\", \"cpu optimized\", \"memory optimized\", \"storage optimized\"\nFiltering is case-insensitive.", + "description": "Only include providers where bandwidth egress is effectively unlimited for the selected plan\n(same basis as UI badge: overage_price if > 0 else unit_amount; unlimited when effective $/GB == 0).", "in": "query", - "name": "filterComputeType", + "name": "filterUnlimitedBandwidthOnly", "required": false, "schema": { - "type": "string" + "type": "boolean" } }, { - "description": "Filter by plan code (optional). If provided, only plans with matching code are returned.\nFiltering is case-insensitive.\nExamples: \"SC-GC-1C-1G-20\", \"DC-HF-4C-8G-160\"\nFiltering is case-insensitive.", + "description": "When set, only organizations whose ddos_provider is one of these slugs are included.\nWhen empty, do not filter by DDoS. Mirrored by marketplace UI: all slugs \"selected\" = omit this.", + "explode": true, "in": "query", - "name": "filterCode", + "name": "filterDdosProviders", "required": false, "schema": { - "type": "string" + "items": { + "type": "string" + }, + "type": "array" } } ], @@ -31019,7 +26095,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPlansResponse" + "$ref": "#/components/schemas/v1ListProvidersResponse" } } }, @@ -31027,27 +26103,29 @@ } }, "tags": [ - "PlanService" + "MarketplaceService" ] - }, - "post": { - "operationId": "ProviderPlanService_CreatePlan", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1CreatePlanRequest" - } + } + }, + "/v1/marketplace/providers/{providerId}": { + "get": { + "operationId": "MarketplaceService_GetProvider", + "parameters": [ + { + "in": "path", + "name": "providerId", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetProviderResponse" } } }, @@ -31055,19 +26133,33 @@ } }, "tags": [ - "ProviderPlanService" + "MarketplaceService" ] } }, - "/v1/plans/{id}": { - "delete": { - "operationId": "ProviderPlanService_DeletePlan", + "/v1/marketplace/regions": { + "get": { + "operationId": "MarketplaceService_ListAvailableRegions", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "description": "When set, only cities that sell a marketplace-listable plan of this asset type.\nUnspecified keeps every marketplace city (virtual machines and game servers).", + "in": "query", + "name": "filterAssetType", + "required": false, "schema": { + "default": "ASSET_TYPE_UNSPECIFIED", + "enum": [ + "ASSET_TYPE_UNSPECIFIED", + "ASSET_TYPE_VM", + "ASSET_TYPE_CONTAINER", + "ASSET_TYPE_STORAGE", + "ASSET_TYPE_GAMESERVER", + "ASSET_TYPE_CDN", + "ASSET_TYPE_IP_ADDRESS", + "ASSET_TYPE_DNS", + "ASSET_TYPE_GPU", + "ASSET_TYPE_GENERIC" + ], "type": "string" } } @@ -31077,7 +26169,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListAvailableRegionsResponse" } } }, @@ -31085,30 +26177,22 @@ } }, "tags": [ - "ProviderPlanService" + "MarketplaceService" ] - }, - "patch": { - "operationId": "ProviderPlanService_UpdatePlan", - "parameters": [ - { - "description": "Plan ID to update (required)", - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + } + }, + "/v1/marketplace/search": { + "post": { + "operationId": "MarketplaceService_SearchMarketplace", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderPlanServiceUpdatePlanBody" + "$ref": "#/components/schemas/v1SearchMarketplaceRequest" } } }, + "description": "Natural-language marketplace search (anonymous landing page).", "required": true }, "responses": { @@ -31116,7 +26200,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1SearchMarketplaceResponse" } } }, @@ -31124,40 +26208,98 @@ } }, "tags": [ - "ProviderPlanService" + "MarketplaceService" ] } }, - "/v1/plans/{planId}:subscribe": { - "post": { - "operationId": "PlanService_Subscribe", + "/v1/metrics": { + "get": { + "operationId": "MetricService_ListMetrics", "parameters": [ { - "in": "path", - "name": "planId", - "required": true, + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { - "description": "Optional billing period. If not provided, uses the plan's default billing\nperiod. If provided, validates that a PlanPrice exists for this billing\nperiod. If not available, returns a FailedPrecondition error.", "in": "query", - "name": "billingPeriod", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "billableOnly", + "required": false, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ListMetricsResponse" + } + } + }, + "description": "A successful response." + } + }, + "summary": "List all available metrics", + "tags": [ + "MetricService" + ] + } + }, + "/v1/metrics-write-credentials": { + "get": { + "operationId": "MetricsCredentialService_ListMetricsWriteCredentials", + "parameters": [ + { + "description": "Optional: omit or leave empty to list credentials for the whole organization.", + "in": "query", + "name": "agentId", "required": false, "schema": { - "default": "BILLING_PERIOD_UNSPECIFIED", - "enum": [ - "BILLING_PERIOD_UNSPECIFIED", - "BILLING_PERIOD_HOUR", - "BILLING_PERIOD_DAY", - "BILLING_PERIOD_WEEK", - "BILLING_PERIOD_MONTH", - "BILLING_PERIOD_QUARTER", - "BILLING_PERIOD_YEAR" - ], "type": "string" } + }, + { + "in": "query", + "name": "includeRevoked", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "description": "-1 means fetch all; otherwise 1..100.", + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } } ], "responses": { @@ -31165,7 +26307,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SubscribeResponse" + "$ref": "#/components/schemas/v1ListMetricsWriteCredentialsResponse" } } }, @@ -31173,18 +26315,16 @@ } }, "tags": [ - "PlanService" + "MetricsCredentialService" ] - } - }, - "/v1/plans:calculate": { + }, "post": { - "operationId": "ProviderPlanService_CalculatePlanPricing", + "operationId": "MetricsCredentialService_CreateMetricsWriteCredential", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CalculatePlanPricingRequest" + "$ref": "#/components/schemas/v1CreateMetricsWriteCredentialRequest" } } }, @@ -31195,7 +26335,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CalculatePlanPricingResponse" + "$ref": "#/components/schemas/v1CreateMetricsWriteCredentialResponse" } } }, @@ -31203,18 +26343,28 @@ } }, "tags": [ - "ProviderPlanService" + "MetricsCredentialService" ] } }, - "/v1/platform": { + "/v1/metrics-write-credentials/{id}:revoke": { "post": { - "operationId": "PlatformService_CreatePlatform", + "operationId": "MetricsCredentialService_RevokeMetricsWriteCredential", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreatePlatformRequest" + "$ref": "#/components/schemas/MetricsCredentialServiceRevokeMetricsWriteCredentialBody" } } }, @@ -31233,38 +26383,17 @@ } }, "tags": [ - "PlatformService" - ] - } - }, - "/v1/platform-versions": { - "get": { - "operationId": "MetadataService_GetPlatformVersions", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1PlatformVersions" - } - } - }, - "description": "A successful response." - } - }, - "summary": "GetPlatformVersions returns pinned versions for k3s, k3d, calico, liqo, liqoctl, and helm.", - "tags": [ - "MetadataService" + "MetricsCredentialService" ] } }, - "/v1/platform/organizations/{organizationId}:ban": { + "/v1/metrics-write-credentials/{id}:rotate": { "post": { - "operationId": "EnforcementService_BanOrganization", + "operationId": "MetricsCredentialService_RotateMetricsWriteCredential", "parameters": [ { "in": "path", - "name": "organizationId", + "name": "id", "required": true, "schema": { "type": "string" @@ -31275,7 +26404,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnforcementServiceBanOrganizationBody" + "$ref": "#/components/schemas/MetricsCredentialServiceRotateMetricsWriteCredentialBody" } } }, @@ -31286,7 +26415,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1CreateMetricsWriteCredentialResponse" } } }, @@ -31294,72 +26423,55 @@ } }, "tags": [ - "EnforcementService" + "MetricsCredentialService" ] } }, - "/v1/platform/organizations/{organizationId}:block-purchases": { - "post": { - "operationId": "EnforcementService_BlockOrganizationPurchases", + "/v1/metrics/{id}": { + "get": { + "operationId": "MetricService_GetMetric", "parameters": [ { "in": "path", - "name": "organizationId", + "name": "id", "required": true, "schema": { "type": "string" } + }, + { + "description": "Alternative to id", + "in": "query", + "name": "code", + "required": false, + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnforcementServiceBlockOrganizationPurchasesBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetMetricResponse" } } }, "description": "A successful response." } }, + "summary": "Get a specific metric by ID or code", "tags": [ - "EnforcementService" + "MetricService" ] } }, - "/v1/platform/organizations/{organizationId}:unban": { + "/v1/monitoring/business/datasource-token:rotate": { "post": { - "operationId": "EnforcementService_UnbanOrganization", - "parameters": [ - { - "in": "path", - "name": "organizationId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "BusinessMonitoringService_RotateBusinessMonitoringDatasourceToken", "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnforcementServiceUnbanOrganizationBody" - } - } - }, - "required": true + "$ref": "#/components/requestBodies/v1RotateMonitoringDatasourceTokenRequest" }, "responses": { "200": { @@ -31374,39 +26486,22 @@ } }, "tags": [ - "EnforcementService" + "BusinessMonitoringService" ] } }, - "/v1/platform/organizations/{organizationId}:unblock-purchases": { + "/v1/monitoring/business/launch": { "post": { - "operationId": "EnforcementService_UnblockOrganizationPurchases", - "parameters": [ - { - "in": "path", - "name": "organizationId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "BusinessMonitoringService_CreateBusinessMonitoringLaunch", "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnforcementServiceUnblockOrganizationPurchasesBody" - } - } - }, - "required": true + "$ref": "#/components/requestBodies/v1CreateMonitoringLaunchRequest" }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1CreateMonitoringLaunchResponse" } } }, @@ -31414,32 +26509,15 @@ } }, "tags": [ - "EnforcementService" + "BusinessMonitoringService" ] } }, - "/v1/platform/users/{userId}:ban": { + "/v1/monitoring/datasource-token:rotate": { "post": { - "operationId": "EnforcementService_BanUser", - "parameters": [ - { - "in": "path", - "name": "userId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "MonitoringService_RotateMonitoringDatasourceToken", "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnforcementServiceBanUserBody" - } - } - }, - "required": true + "$ref": "#/components/requestBodies/v1RotateMonitoringDatasourceTokenRequest" }, "responses": { "200": { @@ -31453,69 +26531,44 @@ "description": "A successful response." } }, + "summary": "RotateMonitoringDatasourceToken replaces the organization's Grafana datasource token.", "tags": [ - "EnforcementService" + "MonitoringService" ] } }, - "/v1/platform/users/{userId}:unban": { + "/v1/monitoring/launch": { "post": { - "operationId": "EnforcementService_UnbanUser", - "parameters": [ - { - "in": "path", - "name": "userId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "MonitoringService_CreateMonitoringLaunch", "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnforcementServiceUnbanUserBody" - } - } - }, - "required": true + "$ref": "#/components/requestBodies/v1CreateMonitoringLaunchRequest" }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1CreateMonitoringLaunchResponse" } } }, "description": "A successful response." } }, + "summary": "CreateMonitoringLaunch returns a one-time URL (valid for about a minute) that signs\nthe caller into the organization's Grafana. Grafana role: Editor when the caller\nmay also rotate the monitoring token, otherwise Viewer.", "tags": [ - "EnforcementService" + "MonitoringService" ] } }, - "/v1/platform/virtual-machines/{virtualMachineId}:delete": { + "/v1/node": { "post": { - "operationId": "EnforcementService_DeletePlatformVirtualMachine", - "parameters": [ - { - "in": "path", - "name": "virtualMachineId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "NodeService_CreateNode", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnforcementServiceDeletePlatformVirtualMachineBody" + "$ref": "#/components/schemas/v1CreateNodeRequest" } } }, @@ -31534,28 +26587,36 @@ } }, "tags": [ - "EnforcementService" + "NodeService" ] } }, - "/v1/platform/virtual-machines/{virtualMachineId}:suspend": { - "post": { - "operationId": "EnforcementService_SuspendPlatformVirtualMachine", - "parameters": [ - { - "in": "path", - "name": "virtualMachineId", - "required": true, - "schema": { - "type": "string" - } + "/v1/node-placement-policy": { + "get": { + "operationId": "NodePlacementService_GetNodePlacementPolicy", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1GetNodePlacementPolicyResponse" + } + } + }, + "description": "A successful response." } - ], + }, + "tags": [ + "NodePlacementService" + ] + }, + "put": { + "operationId": "NodePlacementService_UpdateNodePlacementPolicy", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnforcementServiceSuspendPlatformVirtualMachineBody" + "$ref": "#/components/schemas/v1UpdateNodePlacementPolicyRequest" } } }, @@ -31566,7 +26627,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VirtualMachine" + "$ref": "#/components/schemas/v1UpdateNodePlacementPolicyResponse" } } }, @@ -31574,28 +26635,18 @@ } }, "tags": [ - "EnforcementService" + "NodePlacementService" ] } }, - "/v1/platform/virtual-machines/{virtualMachineId}:unblock": { + "/v1/node/topology/validate": { "post": { - "operationId": "EnforcementService_UnblockPlatformVirtualMachine", - "parameters": [ - { - "in": "path", - "name": "virtualMachineId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "NodeService_ValidateNodeTopology", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnforcementServiceUnblockPlatformVirtualMachineBody" + "$ref": "#/components/schemas/v1ValidateNodeTopologyRequest" } } }, @@ -31606,21 +26657,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VirtualMachine" + "$ref": "#/components/schemas/v1ValidateNodeTopologyResponse" } } }, "description": "A successful response." } }, + "summary": "Dedicated CPU cores: parse-preview of a topology paste without persisting.", "tags": [ - "EnforcementService" + "NodeService" ] } }, - "/v1/platform/{id}": { + "/v1/node/{id}": { "delete": { - "operationId": "PlatformService_DeletePlatform", + "operationId": "NodeService_DeleteNode", "parameters": [ { "in": "path", @@ -31644,11 +26696,11 @@ } }, "tags": [ - "PlatformService" + "NodeService" ] }, "get": { - "operationId": "PlatformService_GetPlatform", + "operationId": "NodeService_GetNode", "parameters": [ { "in": "path", @@ -31664,7 +26716,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPlatformResponse" + "$ref": "#/components/schemas/v1GetNodeResponse" } } }, @@ -31672,11 +26724,11 @@ } }, "tags": [ - "PlatformService" + "NodeService" ] }, "patch": { - "operationId": "PlatformService_UpdatePlatform", + "operationId": "NodeService_UpdateNode", "parameters": [ { "in": "path", @@ -31691,7 +26743,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PlatformServiceUpdatePlatformBody" + "$ref": "#/components/schemas/NodeServiceUpdateNodeBody" } } }, @@ -31702,7 +26754,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdatePlatformResponse" + "$ref": "#/components/schemas/v1UpdateNodeResponse" } } }, @@ -31710,13 +26762,44 @@ } }, "tags": [ - "PlatformService" + "NodeService" ] } }, - "/v1/platforms": { + "/v1/node/{id}/cpu-map": { "get": { - "operationId": "PlatformService_ListPlatforms", + "operationId": "NodeService_GetNodeCPUMap", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1GetNodeCPUMapResponse" + } + } + }, + "description": "A successful response." + } + }, + "summary": "Dedicated CPU cores: full topology + per-CPU occupancy for the node\ntopology board (docs/README-DEDICATED-CPU-CORES.md \u00a76.3/\u00a78.3).", + "tags": [ + "NodeService" + ] + } + }, + "/v1/nodes": { + "get": { + "operationId": "NodeService_ListNodes", "parameters": [ { "in": "query", @@ -31736,6 +26819,15 @@ "type": "integer" } }, + { + "description": "Optional filter; UUID format validated in ListNodes when set.", + "in": "query", + "name": "platformId", + "required": false, + "schema": { + "type": "string" + } + }, { "in": "query", "name": "serviceStatus", @@ -31751,6 +26843,18 @@ "type": "string" } }, + { + "explode": true, + "in": "query", + "name": "expand", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + }, { "in": "query", "name": "search", @@ -31758,6 +26862,14 @@ "schema": { "type": "string" } + }, + { + "in": "query", + "name": "regionId", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -31765,7 +26877,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPlatformsResponse" + "$ref": "#/components/schemas/v1ListNodesResponse" } } }, @@ -31773,139 +26885,108 @@ } }, "tags": [ - "PlatformService" + "NodeService" ] } }, - "/v1/platforms/{platformId}:AssignAgent": { - "post": { - "operationId": "PlatformService_AssignAgent", + "/v1/oauth2/authorize": { + "get": { + "operationId": "OAuth2Service_Authorize", "parameters": [ { - "in": "path", - "name": "platformId", - "required": true, + "in": "query", + "name": "clientId", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlatformServiceAssignAgentBody" - } - } }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "PlatformService" - ] - } - }, - "/v1/platforms/{platformId}:UnassignAgent": { - "post": { - "operationId": "PlatformService_UnassignAgent", - "parameters": [ { - "in": "path", - "name": "platformId", - "required": true, + "in": "query", + "name": "responseType", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlatformServiceUnassignAgentBody" - } + }, + { + "in": "query", + "name": "redirectUri", + "required": false, + "schema": { + "type": "string" } }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "PlatformService" - ] - } - }, - "/v1/provider-reviews": { - "get": { - "operationId": "ProviderReviewService_ListProviderReviews", - "parameters": [ { "in": "query", - "name": "page", + "name": "scope", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { + "description": "CSRF protection", "in": "query", - "name": "pageSize", + "name": "state", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { - "description": "Multi-select star filter (e.g. [5,4]); empty means any stars.", - "explode": true, + "description": "PKCE challenge", "in": "query", - "name": "starRatings", + "name": "codeChallenge", "required": false, "schema": { - "items": { - "format": "int32", - "type": "integer" - }, - "type": "array" + "type": "string" } }, { - "description": "Case-insensitive substring match on review comment or provider reply; empty means no text filter.", + "description": "Only S256, not plain", + "in": "query", + "name": "codeChallengeMethod", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1AuthorizeResponse" + } + } + }, + "description": "A successful response." + } + }, + "summary": "Authorize initiates the OAuth2 authorization flow", + "tags": [ + "OAuth2Service" + ] + } + }, + "/v1/oauth2/clients": { + "get": { + "operationId": "OAuth2Service_ListClients", + "parameters": [ + { "in": "query", - "name": "search", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { - "description": "Inbox: 0 = awaiting provider reply / empty reply (default), 1 = replied only, 2 = all reviews.", "in": "query", - "name": "replyFilter", + "name": "pageSize", "required": false, "schema": { "format": "int32", @@ -31918,24 +26999,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListProviderReviewsResponse" + "$ref": "#/components/schemas/v1ListOAuth2ClientsResponse" } } }, "description": "A successful response." } }, + "summary": "ListClients lists OAuth2 clients for the organization", "tags": [ - "ProviderReviewService" + "OAuth2Service" ] }, "post": { - "operationId": "ClientProviderReviewService_CreateClientReview", + "operationId": "OAuth2Service_CreateClient", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateClientReviewRequest" + "$ref": "#/components/schemas/v1CreateOAuth2ClientRequest" } } }, @@ -31946,25 +27028,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateClientReviewResponse" + "$ref": "#/components/schemas/v1CreateOAuth2ClientResponse" } } }, "description": "A successful response." } }, + "summary": "CreateClient creates a new OAuth2 client", "tags": [ - "ClientProviderReviewService" + "OAuth2Service" ] } }, - "/v1/provider-reviews/virtual-machines/{virtualMachineId}": { - "get": { - "operationId": "ClientProviderReviewService_GetClientReviewForVirtualMachine", + "/v1/oauth2/clients/{clientId}": { + "delete": { + "operationId": "OAuth2Service_DeleteClient", "parameters": [ { "in": "path", - "name": "virtualMachineId", + "name": "clientId", "required": true, "schema": { "type": "string" @@ -31976,64 +27059,28 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetClientReviewForVirtualMachineResponse" + "properties": {}, + "type": "object" } } }, "description": "A successful response." } }, + "summary": "DeleteClient deletes an OAuth2 client", "tags": [ - "ClientProviderReviewService" + "OAuth2Service" ] } }, - "/v1/provider-reviews/{reviewId}": { - "delete": { - "operationId": "ClientProviderReviewService_DeleteClientReview", - "parameters": [ - { - "in": "path", - "name": "reviewId", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "ClientProviderReviewService" - ] - }, - "patch": { - "operationId": "ClientProviderReviewService_UpdateClientReview", - "parameters": [ - { - "in": "path", - "name": "reviewId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "/v1/oauth2/refresh": { + "post": { + "operationId": "OAuth2Service_RefreshToken", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ClientProviderReviewServiceUpdateClientReviewBody" + "$ref": "#/components/schemas/v1RefreshTokenRequest" } } }, @@ -32044,64 +27091,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateClientReviewResponse" + "$ref": "#/components/schemas/v1TokenResponse" } } }, "description": "A successful response." } }, + "summary": "RefreshToken exchanges refresh token for new access token", "tags": [ - "ClientProviderReviewService" + "OAuth2Service" ] } }, - "/v1/provider-reviews/{reviewId}/reply": { - "delete": { - "operationId": "ProviderReviewService_DeleteProviderReviewReply", - "parameters": [ - { - "in": "path", - "name": "reviewId", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1DeleteProviderReviewReplyResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "ProviderReviewService" - ] - }, - "patch": { - "operationId": "ProviderReviewService_UpdateProviderReviewReply", - "parameters": [ - { - "in": "path", - "name": "reviewId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "/v1/oauth2/revoke": { + "post": { + "operationId": "OAuth2Service_RevokeToken", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderReviewServiceUpdateProviderReviewReplyBody" + "$ref": "#/components/schemas/v1RevokeTokenRequest" } } }, @@ -32112,34 +27122,28 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateProviderReviewReplyResponse" + "properties": {}, + "type": "object" } } }, "description": "A successful response." } }, + "summary": "RevokeToken revokes an access or refresh token", "tags": [ - "ProviderReviewService" + "OAuth2Service" ] - }, + } + }, + "/v1/oauth2/token": { "post": { - "operationId": "ProviderReviewService_CreateProviderReviewReply", - "parameters": [ - { - "in": "path", - "name": "reviewId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "OAuth2Service_Token", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderReviewServiceCreateProviderReviewReplyBody" + "$ref": "#/components/schemas/v1TokenRequest" } } }, @@ -32150,27 +27154,28 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateProviderReviewReplyResponse" + "$ref": "#/components/schemas/v1TokenResponse" } } }, "description": "A successful response." } }, + "summary": "Token exchanges authorization code for access token", "tags": [ - "ProviderReviewService" + "OAuth2Service" ] } }, - "/v1/provider/connect/account": { - "delete": { - "operationId": "ProviderConnectService_DisconnectConnectAccount", + "/v1/organization": { + "get": { + "operationId": "OrganizationService_GetOrganization", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetOrganizationResponse" } } }, @@ -32178,17 +27183,19 @@ } }, "tags": [ - "ProviderConnectService" + "OrganizationService" ] - }, - "get": { - "operationId": "ProviderConnectService_GetConnectAccount", + } + }, + "/v1/organizations": { + "delete": { + "operationId": "OrganizationService_DeleteOrganization", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetConnectAccountResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -32196,27 +27203,37 @@ } }, "tags": [ - "ProviderConnectService" + "OrganizationService" ] }, - "post": { - "operationId": "ProviderConnectService_CreateConnectAccount", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1CreateConnectAccountRequest" - } + "get": { + "operationId": "OrganizationService_ListOrganizations", + "parameters": [ + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" } }, - "required": true - }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateConnectAccountResponse" + "$ref": "#/components/schemas/v1ListOrganizationsResponse" } } }, @@ -32224,18 +27241,16 @@ } }, "tags": [ - "ProviderConnectService" + "OrganizationService" ] - } - }, - "/v1/provider/connect/oauth:complete": { - "post": { - "operationId": "ProviderConnectService_CompleteConnectOAuth", + }, + "patch": { + "operationId": "OrganizationService_UpdateOrganization", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CompleteConnectOAuthRequest" + "$ref": "#/components/schemas/v1UpdateOrganizationRequest" } } }, @@ -32246,27 +27261,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CompleteConnectOAuthResponse" + "$ref": "#/components/schemas/v1UpdateOrganizationResponse" } } }, "description": "A successful response." } }, - "summary": "Completes Stripe Connect OAuth after Stripe redirects back with a code.", "tags": [ - "ProviderConnectService" + "OrganizationService" ] - } - }, - "/v1/provider/connect/oauth:start": { + }, "post": { - "operationId": "ProviderConnectService_StartConnectOAuth", + "operationId": "OrganizationService_CreateOrganization", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1StartConnectOAuthRequest" + "$ref": "#/components/schemas/v1CreateOrganizationRequest" } } }, @@ -32277,45 +27289,84 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1StartConnectOAuthResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "Starts Stripe Connect OAuth so a provider can attach an existing Standard account.", "tags": [ - "ProviderConnectService" + "OrganizationService" ] } }, - "/v1/provider/connect/tax-registrations": { + "/v1/payment-methods": { "get": { - "operationId": "ProviderConnectService_ListConnectTaxRegistrations", + "operationId": "PaymentMethodService_ListPaymentMethods", + "parameters": [ + { + "description": "Filters\n\nFilter by subscription", + "in": "query", + "name": "subscriptionId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Only return default payment method", + "in": "query", + "name": "onlyDefault", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "description": "Pagination", + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListConnectTaxRegistrationsResponse" + "$ref": "#/components/schemas/v1ListPaymentMethodsResponse" } } }, "description": "A successful response." } }, + "summary": "List payment methods for an organization/subscription\nReturns payment method details (type, last4, brand, expiry, is_default)", "tags": [ - "ProviderConnectService" + "PaymentMethodService" ] }, "post": { - "operationId": "ProviderConnectService_CreateConnectTaxRegistration", + "operationId": "PaymentMethodService_AttachPaymentMethod", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateConnectTaxRegistrationRequest" + "$ref": "#/components/schemas/v1AttachPaymentMethodRequest" } } }, @@ -32326,157 +27377,195 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateConnectTaxRegistrationResponse" + "$ref": "#/components/schemas/v1AttachPaymentMethodResponse" } } }, "description": "A successful response." } }, + "summary": "Attach a payment method to a subscription/organization\nWorks for both providers (platform subscriptions) and clients (provider\nplan subscriptions) Authorization: Check organization type and rule engine\n(subscription.payment_method.manage.enabled)", "tags": [ - "ProviderConnectService" + "PaymentMethodService" ] } }, - "/v1/provider/connect/tax-registrations/{id}/expire": { - "post": { - "operationId": "ProviderConnectService_ExpireConnectTaxRegistration", + "/v1/payment-methods/{paymentMethodId}": { + "delete": { + "operationId": "PaymentMethodService_RemovePaymentMethod", "parameters": [ { "in": "path", - "name": "id", + "name": "paymentMethodId", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProviderConnectServiceExpireConnectTaxRegistrationBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ExpireConnectTaxRegistrationResponse" + "$ref": "#/components/schemas/v1RemovePaymentMethodResponse" } } }, "description": "A successful response." } }, + "summary": "Remove a payment method\nValidation:\n- Providers: Cannot remove if only one method exists (except on free plan)\n- Clients: Cannot remove if only one method exists\n- Cannot remove if payment method is currently in use for active\nsubscriptions", "tags": [ - "ProviderConnectService" + "PaymentMethodService" ] } }, - "/v1/provider/connect/tax-session": { + "/v1/payment-methods/{paymentMethodId}:set-default": { "post": { - "operationId": "ProviderConnectService_CreateConnectTaxSession", + "operationId": "PaymentMethodService_SetDefaultPaymentMethod", + "parameters": [ + { + "in": "path", + "name": "paymentMethodId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { - "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentMethodServiceSetDefaultPaymentMethodBody" + } + } + }, + "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateConnectTaxSessionResponse" + "$ref": "#/components/schemas/v1SetDefaultPaymentMethodResponse" } } }, "description": "A successful response." } }, - "summary": "Creates a Stripe AccountSession client secret for Connect tax_settings /\ntax_registrations embedded components (legacy; prefer native tax RPCs).", + "summary": "Set a payment method as the default payment method\nValidates payment method belongs to organization/subscription", "tags": [ - "ProviderConnectService" + "PaymentMethodService" ] } }, - "/v1/provider/connect/tax-settings": { + "/v1/payments": { "get": { - "operationId": "ProviderConnectService_GetConnectTaxSettings", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetConnectTaxSettingsResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "ProviderConnectService" - ] - }, - "put": { - "operationId": "ProviderConnectService_UpdateConnectTaxSettings", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1UpdateConnectTaxSettingsRequest" - } + "operationId": "PaymentService_ListPayments", + "parameters": [ + { + "in": "query", + "name": "invoiceId", + "required": false, + "schema": { + "type": "string" } }, - "required": true - }, + { + "in": "query", + "name": "status", + "required": false, + "schema": { + "default": "PAYMENT_STATUS_UNSPECIFIED", + "enum": [ + "PAYMENT_STATUS_UNSPECIFIED", + "PAYMENT_STATUS_PENDING", + "PAYMENT_STATUS_PROCESSING", + "PAYMENT_STATUS_SUCCEEDED", + "PAYMENT_STATUS_FAILED", + "PAYMENT_STATUS_CANCELED", + "PAYMENT_STATUS_REFUNDED", + "PAYMENT_STATUS_PARTIALLY_REFUNDED" + ], + "type": "string" + } + }, + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateConnectTaxSettingsResponse" + "$ref": "#/components/schemas/v1ListPaymentsResponse" } } }, "description": "A successful response." } }, + "summary": "ListPayments lists payments for an invoice or organization", "tags": [ - "ProviderConnectService" + "PaymentService" ] } }, - "/v1/provider/customer-stats": { + "/v1/payments/{paymentId}": { "get": { - "operationId": "ProviderCustomerService_GetProviderCustomerStats", + "operationId": "PaymentService_GetPayment", + "parameters": [ + { + "in": "path", + "name": "paymentId", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetProviderCustomerStatsResponse" + "$ref": "#/components/schemas/v1GetPaymentResponse" } } }, "description": "A successful response." } }, - "summary": "Path must not be `/customers/stats`: some gateways match `/customers/{client_organization_id}` first and treat \"stats\" as a UUID field (validation error).", + "summary": "GetPayment retrieves a single payment with refunds", "tags": [ - "ProviderCustomerService" + "PaymentService" ] } }, - "/v1/provider/customers": { + "/v1/permissions": { "get": { - "operationId": "ProviderCustomerService_ListProviderCustomers", + "operationId": "PermissionService_ListPermissions", "parameters": [ { - "description": "0-based page (default 0).", "in": "query", "name": "page", "required": false, @@ -32486,7 +27575,6 @@ } }, { - "description": "-1 = all matches (no server row cap; prefer paginated 1..100 for large data sets). Otherwise 1..100 per page (see ListVirtualMachinesRequest).", "in": "query", "name": "pageSize", "required": false, @@ -32496,28 +27584,75 @@ } }, { - "description": "Case-insensitive match on client organization name or any member email (owners/members via roles & groups).", "in": "query", - "name": "search", + "name": "filterName", "required": false, "schema": { "type": "string" } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ListPermissionsResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "PermissionService" + ] + } + }, + "/v1/permissions/assign-to-role": { + "post": { + "operationId": "PermissionService_AssignPermissionToRole", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1AssignPermissionToRoleRequest" + } + } }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1SuccessResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "PermissionService" + ] + } + }, + "/v1/permissions/effective": { + "get": { + "operationId": "PermissionService_ListEffectivePermissions", + "parameters": [ { - "description": "Default / UNSPECIFIED means ALL (same as PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL).\n\n - PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL: All customers (any VM history with this provider, including when every VM is soft-deleted).", + "explode": true, "in": "query", - "name": "activityFilter", + "name": "userIds", "required": false, "schema": { - "default": "PROVIDER_CUSTOMER_ACTIVITY_FILTER_UNSPECIFIED", - "enum": [ - "PROVIDER_CUSTOMER_ACTIVITY_FILTER_UNSPECIFIED", - "PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL", - "PROVIDER_CUSTOMER_ACTIVITY_FILTER_ACTIVE", - "PROVIDER_CUSTOMER_ACTIVITY_FILTER_INACTIVE" - ], - "type": "string" + "items": { + "type": "string" + }, + "type": "array" } } ], @@ -32526,7 +27661,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListProviderCustomersResponse" + "$ref": "#/components/schemas/v1ListEffectivePermissionsResponse" } } }, @@ -32534,18 +27669,30 @@ } }, "tags": [ - "ProviderCustomerService" + "PermissionService" ] } }, - "/v1/provider/customers/{clientOrganizationId}": { - "get": { - "operationId": "ProviderCustomerService_GetProviderCustomer", + "/v1/permissions/remove-from-role": { + "delete": { + "operationId": "PermissionService_RemovePermissionFromRole", "parameters": [ { - "in": "path", - "name": "clientOrganizationId", - "required": true, + "explode": true, + "in": "query", + "name": "permissionIds", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + { + "in": "query", + "name": "roleId", + "required": false, "schema": { "type": "string" } @@ -32556,7 +27703,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetProviderCustomerResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -32564,22 +27711,14 @@ } }, "tags": [ - "ProviderCustomerService" + "PermissionService" ] } }, - "/v1/provider/customers/{clientOrganizationId}/assets": { + "/v1/plans": { "get": { - "operationId": "ProviderCustomerService_ListProviderCustomerAssets", + "operationId": "PlanService_ListPlans", "parameters": [ - { - "in": "path", - "name": "clientOrganizationId", - "required": true, - "schema": { - "type": "string" - } - }, { "in": "query", "name": "page", @@ -32590,7 +27729,6 @@ } }, { - "description": "Same rules as ListProviderCustomers.page_size.", "in": "query", "name": "pageSize", "required": false, @@ -32600,6 +27738,33 @@ } }, { + "description": "Filter to show only template plans (true) or only non-template plans\n(false) If not specified, shows both template and non-template plans", + "in": "query", + "name": "isTemplate", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "description": "Filter by end user type (client, provider, or all)\nIf not specified, shows plans for all end user types based on organization\npermissions", + "in": "query", + "name": "endUser", + "required": false, + "schema": { + "default": "END_USER_UNSPECIFIED", + "enum": [ + "END_USER_UNSPECIFIED", + "END_USER_CLIENT", + "END_USER_PROVIDER", + "END_USER_ALL", + "END_USER_USER" + ], + "type": "string" + } + }, + { + "description": "Search filter for plan name, code, or description", "in": "query", "name": "search", "required": false, @@ -32608,40 +27773,57 @@ } }, { + "description": "Filter by asset type (vm, gameserver, etc.)", "in": "query", "name": "assetType", "required": false, "schema": { - "default": "PROVIDER_CUSTOMER_ASSET_TYPE_UNSPECIFIED", + "default": "ASSET_TYPE_UNSPECIFIED", "enum": [ - "PROVIDER_CUSTOMER_ASSET_TYPE_UNSPECIFIED", - "PROVIDER_CUSTOMER_ASSET_TYPE_ALL", - "PROVIDER_CUSTOMER_ASSET_TYPE_VIRTUAL_MACHINE", - "PROVIDER_CUSTOMER_ASSET_TYPE_DEDICATED_SERVER", - "PROVIDER_CUSTOMER_ASSET_TYPE_GAME_SERVER" + "ASSET_TYPE_UNSPECIFIED", + "ASSET_TYPE_VM", + "ASSET_TYPE_CONTAINER", + "ASSET_TYPE_STORAGE", + "ASSET_TYPE_GAMESERVER", + "ASSET_TYPE_CDN", + "ASSET_TYPE_IP_ADDRESS", + "ASSET_TYPE_DNS", + "ASSET_TYPE_GPU", + "ASSET_TYPE_GENERIC" ], "type": "string" } }, { - "description": "When set (not UNSPECIFIED), only assets matching this activity status are returned.", + "description": "Filter by billing type (subscription, usage, etc.)\nIf not specified, shows plans for all billing types\n\n - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan)", "in": "query", - "name": "activityStatus", + "name": "billingType", "required": false, "schema": { - "default": "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_UNSPECIFIED", + "default": "BILLING_TYPE_UNSPECIFIED", "enum": [ - "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_UNSPECIFIED", - "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_ACTIVE", - "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_INACTIVE" + "BILLING_TYPE_UNSPECIFIED", + "BILLING_TYPE_SUBSCRIPTION", + "BILLING_TYPE_USAGE", + "BILLING_TYPE_FREE", + "BILLING_TYPE_PERCENTAGE" ], "type": "string" } }, { - "description": "When set to a non-empty UUID, only assets whose VM node is in this region are returned.", + "description": "Filter by compute type (optional). If provided, only plans with matching compute type in their name are returned.\nExamples: \"high performance\", \"high frequency\", \"general compute\", \"general purpose\", \"cpu optimized\", \"memory optimized\", \"storage optimized\"\nFiltering is case-insensitive.", "in": "query", - "name": "regionId", + "name": "filterComputeType", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Filter by plan code (optional). If provided, only plans with matching code are returned.\nFiltering is case-insensitive.\nExamples: \"SC-GC-1C-1G-20\", \"DC-HF-4C-8G-160\"\nFiltering is case-insensitive.", + "in": "query", + "name": "filterCode", "required": false, "schema": { "type": "string" @@ -32653,7 +27835,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListProviderCustomerAssetsResponse" + "$ref": "#/components/schemas/v1ListPlansResponse" } } }, @@ -32661,29 +27843,27 @@ } }, "tags": [ - "ProviderCustomerService" + "PlanService" ] - } - }, - "/v1/provider/customers/{clientOrganizationId}/billing": { - "get": { - "operationId": "ProviderCustomerService_GetProviderCustomerBilling", - "parameters": [ - { - "in": "path", - "name": "clientOrganizationId", - "required": true, - "schema": { - "type": "string" + }, + "post": { + "operationId": "ProviderPlanService_CreatePlan", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1CreatePlanRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetProviderCustomerBillingResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -32691,47 +27871,29 @@ } }, "tags": [ - "ProviderCustomerService" + "ProviderPlanService" ] } }, - "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:restart": { - "post": { - "operationId": "ProviderCustomerService_RestartProviderCustomerVirtualMachine", + "/v1/plans/{id}": { + "delete": { + "operationId": "ProviderPlanService_DeletePlan", "parameters": [ { "in": "path", - "name": "clientOrganizationId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "virtualMachineId", + "name": "id", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProviderCustomerServiceRestartProviderCustomerVirtualMachineBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VirtualMachine" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -32739,25 +27901,16 @@ } }, "tags": [ - "ProviderCustomerService" + "ProviderPlanService" ] - } - }, - "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:start": { - "post": { - "operationId": "ProviderCustomerService_StartProviderCustomerVirtualMachine", + }, + "patch": { + "operationId": "ProviderPlanService_UpdatePlan", "parameters": [ { + "description": "Plan ID to update (required)", "in": "path", - "name": "clientOrganizationId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "virtualMachineId", + "name": "id", "required": true, "schema": { "type": "string" @@ -32768,7 +27921,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderCustomerServiceStartProviderCustomerVirtualMachineBody" + "$ref": "#/components/schemas/ProviderPlanServiceUpdatePlanBody" } } }, @@ -32779,7 +27932,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VirtualMachine" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -32787,47 +27940,48 @@ } }, "tags": [ - "ProviderCustomerService" + "ProviderPlanService" ] } }, - "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:stop": { + "/v1/plans/{planId}:subscribe": { "post": { - "operationId": "ProviderCustomerService_StopProviderCustomerVirtualMachine", + "operationId": "PlanService_Subscribe", "parameters": [ { "in": "path", - "name": "clientOrganizationId", + "name": "planId", "required": true, "schema": { "type": "string" } }, { - "in": "path", - "name": "virtualMachineId", - "required": true, + "description": "Optional billing period. If not provided, uses the plan's default billing\nperiod. If provided, validates that a PlanPrice exists for this billing\nperiod. If not available, returns a FailedPrecondition error.", + "in": "query", + "name": "billingPeriod", + "required": false, "schema": { + "default": "BILLING_PERIOD_UNSPECIFIED", + "enum": [ + "BILLING_PERIOD_UNSPECIFIED", + "BILLING_PERIOD_HOUR", + "BILLING_PERIOD_DAY", + "BILLING_PERIOD_WEEK", + "BILLING_PERIOD_MONTH", + "BILLING_PERIOD_QUARTER", + "BILLING_PERIOD_YEAR" + ], "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProviderCustomerServiceStopProviderCustomerVirtualMachineBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VirtualMachine" + "$ref": "#/components/schemas/v1SubscribeResponse" } } }, @@ -32835,36 +27989,18 @@ } }, "tags": [ - "ProviderCustomerService" + "PlanService" ] } }, - "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:suspend": { + "/v1/plans:calculate": { "post": { - "operationId": "ProviderCustomerService_SuspendProviderCustomerVirtualMachine", - "parameters": [ - { - "in": "path", - "name": "clientOrganizationId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "virtualMachineId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "ProviderPlanService_CalculatePlanPricing", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderCustomerServiceSuspendProviderCustomerVirtualMachineBody" + "$ref": "#/components/schemas/v1CalculatePlanPricingRequest" } } }, @@ -32875,7 +28011,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VirtualMachine" + "$ref": "#/components/schemas/v1CalculatePlanPricingResponse" } } }, @@ -32883,36 +28019,18 @@ } }, "tags": [ - "ProviderCustomerService" + "ProviderPlanService" ] } }, - "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:unblock": { + "/v1/platform": { "post": { - "operationId": "ProviderCustomerService_UnblockProviderCustomerVirtualMachine", - "parameters": [ - { - "in": "path", - "name": "clientOrganizationId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "virtualMachineId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "PlatformService_CreatePlatform", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderCustomerServiceUnblockProviderCustomerVirtualMachineBody" + "$ref": "#/components/schemas/v1CreatePlatformRequest" } } }, @@ -32923,7 +28041,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VirtualMachine" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -32931,57 +28049,38 @@ } }, "tags": [ - "ProviderCustomerService" + "PlatformService" ] } }, - "/v1/provider/customers/{clientOrganizationId}:block-purchases": { - "post": { - "operationId": "ProviderCustomerService_BlockProviderCustomerPurchases", - "parameters": [ - { - "in": "path", - "name": "clientOrganizationId", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProviderCustomerServiceBlockProviderCustomerPurchasesBody" - } - } - }, - "required": true - }, + "/v1/platform-versions": { + "get": { + "operationId": "MetadataService_GetPlatformVersions", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1PlatformVersions" } } }, "description": "A successful response." } }, + "summary": "GetPlatformVersions returns pinned versions for k3s, k3d, calico, liqo, liqoctl, and helm.", "tags": [ - "ProviderCustomerService" + "MetadataService" ] } }, - "/v1/provider/customers/{clientOrganizationId}:unblock-purchases": { + "/v1/platform/organizations/{organizationId}:ban": { "post": { - "operationId": "ProviderCustomerService_UnblockProviderCustomerPurchases", + "operationId": "EnforcementService_BanOrganization", "parameters": [ { "in": "path", - "name": "clientOrganizationId", + "name": "organizationId", "required": true, "schema": { "type": "string" @@ -32992,7 +28091,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderCustomerServiceUnblockProviderCustomerPurchasesBody" + "$ref": "#/components/schemas/EnforcementServiceBanOrganizationBody" } } }, @@ -33011,94 +28110,39 @@ } }, "tags": [ - "ProviderCustomerService" + "EnforcementService" ] } }, - "/v1/provider/dashboard/addon-catalog-stats": { - "get": { - "operationId": "ProviderDashboardService_ListDashboardAddonCatalogStats", + "/v1/platform/organizations/{organizationId}:block-purchases": { + "post": { + "operationId": "EnforcementService_BlockOrganizationPurchases", "parameters": [ { - "in": "query", - "name": "addonSearch", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "addonTypeFilter", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "addonBillingTypeFilter", - "required": false, + "in": "path", + "name": "organizationId", + "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListDashboardAddonCatalogStatsResponse" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnforcementServiceBlockOrganizationPurchasesBody" } - }, - "description": "A successful response." - } - }, - "tags": [ - "ProviderDashboardService" - ] - } - }, - "/v1/provider/dashboard/asset-sales-timeseries": { - "get": { - "operationId": "ProviderDashboardService_GetDashboardAssetSalesTimeseries", - "parameters": [ - { - "in": "query", - "name": "rangeDays", - "required": false, - "schema": { - "format": "int32", - "type": "integer" } - } - ], + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetDashboardAssetSalesTimeseriesResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -33106,66 +28150,39 @@ } }, "tags": [ - "ProviderDashboardService" + "EnforcementService" ] } }, - "/v1/provider/dashboard/billing-sales": { - "get": { - "operationId": "ProviderDashboardService_GetDashboardBillingSales", + "/v1/platform/organizations/{organizationId}:unban": { + "post": { + "operationId": "EnforcementService_UnbanOrganization", "parameters": [ { - "in": "query", - "name": "rangeDays", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "includePriorPeriod", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "description": "Revenue-by-customer table (1-based page). Omit for defaults (page 1, page size 25).", - "in": "query", - "name": "revenueByCustomerPage", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "revenueByCustomerPageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "description": "Case-insensitive substring match on contact email, organization id, or organization name.", - "in": "query", - "name": "revenueByCustomerEmailFilter", - "required": false, + "in": "path", + "name": "organizationId", + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnforcementServiceUnbanOrganizationBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetDashboardBillingSalesResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -33173,30 +28190,39 @@ } }, "tags": [ - "ProviderDashboardService" + "EnforcementService" ] } }, - "/v1/provider/dashboard/customer-acquisition-timeseries": { - "get": { - "operationId": "ProviderDashboardService_GetDashboardCustomerAcquisitionTimeseries", + "/v1/platform/organizations/{organizationId}:unblock-purchases": { + "post": { + "operationId": "EnforcementService_UnblockOrganizationPurchases", "parameters": [ { - "in": "query", - "name": "rangeDays", - "required": false, + "in": "path", + "name": "organizationId", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnforcementServiceUnblockOrganizationPurchasesBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetDashboardCustomerAcquisitionTimeseriesResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -33204,55 +28230,39 @@ } }, "tags": [ - "ProviderDashboardService" + "EnforcementService" ] } }, - "/v1/provider/dashboard/infrastructure": { - "get": { - "operationId": "ProviderDashboardService_ListDashboardInfrastructure", + "/v1/platform/users/{userId}:ban": { + "post": { + "operationId": "EnforcementService_BanUser", "parameters": [ { - "in": "query", - "name": "platformId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "regionId", - "required": false, + "in": "path", + "name": "userId", + "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnforcementServiceBanUserBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDashboardInfrastructureResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -33260,47 +28270,39 @@ } }, "tags": [ - "ProviderDashboardService" + "EnforcementService" ] } }, - "/v1/provider/dashboard/ipam": { - "get": { - "operationId": "ProviderDashboardService_ListDashboardIpam", + "/v1/platform/users/{userId}:unban": { + "post": { + "operationId": "EnforcementService_UnbanUser", "parameters": [ { - "in": "query", - "name": "networkId", - "required": false, + "in": "path", + "name": "userId", + "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "allocatedSampleIpsPage", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "allocatedSampleIpsPageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnforcementServiceUnbanUserBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDashboardIpamResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -33308,77 +28310,39 @@ } }, "tags": [ - "ProviderDashboardService" + "EnforcementService" ] } }, - "/v1/provider/dashboard/ipam/assignments": { - "get": { - "operationId": "ProviderDashboardService_ListDashboardIpamAssignments", + "/v1/platform/virtual-machines/{virtualMachineId}:delete": { + "post": { + "operationId": "EnforcementService_DeletePlatformVirtualMachine", "parameters": [ { - "in": "query", - "name": "networkId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "search", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "platformId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "ipFamily", - "required": false, + "in": "path", + "name": "virtualMachineId", + "required": true, "schema": { - "default": "DASHBOARD_IPAM_ASSIGNMENT_IP_FAMILY_UNSPECIFIED", - "enum": [ - "DASHBOARD_IPAM_ASSIGNMENT_IP_FAMILY_UNSPECIFIED", - "DASHBOARD_IPAM_ASSIGNMENT_IP_FAMILY_IPV4", - "DASHBOARD_IPAM_ASSIGNMENT_IP_FAMILY_IPV6" - ], "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnforcementServiceDeletePlatformVirtualMachineBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDashboardIpamAssignmentsResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -33386,63 +28350,39 @@ } }, "tags": [ - "ProviderDashboardService" + "EnforcementService" ] } }, - "/v1/provider/dashboard/plan-subscription-stats": { - "get": { - "operationId": "ProviderDashboardService_ListDashboardPlanSubscriptionStats", + "/v1/platform/virtual-machines/{virtualMachineId}:suspend": { + "post": { + "operationId": "EnforcementService_SuspendPlatformVirtualMachine", "parameters": [ { - "in": "query", - "name": "planSearch", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "planBillingTypeFilter", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "planAssetFilter", - "required": false, + "in": "path", + "name": "virtualMachineId", + "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "plansPage", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "plansPageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnforcementServiceSuspendPlatformVirtualMachineBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDashboardPlanSubscriptionStatsResponse" + "$ref": "#/components/schemas/v1VirtualMachine" } } }, @@ -33450,19 +28390,39 @@ } }, "tags": [ - "ProviderDashboardService" + "EnforcementService" ] } }, - "/v1/provider/dashboard/plans-tab-stats": { - "get": { - "operationId": "ProviderDashboardPlansTabService_GetDashboardPlansTabStats", + "/v1/platform/virtual-machines/{virtualMachineId}:unblock": { + "post": { + "operationId": "EnforcementService_UnblockPlatformVirtualMachine", + "parameters": [ + { + "in": "path", + "name": "virtualMachineId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnforcementServiceUnblockPlatformVirtualMachineBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ProviderDashboardPlansTabStats" + "$ref": "#/components/schemas/v1VirtualMachine" } } }, @@ -33470,19 +28430,29 @@ } }, "tags": [ - "ProviderDashboardPlansTabService" + "EnforcementService" ] } }, - "/v1/provider/dashboard/summary": { - "get": { - "operationId": "ProviderDashboardService_GetDashboardSummary", + "/v1/platform/{id}": { + "delete": { + "operationId": "PlatformService_DeletePlatform", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetDashboardSummaryResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -33490,39 +28460,65 @@ } }, "tags": [ - "ProviderDashboardService" + "PlatformService" ] - } - }, - "/v1/provider/dashboard/tickets/statistics": { + }, "get": { - "operationId": "ProviderDashboardService_ListDashboardTicketStatistics", + "operationId": "PlatformService_GetPlatform", "parameters": [ { - "in": "query", - "name": "fromTime", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { - "format": "date-time", "type": "string" } - }, + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1GetPlatformResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "PlatformService" + ] + }, + "patch": { + "operationId": "PlatformService_UpdatePlatform", + "parameters": [ { - "in": "query", - "name": "toTime", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { - "format": "date-time", "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformServiceUpdatePlatformBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDashboardTicketStatisticsResponse" + "$ref": "#/components/schemas/v1UpdatePlatformResponse" } } }, @@ -33530,49 +28526,26 @@ } }, "tags": [ - "ProviderDashboardService" + "PlatformService" ] } }, - "/v1/provider/dashboard/virtual-machines": { + "/v1/platforms": { "get": { - "operationId": "ProviderDashboardService_ListDashboardVirtualMachines", + "operationId": "PlatformService_ListPlatforms", "parameters": [ { "in": "query", - "name": "platformId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "regionId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "nodeId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "customerEmailContains", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "vmPage", + "name": "pageSize", "required": false, "schema": { "format": "int32", @@ -33581,16 +28554,22 @@ }, { "in": "query", - "name": "vmPageSize", + "name": "serviceStatus", "required": false, "schema": { - "format": "int32", - "type": "integer" + "default": "SERVICE_STATUS_UNSPECIFIED", + "enum": [ + "SERVICE_STATUS_UNSPECIFIED", + "SERVICE_STATUS_ONLINE", + "SERVICE_STATUS_OFFLINE", + "SERVICE_STATUS_MAINTENANCE" + ], + "type": "string" } }, { "in": "query", - "name": "vmtemplateId", + "name": "search", "required": false, "schema": { "type": "string" @@ -33602,7 +28581,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDashboardVirtualMachinesResponse" + "$ref": "#/components/schemas/v1ListPlatformsResponse" } } }, @@ -33610,83 +28589,139 @@ } }, "tags": [ - "ProviderDashboardService" + "PlatformService" ] } }, - "/v1/provider/held-payouts": { - "get": { - "operationId": "PayoutInvoiceService_ListHeldPayouts", + "/v1/platforms/{platformId}:AssignAgent": { + "post": { + "operationId": "PlatformService_AssignAgent", "parameters": [ { - "in": "query", - "name": "page", - "required": false, + "in": "path", + "name": "platformId", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformServiceAssignAgentBody" + } } }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1SuccessResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "PlatformService" + ] + } + }, + "/v1/platforms/{platformId}:UnassignAgent": { + "post": { + "operationId": "PlatformService_UnassignAgent", + "parameters": [ { - "in": "query", - "name": "pageSize", - "required": false, + "in": "path", + "name": "platformId", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformServiceUnassignAgentBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListHeldPayoutsResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "Paid client invoices whose payout to this provider is on hold, soonest release first.", "tags": [ - "PayoutInvoiceService" + "PlatformService" ] } }, - "/v1/provider/live-validations": { + "/v1/provider-reviews": { "get": { - "operationId": "LiveValidationService_ListPlanLiveValidations", + "operationId": "ProviderReviewService_ListProviderReviews", "parameters": [ { "in": "query", - "name": "planId", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" } }, { + "description": "Multi-select star filter (e.g. [5,4]); empty means any stars.", + "explode": true, "in": "query", - "name": "search", + "name": "starRatings", "required": false, "schema": { - "type": "string" + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" } }, { + "description": "Case-insensitive substring match on review comment or provider reply; empty means no text filter.", "in": "query", - "name": "page", + "name": "search", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { + "description": "Inbox: 0 = awaiting provider reply / empty reply (default), 1 = replied only, 2 = all reviews.", "in": "query", - "name": "pageSize", + "name": "replyFilter", "required": false, "schema": { "format": "int32", @@ -33699,7 +28734,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPlanLiveValidationsResponse" + "$ref": "#/components/schemas/v1ListProviderReviewsResponse" } } }, @@ -33707,19 +28742,57 @@ } }, "tags": [ - "LiveValidationService" + "ProviderReviewService" + ] + }, + "post": { + "operationId": "ClientProviderReviewService_CreateClientReview", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1CreateClientReviewRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1CreateClientReviewResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "ClientProviderReviewService" ] } }, - "/v1/provider/manual-payout": { - "delete": { - "operationId": "ManualPayoutService_DeleteManualPayout", + "/v1/provider-reviews/virtual-machines/{virtualMachineId}": { + "get": { + "operationId": "ClientProviderReviewService_GetClientReviewForVirtualMachine", + "parameters": [ + { + "in": "path", + "name": "virtualMachineId", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetClientReviewForVirtualMachineResponse" } } }, @@ -33727,17 +28800,29 @@ } }, "tags": [ - "ManualPayoutService" + "ClientProviderReviewService" ] - }, - "get": { - "operationId": "ManualPayoutService_GetManualPayout", + } + }, + "/v1/provider-reviews/{reviewId}": { + "delete": { + "operationId": "ClientProviderReviewService_DeleteClientReview", + "parameters": [ + { + "in": "path", + "name": "reviewId", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetManualPayoutResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -33745,16 +28830,26 @@ } }, "tags": [ - "ManualPayoutService" + "ClientProviderReviewService" ] }, - "post": { - "operationId": "ManualPayoutService_CreateManualPayout", + "patch": { + "operationId": "ClientProviderReviewService_UpdateClientReview", + "parameters": [ + { + "in": "path", + "name": "reviewId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateManualPayoutRequest" + "$ref": "#/components/schemas/ClientProviderReviewServiceUpdateClientReviewBody" } } }, @@ -33765,7 +28860,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateManualPayoutResponse" + "$ref": "#/components/schemas/v1UpdateClientReviewResponse" } } }, @@ -33773,37 +28868,18 @@ } }, "tags": [ - "ManualPayoutService" + "ClientProviderReviewService" ] } }, - "/v1/provider/network/smtp-outbound-policies": { - "get": { - "operationId": "ProviderNetworkService_ListVirtualMachineSmtpOutboundPolicies", + "/v1/provider-reviews/{reviewId}/reply": { + "delete": { + "operationId": "ProviderReviewService_DeleteProviderReviewReply", "parameters": [ { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "description": "Case-insensitive substring match on hostname, customer contact email, or exact virtual machine UUID.", - "in": "query", - "name": "search", - "required": false, + "in": "path", + "name": "reviewId", + "required": true, "schema": { "type": "string" } @@ -33814,7 +28890,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListVirtualMachineSmtpOutboundPoliciesResponse" + "$ref": "#/components/schemas/v1DeleteProviderReviewReplyResponse" } } }, @@ -33822,17 +28898,15 @@ } }, "tags": [ - "ProviderNetworkService" + "ProviderReviewService" ] - } - }, - "/v1/provider/network/smtp-outbound-policies/{virtualMachineId}": { - "put": { - "operationId": "ProviderNetworkService_UpdateVirtualMachineSmtpOutboundPolicy", + }, + "patch": { + "operationId": "ProviderReviewService_UpdateProviderReviewReply", "parameters": [ { "in": "path", - "name": "virtualMachineId", + "name": "reviewId", "required": true, "schema": { "type": "string" @@ -33843,7 +28917,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderNetworkServiceUpdateVirtualMachineSmtpOutboundPolicyBody" + "$ref": "#/components/schemas/ProviderReviewServiceUpdateProviderReviewReplyBody" } } }, @@ -33854,27 +28928,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VirtualMachineSmtpOutboundPolicyView" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "ProviderNetworkService" - ] - } - }, - "/v1/provider/network/smtp-outbound-policy": { - "get": { - "operationId": "ProviderNetworkService_GetSmtpOutboundProviderPolicy", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetSmtpOutboundProviderPolicyResponse" + "$ref": "#/components/schemas/v1UpdateProviderReviewReplyResponse" } } }, @@ -33882,16 +28936,26 @@ } }, "tags": [ - "ProviderNetworkService" + "ProviderReviewService" ] }, - "put": { - "operationId": "ProviderNetworkService_UpdateSmtpOutboundProviderPolicy", + "post": { + "operationId": "ProviderReviewService_CreateProviderReviewReply", + "parameters": [ + { + "in": "path", + "name": "reviewId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateSmtpOutboundProviderPolicyRequest" + "$ref": "#/components/schemas/ProviderReviewServiceCreateProviderReviewReplyBody" } } }, @@ -33902,7 +28966,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetSmtpOutboundProviderPolicyResponse" + "$ref": "#/components/schemas/v1CreateProviderReviewReplyResponse" } } }, @@ -33910,19 +28974,19 @@ } }, "tags": [ - "ProviderNetworkService" + "ProviderReviewService" ] } }, - "/v1/provider/onboarding/checklist": { - "get": { - "operationId": "ProviderOnboardingService_GetProviderOnboardingChecklist", + "/v1/provider/connect/account": { + "delete": { + "operationId": "ProviderConnectService_DisconnectConnectAccount", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetProviderOnboardingChecklistResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -33930,19 +28994,17 @@ } }, "tags": [ - "ProviderOnboardingService" + "ProviderConnectService" ] - } - }, - "/v1/provider/payout-configuration": { + }, "get": { - "operationId": "PayoutConfigurationService_GetPayoutConfiguration", + "operationId": "ProviderConnectService_GetConnectAccount", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPayoutConfigurationResponse" + "$ref": "#/components/schemas/v1GetConnectAccountResponse" } } }, @@ -33950,16 +29012,16 @@ } }, "tags": [ - "PayoutConfigurationService" + "ProviderConnectService" ] }, - "put": { - "operationId": "PayoutConfigurationService_UpdatePayoutConfiguration", + "post": { + "operationId": "ProviderConnectService_CreateConnectAccount", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdatePayoutConfigurationRequest" + "$ref": "#/components/schemas/v1CreateConnectAccountRequest" } } }, @@ -33970,7 +29032,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPayoutConfigurationResponse" + "$ref": "#/components/schemas/v1CreateConnectAccountResponse" } } }, @@ -33978,174 +29040,149 @@ } }, "tags": [ - "PayoutConfigurationService" + "ProviderConnectService" ] } }, - "/v1/provider/payout-invoices": { - "get": { - "operationId": "PayoutInvoiceService_ListPayoutInvoices", - "parameters": [ - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" + "/v1/provider/connect/oauth:complete": { + "post": { + "operationId": "ProviderConnectService_CompleteConnectOAuth", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1CompleteConnectOAuthRequest" + } } }, - { - "description": "Filter by payout status", - "in": "query", - "name": "status", - "required": false, - "schema": { - "default": "PAYOUT_STATUS_UNSPECIFIED", - "enum": [ - "PAYOUT_STATUS_UNSPECIFIED", - "PAYOUT_STATUS_PENDING", - "PAYOUT_STATUS_PROCESSING", - "PAYOUT_STATUS_COMPLETED", - "PAYOUT_STATUS_FAILED", - "PAYOUT_STATUS_CANCELED" - ], - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPayoutInvoicesResponse" + "$ref": "#/components/schemas/v1CompleteConnectOAuthResponse" } } }, "description": "A successful response." } }, + "summary": "Completes Stripe Connect OAuth after Stripe redirects back with a code.", "tags": [ - "PayoutInvoiceService" + "ProviderConnectService" ] } }, - "/v1/provider/payout-invoices/{id}": { - "get": { - "operationId": "PayoutInvoiceService_GetPayoutInvoice", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" + "/v1/provider/connect/oauth:start": { + "post": { + "operationId": "ProviderConnectService_StartConnectOAuth", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1StartConnectOAuthRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPayoutInvoiceResponse" + "$ref": "#/components/schemas/v1StartConnectOAuthResponse" } } }, "description": "A successful response." } }, + "summary": "Starts Stripe Connect OAuth so a provider can attach an existing Standard account.", "tags": [ - "PayoutInvoiceService" + "ProviderConnectService" ] } }, - "/v1/provider/plans/assignable-nodes": { + "/v1/provider/connect/tax-registrations": { "get": { - "operationId": "ProviderPlanService_ListAssignableNodesForPlan", - "parameters": [ - { - "description": "Optional: set for create-from-template. Empty when plan_id is used.", - "in": "query", - "name": "templatePlanId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Optional: set for edit existing plan. Empty when template_plan_id is used.", - "in": "query", - "name": "planId", - "required": false, - "schema": { - "type": "string" + "operationId": "ProviderConnectService_ListConnectTaxRegistrations", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ListConnectTaxRegistrationsResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "ProviderConnectService" + ] + }, + "post": { + "operationId": "ProviderConnectService_CreateConnectTaxRegistration", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1CreateConnectTaxRegistrationRequest" + } } }, - { - "in": "query", - "name": "regionId", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListAssignableNodesForPlanResponse" + "$ref": "#/components/schemas/v1CreateConnectTaxRegistrationResponse" } } }, "description": "A successful response." } }, - "summary": "Nodes the provider may assign to a plan (catalog-eligible for tier/category).", "tags": [ - "ProviderPlanService" + "ProviderConnectService" ] } }, - "/v1/provider/plans/{planId}/live-validation": { - "delete": { - "operationId": "LiveValidationService_DeletePlanLiveValidation", + "/v1/provider/connect/tax-registrations/{id}/expire": { + "post": { + "operationId": "ProviderConnectService_ExpireConnectTaxRegistration", "parameters": [ { "in": "path", - "name": "planId", + "name": "id", "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "nodeId", - "required": false, - "schema": { - "type": "string" - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProviderConnectServiceExpireConnectTaxRegistrationBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ExpireConnectTaxRegistrationResponse" } } }, @@ -34153,35 +29190,43 @@ } }, "tags": [ - "LiveValidationService" + "ProviderConnectService" ] - }, - "get": { - "operationId": "LiveValidationService_GetPlanLiveValidation", - "parameters": [ - { - "in": "path", - "name": "planId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "nodeId", - "required": false, - "schema": { - "type": "string" - } + } + }, + "/v1/provider/connect/tax-session": { + "post": { + "operationId": "ProviderConnectService_CreateConnectTaxSession", + "requestBody": { + "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1CreateConnectTaxSessionResponse" + } + } + }, + "description": "A successful response." } - ], + }, + "summary": "Creates a Stripe AccountSession client secret for Connect tax_settings /\ntax_registrations embedded components (legacy; prefer native tax RPCs).", + "tags": [ + "ProviderConnectService" + ] + } + }, + "/v1/provider/connect/tax-settings": { + "get": { + "operationId": "ProviderConnectService_GetConnectTaxSettings", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPlanLiveValidationResponse" + "$ref": "#/components/schemas/v1GetConnectTaxSettingsResponse" } } }, @@ -34189,26 +29234,16 @@ } }, "tags": [ - "LiveValidationService" + "ProviderConnectService" ] }, - "post": { - "operationId": "LiveValidationService_StartPlanLiveValidation", - "parameters": [ - { - "in": "path", - "name": "planId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "put": { + "operationId": "ProviderConnectService_UpdateConnectTaxSettings", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LiveValidationServiceStartPlanLiveValidationBody" + "$ref": "#/components/schemas/v1UpdateConnectTaxSettingsRequest" } } }, @@ -34219,7 +29254,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1StartPlanLiveValidationResponse" + "$ref": "#/components/schemas/v1UpdateConnectTaxSettingsResponse" } } }, @@ -34227,46 +29262,78 @@ } }, "tags": [ - "LiveValidationService" + "ProviderConnectService" ] } }, - "/v1/provider/plans/{planId}/live-validation/benchmarks": { + "/v1/provider/customer-stats": { "get": { - "operationId": "LiveValidationService_ListPlanLiveValidationBenchmarks", + "operationId": "ProviderCustomerService_GetProviderCustomerStats", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1GetProviderCustomerStatsResponse" + } + } + }, + "description": "A successful response." + } + }, + "summary": "Path must not be `/customers/stats`: some gateways match `/customers/{client_organization_id}` first and treat \"stats\" as a UUID field (validation error).", + "tags": [ + "ProviderCustomerService" + ] + } + }, + "/v1/provider/customers": { + "get": { + "operationId": "ProviderCustomerService_ListProviderCustomers", "parameters": [ { - "in": "path", - "name": "planId", - "required": true, + "description": "0-based page (default 0).", + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { + "description": "-1 = all matches (no server row cap; prefer paginated 1..100 for large data sets). Otherwise 1..100 per page (see ListVirtualMachinesRequest).", "in": "query", - "name": "nodeId", + "name": "pageSize", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { + "description": "Case-insensitive match on client organization name or any member email (owners/members via roles & groups).", "in": "query", - "name": "page", + "name": "search", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { + "description": "Default / UNSPECIFIED means ALL (same as PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL).\n\n - PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL: All customers (any VM history with this provider, including when every VM is soft-deleted).", "in": "query", - "name": "pageSize", + "name": "activityFilter", "required": false, "schema": { - "format": "int32", - "type": "integer" + "default": "PROVIDER_CUSTOMER_ACTIVITY_FILTER_UNSPECIFIED", + "enum": [ + "PROVIDER_CUSTOMER_ACTIVITY_FILTER_UNSPECIFIED", + "PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL", + "PROVIDER_CUSTOMER_ACTIVITY_FILTER_ACTIVE", + "PROVIDER_CUSTOMER_ACTIVITY_FILTER_INACTIVE" + ], + "type": "string" } } ], @@ -34275,7 +29342,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPlanLiveValidationBenchmarksResponse" + "$ref": "#/components/schemas/v1ListProviderCustomersResponse" } } }, @@ -34283,17 +29350,17 @@ } }, "tags": [ - "LiveValidationService" + "ProviderCustomerService" ] } }, - "/v1/provider/plans/{planId}/live-validation/nodes": { + "/v1/provider/customers/{clientOrganizationId}": { "get": { - "operationId": "LiveValidationService_ListEligibleNodesForPlan", + "operationId": "ProviderCustomerService_GetProviderCustomer", "parameters": [ { "in": "path", - "name": "planId", + "name": "clientOrganizationId", "required": true, "schema": { "type": "string" @@ -34305,7 +29372,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListEligibleNodesForPlanResponse" + "$ref": "#/components/schemas/v1GetProviderCustomerResponse" } } }, @@ -34313,38 +29380,22 @@ } }, "tags": [ - "LiveValidationService" + "ProviderCustomerService" ] } }, - "/v1/provider/preflight-checks": { + "/v1/provider/customers/{clientOrganizationId}/assets": { "get": { - "operationId": "PreflightService_ListPreflightChecks", + "operationId": "ProviderCustomerService_ListProviderCustomerAssets", "parameters": [ { - "in": "query", - "name": "planCode", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "planId", - "required": false, + "in": "path", + "name": "clientOrganizationId", + "required": true, "schema": { "type": "string" } }, - { - "in": "query", - "name": "issuesOnly", - "required": false, - "schema": { - "type": "boolean" - } - }, { "in": "query", "name": "page", @@ -34355,6 +29406,7 @@ } }, { + "description": "Same rules as ListProviderCustomers.page_size.", "in": "query", "name": "pageSize", "required": false, @@ -34362,74 +29414,53 @@ "format": "int32", "type": "integer" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListPreflightChecksResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "PreflightService" - ] - } - }, - "/v1/provider/revenue": { - "get": { - "operationId": "PayoutInvoiceService_GetProviderRevenue", - "parameters": [ - { - "description": "Start date for revenue calculation (inclusive)", - "in": "query", - "name": "startDate", - "required": false, - "schema": { - "format": "date-time", - "type": "string" - } }, { - "description": "End date for revenue calculation (inclusive)", "in": "query", - "name": "endDate", + "name": "search", "required": false, "schema": { - "format": "date-time", "type": "string" } }, { - "description": "Filter by plan ID (optional)", "in": "query", - "name": "planId", + "name": "assetType", "required": false, "schema": { + "default": "PROVIDER_CUSTOMER_ASSET_TYPE_UNSPECIFIED", + "enum": [ + "PROVIDER_CUSTOMER_ASSET_TYPE_UNSPECIFIED", + "PROVIDER_CUSTOMER_ASSET_TYPE_ALL", + "PROVIDER_CUSTOMER_ASSET_TYPE_VIRTUAL_MACHINE", + "PROVIDER_CUSTOMER_ASSET_TYPE_DEDICATED_SERVER", + "PROVIDER_CUSTOMER_ASSET_TYPE_GAME_SERVER" + ], "type": "string" } }, { - "description": "Filter by client organization ID (optional)", + "description": "When set (not UNSPECIFIED), only assets matching this activity status are returned.", "in": "query", - "name": "clientOrganizationId", + "name": "activityStatus", "required": false, "schema": { + "default": "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_UNSPECIFIED", + "enum": [ + "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_UNSPECIFIED", + "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_ACTIVE", + "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_INACTIVE" + ], "type": "string" } }, { - "description": "Include pending/processing payouts in calculations (default: true)", + "description": "When set to a non-empty UUID, only assets whose VM node is in this region are returned.", "in": "query", - "name": "includePending", + "name": "regionId", "required": false, "schema": { - "type": "boolean" + "type": "string" } } ], @@ -34438,7 +29469,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetProviderRevenueResponse" + "$ref": "#/components/schemas/v1ListProviderCustomerAssetsResponse" } } }, @@ -34446,19 +29477,29 @@ } }, "tags": [ - "PayoutInvoiceService" + "ProviderCustomerService" ] } }, - "/v1/provider/storefront": { + "/v1/provider/customers/{clientOrganizationId}/billing": { "get": { - "operationId": "ProviderStorefrontService_GetMyStorefront", + "operationId": "ProviderCustomerService_GetProviderCustomerBilling", + "parameters": [ + { + "in": "path", + "name": "clientOrganizationId", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetMyStorefrontResponse" + "$ref": "#/components/schemas/v1GetProviderCustomerBillingResponse" } } }, @@ -34466,16 +29507,36 @@ } }, "tags": [ - "ProviderStorefrontService" + "ProviderCustomerService" ] - }, - "patch": { - "operationId": "ProviderStorefrontService_UpdateMyStorefront", + } + }, + "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:restart": { + "post": { + "operationId": "ProviderCustomerService_RestartProviderCustomerVirtualMachine", + "parameters": [ + { + "in": "path", + "name": "clientOrganizationId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "virtualMachineId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateMyStorefrontRequest" + "$ref": "#/components/schemas/ProviderCustomerServiceRestartProviderCustomerVirtualMachineBody" } } }, @@ -34486,7 +29547,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetMyStorefrontResponse" + "$ref": "#/components/schemas/v1VirtualMachine" } } }, @@ -34494,65 +29555,47 @@ } }, "tags": [ - "ProviderStorefrontService" + "ProviderCustomerService" ] } }, - "/v1/provider/storefront/opt-in": { + "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:start": { "post": { - "operationId": "ProviderStorefrontService_OptInStorefront", - "requestBody": { - "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetMyStorefrontResponse" - } - } - }, - "description": "A successful response." + "operationId": "ProviderCustomerService_StartProviderCustomerVirtualMachine", + "parameters": [ + { + "in": "path", + "name": "clientOrganizationId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "virtualMachineId", + "required": true, + "schema": { + "type": "string" + } } - }, - "tags": [ - "ProviderStorefrontService" - ] - } - }, - "/v1/provider/storefront/opt-out": { - "post": { - "operationId": "ProviderStorefrontService_OptOutStorefront", + ], "requestBody": { - "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetMyStorefrontResponse" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProviderCustomerServiceStartProviderCustomerVirtualMachineBody" } - }, - "description": "A successful response." - } + } + }, + "required": true }, - "tags": [ - "ProviderStorefrontService" - ] - } - }, - "/v1/provider/storefront/preview": { - "get": { - "operationId": "ProviderStorefrontService_PreviewMyStorefront", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1PreviewMyStorefrontResponse" + "$ref": "#/components/schemas/v1VirtualMachine" } } }, @@ -34560,59 +29603,36 @@ } }, "tags": [ - "ProviderStorefrontService" + "ProviderCustomerService" ] } }, - "/v1/provider/storefront/submit": { + "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:stop": { "post": { - "operationId": "ProviderStorefrontService_SubmitMyStorefront", - "requestBody": { - "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetMyStorefrontResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "ProviderStorefrontService" - ] - } - }, - "/v1/provider/ticket-notification-policy": { - "get": { - "operationId": "ProviderTicketNotificationService_GetProviderTicketNotificationPolicy", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetProviderTicketNotificationPolicyResponse" - } - } - }, - "description": "A successful response." + "operationId": "ProviderCustomerService_StopProviderCustomerVirtualMachine", + "parameters": [ + { + "in": "path", + "name": "clientOrganizationId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "virtualMachineId", + "required": true, + "schema": { + "type": "string" + } } - }, - "tags": [ - "ProviderTicketNotificationService" - ] - }, - "put": { - "operationId": "ProviderTicketNotificationService_UpdateProviderTicketNotificationPolicy", + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateProviderTicketNotificationPolicyRequest" + "$ref": "#/components/schemas/ProviderCustomerServiceStopProviderCustomerVirtualMachineBody" } } }, @@ -34623,7 +29643,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetProviderTicketNotificationPolicyResponse" + "$ref": "#/components/schemas/v1VirtualMachine" } } }, @@ -34631,99 +29651,95 @@ } }, "tags": [ - "ProviderTicketNotificationService" + "ProviderCustomerService" ] } }, - "/v1/provider/ticket-notification-policy:send-test": { + "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:suspend": { "post": { - "operationId": "ProviderTicketNotificationService_SendProviderTicketNotificationTest", + "operationId": "ProviderCustomerService_SuspendProviderCustomerVirtualMachine", + "parameters": [ + { + "in": "path", + "name": "clientOrganizationId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "virtualMachineId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { - "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProviderCustomerServiceSuspendProviderCustomerVirtualMachineBody" } - }, - "description": "A successful response." - } + } + }, + "required": true }, - "tags": [ - "ProviderTicketNotificationService" - ] - } - }, - "/v1/public/stats": { - "get": { - "operationId": "MarketplaceService_GetPublicPlatformStats", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPublicPlatformStatsResponse" + "$ref": "#/components/schemas/v1VirtualMachine" } } }, "description": "A successful response." } }, - "summary": "Platform-wide totals for the public homepage: Compute Instances and game\nservers provisioned, DNS zones and records hosted, live storefronts.\nAnonymous and cached for a few minutes; carries no tenant data. The\nfrontend reads it once per build, not per page view.", "tags": [ - "MarketplaceService" + "ProviderCustomerService" ] } }, - "/v1/public/storefronts": { - "get": { - "operationId": "MarketplaceService_ListPublicStorefronts", + "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:unblock": { + "post": { + "operationId": "ProviderCustomerService_UnblockProviderCustomerVirtualMachine", "parameters": [ { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "search", - "required": false, + "in": "path", + "name": "clientOrganizationId", + "required": true, "schema": { "type": "string" } }, { - "in": "query", - "name": "filterCountry", - "required": false, + "in": "path", + "name": "virtualMachineId", + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProviderCustomerServiceUnblockProviderCustomerVirtualMachineBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPublicStorefrontsResponse" + "$ref": "#/components/schemas/v1VirtualMachine" } } }, @@ -34731,29 +29747,39 @@ } }, "tags": [ - "MarketplaceService" + "ProviderCustomerService" ] } }, - "/v1/public/storefronts/by-id/{providerId}": { - "get": { - "operationId": "MarketplaceService_GetPublicStorefrontByID", + "/v1/provider/customers/{clientOrganizationId}:block-purchases": { + "post": { + "operationId": "ProviderCustomerService_BlockProviderCustomerPurchases", "parameters": [ { "in": "path", - "name": "providerId", + "name": "clientOrganizationId", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProviderCustomerServiceBlockProviderCustomerPurchasesBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPublicStorefrontResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -34761,29 +29787,39 @@ } }, "tags": [ - "MarketplaceService" + "ProviderCustomerService" ] } }, - "/v1/public/storefronts/{slug}": { - "get": { - "operationId": "MarketplaceService_GetPublicStorefront", + "/v1/provider/customers/{clientOrganizationId}:unblock-purchases": { + "post": { + "operationId": "ProviderCustomerService_UnblockProviderCustomerPurchases", "parameters": [ { "in": "path", - "name": "slug", + "name": "clientOrganizationId", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProviderCustomerServiceUnblockProviderCustomerPurchasesBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPublicStorefrontResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -34791,17 +29827,17 @@ } }, "tags": [ - "MarketplaceService" + "ProviderCustomerService" ] } }, - "/v1/refunds": { + "/v1/provider/dashboard/addon-catalog-stats": { "get": { - "operationId": "RefundService_ListRefunds", + "operationId": "ProviderDashboardService_ListDashboardAddonCatalogStats", "parameters": [ { "in": "query", - "name": "paymentId", + "name": "addonSearch", "required": false, "schema": { "type": "string" @@ -34809,7 +29845,7 @@ }, { "in": "query", - "name": "invoiceId", + "name": "addonTypeFilter", "required": false, "schema": { "type": "string" @@ -34817,18 +29853,9 @@ }, { "in": "query", - "name": "status", + "name": "addonBillingTypeFilter", "required": false, "schema": { - "default": "REFUND_STATUS_UNSPECIFIED", - "enum": [ - "REFUND_STATUS_UNSPECIFIED", - "REFUND_STATUS_PENDING", - "REFUND_STATUS_PROCESSING", - "REFUND_STATUS_SUCCEEDED", - "REFUND_STATUS_FAILED", - "REFUND_STATUS_CANCELED" - ], "type": "string" } }, @@ -34856,29 +29883,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListRefundsResponse" + "$ref": "#/components/schemas/v1ListDashboardAddonCatalogStatsResponse" } } }, "description": "A successful response." } }, - "summary": "ListRefunds lists refunds for a payment, invoice, or organization", "tags": [ - "RefundService" + "ProviderDashboardService" ] } }, - "/v1/refunds/{refundId}": { + "/v1/provider/dashboard/asset-sales-timeseries": { "get": { - "operationId": "RefundService_GetRefund", + "operationId": "ProviderDashboardService_GetDashboardAssetSalesTimeseries", "parameters": [ { - "in": "path", - "name": "refundId", - "required": true, + "in": "query", + "name": "rangeDays", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ], @@ -34887,26 +29914,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetRefundResponse" + "$ref": "#/components/schemas/v1GetDashboardAssetSalesTimeseriesResponse" } } }, "description": "A successful response." } }, - "summary": "GetRefund retrieves a single refund with payment and invoice details", "tags": [ - "RefundService" + "ProviderDashboardService" ] } }, - "/v1/regions": { + "/v1/provider/dashboard/billing-sales": { "get": { - "operationId": "RegionService_ListRegions", + "operationId": "ProviderDashboardService_GetDashboardBillingSales", "parameters": [ { "in": "query", - "name": "page", + "name": "rangeDays", "required": false, "schema": { "format": "int32", @@ -34915,7 +29941,16 @@ }, { "in": "query", - "name": "pageSize", + "name": "includePriorPeriod", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "description": "Revenue-by-customer table (1-based page). Omit for defaults (page 1, page size 25).", + "in": "query", + "name": "revenueByCustomerPage", "required": false, "schema": { "format": "int32", @@ -34924,15 +29959,17 @@ }, { "in": "query", - "name": "search", + "name": "revenueByCustomerPageSize", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { + "description": "Case-insensitive substring match on contact email, organization id, or organization name.", "in": "query", - "name": "platformId", + "name": "revenueByCustomerEmailFilter", "required": false, "schema": { "type": "string" @@ -34944,35 +29981,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListRegionsResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "RegionService" - ] - }, - "post": { - "operationId": "RegionService_CreateRegion", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1CreateRegionRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1Region" + "$ref": "#/components/schemas/v1GetDashboardBillingSalesResponse" } } }, @@ -34980,20 +29989,21 @@ } }, "tags": [ - "RegionService" + "ProviderDashboardService" ] } }, - "/v1/regions/{id}": { - "delete": { - "operationId": "RegionService_DeleteRegion", + "/v1/provider/dashboard/customer-acquisition-timeseries": { + "get": { + "operationId": "ProviderDashboardService_GetDashboardCustomerAcquisitionTimeseries", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "rangeDays", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ], @@ -35002,7 +30012,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetDashboardCustomerAcquisitionTimeseriesResponse" } } }, @@ -35010,19 +30020,47 @@ } }, "tags": [ - "RegionService" + "ProviderDashboardService" ] - }, + } + }, + "/v1/provider/dashboard/infrastructure": { "get": { - "operationId": "RegionService_GetRegion", + "operationId": "ProviderDashboardService_ListDashboardInfrastructure", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "platformId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "regionId", + "required": false, "schema": { "type": "string" } + }, + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } } ], "responses": { @@ -35030,7 +30068,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1Region" + "$ref": "#/components/schemas/v1ListDashboardInfrastructureResponse" } } }, @@ -35038,22 +30076,39 @@ } }, "tags": [ - "RegionService" + "ProviderDashboardService" ] } }, - "/v1/registrar/admin/balance": { + "/v1/provider/dashboard/ipam": { "get": { - "operationId": "RegistrarAdminService_GetRegistrarBalance", + "operationId": "ProviderDashboardService_ListDashboardIpam", "parameters": [ { - "description": "Empty = configured default provider.", "in": "query", - "name": "provider", + "name": "networkId", "required": false, "schema": { "type": "string" } + }, + { + "in": "query", + "name": "allocatedSampleIpsPage", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "allocatedSampleIpsPageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } } ], "responses": { @@ -35061,7 +30116,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetRegistrarBalanceResponse" + "$ref": "#/components/schemas/v1ListDashboardIpamResponse" } } }, @@ -35069,93 +30124,68 @@ } }, "tags": [ - "RegistrarAdminService" + "ProviderDashboardService" ] } }, - "/v1/registrar/admin/domains": { + "/v1/provider/dashboard/ipam/assignments": { "get": { - "operationId": "RegistrarAdminService_ListAllDomains", + "operationId": "ProviderDashboardService_ListDashboardIpamAssignments", "parameters": [ { "in": "query", - "name": "page", + "name": "networkId", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "pageSize", + "name": "search", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { - "explode": true, "in": "query", - "name": "states", + "name": "platformId", "required": false, "schema": { - "items": { - "enum": [ - "REGISTERED_DOMAIN_STATE_UNSPECIFIED", - "REGISTERED_DOMAIN_STATE_REGISTERING", - "REGISTERED_DOMAIN_STATE_ACTIVE", - "REGISTERED_DOMAIN_STATE_TRANSFER_IN_PENDING", - "REGISTERED_DOMAIN_STATE_TRANSFER_OUT_PENDING", - "REGISTERED_DOMAIN_STATE_EXPIRING", - "REGISTERED_DOMAIN_STATE_EXPIRED", - "REGISTERED_DOMAIN_STATE_REDEMPTION", - "REGISTERED_DOMAIN_STATE_PENDING_DELETE", - "REGISTERED_DOMAIN_STATE_TRANSFERRED_OUT", - "REGISTERED_DOMAIN_STATE_DELETED", - "REGISTERED_DOMAIN_STATE_FAILED" - ], - "type": "string" - }, - "type": "array" + "type": "string" } }, { "in": "query", - "name": "search", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "organizationId", + "name": "pageSize", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { - "explode": true, "in": "query", - "name": "holds", + "name": "ipFamily", "required": false, "schema": { - "items": { - "enum": [ - "DOMAIN_HOLD_UNSPECIFIED", - "DOMAIN_HOLD_VERIFICATION", - "DOMAIN_HOLD_ABUSE", - "DOMAIN_HOLD_PAYMENT_DISPUTE", - "DOMAIN_HOLD_UNPAID", - "DOMAIN_HOLD_UDRP", - "DOMAIN_HOLD_ADMIN" - ], - "type": "string" - }, - "type": "array" + "default": "DASHBOARD_IPAM_ASSIGNMENT_IP_FAMILY_UNSPECIFIED", + "enum": [ + "DASHBOARD_IPAM_ASSIGNMENT_IP_FAMILY_UNSPECIFIED", + "DASHBOARD_IPAM_ASSIGNMENT_IP_FAMILY_IPV4", + "DASHBOARD_IPAM_ASSIGNMENT_IP_FAMILY_IPV6" + ], + "type": "string" } } ], @@ -35164,7 +30194,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListAllDomainsResponse" + "$ref": "#/components/schemas/v1ListDashboardIpamAssignmentsResponse" } } }, @@ -35172,80 +30202,83 @@ } }, "tags": [ - "RegistrarAdminService" + "ProviderDashboardService" ] } }, - "/v1/registrar/admin/domains/{name}/client-hold": { - "put": { - "operationId": "RegistrarAdminService_SetClientHold", + "/v1/provider/dashboard/plan-subscription-stats": { + "get": { + "operationId": "ProviderDashboardService_ListDashboardPlanSubscriptionStats", "parameters": [ { - "in": "path", - "name": "name", - "required": true, + "in": "query", + "name": "planSearch", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegistrarAdminServiceSetClientHoldBody" - } + }, + { + "in": "query", + "name": "planBillingTypeFilter", + "required": false, + "schema": { + "type": "string" } }, - "required": true - }, + { + "in": "query", + "name": "planAssetFilter", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "plansPage", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "plansPageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1AdminRegisteredDomain" + "$ref": "#/components/schemas/v1ListDashboardPlanSubscriptionStatsResponse" } } }, "description": "A successful response." } }, - "summary": "Registry clientHold (suspends resolution).", "tags": [ - "RegistrarAdminService" + "ProviderDashboardService" ] } }, - "/v1/registrar/admin/domains/{name}/holds": { - "post": { - "operationId": "RegistrarAdminService_AddDomainHold", - "parameters": [ - { - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegistrarAdminServiceAddDomainHoldBody" - } - } - }, - "required": true - }, + "/v1/provider/dashboard/plans-tab-stats": { + "get": { + "operationId": "ProviderDashboardPlansTabService_GetDashboardPlansTabStats", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1AdminRegisteredDomain" + "$ref": "#/components/schemas/v1ProviderDashboardPlansTabStats" } } }, @@ -35253,39 +30286,19 @@ } }, "tags": [ - "RegistrarAdminService" + "ProviderDashboardPlansTabService" ] } }, - "/v1/registrar/admin/domains/{name}/holds/remove": { - "post": { - "operationId": "RegistrarAdminService_RemoveDomainHold", - "parameters": [ - { - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegistrarAdminServiceRemoveDomainHoldBody" - } - } - }, - "required": true - }, + "/v1/provider/dashboard/summary": { + "get": { + "operationId": "ProviderDashboardService_GetDashboardSummary", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1AdminRegisteredDomain" + "$ref": "#/components/schemas/v1GetDashboardSummaryResponse" } } }, @@ -35293,39 +30306,39 @@ } }, "tags": [ - "RegistrarAdminService" + "ProviderDashboardService" ] } }, - "/v1/registrar/admin/domains/{name}/move": { - "post": { - "operationId": "RegistrarAdminService_MoveDomainToOrganization", + "/v1/provider/dashboard/tickets/statistics": { + "get": { + "operationId": "ProviderDashboardService_ListDashboardTicketStatistics", "parameters": [ { - "in": "path", - "name": "name", - "required": true, + "in": "query", + "name": "fromTime", + "required": false, "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "in": "query", + "name": "toTime", + "required": false, + "schema": { + "format": "date-time", "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegistrarAdminServiceMoveDomainToOrganizationBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1AdminRegisteredDomain" + "$ref": "#/components/schemas/v1ListDashboardTicketStatisticsResponse" } } }, @@ -35333,96 +30346,49 @@ } }, "tags": [ - "RegistrarAdminService" + "ProviderDashboardService" ] } }, - "/v1/registrar/admin/domains/{name}/sync": { - "post": { - "operationId": "RegistrarAdminService_SyncDomain", + "/v1/provider/dashboard/virtual-machines": { + "get": { + "operationId": "ProviderDashboardService_ListDashboardVirtualMachines", "parameters": [ { - "in": "path", - "name": "name", - "required": true, + "in": "query", + "name": "platformId", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegistrarAdminServiceSyncDomainBody" - } + }, + { + "in": "query", + "name": "regionId", + "required": false, + "schema": { + "type": "string" } }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1AdminRegisteredDomain" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "RegistrarAdminService" - ] - } - }, - "/v1/registrar/admin/operations/retry": { - "post": { - "operationId": "RegistrarAdminService_RetryRegistrarOperation", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1RetryRegistrarOperationRequest" - } + { + "in": "query", + "name": "nodeId", + "required": false, + "schema": { + "type": "string" } }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "RegistrarAdminService" - ] - } - }, - "/v1/registrar/admin/orders": { - "get": { - "operationId": "RegistrarAdminService_ListAllDomainOrders", - "parameters": [ { "in": "query", - "name": "page", + "name": "customerEmailContains", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "pageSize", + "name": "vmPage", "required": false, "schema": { "format": "int32", @@ -35430,34 +30396,17 @@ } }, { - "explode": true, "in": "query", - "name": "states", + "name": "vmPageSize", "required": false, "schema": { - "items": { - "enum": [ - "DOMAIN_ORDER_STATE_UNSPECIFIED", - "DOMAIN_ORDER_STATE_DRAFT", - "DOMAIN_ORDER_STATE_QUOTED", - "DOMAIN_ORDER_STATE_AWAITING_PAYMENT", - "DOMAIN_ORDER_STATE_AUTHORIZED", - "DOMAIN_ORDER_STATE_IN_REVIEW", - "DOMAIN_ORDER_STATE_PROCESSING", - "DOMAIN_ORDER_STATE_COMPLETED", - "DOMAIN_ORDER_STATE_PARTIALLY_COMPLETED", - "DOMAIN_ORDER_STATE_FAILED", - "DOMAIN_ORDER_STATE_CANCELED", - "DOMAIN_ORDER_STATE_EXPIRED" - ], - "type": "string" - }, - "type": "array" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "organizationId", + "name": "vmtemplateId", "required": false, "schema": { "type": "string" @@ -35469,7 +30418,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListAllDomainOrdersResponse" + "$ref": "#/components/schemas/v1ListDashboardVirtualMachinesResponse" } } }, @@ -35477,87 +30426,87 @@ } }, "tags": [ - "RegistrarAdminService" + "ProviderDashboardService" ] } }, - "/v1/registrar/admin/orders/{id}/review": { - "post": { - "operationId": "RegistrarAdminService_ReviewDomainOrder", + "/v1/provider/held-payouts": { + "get": { + "operationId": "PayoutInvoiceService_ListHeldPayouts", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegistrarAdminServiceReviewDomainOrderBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1AdminDomainOrder" + "$ref": "#/components/schemas/v1ListHeldPayoutsResponse" } } }, "description": "A successful response." } }, - "summary": "Approve or decline an order in in_review.", + "summary": "Paid client invoices whose payout to this provider is on hold, soonest release first.", "tags": [ - "RegistrarAdminService" + "PayoutInvoiceService" ] } }, - "/v1/registrar/admin/tlds": { + "/v1/provider/live-validations": { "get": { - "operationId": "RegistrarAdminService_ListTldOfferings", + "operationId": "LiveValidationService_ListPlanLiveValidations", "parameters": [ { "in": "query", - "name": "page", + "name": "planId", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "pageSize", + "name": "search", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "provider", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "search", + "name": "pageSize", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ], @@ -35566,7 +30515,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListTldOfferingsResponse" + "$ref": "#/components/schemas/v1ListPlanLiveValidationsResponse" } } }, @@ -35574,90 +30523,54 @@ } }, "tags": [ - "RegistrarAdminService" + "LiveValidationService" ] } }, - "/v1/registrar/admin/tlds/sync": { - "post": { - "operationId": "RegistrarAdminService_SyncTldCatalog", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SyncTldCatalogRequest" - } - } - }, - "required": true - }, + "/v1/provider/manual-payout": { + "delete": { + "operationId": "ManualPayoutService_DeleteManualPayout", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SyncTldCatalogResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "Queue registrar_catalog_sync now (it also runs daily at 03:30 UTC).", - "tags": [ - "RegistrarAdminService" - ] - } - }, - "/v1/registrar/admin/tlds/{tld}": { - "put": { - "operationId": "RegistrarAdminService_SetTldOffering", - "parameters": [ - { - "in": "path", - "name": "tld", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegistrarAdminServiceSetTldOfferingBody" - } - } - }, - "required": true - }, + "tags": [ + "ManualPayoutService" + ] + }, + "get": { + "operationId": "ManualPayoutService_GetManualPayout", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1TldOffering" + "$ref": "#/components/schemas/v1GetManualPayoutResponse" } } }, "description": "A successful response." } }, - "summary": "Enable/disable, feature, block, override price.", "tags": [ - "RegistrarAdminService" + "ManualPayoutService" ] - } - }, - "/v1/registrar/check": { + }, "post": { - "operationId": "DomainSearchService_CheckDomains", + "operationId": "ManualPayoutService_CreateManualPayout", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CheckDomainsRequest" + "$ref": "#/components/schemas/v1CreateManualPayoutRequest" } } }, @@ -35668,67 +30581,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CheckDomainsResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "Live, uncached availability (add-to-cart and checkout). Login required.", - "tags": [ - "DomainSearchService" - ] - } - }, - "/v1/registrar/contact-schema": { - "get": { - "operationId": "DomainContactService_GetContactSchema", - "parameters": [ - { - "description": "Limit country rules to one country (ISO alpha-2); empty = all.", - "in": "query", - "name": "country", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Include extension field specs for these TLDs.", - "explode": true, - "in": "query", - "name": "tlds", - "required": false, - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetContactSchemaResponse" + "$ref": "#/components/schemas/v1CreateManualPayoutResponse" } } }, "description": "A successful response." } }, - "summary": "Per-country rules and base field specs for the client-side (zod) schema.", "tags": [ - "DomainContactService" + "ManualPayoutService" ] } }, - "/v1/registrar/contacts": { + "/v1/provider/network/smtp-outbound-policies": { "get": { - "operationId": "DomainContactService_ListDomainContacts", + "operationId": "ProviderNetworkService_ListVirtualMachineSmtpOutboundPolicies", "parameters": [ { "in": "query", @@ -35749,6 +30616,7 @@ } }, { + "description": "Case-insensitive substring match on hostname, customer contact email, or exact virtual machine UUID.", "in": "query", "name": "search", "required": false, @@ -35762,7 +30630,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDomainContactsResponse" + "$ref": "#/components/schemas/v1ListVirtualMachineSmtpOutboundPoliciesResponse" } } }, @@ -35770,16 +30638,28 @@ } }, "tags": [ - "DomainContactService" + "ProviderNetworkService" ] - }, - "post": { - "operationId": "DomainContactService_CreateDomainContact", + } + }, + "/v1/provider/network/smtp-outbound-policies/{virtualMachineId}": { + "put": { + "operationId": "ProviderNetworkService_UpdateVirtualMachineSmtpOutboundPolicy", + "parameters": [ + { + "in": "path", + "name": "virtualMachineId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateDomainContactRequest" + "$ref": "#/components/schemas/ProviderNetworkServiceUpdateVirtualMachineSmtpOutboundPolicyBody" } } }, @@ -35790,7 +30670,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DomainContact" + "$ref": "#/components/schemas/v1VirtualMachineSmtpOutboundPolicyView" } } }, @@ -35798,18 +30678,36 @@ } }, "tags": [ - "DomainContactService" + "ProviderNetworkService" ] } }, - "/v1/registrar/contacts/validate": { - "post": { - "operationId": "DomainContactService_ValidateDomainContact", + "/v1/provider/network/smtp-outbound-policy": { + "get": { + "operationId": "ProviderNetworkService_GetSmtpOutboundProviderPolicy", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1GetSmtpOutboundProviderPolicyResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "ProviderNetworkService" + ] + }, + "put": { + "operationId": "ProviderNetworkService_UpdateSmtpOutboundProviderPolicy", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ValidateDomainContactRequest" + "$ref": "#/components/schemas/v1UpdateSmtpOutboundProviderPolicyRequest" } } }, @@ -35820,38 +30718,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ValidateDomainContactResponse" + "$ref": "#/components/schemas/v1GetSmtpOutboundProviderPolicyResponse" } } }, "description": "A successful response." } }, - "summary": "Dry run for forms: errors, warnings and normalized values.", "tags": [ - "DomainContactService" + "ProviderNetworkService" ] } }, - "/v1/registrar/contacts/{id}": { - "delete": { - "operationId": "DomainContactService_DeleteDomainContact", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "/v1/provider/onboarding/checklist": { + "get": { + "operationId": "ProviderOnboardingService_GetProviderOnboardingChecklist", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetProviderOnboardingChecklistResponse" } } }, @@ -35859,27 +30746,19 @@ } }, "tags": [ - "DomainContactService" + "ProviderOnboardingService" ] - }, + } + }, + "/v1/provider/payout-configuration": { "get": { - "operationId": "DomainContactService_GetDomainContact", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "PayoutConfigurationService_GetPayoutConfiguration", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DomainContact" + "$ref": "#/components/schemas/v1GetPayoutConfigurationResponse" } } }, @@ -35887,26 +30766,16 @@ } }, "tags": [ - "DomainContactService" + "PayoutConfigurationService" ] }, "put": { - "operationId": "DomainContactService_UpdateDomainContact", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "PayoutConfigurationService_UpdatePayoutConfiguration", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DomainContactServiceUpdateDomainContactBody" + "$ref": "#/components/schemas/v1UpdatePayoutConfigurationRequest" } } }, @@ -35917,7 +30786,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateDomainContactResponse" + "$ref": "#/components/schemas/v1GetPayoutConfigurationResponse" } } }, @@ -35925,13 +30794,13 @@ } }, "tags": [ - "DomainContactService" + "PayoutConfigurationService" ] } }, - "/v1/registrar/domains": { + "/v1/provider/payout-invoices": { "get": { - "operationId": "RegisteredDomainService_ListRegisteredDomains", + "operationId": "PayoutInvoiceService_ListPayoutInvoices", "parameters": [ { "in": "query", @@ -35952,57 +30821,22 @@ } }, { - "explode": true, - "in": "query", - "name": "states", - "required": false, - "schema": { - "items": { - "enum": [ - "REGISTERED_DOMAIN_STATE_UNSPECIFIED", - "REGISTERED_DOMAIN_STATE_REGISTERING", - "REGISTERED_DOMAIN_STATE_ACTIVE", - "REGISTERED_DOMAIN_STATE_TRANSFER_IN_PENDING", - "REGISTERED_DOMAIN_STATE_TRANSFER_OUT_PENDING", - "REGISTERED_DOMAIN_STATE_EXPIRING", - "REGISTERED_DOMAIN_STATE_EXPIRED", - "REGISTERED_DOMAIN_STATE_REDEMPTION", - "REGISTERED_DOMAIN_STATE_PENDING_DELETE", - "REGISTERED_DOMAIN_STATE_TRANSFERRED_OUT", - "REGISTERED_DOMAIN_STATE_DELETED", - "REGISTERED_DOMAIN_STATE_FAILED" - ], - "type": "string" - }, - "type": "array" - } - }, - { - "description": "Substring match on the name.", + "description": "Filter by payout status", "in": "query", - "name": "search", + "name": "status", "required": false, "schema": { + "default": "PAYOUT_STATUS_UNSPECIFIED", + "enum": [ + "PAYOUT_STATUS_UNSPECIFIED", + "PAYOUT_STATUS_PENDING", + "PAYOUT_STATUS_PROCESSING", + "PAYOUT_STATUS_COMPLETED", + "PAYOUT_STATUS_FAILED", + "PAYOUT_STATUS_CANCELED" + ], "type": "string" } - }, - { - "description": "Renew-by within 30 days.", - "in": "query", - "name": "expiringSoon", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "description": "Has a hold, verification pending, failed renewal or pending transfer out.", - "in": "query", - "name": "needsAttention", - "required": false, - "schema": { - "type": "boolean" - } } ], "responses": { @@ -36010,7 +30844,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListRegisteredDomainsResponse" + "$ref": "#/components/schemas/v1ListPayoutInvoicesResponse" } } }, @@ -36018,17 +30852,17 @@ } }, "tags": [ - "RegisteredDomainService" + "PayoutInvoiceService" ] } }, - "/v1/registrar/domains/{name}": { + "/v1/provider/payout-invoices/{id}": { "get": { - "operationId": "RegisteredDomainService_GetRegisteredDomain", + "operationId": "PayoutInvoiceService_GetPayoutInvoice", "parameters": [ { "in": "path", - "name": "name", + "name": "id", "required": true, "schema": { "type": "string" @@ -36040,7 +30874,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1RegisteredDomain" + "$ref": "#/components/schemas/v1GetPayoutInvoiceResponse" } } }, @@ -36048,220 +30882,138 @@ } }, "tags": [ - "RegisteredDomainService" + "PayoutInvoiceService" ] } }, - "/v1/registrar/domains/{name}/auth-code": { - "post": { - "operationId": "RegisteredDomainService_GetDomainAuthCode", + "/v1/provider/plans/assignable-nodes": { + "get": { + "operationId": "ProviderPlanService_ListAssignableNodesForPlan", "parameters": [ { - "in": "path", - "name": "name", - "required": true, + "description": "Optional: set for create-from-template. Empty when plan_id is used.", + "in": "query", + "name": "templatePlanId", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisteredDomainServiceGetDomainAuthCodeBody" - } + }, + { + "description": "Optional: set for edit existing plan. Empty when template_plan_id is used.", + "in": "query", + "name": "planId", + "required": false, + "schema": { + "type": "string" } }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetDomainAuthCodeResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "POST so the reauth token travels in the body. Sensitive response.", - "tags": [ - "RegisteredDomainService" - ] - } - }, - "/v1/registrar/domains/{name}/auth-code/reset": { - "post": { - "operationId": "RegisteredDomainService_ResetDomainAuthCode", - "parameters": [ { - "in": "path", - "name": "name", - "required": true, + "in": "query", + "name": "regionId", + "required": false, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisteredDomainServiceResetDomainAuthCodeBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetDomainAuthCodeResponse" + "$ref": "#/components/schemas/v1ListAssignableNodesForPlanResponse" } } }, "description": "A successful response." } }, + "summary": "Nodes the provider may assign to a plan (catalog-eligible for tier/category).", "tags": [ - "RegisteredDomainService" + "ProviderPlanService" ] } }, - "/v1/registrar/domains/{name}/auto-renew": { - "put": { - "operationId": "RegisteredDomainService_SetDomainAutoRenew", + "/v1/provider/plans/{planId}/live-validation": { + "delete": { + "operationId": "LiveValidationService_DeletePlanLiveValidation", "parameters": [ { "in": "path", - "name": "name", + "name": "planId", "required": true, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisteredDomainServiceSetDomainAutoRenewBody" - } - } }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1RegisteredDomain" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "RegisteredDomainService" - ] - } - }, - "/v1/registrar/domains/{name}/contacts": { - "put": { - "operationId": "RegisteredDomainService_UpdateDomainContacts", - "parameters": [ { - "in": "path", - "name": "name", - "required": true, + "in": "query", + "name": "nodeId", + "required": false, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisteredDomainServiceUpdateDomainContactsBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateDomainContactsResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "May start the change-of-registrant flow.", "tags": [ - "RegisteredDomainService" + "LiveValidationService" ] - } - }, - "/v1/registrar/domains/{name}/delete": { - "post": { - "operationId": "RegisteredDomainService_DeleteRegisteredDomain", + }, + "get": { + "operationId": "LiveValidationService_GetPlanLiveValidation", "parameters": [ { "in": "path", - "name": "name", + "name": "planId", "required": true, "schema": { "type": "string" } + }, + { + "in": "query", + "name": "nodeId", + "required": false, + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisteredDomainServiceDeleteRegisteredDomainBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DeleteRegisteredDomainResponse" + "$ref": "#/components/schemas/v1GetPlanLiveValidationResponse" } } }, "description": "A successful response." } }, - "summary": "Two steps: without confirmation_code a code is emailed to the org owners.\nPOST (not DELETE) so the confirmation code and reauth token travel in the body,\nnot in the URL.", "tags": [ - "RegisteredDomainService" + "LiveValidationService" ] - } - }, - "/v1/registrar/domains/{name}/dnssec": { - "put": { - "operationId": "RegisteredDomainService_SetDomainDnssec", + }, + "post": { + "operationId": "LiveValidationService_StartPlanLiveValidation", "parameters": [ { "in": "path", - "name": "name", + "name": "planId", "required": true, "schema": { "type": "string" @@ -36272,7 +31024,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RegisteredDomainServiceSetDomainDnssecBody" + "$ref": "#/components/schemas/LiveValidationServiceStartPlanLiveValidationBody" } } }, @@ -36283,26 +31035,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1RegisteredDomain" + "$ref": "#/components/schemas/v1StartPlanLiveValidationResponse" } } }, "description": "A successful response." } }, - "summary": "Mode + custom keys.", "tags": [ - "RegisteredDomainService" + "LiveValidationService" ] } }, - "/v1/registrar/domains/{name}/events": { + "/v1/provider/plans/{planId}/live-validation/benchmarks": { "get": { - "operationId": "RegisteredDomainService_ListDomainEvents", + "operationId": "LiveValidationService_ListPlanLiveValidationBenchmarks", "parameters": [ { "in": "path", - "name": "name", + "name": "planId", "required": true, "schema": { "type": "string" @@ -36310,16 +31061,15 @@ }, { "in": "query", - "name": "page", + "name": "nodeId", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "pageSize", + "name": "page", "required": false, "schema": { "format": "int32", @@ -36327,48 +31077,12 @@ } }, { - "explode": true, "in": "query", - "name": "kinds", + "name": "pageSize", "required": false, "schema": { - "items": { - "enum": [ - "DOMAIN_EVENT_KIND_UNSPECIFIED", - "DOMAIN_EVENT_KIND_REGISTERED", - "DOMAIN_EVENT_KIND_REGISTRATION_FAILED", - "DOMAIN_EVENT_KIND_RENEWED", - "DOMAIN_EVENT_KIND_RENEWAL_FAILED", - "DOMAIN_EVENT_KIND_RESTORED", - "DOMAIN_EVENT_KIND_EXPIRED", - "DOMAIN_EVENT_KIND_DELETED", - "DOMAIN_EVENT_KIND_STATE_CHANGED", - "DOMAIN_EVENT_KIND_TRANSFER_IN_STARTED", - "DOMAIN_EVENT_KIND_TRANSFER_IN_COMPLETED", - "DOMAIN_EVENT_KIND_TRANSFER_IN_FAILED", - "DOMAIN_EVENT_KIND_NS_CHANGED", - "DOMAIN_EVENT_KIND_DNSSEC_CHANGED", - "DOMAIN_EVENT_KIND_GLUE_CHANGED", - "DOMAIN_EVENT_KIND_CONTACT_CHANGE_REQUESTED", - "DOMAIN_EVENT_KIND_CONTACT_CHANGED", - "DOMAIN_EVENT_KIND_LOCK_CHANGED", - "DOMAIN_EVENT_KIND_PRIVACY_CHANGED", - "DOMAIN_EVENT_KIND_AUTH_CODE_VIEWED", - "DOMAIN_EVENT_KIND_AUTH_CODE_RESET", - "DOMAIN_EVENT_KIND_TRANSFER_OUT_REQUESTED", - "DOMAIN_EVENT_KIND_TRANSFER_OUT_APPROVED", - "DOMAIN_EVENT_KIND_TRANSFER_OUT_COMPLETED", - "DOMAIN_EVENT_KIND_AUTO_RENEW_CHANGED", - "DOMAIN_EVENT_KIND_HOLD_ADDED", - "DOMAIN_EVENT_KIND_HOLD_REMOVED", - "DOMAIN_EVENT_KIND_VERIFICATION_SENT", - "DOMAIN_EVENT_KIND_VERIFICATION_COMPLETED", - "DOMAIN_EVENT_KIND_MOVED", - "DOMAIN_EVENT_KIND_SYNCED_DRIFT" - ], - "type": "string" - }, - "type": "array" + "format": "int32", + "type": "integer" } } ], @@ -36377,7 +31091,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDomainEventsResponse" + "$ref": "#/components/schemas/v1ListPlanLiveValidationBenchmarksResponse" } } }, @@ -36385,17 +31099,17 @@ } }, "tags": [ - "RegisteredDomainService" + "LiveValidationService" ] } }, - "/v1/registrar/domains/{name}/glue": { + "/v1/provider/plans/{planId}/live-validation/nodes": { "get": { - "operationId": "RegisteredDomainService_ListDomainGlueRecords", + "operationId": "LiveValidationService_ListEligibleNodesForPlan", "parameters": [ { "in": "path", - "name": "name", + "name": "planId", "required": true, "schema": { "type": "string" @@ -36407,7 +31121,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDomainGlueRecordsResponse" + "$ref": "#/components/schemas/v1ListEligibleNodesForPlanResponse" } } }, @@ -36415,83 +31129,63 @@ } }, "tags": [ - "RegisteredDomainService" + "LiveValidationService" ] } }, - "/v1/registrar/domains/{name}/glue/{host}": { - "delete": { - "operationId": "RegisteredDomainService_DeleteDomainGlueRecord", + "/v1/provider/preflight-checks": { + "get": { + "operationId": "PreflightService_ListPreflightChecks", "parameters": [ { - "in": "path", - "name": "name", - "required": true, + "in": "query", + "name": "planCode", + "required": false, "schema": { "type": "string" } }, { - "in": "path", - "name": "host", - "required": true, + "in": "query", + "name": "planId", + "required": false, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "RegisteredDomainService" - ] - }, - "put": { - "operationId": "RegisteredDomainService_UpsertDomainGlueRecord", - "parameters": [ + }, { - "in": "path", - "name": "name", - "required": true, + "in": "query", + "name": "issuesOnly", + "required": false, "schema": { - "type": "string" + "type": "boolean" } }, { - "in": "path", - "name": "host", - "required": true, + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisteredDomainServiceUpsertDomainGlueRecordBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DomainGlueRecord" + "$ref": "#/components/schemas/v1ListPreflightChecksResponse" } } }, @@ -36499,38 +31193,59 @@ } }, "tags": [ - "RegisteredDomainService" + "PreflightService" ] } }, - "/v1/registrar/domains/{name}/invoices": { + "/v1/provider/revenue": { "get": { - "operationId": "RegisteredDomainService_ListDomainInvoices", + "operationId": "PayoutInvoiceService_GetProviderRevenue", "parameters": [ { - "in": "path", - "name": "name", - "required": true, + "description": "Start date for revenue calculation (inclusive)", + "in": "query", + "name": "startDate", + "required": false, "schema": { + "format": "date-time", "type": "string" } }, { + "description": "End date for revenue calculation (inclusive)", "in": "query", - "name": "page", + "name": "endDate", "required": false, "schema": { - "format": "int32", - "type": "integer" + "format": "date-time", + "type": "string" + } + }, + { + "description": "Filter by plan ID (optional)", + "in": "query", + "name": "planId", + "required": false, + "schema": { + "type": "string" } }, { + "description": "Filter by client organization ID (optional)", "in": "query", - "name": "pageSize", + "name": "clientOrganizationId", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" + } + }, + { + "description": "Include pending/processing payouts in calculations (default: true)", + "in": "query", + "name": "includePending", + "required": false, + "schema": { + "type": "boolean" } } ], @@ -36539,78 +31254,44 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDomainInvoicesResponse" + "$ref": "#/components/schemas/v1GetProviderRevenueResponse" } } }, "description": "A successful response." } }, - "summary": "Billing tab: paid invoices covering the domain (checkout orders and\nautomatic renewals, which have no order). Newest first.", "tags": [ - "RegisteredDomainService" + "PayoutInvoiceService" ] } }, - "/v1/registrar/domains/{name}/lock": { - "put": { - "operationId": "RegisteredDomainService_SetDomainTransferLock", - "parameters": [ - { - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisteredDomainServiceSetDomainTransferLockBody" - } - } - }, - "required": true - }, + "/v1/provider/storefront": { + "get": { + "operationId": "ProviderStorefrontService_GetMyStorefront", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1RegisteredDomain" + "$ref": "#/components/schemas/v1GetMyStorefrontResponse" } } }, "description": "A successful response." } }, - "summary": "Unlocking requires a step-up reauth_token.", "tags": [ - "RegisteredDomainService" + "ProviderStorefrontService" ] - } - }, - "/v1/registrar/domains/{name}/nameservers": { - "put": { - "operationId": "RegisteredDomainService_SetDomainNameservers", - "parameters": [ - { - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string" - } - } - ], + }, + "patch": { + "operationId": "ProviderStorefrontService_UpdateMyStorefront", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RegisteredDomainServiceSetDomainNameserversBody" + "$ref": "#/components/schemas/v1UpdateMyStorefrontRequest" } } }, @@ -36621,7 +31302,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1RegisteredDomain" + "$ref": "#/components/schemas/v1GetMyStorefrontResponse" } } }, @@ -36629,162 +31310,88 @@ } }, "tags": [ - "RegisteredDomainService" + "ProviderStorefrontService" ] } }, - "/v1/registrar/domains/{name}/privacy": { - "put": { - "operationId": "RegisteredDomainService_SetDomainPrivacy", - "parameters": [ - { - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string" - } - } - ], + "/v1/provider/storefront/opt-in": { + "post": { + "operationId": "ProviderStorefrontService_OptInStorefront", "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisteredDomainServiceSetDomainPrivacyBody" - } - } - }, - "required": true + "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SetDomainPrivacyResponse" + "$ref": "#/components/schemas/v1GetMyStorefrontResponse" } } }, "description": "A successful response." } }, - "summary": "Enabling may create a privacy order to pay (order_id in the response).", "tags": [ - "RegisteredDomainService" + "ProviderStorefrontService" ] } }, - "/v1/registrar/domains/{name}/renew": { + "/v1/provider/storefront/opt-out": { "post": { - "operationId": "RegisteredDomainService_RenewDomain", - "parameters": [ - { - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "ProviderStorefrontService_OptOutStorefront", "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisteredDomainServiceRenewDomainBody" - } - } - }, - "required": true + "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DomainOrder" + "$ref": "#/components/schemas/v1GetMyStorefrontResponse" } } }, "description": "A successful response." } }, - "summary": "Creates a renew order (checkout path, 3-D Secure possible).", "tags": [ - "RegisteredDomainService" + "ProviderStorefrontService" ] } }, - "/v1/registrar/domains/{name}/restore": { - "post": { - "operationId": "RegisteredDomainService_RestoreDomain", - "parameters": [ - { - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisteredDomainServiceRestoreDomainBody" - } - } - }, - "required": true - }, + "/v1/provider/storefront/preview": { + "get": { + "operationId": "ProviderStorefrontService_PreviewMyStorefront", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DomainOrder" + "$ref": "#/components/schemas/v1PreviewMyStorefrontResponse" } } }, "description": "A successful response." } }, - "summary": "Creates a restore order.", "tags": [ - "RegisteredDomainService" + "ProviderStorefrontService" ] } }, - "/v1/registrar/domains/{name}/transfer-out/approve": { + "/v1/provider/storefront/submit": { "post": { - "operationId": "RegisteredDomainService_ApproveOutgoingTransfer", - "parameters": [ - { - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "ProviderStorefrontService_SubmitMyStorefront", "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisteredDomainServiceApproveOutgoingTransferBody" - } - } - }, - "required": true + "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1RegisteredDomain" + "$ref": "#/components/schemas/v1GetMyStorefrontResponse" } } }, @@ -36792,28 +31399,36 @@ } }, "tags": [ - "RegisteredDomainService" + "ProviderStorefrontService" ] } }, - "/v1/registrar/domains/{name}/verification/resend": { - "post": { - "operationId": "RegisteredDomainService_ResendRegistrantVerification", - "parameters": [ - { - "in": "path", - "name": "name", - "required": true, - "schema": { - "type": "string" - } + "/v1/provider/ticket-notification-policy": { + "get": { + "operationId": "ProviderTicketNotificationService_GetProviderTicketNotificationPolicy", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1GetProviderTicketNotificationPolicyResponse" + } + } + }, + "description": "A successful response." } - ], + }, + "tags": [ + "ProviderTicketNotificationService" + ] + }, + "put": { + "operationId": "ProviderTicketNotificationService_UpdateProviderTicketNotificationPolicy", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RegisteredDomainServiceResendRegistrantVerificationBody" + "$ref": "#/components/schemas/v1UpdateProviderTicketNotificationPolicyRequest" } } }, @@ -36824,7 +31439,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ResendRegistrantVerificationResponse" + "$ref": "#/components/schemas/v1GetProviderTicketNotificationPolicyResponse" } } }, @@ -36832,54 +31447,36 @@ } }, "tags": [ - "RegisteredDomainService" + "ProviderTicketNotificationService" ] } }, - "/v1/registrar/order-items/{orderItemId}/retry-transfer": { + "/v1/provider/ticket-notification-policy:send-test": { "post": { - "operationId": "RegisteredDomainService_RetryDomainTransfer", - "parameters": [ - { - "in": "path", - "name": "orderItemId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "ProviderTicketNotificationService_SendProviderTicketNotificationTest", "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisteredDomainServiceRetryDomainTransferBody" - } - } - }, - "required": true + "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DomainOrder" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "Resubmits a failed incoming transfer with a corrected auth code (restarts\nthe registry operation). Only while the order still holds the payment for\nthe item; otherwise TRANSFER_NEW_ORDER_REQUIRED.", "tags": [ - "RegisteredDomainService" + "ProviderTicketNotificationService" ] } }, - "/v1/registrar/orders": { + "/v1/public/storefronts": { "get": { - "operationId": "DomainOrderService_ListDomainOrders", + "operationId": "MarketplaceService_ListPublicStorefronts", "parameters": [ { "in": "query", @@ -36900,29 +31497,19 @@ } }, { - "explode": true, "in": "query", - "name": "states", + "name": "search", "required": false, "schema": { - "items": { - "enum": [ - "DOMAIN_ORDER_STATE_UNSPECIFIED", - "DOMAIN_ORDER_STATE_DRAFT", - "DOMAIN_ORDER_STATE_QUOTED", - "DOMAIN_ORDER_STATE_AWAITING_PAYMENT", - "DOMAIN_ORDER_STATE_AUTHORIZED", - "DOMAIN_ORDER_STATE_IN_REVIEW", - "DOMAIN_ORDER_STATE_PROCESSING", - "DOMAIN_ORDER_STATE_COMPLETED", - "DOMAIN_ORDER_STATE_PARTIALLY_COMPLETED", - "DOMAIN_ORDER_STATE_FAILED", - "DOMAIN_ORDER_STATE_CANCELED", - "DOMAIN_ORDER_STATE_EXPIRED" - ], - "type": "string" - }, - "type": "array" + "type": "string" + } + }, + { + "in": "query", + "name": "filterCountry", + "required": false, + "schema": { + "type": "string" } } ], @@ -36931,35 +31518,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDomainOrdersResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "DomainOrderService" - ] - }, - "post": { - "operationId": "DomainOrderService_CreateDomainOrder", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1CreateDomainOrderRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1DomainOrder" + "$ref": "#/components/schemas/v1ListPublicStorefrontsResponse" } } }, @@ -36967,17 +31526,17 @@ } }, "tags": [ - "DomainOrderService" + "MarketplaceService" ] } }, - "/v1/registrar/orders/{id}": { + "/v1/public/storefronts/by-id/{providerId}": { "get": { - "operationId": "DomainOrderService_GetDomainOrder", + "operationId": "MarketplaceService_GetPublicStorefrontByID", "parameters": [ { "in": "path", - "name": "id", + "name": "providerId", "required": true, "schema": { "type": "string" @@ -36989,7 +31548,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DomainOrder" + "$ref": "#/components/schemas/v1GetPublicStorefrontResponse" } } }, @@ -36997,262 +31556,207 @@ } }, "tags": [ - "DomainOrderService" + "MarketplaceService" ] - }, - "patch": { - "operationId": "DomainOrderService_UpdateDomainOrder", + } + }, + "/v1/public/storefronts/{slug}": { + "get": { + "operationId": "MarketplaceService_GetPublicStorefront", "parameters": [ { "in": "path", - "name": "id", + "name": "slug", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DomainOrderServiceUpdateDomainOrderBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DomainOrder" + "$ref": "#/components/schemas/v1GetPublicStorefrontResponse" } } }, "description": "A successful response." } }, - "summary": "Items, years, privacy, auto-renew, contact and DNS choices.", "tags": [ - "DomainOrderService" + "MarketplaceService" ] } }, - "/v1/registrar/orders/{id}/cancel": { - "post": { - "operationId": "DomainOrderService_CancelDomainOrder", + "/v1/refunds": { + "get": { + "operationId": "RefundService_ListRefunds", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "paymentId", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DomainOrderServiceCancelDomainOrderBody" - } + }, + { + "in": "query", + "name": "invoiceId", + "required": false, + "schema": { + "type": "string" } }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1DomainOrder" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "DomainOrderService" - ] - } - }, - "/v1/registrar/orders/{id}/checkout": { - "post": { - "operationId": "DomainOrderService_CheckoutDomainOrder", - "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "status", + "required": false, "schema": { + "default": "REFUND_STATUS_UNSPECIFIED", + "enum": [ + "REFUND_STATUS_UNSPECIFIED", + "REFUND_STATUS_PENDING", + "REFUND_STATUS_PROCESSING", + "REFUND_STATUS_SUCCEEDED", + "REFUND_STATUS_FAILED", + "REFUND_STATUS_CANCELED" + ], "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DomainOrderServiceCheckoutDomainOrderBody" - } + }, + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" } }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1CheckoutDomainOrderResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "Authorize payment and start processing. May return requires_action + client_secret.", - "tags": [ - "DomainOrderService" - ] - } - }, - "/v1/registrar/orders/{id}/confirm": { - "post": { - "operationId": "DomainOrderService_ConfirmDomainOrder", - "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "pageSize", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DomainOrderServiceConfirmDomainOrderBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DomainOrder" + "$ref": "#/components/schemas/v1ListRefundsResponse" } } }, "description": "A successful response." } }, - "summary": "After 3-D Secure: re-reads the PaymentIntent from Stripe and continues.", + "summary": "ListRefunds lists refunds for a payment, invoice, or organization", "tags": [ - "DomainOrderService" + "RefundService" ] } }, - "/v1/registrar/orders/{id}/price": { - "post": { - "operationId": "DomainOrderService_PriceDomainOrder", + "/v1/refunds/{refundId}": { + "get": { + "operationId": "RefundService_GetRefund", "parameters": [ { "in": "path", - "name": "id", + "name": "refundId", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DomainOrderServicePriceDomainOrderBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DomainOrderQuote" + "$ref": "#/components/schemas/v1GetRefundResponse" } } }, "description": "A successful response." } }, - "summary": "Re-quote with live prices and tax (Stripe Tax).", + "summary": "GetRefund retrieves a single refund with payment and invoice details", "tags": [ - "DomainOrderService" + "RefundService" ] } }, - "/v1/registrar/registrant-changes/{token}": { - "post": { - "operationId": "RegisteredDomainService_ConfirmRegistrantChange", + "/v1/regions": { + "get": { + "operationId": "RegionService_ListRegions", "parameters": [ { - "description": "Signed token from the approval email.", - "in": "path", - "name": "token", - "required": true, + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "search", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "platformId", + "required": false, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RegisteredDomainServiceConfirmRegistrantChangeBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ConfirmRegistrantChangeResponse" + "$ref": "#/components/schemas/v1ListRegionsResponse" } } }, "description": "A successful response." } }, - "summary": "Anonymous via the signed token from the approval email.", "tags": [ - "RegisteredDomainService" + "RegionService" ] - } - }, - "/v1/registrar/search": { + }, "post": { - "operationId": "DomainSearchService_SearchDomains", + "operationId": "RegionService_CreateRegion", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SearchDomainsRequest" + "$ref": "#/components/schemas/v1CreateRegionRequest" } } }, @@ -37263,71 +31767,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SearchDomainsResponse" + "$ref": "#/components/schemas/v1Region" } } }, "description": "A successful response." } }, - "summary": "Anonymous. Search a name, label or keywords; exact match first, then featured TLDs, then suggestions.", "tags": [ - "DomainSearchService" + "RegionService" ] } }, - "/v1/registrar/tlds": { - "get": { - "operationId": "DomainSearchService_ListTldPrices", + "/v1/regions/{id}": { + "delete": { + "operationId": "RegionService_DeleteRegion", "parameters": [ { - "in": "query", - "name": "featuredOnly", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "description": "Only TLDs of this category (unspecified = all enabled TLDs).", - "in": "query", - "name": "category", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { - "default": "TLD_CATEGORY_UNSPECIFIED", - "enum": [ - "TLD_CATEGORY_UNSPECIFIED", - "TLD_CATEGORY_GENERIC", - "TLD_CATEGORY_COUNTRY", - "TLD_CATEGORY_TECH", - "TLD_CATEGORY_BUSINESS", - "TLD_CATEGORY_CREATIVE", - "TLD_CATEGORY_COMMUNITY", - "TLD_CATEGORY_GEOGRAPHIC", - "TLD_CATEGORY_LIFESTYLE", - "TLD_CATEGORY_SHOPPING", - "TLD_CATEGORY_OTHER" - ], "type": "string" } - }, - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } } ], "responses": { @@ -37335,45 +31797,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListTldPricesResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "Anonymous. Public TLD price list (registration, renewal, transfer, restore, privacy).", "tags": [ - "DomainSearchService" + "RegionService" ] - } - }, - "/v1/registrar/tlds/{tld}/requirements": { + }, "get": { - "operationId": "DomainSearchService_GetTldRequirements", + "operationId": "RegionService_GetRegion", "parameters": [ { "in": "path", - "name": "tld", + "name": "id", "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "operation", - "required": false, - "schema": { - "default": "DOMAIN_OPERATION_UNSPECIFIED", - "enum": [ - "DOMAIN_OPERATION_UNSPECIFIED", - "DOMAIN_OPERATION_REGISTER", - "DOMAIN_OPERATION_TRANSFER", - "DOMAIN_OPERATION_UPDATE" - ], - "type": "string" - } } ], "responses": { @@ -37381,47 +31825,15 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetTldRequirementsResponse" - } - } - }, - "description": "A successful response." - } - }, - "summary": "Contact fields a TLD needs for an operation (dynamic extension fields).", - "tags": [ - "DomainSearchService" - ] - } - }, - "/v1/registrar/transfer-check": { - "post": { - "operationId": "DomainSearchService_CheckTransfer", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1CheckTransferRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1CheckTransferResponse" + "$ref": "#/components/schemas/v1Region" } } }, "description": "A successful response." } }, - "summary": "Whether names can be transferred in, with price and warnings.", "tags": [ - "DomainSearchService" + "RegionService" ] } }, @@ -41518,9 +35930,6 @@ { "name": "MonitoringService" }, - { - "name": "BlogSubscriptionService" - }, { "name": "VirtualMachineService" }, @@ -41659,21 +36068,6 @@ { "name": "ProviderStorefrontService" }, - { - "name": "DomainSearchService" - }, - { - "name": "DomainOrderService" - }, - { - "name": "RegisteredDomainService" - }, - { - "name": "DomainContactService" - }, - { - "name": "RegistrarAdminService" - }, { "name": "RoadmapService" }, diff --git a/src/noderings/__init__.py b/src/noderings/__init__.py index 0437678..15f72ca 100644 --- a/src/noderings/__init__.py +++ b/src/noderings/__init__.py @@ -16,7 +16,7 @@ from . import models from ._base import DEFAULT_BASE_URL, NOT_GIVEN, NotGiven -from ._client import DOMAIN_ORDER_FINAL_STATES, AsyncNodeRings, NodeRings, WaitTimeoutError +from ._client import AsyncNodeRings, NodeRings, WaitTimeoutError from ._errors import ( APIConnectionError, APIError, @@ -37,7 +37,6 @@ __all__ = [ "DEFAULT_BASE_URL", "NOT_GIVEN", - "DOMAIN_ORDER_FINAL_STATES", "APIConnectionError", "APIError", "APITimeoutError", diff --git a/src/noderings/_client.py b/src/noderings/_client.py index 3140154..772c7d3 100644 --- a/src/noderings/_client.py +++ b/src/noderings/_client.py @@ -14,7 +14,7 @@ from ._errors import NotFoundError from ._services import _AsyncServices, _Services -__all__ = ["DOMAIN_ORDER_FINAL_STATES", "AsyncNodeRings", "NodeRings", "WaitTimeoutError"] +__all__ = ["AsyncNodeRings", "NodeRings", "WaitTimeoutError"] class WaitTimeoutError(TimeoutError): @@ -29,27 +29,6 @@ def _status(vm: m.VirtualMachine | None) -> str: return str(vm.operation_status) if vm is not None and vm.operation_status is not None else "unknown" -#: Domain order states that no longer change. -DOMAIN_ORDER_FINAL_STATES: frozenset[str] = frozenset( - str(s) - for s in ( - m.DomainOrderState.COMPLETED, - m.DomainOrderState.PARTIALLY_COMPLETED, - m.DomainOrderState.FAILED, - m.DomainOrderState.CANCELED, - m.DomainOrderState.EXPIRED, - ) -) - - -def _order_final(order: m.DomainOrder) -> bool: - return order.state is not None and str(order.state) in DOMAIN_ORDER_FINAL_STATES - - -def _order_state(order: m.DomainOrder | None) -> str: - return str(order.state) if order is not None and order.state is not None else "unknown" - - class NodeRings(SyncAPIClient, _Services): """A client for the NodeRings API. @@ -157,33 +136,6 @@ def wait_for_virtual_machine_deleted(self, id: str, *, interval: float = 5.0, ti except NotFoundError: return - def wait_for_domain_order( - self, - id: str, - until: Callable[[m.DomainOrder], bool] | None = None, - *, - interval: float = 5.0, - timeout: float = 900.0, - ) -> m.DomainOrder: - """Poll a domain order until ``until(order)`` is true and return it. - - Without ``until``, waits until the order is final: completed, partially - completed, failed, canceled or expired (:data:`DOMAIN_ORDER_FINAL_STATES`). - Raises :class:`WaitTimeoutError` after ``timeout`` seconds (default 15 - minutes), and :class:`NotFoundError` if the order does not exist. - """ - check = until or _order_final - deadline = time.monotonic() + timeout - while True: - last = self.domain_order.get_domain_order(id) - if check(last): - return last - if time.monotonic() + interval > deadline: - raise WaitTimeoutError( - f"waiting for domain order {id}: timed out (last state {_order_state(last)})", last - ) - time.sleep(interval) - class AsyncNodeRings(AsyncAPIClient, _AsyncServices): """The asyncio version of :class:`NodeRings`, with the same arguments and API areas:: @@ -263,30 +215,3 @@ async def wait_for_virtual_machine_deleted(self, id: str, *, interval: float = 5 ) except NotFoundError: return - - async def wait_for_domain_order( - self, - id: str, - until: Callable[[m.DomainOrder], bool | Awaitable[bool]] | None = None, - *, - interval: float = 5.0, - timeout: float = 900.0, - ) -> m.DomainOrder: - """Poll a domain order until it is final (or ``until(order)`` is true). See :meth:`NodeRings.wait_for_domain_order`.""" - loop = asyncio.get_running_loop() - deadline = loop.time() + timeout - while True: - last = await self.domain_order.get_domain_order(id) - if until is None: - done: bool | Awaitable[bool] = _order_final(last) - else: - done = until(last) - if not isinstance(done, bool): - done = await done - if done: - return last - if loop.time() + interval > deadline: - raise WaitTimeoutError( - f"waiting for domain order {id}: timed out (last state {_order_state(last)})", last - ) - await asyncio.sleep(interval) diff --git a/src/noderings/_services.py b/src/noderings/_services.py index db6f64c..79227a7 100644 --- a/src/noderings/_services.py +++ b/src/noderings/_services.py @@ -18,8 +18,6 @@ "AsyncAgentService", "BackupService", "AsyncBackupService", - "BlogSubscriptionService", - "AsyncBlogSubscriptionService", "BusinessMonitoringService", "AsyncBusinessMonitoringService", "ChatService", @@ -42,12 +40,6 @@ "AsyncDNSZoneService", "DNSSECService", "AsyncDNSSECService", - "DomainContactService", - "AsyncDomainContactService", - "DomainOrderService", - "AsyncDomainOrderService", - "DomainSearchService", - "AsyncDomainSearchService", "DomainService", "AsyncDomainService", "EnvironmentVariableService", @@ -134,10 +126,6 @@ "AsyncRefundService", "RegionService", "AsyncRegionService", - "RegisteredDomainService", - "AsyncRegisteredDomainService", - "RegistrarAdminService", - "AsyncRegistrarAdminService", "RoadmapService", "AsyncRoadmapService", "RoleService", @@ -852,102 +840,6 @@ def restore_backup( ) -class BlogSubscriptionService(_Service): - """The NodeRings BlogSubscriptionService API.""" - - def confirm_blog_subscription( - self, - *, - token: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ConfirmBlogSubscriptionResponse: - """ - Confirm an address with the token from the confirmation email. - - It calls ``POST /v1/blog/subscriptions/confirm``. - - Args: - token: Token from the confirmation email link. - """ - return self._client._call( - "POST", - "/v1/blog/subscriptions/confirm", - m.ConfirmBlogSubscriptionResponse, - query=_query(extra_query), - body=_body(m.ConfirmBlogSubscriptionRequest, extra_body, False, ("token", token)), - idempotent=False, - timeout=timeout, - ) - - def subscribe_to_blog( - self, - *, - email: str | None = None, - source: str | None = None, - turnstile_token: str | None = None, - website: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SubscribeToBlogResponse: - """ - Start a subscription and send the confirmation email. - - It calls ``POST /v1/blog/subscriptions``. - - Args: - email: Address that should receive new posts. - source: Where the form was shown, for example "blog_index" or "post:what-noderings-is". - turnstile_token: Cloudflare Turnstile token from the widget. Required when the backend enables Turnstile for blog sign-ups. - website: Honeypot. Real readers never see or fill this field. - """ - return self._client._call( - "POST", - "/v1/blog/subscriptions", - m.SubscribeToBlogResponse, - query=_query(extra_query), - body=_body( - m.SubscribeToBlogRequest, - extra_body, - False, - ("email", email), - ("source", source), - ("turnstile_token", turnstile_token), - ("website", website), - ), - idempotent=False, - timeout=timeout, - ) - - def unsubscribe_from_blog( - self, - *, - token: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.UnsubscribeFromBlogResponse: - """ - Stop emails with the token from an unsubscribe link. - - It calls ``POST /v1/blog/subscriptions/unsubscribe``. - - Args: - token: Token from the unsubscribe link in any blog email. - """ - return self._client._call( - "POST", - "/v1/blog/subscriptions/unsubscribe", - m.UnsubscribeFromBlogResponse, - query=_query(extra_query), - body=_body(m.UnsubscribeFromBlogRequest, extra_body, False, ("token", token)), - idempotent=False, - timeout=timeout, - ) - - class BusinessMonitoringService(_Service): """The NodeRings BusinessMonitoringService API.""" @@ -3141,46 +3033,42 @@ def get_dnssec( ) -class DomainContactService(_Service): - """The NodeRings DomainContactService API.""" +class DomainService(_Service): + """The NodeRings DomainService API.""" - def create_domain_contact( + def create_domain( self, *, - contact: m.DomainContactInput | dict[str, Any] | None = None, - tlds: list[str] | None = None, + name: str | None = None, + verification_type: m.VerificationType | str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainContact: - """ - Call ``POST /v1/registrar/contacts``. - - Args: - contact: Writable contact fields. ASCII only in v1; the server normalizes and validates. - tlds: Validate against the requirements of these TLDs too. - """ + ) -> m.SuccessResponse: + """Call ``POST /v1/domain``.""" return self._client._call( "POST", - "/v1/registrar/contacts", - m.DomainContact, + "/v1/domain", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.CreateDomainContactRequest, extra_body, False, ("contact", contact), ("tlds", tlds)), + body=_body( + m.CreateDomainRequest, extra_body, False, ("name", name), ("verification_type", verification_type) + ), idempotent=False, timeout=timeout, ) - def delete_domain_contact( + def delete_domain( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/registrar/contacts/{id}``.""" + """Call ``DELETE /v1/domain/{id}``.""" return self._client._call( "DELETE", - f"/v1/registrar/contacts/{_path(id)}", + f"/v1/domain/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -3188,82 +3076,132 @@ def delete_domain_contact( timeout=timeout, ) - def get_contact_schema( + def get_domain( self, *, - country: str | None = None, - tlds: list[str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetContactSchemaResponse: - """ - Per-country rules and base field specs for the client-side (zod) schema. - - It calls ``GET /v1/registrar/contact-schema``. + ) -> m.GetDomainResponse: + """Call ``GET /v1/domain``.""" + return self._client._call( + "GET", + "/v1/domain", + m.GetDomainResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - Args: - country: Limit country rules to one country (ISO alpha-2); empty = all. - tlds: Include extension field specs for these TLDs. - """ + def verify_domain( + self, + id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``GET /v1/domain/verify/{id}``.""" return self._client._call( "GET", - "/v1/registrar/contact-schema", - m.GetContactSchemaResponse, - query=_query(extra_query, ("country", country), ("tlds", tlds)), + f"/v1/domain/verify/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + +class EnvironmentVariableService(_Service): + """The NodeRings EnvironmentVariableService API.""" + + def create_environment_variable( + self, + *, + key: str | None = None, + value: str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.CreateEnvironmentVariableResponse: + """Call ``POST /v1/environment-variables``.""" + return self._client._call( + "POST", + "/v1/environment-variables", + m.CreateEnvironmentVariableResponse, + query=_query(extra_query), + body=_body(m.CreateEnvironmentVariableRequest, extra_body, False, ("key", key), ("value", value)), + idempotent=False, + timeout=timeout, + ) + + def delete_environment_variable( + self, + id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``DELETE /v1/environment-variables/{id}``.""" + return self._client._call( + "DELETE", + f"/v1/environment-variables/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_domain_contact( + def get_environment_variable( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainContact: - """Call ``GET /v1/registrar/contacts/{id}``.""" + ) -> m.GetEnvironmentVariableResponse: + """Call ``GET /v1/environment-variables/{id}``.""" return self._client._call( "GET", - f"/v1/registrar/contacts/{_path(id)}", - m.DomainContact, + f"/v1/environment-variables/{_path(id)}", + m.GetEnvironmentVariableResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_domain_contacts( + def list_environment_variables( self, *, page: int | None = None, page_size: int | None = None, - search: str | None = None, + filter_key: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDomainContactsResponse: - """Call ``GET /v1/registrar/contacts``.""" + ) -> m.ListEnvironmentVariablesResponse: + """Call ``GET /v1/environment-variables``.""" return self._client._call( "GET", - "/v1/registrar/contacts", - m.ListDomainContactsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("search", search)), + "/v1/environment-variables", + m.ListEnvironmentVariablesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterKey", filter_key)), body=None, idempotent=False, timeout=timeout, ) - def list_domain_contacts_all( + def list_environment_variables_all( self, *, page: int | None = None, page_size: int | None = None, - search: str | None = None, + filter_key: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.DomainContact]: + ) -> Iterator[m.EnvironmentVariable]: """ - Every result of :meth:`list_domain_contacts`, reading page after page. + Every result of :meth:`list_environment_variables`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -3271,14 +3209,14 @@ def list_domain_contacts_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_domain_contacts( + res = self.list_environment_variables( page=page, page_size=size, - search=search, + filter_key=filter_key, extra_query=extra_query, timeout=timeout, ) - items = res.contacts + items = res.environment_variables for item in items: yield item seen += len(items) @@ -3286,468 +3224,351 @@ def list_domain_contacts_all( return page += 1 - def update_domain_contact( + def update_environment_variable( self, id: str, *, - contact: m.DomainContactInput | dict[str, Any] | None = None, - tlds: list[str] | None = None, + value: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateDomainContactResponse: - """ - Call ``PUT /v1/registrar/contacts/{id}``. - - Args: - contact: Writable contact fields. ASCII only in v1; the server normalizes and validates. - """ + ) -> m.SuccessResponse: + """Call ``PATCH /v1/environment-variables/{id}``.""" return self._client._call( - "PUT", - f"/v1/registrar/contacts/{_path(id)}", - m.UpdateDomainContactResponse, + "PATCH", + f"/v1/environment-variables/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.UpdateDomainContactBody, extra_body, False, ("contact", contact), ("tlds", tlds)), + body=_body(m.UpdateEnvironmentVariableBody, extra_body, False, ("value", value)), idempotent=False, timeout=timeout, ) - def validate_domain_contact( + +class ExchangeRateService(_Service): + """The NodeRings ExchangeRateService API.""" + + def convert_currency( self, *, - contact: m.DomainContactInput | dict[str, Any] | None = None, - tlds: list[str] | None = None, + target_currency: str | None = None, + usd_amount: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ValidateDomainContactResponse: + ) -> m.ConvertCurrencyResponse: """ - Dry run for forms: errors, warnings and normalized values. + Convert an amount from USD to a target currency - It calls ``POST /v1/registrar/contacts/validate``. + It calls ``POST /v1/exchange-rate/convert``. Args: - contact: Writable contact fields. ASCII only in v1; the server normalizes and validates. + target_currency: Target currency code (e.g., "EUR", "GBP", "JPY") + usd_amount: Amount in USD to convert """ return self._client._call( "POST", - "/v1/registrar/contacts/validate", - m.ValidateDomainContactResponse, + "/v1/exchange-rate/convert", + m.ConvertCurrencyResponse, query=_query(extra_query), - body=_body(m.ValidateDomainContactRequest, extra_body, False, ("contact", contact), ("tlds", tlds)), + body=_body( + m.ConvertCurrencyRequest, + extra_body, + False, + ("target_currency", target_currency), + ("usd_amount", usd_amount), + ), idempotent=False, timeout=timeout, ) - -class DomainOrderService(_Service): - """The NodeRings DomainOrderService API.""" - - def cancel_domain_order( + def get_all_exchange_rates( self, - id: str, *, - reason: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrder: - """Call ``POST /v1/registrar/orders/{id}/cancel``.""" + ) -> m.GetAllExchangeRatesResponse: + """ + Get all exchange rates at once (returns map of currency codes to rates) + + It calls ``GET /v1/exchange-rate/rates``. + """ return self._client._call( - "POST", - f"/v1/registrar/orders/{_path(id)}/cancel", - m.DomainOrder, + "GET", + "/v1/exchange-rate/rates", + m.GetAllExchangeRatesResponse, query=_query(extra_query), - body=_body(m.CancelDomainOrderBody, extra_body, False, ("reason", reason)), + body=None, idempotent=False, timeout=timeout, ) - def checkout_domain_order( + def get_exchange_rate( self, - id: str, + currency_code: str, *, - accept_terms_version: str | None = None, - confirm_billing_country: bool | None = None, - evidence_country: str | None = None, - idempotency_key: str | None = None, - mit_consent: bool | None = None, - payment_method_id: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CheckoutDomainOrderResponse: + ) -> m.GetExchangeRateResponse: """ - Authorize payment and start processing. May return requires_action + client_secret. - - It calls ``POST /v1/registrar/orders/{id}/checkout``. A retry of the same call cannot create - a second resource: the SDK sends an idempotency key. + Get the current exchange rate for a specific currency (from USD) - Args: - accept_terms_version: Must equal the current terms version (no implicit acceptance). - confirm_billing_country: Customer confirmed a billing country that matches neither card nor IP. - evidence_country: Second proof of country when confirm_billing_country is set (ISO 3166-1 alpha-2). - idempotency_key: A UUID that makes the create safe to retry. If you leave it out, the SDK sets a new one. - mit_consent: Consent to merchant-initiated renewal charges. - payment_method_id: Card to charge. Domains are card-only: account credit and coupons never apply. + It calls ``GET /v1/exchange-rate/rate/{currencyCode}``. """ return self._client._call( - "POST", - f"/v1/registrar/orders/{_path(id)}/checkout", - m.CheckoutDomainOrderResponse, + "GET", + f"/v1/exchange-rate/rate/{_path(currency_code)}", + m.GetExchangeRateResponse, query=_query(extra_query), - body=_body( - m.CheckoutDomainOrderBody, - extra_body, - True, - ("accept_terms_version", accept_terms_version), - ("confirm_billing_country", confirm_billing_country), - ("evidence_country", evidence_country), - ("idempotency_key", idempotency_key), - ("mit_consent", mit_consent), - ("payment_method_id", payment_method_id), - ), - idempotent=True, + body=None, + idempotent=False, timeout=timeout, ) - def confirm_domain_order( + def list_supported_currencies( self, - id: str, *, - payment_intent_id: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrder: + ) -> m.ListSupportedCurrenciesResponse: """ - After 3-D Secure: re-reads the PaymentIntent from Stripe and continues. + List all supported currency codes - It calls ``POST /v1/registrar/orders/{id}/confirm``. + It calls ``GET /v1/exchange-rate/currencies``. """ return self._client._call( - "POST", - f"/v1/registrar/orders/{_path(id)}/confirm", - m.DomainOrder, + "GET", + "/v1/exchange-rate/currencies", + m.ListSupportedCurrenciesResponse, query=_query(extra_query), - body=_body(m.ConfirmDomainOrderBody, extra_body, False, ("payment_intent_id", payment_intent_id)), + body=None, idempotent=False, timeout=timeout, ) - def create_domain_order( + +class FirewallService(_Service): + """The NodeRings FirewallService API.""" + + def create_firewall_address_group( self, *, - contact_id: str | None = None, - idempotency_key: str | None = None, - items: list[m.DomainOrderItemInput | dict[str, Any]] | None = None, - nameservers: list[str] | None = None, - ns_mode: m.DomainNsMode | str | None = None, + group: m.FirewallAddressGroupInput | dict[str, Any] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrder: + ) -> m.CreateFirewallAddressGroupResponse: """ - Call ``POST /v1/registrar/orders``. A retry of the same call cannot create a second - resource: the SDK sends an idempotency key. + Call ``POST /v1/firewall/address-groups``. Args: - contact_id: Default registrant contact for all items. - idempotency_key: A UUID that makes the create safe to retry. If you leave it out, the SDK sets a new one. - ns_mode: - DOMAIN_NS_MODE_NODERINGS: NodeRings DNS (cfg.PowerDNS.AssignedNameservers). - DOMAIN_NS_MODE_CUSTOM: Customer nameservers. + group: FirewallAddressGroupInput is the client-provided payload for create/update. Clients must not provide id/timestamps (those are server-controlled). """ return self._client._call( "POST", - "/v1/registrar/orders", - m.DomainOrder, + "/v1/firewall/address-groups", + m.CreateFirewallAddressGroupResponse, query=_query(extra_query), - body=_body( - m.CreateDomainOrderRequest, - extra_body, - True, - ("contact_id", contact_id), - ("idempotency_key", idempotency_key), - ("items", items), - ("nameservers", nameservers), - ("ns_mode", ns_mode), - ), - idempotent=True, + body=_body(m.CreateFirewallAddressGroupRequest, extra_body, False, ("group", group)), + idempotent=False, timeout=timeout, ) - def get_domain_order( + def create_firewall_rule( self, - id: str, + ruleset_id: str, *, + rule: m.FirewallRuleInput | dict[str, Any] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrder: - """Call ``GET /v1/registrar/orders/{id}``.""" + ) -> m.CreateFirewallRuleResponse: + """ + Call ``POST /v1/firewall/rulesets/{rulesetId}/rules``. + + Args: + rule: FirewallRuleInput is the client-provided rule payload for create/update. Clients must not provide id/ruleset_id/timestamps (those are server-controlled). + """ return self._client._call( - "GET", - f"/v1/registrar/orders/{_path(id)}", - m.DomainOrder, + "POST", + f"/v1/firewall/rulesets/{_path(ruleset_id)}/rules", + m.CreateFirewallRuleResponse, query=_query(extra_query), - body=None, + body=_body(m.CreateFirewallRuleBody, extra_body, False, ("rule", rule)), idempotent=False, timeout=timeout, ) - def list_domain_orders( + def create_firewall_rule_set( self, *, - page: int | None = None, - page_size: int | None = None, - states: list[m.DomainOrderState | str] | None = None, + ruleset: m.FirewallRuleSetInput | dict[str, Any] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDomainOrdersResponse: - """Call ``GET /v1/registrar/orders``.""" + ) -> m.CreateFirewallRuleSetResponse: + """Call ``POST /v1/firewall/rulesets``.""" return self._client._call( - "GET", - "/v1/registrar/orders", - m.ListDomainOrdersResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("states", states)), - body=None, + "POST", + "/v1/firewall/rulesets", + m.CreateFirewallRuleSetResponse, + query=_query(extra_query), + body=_body(m.CreateFirewallRuleSetRequest, extra_body, False, ("ruleset", ruleset)), idempotent=False, timeout=timeout, ) - def list_domain_orders_all( + def delete_firewall_address_group( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - states: list[m.DomainOrderState | str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.DomainOrder]: - """ - Every result of :meth:`list_domain_orders`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_domain_orders( - page=page, - page_size=size, - states=states, - extra_query=extra_query, - timeout=timeout, - ) - items = res.orders - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + ) -> m.SuccessResponse: + """Call ``DELETE /v1/firewall/address-groups/{id}``.""" + return self._client._call( + "DELETE", + f"/v1/firewall/address-groups/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - def price_domain_order( + def delete_firewall_rule( self, id: str, *, - confirm_billing_country: bool | None = None, - evidence_country: str | None = None, - payment_method_id: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrderQuote: - """ - Re-quote with live prices and tax (Stripe Tax). - - It calls ``POST /v1/registrar/orders/{id}/price``. - - Args: - confirm_billing_country: Customer confirmed a billing country that matches neither card nor IP (send when the quote had billing_country_confirmation_required). - evidence_country: Second proof of country with confirm_billing_country (ISO 3166-1 alpha-2, e.g. the phone number's country). Must equal the billing country. - payment_method_id: Card to quote with (its country is tax location evidence). Empty = default card. - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/firewall/rules/{id}``.""" return self._client._call( - "POST", - f"/v1/registrar/orders/{_path(id)}/price", - m.DomainOrderQuote, + "DELETE", + f"/v1/firewall/rules/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.PriceDomainOrderBody, - extra_body, - False, - ("confirm_billing_country", confirm_billing_country), - ("evidence_country", evidence_country), - ("payment_method_id", payment_method_id), - ), + body=None, idempotent=False, timeout=timeout, ) - def update_domain_order( + def delete_firewall_rule_set( self, id: str, *, - add_items: list[m.DomainOrderItemInput | dict[str, Any]] | None = None, - contact_id: str | None = None, - item_updates: list[m.DomainOrderItemUpdate | dict[str, Any]] | None = None, - nameservers: list[str] | None = None, - ns_mode: m.DomainNsMode | str | None = None, - remove_item_ids: list[str] | None = None, - extra_body: dict[str, Any] | None = None, + force: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrder: - """ - Items, years, privacy, auto-renew, contact and DNS choices. - - It calls ``PATCH /v1/registrar/orders/{id}``. - - Args: - add_items: Items to add. - contact_id: Registrant contact for every item. - item_updates: Changes to existing items. - ns_mode: - DOMAIN_NS_MODE_NODERINGS: NodeRings DNS (cfg.PowerDNS.AssignedNameservers). - DOMAIN_NS_MODE_CUSTOM: Customer nameservers. - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/firewall/rulesets/{id}``.""" return self._client._call( - "PATCH", - f"/v1/registrar/orders/{_path(id)}", - m.DomainOrder, - query=_query(extra_query), - body=_body( - m.UpdateDomainOrderBody, - extra_body, - False, - ("add_items", add_items), - ("contact_id", contact_id), - ("item_updates", item_updates), - ("nameservers", nameservers), - ("ns_mode", ns_mode), - ("remove_item_ids", remove_item_ids), - ), + "DELETE", + f"/v1/firewall/rulesets/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query, ("force", force)), + body=None, idempotent=False, timeout=timeout, ) - -class DomainSearchService(_Service): - """The NodeRings DomainSearchService API.""" - - def check_domains( + def get_firewall_address_group( self, + id: str, *, - names: list[str] | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CheckDomainsResponse: - """ - Live, uncached availability (add-to-cart and checkout). Login required. - - It calls ``POST /v1/registrar/check``. - """ + ) -> m.FirewallAddressGroup: + """Call ``GET /v1/firewall/address-groups/{id}``.""" return self._client._call( - "POST", - "/v1/registrar/check", - m.CheckDomainsResponse, + "GET", + f"/v1/firewall/address-groups/{_path(id)}", + m.FirewallAddressGroup, query=_query(extra_query), - body=_body(m.CheckDomainsRequest, extra_body, False, ("names", names)), + body=None, idempotent=False, timeout=timeout, ) - def check_transfer( + def get_firewall_rule( self, + id: str, *, - names: list[str] | None = None, - extra_body: dict[str, Any] | None = None, + direction: m.FirewallDirection | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CheckTransferResponse: + ) -> m.FirewallRuleResource: """ - Whether names can be transferred in, with price and warnings. + Call ``GET /v1/firewall/rules/{id}``. - It calls ``POST /v1/registrar/transfer-check``. + Args: + direction: Optional: Filter by direction. If not specified, returns the rule regardless of direction. """ return self._client._call( - "POST", - "/v1/registrar/transfer-check", - m.CheckTransferResponse, - query=_query(extra_query), - body=_body(m.CheckTransferRequest, extra_body, False, ("names", names)), + "GET", + f"/v1/firewall/rules/{_path(id)}", + m.FirewallRuleResource, + query=_query(extra_query, ("direction", direction)), + body=None, idempotent=False, timeout=timeout, ) - def get_tld_requirements( + def get_firewall_rule_set( self, - tld: str, + id: str, *, - operation: m.DomainOperation | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetTldRequirementsResponse: - """ - Contact fields a TLD needs for an operation (dynamic extension fields). - - It calls ``GET /v1/registrar/tlds/{tld}/requirements``. - """ + ) -> m.FirewallRuleSet: + """Call ``GET /v1/firewall/rulesets/{id}``.""" return self._client._call( "GET", - f"/v1/registrar/tlds/{_path(tld)}/requirements", - m.GetTldRequirementsResponse, - query=_query(extra_query, ("operation", operation)), + f"/v1/firewall/rulesets/{_path(id)}", + m.FirewallRuleSet, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_tld_prices( + def list_firewall_address_groups( self, *, - featured_only: bool | None = None, - category: m.TldCategory | str | None = None, page: int | None = None, page_size: int | None = None, + name: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListTldPricesResponse: + ) -> m.ListFirewallAddressGroupsResponse: """ - Anonymous. Public TLD price list (registration, renewal, transfer, restore, privacy). - - It calls ``GET /v1/registrar/tlds``. + Call ``GET /v1/firewall/address-groups``. Args: - category: Only TLDs of this category (unspecified = all enabled TLDs). + name: Note: family filter removed as address groups can now contain mixed IPv4/IPv6 """ return self._client._call( "GET", - "/v1/registrar/tlds", - m.ListTldPricesResponse, - query=_query( - extra_query, - ("featuredOnly", featured_only), - ("category", category), - ("page", page), - ("pageSize", page_size), - ), + "/v1/firewall/address-groups", + m.ListFirewallAddressGroupsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("name", name)), body=None, idempotent=False, timeout=timeout, ) - def list_tld_prices_all( + def list_firewall_address_groups_all( self, *, - featured_only: bool | None = None, - category: m.TldCategory | str | None = None, page: int | None = None, page_size: int | None = None, + name: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.TldPrice]: + ) -> Iterator[m.FirewallAddressGroup]: """ - Every result of :meth:`list_tld_prices`, reading page after page. + Every result of :meth:`list_firewall_address_groups`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -3755,15 +3576,14 @@ def list_tld_prices_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_tld_prices( + res = self.list_firewall_address_groups( page=page, page_size=size, - featured_only=featured_only, - category=category, + name=name, extra_query=extra_query, timeout=timeout, ) - items = res.tlds + items = res.groups for item in items: yield item seen += len(items) @@ -3771,223 +3591,111 @@ def list_tld_prices_all( return page += 1 - def search_domains( + def list_firewall_rule_sets( self, *, - category: m.TldCategory | str | None = None, - exact_only: bool | None = None, - include_suggestions: bool | None = None, - query: str | None = None, - tlds: list[str] | None = None, - turnstile_token: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + name: str | None = None, + filter_attachment: m.FirewallRuleSetAttachmentFilter | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SearchDomainsResponse: + ) -> m.ListFirewallRuleSetsResponse: """ - Anonymous. Search a name, label or keywords; exact match first, then featured TLDs, then - suggestions. - - It calls ``POST /v1/registrar/search``. + Call ``GET /v1/firewall/rulesets``. Args: - category: Grouping for "Show more extensions" in search and the pricing page (§8.2). - exact_only: Check only the exact name, served from the availability cache (type-ahead). - include_suggestions: Include registrar name suggestions (when the adapter supports them). - query: A name (evergreen-coffee.com), a label (evergreencoffee) or short keywords. - tlds: Restrict results to these TLDs (without leading dot). Empty = featured TLDs. - turnstile_token: Turnstile token; required for anonymous callers. + filter_attachment: Optional: Filter by whether any virtual machine is attached to the ruleset. - FIREWALL_RULESET_ATTACHMENT_FILTER_UNSPECIFIED: All rulesets - FIREWALL_RULESET_ATTACHMENT_FILTER_ATTACHED: Rulesets with at least one VM attached - FIREWALL_RULESET_ATTACHMENT_FILTER_UNATTACHED: Rulesets with no VMs attached """ return self._client._call( - "POST", - "/v1/registrar/search", - m.SearchDomainsResponse, - query=_query(extra_query), - body=_body( - m.SearchDomainsRequest, - extra_body, - False, - ("category", category), - ("exact_only", exact_only), - ("include_suggestions", include_suggestions), - ("query", query), - ("tlds", tlds), - ("turnstile_token", turnstile_token), + "GET", + "/v1/firewall/rulesets", + m.ListFirewallRuleSetsResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("name", name), + ("filterAttachment", filter_attachment), ), + body=None, idempotent=False, timeout=timeout, ) - -class DomainService(_Service): - """The NodeRings DomainService API.""" - - def create_domain( + def list_firewall_rule_sets_all( self, *, + page: int | None = None, + page_size: int | None = None, name: str | None = None, - verification_type: m.VerificationType | str | None = None, - extra_body: dict[str, Any] | None = None, + filter_attachment: m.FirewallRuleSetAttachmentFilter | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/domain``.""" - return self._client._call( - "POST", - "/v1/domain", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.CreateDomainRequest, extra_body, False, ("name", name), ("verification_type", verification_type) - ), - idempotent=False, - timeout=timeout, - ) + ) -> Iterator[m.FirewallRuleSet]: + """ + Every result of :meth:`list_firewall_rule_sets`, reading page after page. - def delete_domain( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/domain/{id}``.""" - return self._client._call( - "DELETE", - f"/v1/domain/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def get_domain( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetDomainResponse: - """Call ``GET /v1/domain``.""" - return self._client._call( - "GET", - "/v1/domain", - m.GetDomainResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def verify_domain( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``GET /v1/domain/verify/{id}``.""" - return self._client._call( - "GET", - f"/v1/domain/verify/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - -class EnvironmentVariableService(_Service): - """The NodeRings EnvironmentVariableService API.""" - - def create_environment_variable( - self, - *, - key: str | None = None, - value: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.CreateEnvironmentVariableResponse: - """Call ``POST /v1/environment-variables``.""" - return self._client._call( - "POST", - "/v1/environment-variables", - m.CreateEnvironmentVariableResponse, - query=_query(extra_query), - body=_body(m.CreateEnvironmentVariableRequest, extra_body, False, ("key", key), ("value", value)), - idempotent=False, - timeout=timeout, - ) - - def delete_environment_variable( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/environment-variables/{id}``.""" - return self._client._call( - "DELETE", - f"/v1/environment-variables/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def get_environment_variable( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetEnvironmentVariableResponse: - """Call ``GET /v1/environment-variables/{id}``.""" - return self._client._call( - "GET", - f"/v1/environment-variables/{_path(id)}", - m.GetEnvironmentVariableResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_firewall_rule_sets( + page=page, + page_size=size, + name=name, + filter_attachment=filter_attachment, + extra_query=extra_query, + timeout=timeout, + ) + items = res.rulesets + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 - def list_environment_variables( + def list_firewall_rules( self, + ruleset_id: str, *, page: int | None = None, page_size: int | None = None, - filter_key: str | None = None, + direction: m.FirewallDirection | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListEnvironmentVariablesResponse: - """Call ``GET /v1/environment-variables``.""" + ) -> m.ListFirewallRulesResponse: + """ + Call ``GET /v1/firewall/rulesets/{rulesetId}/rules``. + + Args: + direction: Optional: Filter by direction. If not specified, returns all rules regardless of direction. + """ return self._client._call( "GET", - "/v1/environment-variables", - m.ListEnvironmentVariablesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterKey", filter_key)), + f"/v1/firewall/rulesets/{_path(ruleset_id)}/rules", + m.ListFirewallRulesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("direction", direction)), body=None, idempotent=False, timeout=timeout, ) - def list_environment_variables_all( + def list_firewall_rules_all( self, + ruleset_id: str, *, page: int | None = None, page_size: int | None = None, - filter_key: str | None = None, + direction: m.FirewallDirection | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.EnvironmentVariable]: + ) -> Iterator[m.FirewallRuleResource]: """ - Every result of :meth:`list_environment_variables`, reading page after page. + Every result of :meth:`list_firewall_rules`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -3995,14 +3703,15 @@ def list_environment_variables_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_environment_variables( + res = self.list_firewall_rules( + ruleset_id, page=page, page_size=size, - filter_key=filter_key, + direction=direction, extra_query=extra_query, timeout=timeout, ) - items = res.environment_variables + items = res.rules for item in items: yield item seen += len(items) @@ -4010,1878 +3719,1855 @@ def list_environment_variables_all( return page += 1 - def update_environment_variable( + def move_firewall_rule( self, id: str, *, - value: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``PATCH /v1/environment-variables/{id}``.""" - return self._client._call( - "PATCH", - f"/v1/environment-variables/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.UpdateEnvironmentVariableBody, extra_body, False, ("value", value)), - idempotent=False, - timeout=timeout, - ) - - -class ExchangeRateService(_Service): - """The NodeRings ExchangeRateService API.""" - - def convert_currency( - self, - *, - target_currency: str | None = None, - usd_amount: str | None = None, + position: m.FirewallRulePosition | str | None = None, + target_rule_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ConvertCurrencyResponse: + ) -> m.FirewallRuleResource: """ - Convert an amount from USD to a target currency - - It calls ``POST /v1/exchange-rate/convert``. + Call ``POST /v1/firewall/rules/{id}/move``. Args: - target_currency: Target currency code (e.g., "EUR", "GBP", "JPY") - usd_amount: Amount in USD to convert + target_rule_id: ID of the target rule to move relative to """ return self._client._call( "POST", - "/v1/exchange-rate/convert", - m.ConvertCurrencyResponse, + f"/v1/firewall/rules/{_path(id)}/move", + m.FirewallRuleResource, query=_query(extra_query), body=_body( - m.ConvertCurrencyRequest, - extra_body, - False, - ("target_currency", target_currency), - ("usd_amount", usd_amount), + m.MoveFirewallRuleBody, extra_body, False, ("position", position), ("target_rule_id", target_rule_id) ), idempotent=False, timeout=timeout, ) - def get_all_exchange_rates( + def update_firewall_address_group( self, + id: str, *, + group: m.FirewallAddressGroupInput | dict[str, Any] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetAllExchangeRatesResponse: + ) -> m.FirewallAddressGroup: """ - Get all exchange rates at once (returns map of currency codes to rates) + Call ``PATCH /v1/firewall/address-groups/{id}``. - It calls ``GET /v1/exchange-rate/rates``. + Args: + group: FirewallAddressGroupInput is the client-provided payload for create/update. Clients must not provide id/timestamps (those are server-controlled). """ return self._client._call( - "GET", - "/v1/exchange-rate/rates", - m.GetAllExchangeRatesResponse, + "PATCH", + f"/v1/firewall/address-groups/{_path(id)}", + m.FirewallAddressGroup, query=_query(extra_query), - body=None, + body=_body(m.UpdateFirewallAddressGroupBody, extra_body, False, ("group", group)), idempotent=False, timeout=timeout, ) - def get_exchange_rate( + def update_firewall_rule( self, - currency_code: str, + id: str, *, + rule: m.FirewallRuleInput | dict[str, Any] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetExchangeRateResponse: + ) -> m.FirewallRuleResource: """ - Get the current exchange rate for a specific currency (from USD) + Call ``PATCH /v1/firewall/rules/{id}``. - It calls ``GET /v1/exchange-rate/rate/{currencyCode}``. + Args: + rule: FirewallRuleInput is the client-provided rule payload for create/update. Clients must not provide id/ruleset_id/timestamps (those are server-controlled). """ return self._client._call( - "GET", - f"/v1/exchange-rate/rate/{_path(currency_code)}", - m.GetExchangeRateResponse, + "PATCH", + f"/v1/firewall/rules/{_path(id)}", + m.FirewallRuleResource, query=_query(extra_query), - body=None, + body=_body(m.UpdateFirewallRuleBody, extra_body, False, ("rule", rule)), idempotent=False, timeout=timeout, ) - def list_supported_currencies( + def update_firewall_rule_set( self, + id: str, *, + ruleset: m.FirewallRuleSetInput | dict[str, Any] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListSupportedCurrenciesResponse: - """ - List all supported currency codes - - It calls ``GET /v1/exchange-rate/currencies``. - """ + ) -> m.FirewallRuleSet: + """Call ``PATCH /v1/firewall/rulesets/{id}``.""" return self._client._call( - "GET", - "/v1/exchange-rate/currencies", - m.ListSupportedCurrenciesResponse, + "PATCH", + f"/v1/firewall/rulesets/{_path(id)}", + m.FirewallRuleSet, query=_query(extra_query), - body=None, + body=_body(m.UpdateFirewallRuleSetBody, extra_body, False, ("ruleset", ruleset)), idempotent=False, timeout=timeout, ) -class FirewallService(_Service): - """The NodeRings FirewallService API.""" +class GameServerService(_Service): + """The NodeRings GameServerService API.""" - def create_firewall_address_group( + def archive_files( self, + id: str, *, - group: m.FirewallAddressGroupInput | dict[str, Any] | None = None, + files: list[str] | None = None, + root: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateFirewallAddressGroupResponse: - """ - Call ``POST /v1/firewall/address-groups``. - - Args: - group: FirewallAddressGroupInput is the client-provided payload for create/update. Clients must not provide id/timestamps (those are server-controlled). - """ + ) -> m.ArchiveFilesResponse: + """Call ``POST /v1/game-servers/{id}/files:archive``.""" return self._client._call( "POST", - "/v1/firewall/address-groups", - m.CreateFirewallAddressGroupResponse, + f"/v1/game-servers/{_path(id)}/files:archive", + m.ArchiveFilesResponse, query=_query(extra_query), - body=_body(m.CreateFirewallAddressGroupRequest, extra_body, False, ("group", group)), + body=_body(m.ArchiveFilesBody, extra_body, False, ("files", files), ("root", root)), idempotent=False, timeout=timeout, ) - def create_firewall_rule( + def change_game_server_game( self, - ruleset_id: str, + id: str, *, - rule: m.FirewallRuleInput | dict[str, Any] | None = None, + accept_eula: bool | None = None, + environment: dict[str, str] | None = None, + template_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateFirewallRuleResponse: - """ - Call ``POST /v1/firewall/rulesets/{rulesetId}/rules``. - - Args: - rule: FirewallRuleInput is the client-provided rule payload for create/update. Clients must not provide id/ruleset_id/timestamps (those are server-controlled). - """ + ) -> m.GameServer: + """Call ``POST /v1/game-servers/{id}:changeGame``.""" return self._client._call( "POST", - f"/v1/firewall/rulesets/{_path(ruleset_id)}/rules", - m.CreateFirewallRuleResponse, + f"/v1/game-servers/{_path(id)}:changeGame", + m.GameServer, query=_query(extra_query), - body=_body(m.CreateFirewallRuleBody, extra_body, False, ("rule", rule)), + body=_body( + m.ChangeGameServerGameBody, + extra_body, + False, + ("accept_eula", accept_eula), + ("environment", environment), + ("template_id", template_id), + ), idempotent=False, timeout=timeout, ) - def create_firewall_rule_set( + def copy_file( self, + id: str, *, - ruleset: m.FirewallRuleSetInput | dict[str, Any] | None = None, + location: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateFirewallRuleSetResponse: - """Call ``POST /v1/firewall/rulesets``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/files:copy``.""" return self._client._call( "POST", - "/v1/firewall/rulesets", - m.CreateFirewallRuleSetResponse, + f"/v1/game-servers/{_path(id)}/files:copy", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.CreateFirewallRuleSetRequest, extra_body, False, ("ruleset", ruleset)), + body=_body(m.CopyFileBody, extra_body, False, ("location", location)), idempotent=False, timeout=timeout, ) - def delete_firewall_address_group( + def create_allocation( self, id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/firewall/address-groups/{id}``.""" + ) -> m.GameServerAllocation: + """Call ``POST /v1/game-servers/{id}/allocations``.""" return self._client._call( - "DELETE", - f"/v1/firewall/address-groups/{_path(id)}", - m.SuccessResponse, + "POST", + f"/v1/game-servers/{_path(id)}/allocations", + m.GameServerAllocation, query=_query(extra_query), - body=None, + body=_body(m.CreateAllocationBody, extra_body, False), idempotent=False, timeout=timeout, ) - def delete_firewall_rule( + def create_backup( self, id: str, *, + name: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/firewall/rules/{id}``.""" + ) -> m.GameServerBackup: + """Call ``POST /v1/game-servers/{id}/backups``.""" return self._client._call( - "DELETE", - f"/v1/firewall/rules/{_path(id)}", - m.SuccessResponse, + "POST", + f"/v1/game-servers/{_path(id)}/backups", + m.GameServerBackup, query=_query(extra_query), - body=None, + body=_body(m.CreateBackupBody, extra_body, False, ("name", name)), idempotent=False, timeout=timeout, ) - def delete_firewall_rule_set( + def create_database( self, id: str, *, - force: bool | None = None, + database: str | None = None, + remote: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/firewall/rulesets/{id}``.""" + ) -> m.GameServerDatabase: + """Call ``POST /v1/game-servers/{id}/databases``.""" return self._client._call( - "DELETE", - f"/v1/firewall/rulesets/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query, ("force", force)), - body=None, + "POST", + f"/v1/game-servers/{_path(id)}/databases", + m.GameServerDatabase, + query=_query(extra_query), + body=_body(m.CreateDatabaseBody, extra_body, False, ("database", database), ("remote", remote)), idempotent=False, timeout=timeout, ) - def get_firewall_address_group( + def create_folder( self, id: str, *, + name: str | None = None, + root: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallAddressGroup: - """Call ``GET /v1/firewall/address-groups/{id}``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/files:folder``.""" return self._client._call( - "GET", - f"/v1/firewall/address-groups/{_path(id)}", - m.FirewallAddressGroup, + "POST", + f"/v1/game-servers/{_path(id)}/files:folder", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.CreateFolderBody, extra_body, False, ("name", name), ("root", root)), idempotent=False, timeout=timeout, ) - def get_firewall_rule( + def create_game_server( self, - id: str, *, - direction: m.FirewallDirection | str | None = None, + accept_eula: bool | None = None, + environment: dict[str, str] | None = None, + idempotency_key: str | None = None, + name: str | None = None, + plan_id: str | None = None, + provider_organization_id: str | None = None, + region_id: str | None = None, + template_id: str | None = None, + version_value: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallRuleResource: + ) -> m.GameServer: """ - Call ``GET /v1/firewall/rules/{id}``. + Call ``POST /v1/game-servers``. A retry of the same call cannot create a second resource: + the SDK sends an idempotency key. Args: - direction: Optional: Filter by direction. If not specified, returns the rule regardless of direction. + accept_eula: accept_eula is the customer's agreement. Required when the egg has the EULA mark. + environment: environment overrides egg defaults. Only user-editable variables are accepted. + idempotency_key: A UUID that makes the create safe to retry. If you leave it out, the SDK sets a new one. """ return self._client._call( - "GET", - f"/v1/firewall/rules/{_path(id)}", - m.FirewallRuleResource, - query=_query(extra_query, ("direction", direction)), - body=None, - idempotent=False, + "POST", + "/v1/game-servers", + m.GameServer, + query=_query(extra_query), + body=_body( + m.CreateGameServerRequest, + extra_body, + True, + ("accept_eula", accept_eula), + ("environment", environment), + ("idempotency_key", idempotency_key), + ("name", name), + ("plan_id", plan_id), + ("provider_organization_id", provider_organization_id), + ("region_id", region_id), + ("template_id", template_id), + ("version_value", version_value), + ), + idempotent=True, timeout=timeout, ) - def get_firewall_rule_set( + def create_schedule( self, id: str, *, + day_of_month: str | None = None, + day_of_week: str | None = None, + hour: str | None = None, + is_active: bool | None = None, + minute: str | None = None, + month: str | None = None, + name: str | None = None, + only_when_online: bool | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallRuleSet: - """Call ``GET /v1/firewall/rulesets/{id}``.""" + ) -> m.GameServerSchedule: + """ + Call ``POST /v1/game-servers/{id}/schedules``. + + Args: + is_active: Omitted means the schedule is created enabled. + """ return self._client._call( - "GET", - f"/v1/firewall/rulesets/{_path(id)}", - m.FirewallRuleSet, + "POST", + f"/v1/game-servers/{_path(id)}/schedules", + m.GameServerSchedule, query=_query(extra_query), - body=None, + body=_body( + m.CreateScheduleBody, + extra_body, + False, + ("day_of_month", day_of_month), + ("day_of_week", day_of_week), + ("hour", hour), + ("is_active", is_active), + ("minute", minute), + ("month", month), + ("name", name), + ("only_when_online", only_when_online), + ), idempotent=False, timeout=timeout, ) - def list_firewall_address_groups( + def create_schedule_task( self, + id: str, + schedule_id: str, *, - page: int | None = None, - page_size: int | None = None, - name: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListFirewallAddressGroupsResponse: - """ - Call ``GET /v1/firewall/address-groups``. - - Args: - name: Note: family filter removed as address groups can now contain mixed IPv4/IPv6 - """ + action: str | None = None, + continue_on_failure: bool | None = None, + payload: str | None = None, + time_offset: int | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}/tasks``.""" return self._client._call( - "GET", - "/v1/firewall/address-groups", - m.ListFirewallAddressGroupsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("name", name)), - body=None, + "POST", + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks", + m.SuccessResponse, + query=_query(extra_query), + body=_body( + m.CreateScheduleTaskBody, + extra_body, + False, + ("action", action), + ("continue_on_failure", continue_on_failure), + ("payload", payload), + ("time_offset", time_offset), + ), idempotent=False, timeout=timeout, ) - def list_firewall_address_groups_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - name: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.FirewallAddressGroup]: - """ - Every result of :meth:`list_firewall_address_groups`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_firewall_address_groups( - page=page, - page_size=size, - name=name, - extra_query=extra_query, - timeout=timeout, - ) - items = res.groups - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - def list_firewall_rule_sets( + def delete_allocation( self, + id: str, + allocation_id: str, *, - page: int | None = None, - page_size: int | None = None, - name: str | None = None, - filter_attachment: m.FirewallRuleSetAttachmentFilter | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListFirewallRuleSetsResponse: - """ - Call ``GET /v1/firewall/rulesets``. - - Args: - filter_attachment: Optional: Filter by whether any virtual machine is attached to the ruleset. - FIREWALL_RULESET_ATTACHMENT_FILTER_UNSPECIFIED: All rulesets - FIREWALL_RULESET_ATTACHMENT_FILTER_ATTACHED: Rulesets with at least one VM attached - FIREWALL_RULESET_ATTACHMENT_FILTER_UNATTACHED: Rulesets with no VMs attached - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}/allocations/{allocationId}``.""" return self._client._call( - "GET", - "/v1/firewall/rulesets", - m.ListFirewallRuleSetsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("name", name), - ("filterAttachment", filter_attachment), - ), + "DELETE", + f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_firewall_rule_sets_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - name: str | None = None, - filter_attachment: m.FirewallRuleSetAttachmentFilter | str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.FirewallRuleSet]: - """ - Every result of :meth:`list_firewall_rule_sets`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_firewall_rule_sets( - page=page, - page_size=size, - name=name, - filter_attachment=filter_attachment, - extra_query=extra_query, - timeout=timeout, - ) - items = res.rulesets - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - def list_firewall_rules( + def delete_backup( self, - ruleset_id: str, + id: str, + backup_uuid: str, *, - page: int | None = None, - page_size: int | None = None, - direction: m.FirewallDirection | str | None = None, + truncate: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListFirewallRulesResponse: + ) -> m.SuccessResponse: """ - Call ``GET /v1/firewall/rulesets/{rulesetId}/rules``. + Call ``DELETE /v1/game-servers/{id}/backups/{backupUuid}``. Args: - direction: Optional: Filter by direction. If not specified, returns all rules regardless of direction. + truncate: Restore only. When true, the panel deletes every file before extracting the backup. """ return self._client._call( - "GET", - f"/v1/firewall/rulesets/{_path(ruleset_id)}/rules", - m.ListFirewallRulesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("direction", direction)), + "DELETE", + f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}", + m.SuccessResponse, + query=_query(extra_query, ("truncate", truncate)), body=None, idempotent=False, timeout=timeout, ) - def list_firewall_rules_all( + def delete_database( self, - ruleset_id: str, + id: str, + database_id: str, *, - page: int | None = None, - page_size: int | None = None, - direction: m.FirewallDirection | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.FirewallRuleResource]: - """ - Every result of :meth:`list_firewall_rules`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_firewall_rules( - ruleset_id, - page=page, - page_size=size, - direction=direction, - extra_query=extra_query, - timeout=timeout, - ) - items = res.rules - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}/databases/{databaseId}``.""" + return self._client._call( + "DELETE", + f"/v1/game-servers/{_path(id)}/databases/{_path(database_id)}", + m.SuccessResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - def move_firewall_rule( + def delete_files( self, id: str, *, - position: m.FirewallRulePosition | str | None = None, - target_rule_id: str | None = None, + files: list[str] | None = None, + root: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallRuleResource: - """ - Call ``POST /v1/firewall/rules/{id}/move``. - - Args: - target_rule_id: ID of the target rule to move relative to - """ + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/files:delete``.""" return self._client._call( "POST", - f"/v1/firewall/rules/{_path(id)}/move", - m.FirewallRuleResource, + f"/v1/game-servers/{_path(id)}/files:delete", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.MoveFirewallRuleBody, extra_body, False, ("position", position), ("target_rule_id", target_rule_id) - ), + body=_body(m.DeleteFilesBody, extra_body, False, ("files", files), ("root", root)), idempotent=False, timeout=timeout, ) - def update_firewall_address_group( + def delete_game_server( self, id: str, *, - group: m.FirewallAddressGroupInput | dict[str, Any] | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallAddressGroup: - """ - Call ``PATCH /v1/firewall/address-groups/{id}``. - - Args: - group: FirewallAddressGroupInput is the client-provided payload for create/update. Clients must not provide id/timestamps (those are server-controlled). - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}``.""" return self._client._call( - "PATCH", - f"/v1/firewall/address-groups/{_path(id)}", - m.FirewallAddressGroup, + "DELETE", + f"/v1/game-servers/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.UpdateFirewallAddressGroupBody, extra_body, False, ("group", group)), + body=None, idempotent=False, timeout=timeout, ) - def update_firewall_rule( + def delete_schedule( self, id: str, + schedule_id: str, *, - rule: m.FirewallRuleInput | dict[str, Any] | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallRuleResource: - """ - Call ``PATCH /v1/firewall/rules/{id}``. - - Args: - rule: FirewallRuleInput is the client-provided rule payload for create/update. Clients must not provide id/ruleset_id/timestamps (those are server-controlled). - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}/schedules/{scheduleId}``.""" return self._client._call( - "PATCH", - f"/v1/firewall/rules/{_path(id)}", - m.FirewallRuleResource, + "DELETE", + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.UpdateFirewallRuleBody, extra_body, False, ("rule", rule)), + body=None, idempotent=False, timeout=timeout, ) - def update_firewall_rule_set( + def delete_schedule_task( self, id: str, + schedule_id: str, + task_id: str, *, - ruleset: m.FirewallRuleSetInput | dict[str, Any] | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallRuleSet: - """Call ``PATCH /v1/firewall/rulesets/{id}``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}/schedules/{scheduleId}/tasks/{taskId}``.""" return self._client._call( - "PATCH", - f"/v1/firewall/rulesets/{_path(id)}", - m.FirewallRuleSet, + "DELETE", + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks/{_path(task_id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.UpdateFirewallRuleSetBody, extra_body, False, ("ruleset", ruleset)), + body=None, idempotent=False, timeout=timeout, ) - -class GameServerService(_Service): - """The NodeRings GameServerService API.""" - - def archive_files( + def download_file( self, id: str, *, - files: list[str] | None = None, - root: str | None = None, - extra_body: dict[str, Any] | None = None, + path: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ArchiveFilesResponse: - """Call ``POST /v1/game-servers/{id}/files:archive``.""" + ) -> m.DownloadFileResponse: + """Call ``GET /v1/game-servers/{id}/files/download``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:archive", - m.ArchiveFilesResponse, - query=_query(extra_query), - body=_body(m.ArchiveFilesBody, extra_body, False, ("files", files), ("root", root)), + "GET", + f"/v1/game-servers/{_path(id)}/files/download", + m.DownloadFileResponse, + query=_query(extra_query, ("path", path)), + body=None, idempotent=False, timeout=timeout, ) - def change_game_server_game( + def execute_schedule( self, id: str, + schedule_id: str, *, - accept_eula: bool | None = None, - environment: dict[str, str] | None = None, - template_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServer: - """Call ``POST /v1/game-servers/{id}:changeGame``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}:execute``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}:changeGame", - m.GameServer, + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}:execute", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.ChangeGameServerGameBody, - extra_body, - False, - ("accept_eula", accept_eula), - ("environment", environment), - ("template_id", template_id), - ), + body=_body(m.ExecuteScheduleBody, extra_body, False), idempotent=False, timeout=timeout, ) - def copy_file( + def get_game_server( self, id: str, *, - location: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/files:copy``.""" + ) -> m.GameServer: + """Call ``GET /v1/game-servers/{id}``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:copy", - m.SuccessResponse, + "GET", + f"/v1/game-servers/{_path(id)}", + m.GameServer, query=_query(extra_query), - body=_body(m.CopyFileBody, extra_body, False, ("location", location)), + body=None, idempotent=False, timeout=timeout, ) - def create_allocation( + def get_game_server_resources( self, id: str, *, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerAllocation: - """Call ``POST /v1/game-servers/{id}/allocations``.""" + ) -> m.GameServerResources: + """Call ``GET /v1/game-servers/{id}/resources``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/allocations", - m.GameServerAllocation, + "GET", + f"/v1/game-servers/{_path(id)}/resources", + m.GameServerResources, query=_query(extra_query), - body=_body(m.CreateAllocationBody, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - def create_backup( + def get_startup( self, id: str, *, - name: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerBackup: - """Call ``POST /v1/game-servers/{id}/backups``.""" + ) -> m.GetStartupResponse: + """Call ``GET /v1/game-servers/{id}/startup``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/backups", - m.GameServerBackup, + "GET", + f"/v1/game-servers/{_path(id)}/startup", + m.GetStartupResponse, query=_query(extra_query), - body=_body(m.CreateBackupBody, extra_body, False, ("name", name)), + body=None, idempotent=False, timeout=timeout, ) - def create_database( + def list_allocations( self, id: str, *, - database: str | None = None, - remote: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerDatabase: - """Call ``POST /v1/game-servers/{id}/databases``.""" + ) -> m.ListGameServerAllocationsResponse: + """Call ``GET /v1/game-servers/{id}/allocations``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/databases", - m.GameServerDatabase, + "GET", + f"/v1/game-servers/{_path(id)}/allocations", + m.ListGameServerAllocationsResponse, query=_query(extra_query), - body=_body(m.CreateDatabaseBody, extra_body, False, ("database", database), ("remote", remote)), + body=None, idempotent=False, timeout=timeout, ) - def create_folder( + def list_backups( self, id: str, *, - name: str | None = None, - root: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/files:folder``.""" + ) -> m.ListGameServerBackupsResponse: + """Call ``GET /v1/game-servers/{id}/backups``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:folder", - m.SuccessResponse, + "GET", + f"/v1/game-servers/{_path(id)}/backups", + m.ListGameServerBackupsResponse, query=_query(extra_query), - body=_body(m.CreateFolderBody, extra_body, False, ("name", name), ("root", root)), + body=None, idempotent=False, timeout=timeout, ) - def create_game_server( + def list_databases( self, + id: str, *, - accept_eula: bool | None = None, - environment: dict[str, str] | None = None, - idempotency_key: str | None = None, - name: str | None = None, - plan_id: str | None = None, - provider_organization_id: str | None = None, - region_id: str | None = None, - template_id: str | None = None, - version_value: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServer: - """ - Call ``POST /v1/game-servers``. A retry of the same call cannot create a second resource: - the SDK sends an idempotency key. - - Args: - accept_eula: accept_eula is the customer's agreement. Required when the egg has the EULA mark. - environment: environment overrides egg defaults. Only user-editable variables are accepted. - idempotency_key: A UUID that makes the create safe to retry. If you leave it out, the SDK sets a new one. - """ + ) -> m.ListDatabasesResponse: + """Call ``GET /v1/game-servers/{id}/databases``.""" return self._client._call( - "POST", - "/v1/game-servers", - m.GameServer, + "GET", + f"/v1/game-servers/{_path(id)}/databases", + m.ListDatabasesResponse, query=_query(extra_query), - body=_body( - m.CreateGameServerRequest, - extra_body, - True, - ("accept_eula", accept_eula), - ("environment", environment), - ("idempotency_key", idempotency_key), - ("name", name), - ("plan_id", plan_id), - ("provider_organization_id", provider_organization_id), - ("region_id", region_id), - ("template_id", template_id), - ("version_value", version_value), - ), - idempotent=True, + body=None, + idempotent=False, timeout=timeout, ) - def create_schedule( + def list_files( self, id: str, *, - day_of_month: str | None = None, - day_of_week: str | None = None, - hour: str | None = None, - is_active: bool | None = None, - minute: str | None = None, - month: str | None = None, - name: str | None = None, - only_when_online: bool | None = None, - extra_body: dict[str, Any] | None = None, + directory: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerSchedule: - """ - Call ``POST /v1/game-servers/{id}/schedules``. - - Args: - is_active: Omitted means the schedule is created enabled. - """ + ) -> m.ListFilesResponse: + """Call ``GET /v1/game-servers/{id}/files``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/schedules", - m.GameServerSchedule, - query=_query(extra_query), - body=_body( - m.CreateScheduleBody, - extra_body, - False, - ("day_of_month", day_of_month), - ("day_of_week", day_of_week), - ("hour", hour), - ("is_active", is_active), - ("minute", minute), - ("month", month), - ("name", name), - ("only_when_online", only_when_online), - ), + "GET", + f"/v1/game-servers/{_path(id)}/files", + m.ListFilesResponse, + query=_query(extra_query, ("directory", directory)), + body=None, idempotent=False, timeout=timeout, ) - def create_schedule_task( + def list_game_servers( self, - id: str, - schedule_id: str, *, - action: str | None = None, - continue_on_failure: bool | None = None, - payload: str | None = None, - time_offset: int | None = None, - extra_body: dict[str, Any] | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}/tasks``.""" + ) -> m.ListGameServersResponse: + """Call ``GET /v1/game-servers``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.CreateScheduleTaskBody, - extra_body, - False, - ("action", action), - ("continue_on_failure", continue_on_failure), - ("payload", payload), - ("time_offset", time_offset), - ), + "GET", + "/v1/game-servers", + m.ListGameServersResponse, + query=_query(extra_query, ("pageSize", page_size)), + body=None, idempotent=False, timeout=timeout, ) - def delete_allocation( + def list_order_games( + self, + *, + plan_id: str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.ListOrderGamesResponse: + """Call ``GET /v1/game-servers:order-games``.""" + return self._client._call( + "GET", + "/v1/game-servers:order-games", + m.ListOrderGamesResponse, + query=_query(extra_query, ("planId", plan_id)), + body=None, + idempotent=False, + timeout=timeout, + ) + + def list_schedules( self, id: str, - allocation_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/game-servers/{id}/allocations/{allocationId}``.""" + ) -> m.ListSchedulesResponse: + """Call ``GET /v1/game-servers/{id}/schedules``.""" return self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}", - m.SuccessResponse, + "GET", + f"/v1/game-servers/{_path(id)}/schedules", + m.ListSchedulesResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def delete_backup( + def lock_backup( self, id: str, backup_uuid: str, *, truncate: bool | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: """ - Call ``DELETE /v1/game-servers/{id}/backups/{backupUuid}``. + Call ``POST /v1/game-servers/{id}/backups/{backupUuid}:lock``. Args: truncate: Restore only. When true, the panel deletes every file before extracting the backup. """ return self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}", + "POST", + f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}:lock", m.SuccessResponse, - query=_query(extra_query, ("truncate", truncate)), - body=None, + query=_query(extra_query), + body=_body(m.LockBackupBody, extra_body, False, ("truncate", truncate)), idempotent=False, timeout=timeout, ) - def delete_database( + def open_console( self, id: str, - database_id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/game-servers/{id}/databases/{databaseId}``.""" + ) -> m.OpenConsoleResponse: + """Call ``POST /v1/game-servers/{id}:console``.""" return self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}/databases/{_path(database_id)}", - m.SuccessResponse, + "POST", + f"/v1/game-servers/{_path(id)}:console", + m.OpenConsoleResponse, query=_query(extra_query), - body=None, + body=_body(m.OpenConsoleBody, extra_body, False), idempotent=False, timeout=timeout, ) - def delete_files( + def power_game_server( self, id: str, *, - files: list[str] | None = None, - root: str | None = None, + signal: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/files:delete``.""" + ) -> m.GameServer: + """Call ``POST /v1/game-servers/{id}:power``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/files:delete", - m.SuccessResponse, + f"/v1/game-servers/{_path(id)}:power", + m.GameServer, query=_query(extra_query), - body=_body(m.DeleteFilesBody, extra_body, False, ("files", files), ("root", root)), + body=_body(m.PowerGameServerBody, extra_body, False, ("signal", signal)), idempotent=False, timeout=timeout, ) - def delete_game_server( + def read_file( self, id: str, *, + path: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/game-servers/{id}``.""" + ) -> m.ReadFileResponse: + """Call ``GET /v1/game-servers/{id}/files/content``.""" return self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), + "GET", + f"/v1/game-servers/{_path(id)}/files/content", + m.ReadFileResponse, + query=_query(extra_query, ("path", path)), body=None, idempotent=False, timeout=timeout, ) - def delete_schedule( + def reinstall_game_server( self, id: str, - schedule_id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/game-servers/{id}/schedules/{scheduleId}``.""" + ) -> m.GameServer: + """Call ``POST /v1/game-servers/{id}:reinstall``.""" return self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}", - m.SuccessResponse, + "POST", + f"/v1/game-servers/{_path(id)}:reinstall", + m.GameServer, query=_query(extra_query), - body=None, + body=_body(m.ReinstallGameServerBody, extra_body, False), idempotent=False, timeout=timeout, ) - def delete_schedule_task( + def rename_file( self, id: str, - schedule_id: str, - task_id: str, *, + dest: str | None = None, + root: str | None = None, + source: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/game-servers/{id}/schedules/{scheduleId}/tasks/{taskId}``.""" + """Call ``POST /v1/game-servers/{id}/files:rename``.""" return self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks/{_path(task_id)}", + "POST", + f"/v1/game-servers/{_path(id)}/files:rename", m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.RenameFileBody, extra_body, False, ("dest", dest), ("root", root), ("source", source)), idempotent=False, timeout=timeout, ) - def download_file( + def rename_game_server( self, id: str, *, - path: str | None = None, + name: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DownloadFileResponse: - """Call ``GET /v1/game-servers/{id}/files/download``.""" + ) -> m.GameServer: + """Call ``POST /v1/game-servers/{id}:rename``.""" return self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/files/download", - m.DownloadFileResponse, - query=_query(extra_query, ("path", path)), - body=None, + "POST", + f"/v1/game-servers/{_path(id)}:rename", + m.GameServer, + query=_query(extra_query), + body=_body(m.RenameGameServerBody, extra_body, False, ("name", name)), idempotent=False, timeout=timeout, ) - def execute_schedule( + def restore_backup( self, id: str, - schedule_id: str, + backup_uuid: str, *, + truncate: bool | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}:execute``.""" + """ + Call ``POST /v1/game-servers/{id}/backups/{backupUuid}:restore``. + + Args: + truncate: Restore only. When true, the panel deletes every file before extracting the backup. + """ return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}:execute", + f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}:restore", m.SuccessResponse, query=_query(extra_query), - body=_body(m.ExecuteScheduleBody, extra_body, False), + body=_body(m.GameServerRestoreBackupBody, extra_body, False, ("truncate", truncate)), idempotent=False, timeout=timeout, ) - def get_game_server( + def rotate_database_password( self, id: str, + database_id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServer: - """Call ``GET /v1/game-servers/{id}``.""" + ) -> m.GameServerDatabase: + """Call ``POST /v1/game-servers/{id}/databases/{databaseId}:rotate``.""" return self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}", - m.GameServer, + "POST", + f"/v1/game-servers/{_path(id)}/databases/{_path(database_id)}:rotate", + m.GameServerDatabase, query=_query(extra_query), - body=None, + body=_body(m.RotateDatabasePasswordBody, extra_body, False), idempotent=False, timeout=timeout, ) - def get_game_server_resources( + def set_primary_allocation( self, id: str, + allocation_id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerResources: - """Call ``GET /v1/game-servers/{id}/resources``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/allocations/{allocationId}:primary``.""" return self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/resources", - m.GameServerResources, + "POST", + f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}:primary", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.SetPrimaryAllocationBody, extra_body, False), idempotent=False, timeout=timeout, ) - def get_startup( + def update_allocation( self, id: str, + allocation_id: str, *, + notes: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetStartupResponse: - """Call ``GET /v1/game-servers/{id}/startup``.""" + ) -> m.GameServerAllocation: + """Call ``POST /v1/game-servers/{id}/allocations/{allocationId}``.""" return self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/startup", - m.GetStartupResponse, + "POST", + f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}", + m.GameServerAllocation, query=_query(extra_query), - body=None, + body=_body(m.UpdateAllocationBody, extra_body, False, ("notes", notes)), idempotent=False, timeout=timeout, ) - def list_allocations( + def update_docker_image( self, id: str, *, + docker_image: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListGameServerAllocationsResponse: - """Call ``GET /v1/game-servers/{id}/allocations``.""" + ) -> m.SuccessResponse: + """Call ``PUT /v1/game-servers/{id}/docker-image``.""" return self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/allocations", - m.ListGameServerAllocationsResponse, + "PUT", + f"/v1/game-servers/{_path(id)}/docker-image", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.UpdateDockerImageBody, extra_body, False, ("docker_image", docker_image)), idempotent=False, timeout=timeout, ) - def list_backups( + def update_schedule( self, id: str, + schedule_id: str, *, + day_of_month: str | None = None, + day_of_week: str | None = None, + hour: str | None = None, + is_active: bool | None = None, + minute: str | None = None, + month: str | None = None, + name: str | None = None, + only_when_online: bool | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListGameServerBackupsResponse: - """Call ``GET /v1/game-servers/{id}/backups``.""" + ) -> m.GameServerSchedule: + """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}``.""" return self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/backups", - m.ListGameServerBackupsResponse, + "POST", + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}", + m.GameServerSchedule, query=_query(extra_query), - body=None, + body=_body( + m.UpdateScheduleBody, + extra_body, + False, + ("day_of_month", day_of_month), + ("day_of_week", day_of_week), + ("hour", hour), + ("is_active", is_active), + ("minute", minute), + ("month", month), + ("name", name), + ("only_when_online", only_when_online), + ), idempotent=False, timeout=timeout, ) - def list_databases( + def update_schedule_task( self, id: str, + schedule_id: str, + task_id: str, *, + action: str | None = None, + continue_on_failure: bool | None = None, + payload: str | None = None, + sequence_id: int | None = None, + time_offset: int | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDatabasesResponse: - """Call ``GET /v1/game-servers/{id}/databases``.""" + ) -> m.SuccessResponse: + """ + Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}/tasks/{taskId}``. + + Args: + sequence_id: Omitted leaves the task where it is. Set it to move the task in the run order. + """ return self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/databases", - m.ListDatabasesResponse, + "POST", + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks/{_path(task_id)}", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body( + m.UpdateScheduleTaskBody, + extra_body, + False, + ("action", action), + ("continue_on_failure", continue_on_failure), + ("payload", payload), + ("sequence_id", sequence_id), + ("time_offset", time_offset), + ), idempotent=False, timeout=timeout, ) - def list_files( + def update_startup_variable( self, id: str, *, - directory: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListFilesResponse: - """Call ``GET /v1/game-servers/{id}/files``.""" - return self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/files", - m.ListFilesResponse, - query=_query(extra_query, ("directory", directory)), - body=None, - idempotent=False, - timeout=timeout, - ) - - def list_game_servers( - self, - *, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListGameServersResponse: - """Call ``GET /v1/game-servers``.""" - return self._client._call( - "GET", - "/v1/game-servers", - m.ListGameServersResponse, - query=_query(extra_query, ("pageSize", page_size)), - body=None, - idempotent=False, - timeout=timeout, - ) - - def list_order_games( - self, - *, - plan_id: str | None = None, + key: str | None = None, + value: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListOrderGamesResponse: - """Call ``GET /v1/game-servers:order-games``.""" + ) -> m.SuccessResponse: + """Call ``PUT /v1/game-servers/{id}/startup``.""" return self._client._call( - "GET", - "/v1/game-servers:order-games", - m.ListOrderGamesResponse, - query=_query(extra_query, ("planId", plan_id)), - body=None, + "PUT", + f"/v1/game-servers/{_path(id)}/startup", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.UpdateStartupVariableBody, extra_body, False, ("key", key), ("value", value)), idempotent=False, timeout=timeout, ) - def list_schedules( + def upload_file( self, id: str, *, + content: bytes | None = None, + directory: str | None = None, + filename: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListSchedulesResponse: - """Call ``GET /v1/game-servers/{id}/schedules``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/files:upload``.""" return self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/schedules", - m.ListSchedulesResponse, + "POST", + f"/v1/game-servers/{_path(id)}/files:upload", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body( + m.UploadFileBody, + extra_body, + False, + ("content", content), + ("directory", directory), + ("filename", filename), + ), idempotent=False, timeout=timeout, ) - def lock_backup( + def write_file( self, id: str, - backup_uuid: str, *, - truncate: bool | None = None, + content: bytes | None = None, + path: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """ - Call ``POST /v1/game-servers/{id}/backups/{backupUuid}:lock``. - - Args: - truncate: Restore only. When true, the panel deletes every file before extracting the backup. - """ + """Call ``PUT /v1/game-servers/{id}/files``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}:lock", + "PUT", + f"/v1/game-servers/{_path(id)}/files", m.SuccessResponse, query=_query(extra_query), - body=_body(m.LockBackupBody, extra_body, False, ("truncate", truncate)), + body=_body(m.WriteFileBody, extra_body, False, ("content", content), ("path", path)), idempotent=False, timeout=timeout, ) - def open_console( + +class GameServerTemplateService(_Service): + """The NodeRings GameServerTemplateService API.""" + + def duplicate_game_server_template( self, id: str, *, + name: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.OpenConsoleResponse: - """Call ``POST /v1/game-servers/{id}:console``.""" + ) -> m.GameServerTemplate: + """Call ``POST /v1/game-server-templates/{id}:duplicate``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}:console", - m.OpenConsoleResponse, + f"/v1/game-server-templates/{_path(id)}:duplicate", + m.GameServerTemplate, query=_query(extra_query), - body=_body(m.OpenConsoleBody, extra_body, False), + body=_body(m.DuplicateGameServerTemplateBody, extra_body, False, ("name", name)), idempotent=False, timeout=timeout, ) - def power_game_server( + def import_game_server_template( self, - id: str, *, - signal: str | None = None, + docker_image: str | None = None, + egg_id: int | None = None, + icon: str | None = None, + name: str | None = None, + nest_id: int | None = None, + platform_id: str | None = None, + startup: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServer: - """Call ``POST /v1/game-servers/{id}:power``.""" + ) -> m.GameServerTemplate: + """Call ``POST /v1/game-server-templates:import``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}:power", - m.GameServer, + "/v1/game-server-templates:import", + m.GameServerTemplate, query=_query(extra_query), - body=_body(m.PowerGameServerBody, extra_body, False, ("signal", signal)), + body=_body( + m.ImportGameServerTemplateRequest, + extra_body, + False, + ("docker_image", docker_image), + ("egg_id", egg_id), + ("icon", icon), + ("name", name), + ("nest_id", nest_id), + ("platform_id", platform_id), + ("startup", startup), + ), idempotent=False, timeout=timeout, ) - def read_file( + def list_game_server_templates( self, - id: str, *, - path: str | None = None, + platform_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ReadFileResponse: - """Call ``GET /v1/game-servers/{id}/files/content``.""" + ) -> m.ListGameServerTemplatesResponse: + """Call ``GET /v1/game-server-templates``.""" return self._client._call( "GET", - f"/v1/game-servers/{_path(id)}/files/content", - m.ReadFileResponse, - query=_query(extra_query, ("path", path)), + "/v1/game-server-templates", + m.ListGameServerTemplatesResponse, + query=_query(extra_query, ("platformId", platform_id)), body=None, idempotent=False, timeout=timeout, ) - def reinstall_game_server( + def set_game_nest_ordering( self, - id: str, *, + catalog_key: str | None = None, + ordering_enabled: bool | None = None, + platform_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServer: - """Call ``POST /v1/game-servers/{id}:reinstall``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/game-server-templates:nest-ordering``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}:reinstall", - m.GameServer, + "/v1/game-server-templates:nest-ordering", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.ReinstallGameServerBody, extra_body, False), + body=_body( + m.SetGameNestOrderingRequest, + extra_body, + False, + ("catalog_key", catalog_key), + ("ordering_enabled", ordering_enabled), + ("platform_id", platform_id), + ), idempotent=False, timeout=timeout, ) - def rename_file( + def update_game_server_template( self, id: str, *, - dest: str | None = None, - root: str | None = None, - source: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/files:rename``.""" + confirmed: bool | None = None, + docker_image: str | None = None, + egg_id: int | None = None, + hidden: bool | None = None, + icon: str | None = None, + nest_id: int | None = None, + ordering_enabled: bool | None = None, + startup: str | None = None, + version_variable: str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GameServerTemplate: + """Call ``PATCH /v1/game-server-templates/{id}``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:rename", - m.SuccessResponse, + "PATCH", + f"/v1/game-server-templates/{_path(id)}", + m.GameServerTemplate, query=_query(extra_query), - body=_body(m.RenameFileBody, extra_body, False, ("dest", dest), ("root", root), ("source", source)), + body=_body( + m.UpdateGameServerTemplateBody, + extra_body, + False, + ("confirmed", confirmed), + ("docker_image", docker_image), + ("egg_id", egg_id), + ("hidden", hidden), + ("icon", icon), + ("nest_id", nest_id), + ("ordering_enabled", ordering_enabled), + ("startup", startup), + ("version_variable", version_variable), + ), idempotent=False, timeout=timeout, ) - def rename_game_server( + +class GroupService(_Service): + """The NodeRings GroupService API.""" + + def add_service_account_to_group( self, - id: str, *, - name: str | None = None, + group_id: str | None = None, + service_account_ids: list[str] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServer: - """Call ``POST /v1/game-servers/{id}:rename``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/groups/add-service-account``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}:rename", - m.GameServer, + "/v1/groups/add-service-account", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.RenameGameServerBody, extra_body, False, ("name", name)), + body=_body( + m.AddServiceAccountToGroupRequest, + extra_body, + False, + ("group_id", group_id), + ("service_account_ids", service_account_ids), + ), idempotent=False, timeout=timeout, ) - def restore_backup( + def add_user_to_group( self, - id: str, - backup_uuid: str, *, - truncate: bool | None = None, + group_id: str | None = None, + user_ids: list[str] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """ - Call ``POST /v1/game-servers/{id}/backups/{backupUuid}:restore``. - - Args: - truncate: Restore only. When true, the panel deletes every file before extracting the backup. - """ + """Call ``POST /v1/groups/add-user``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}:restore", + "/v1/groups/add-user", m.SuccessResponse, query=_query(extra_query), - body=_body(m.GameServerRestoreBackupBody, extra_body, False, ("truncate", truncate)), + body=_body(m.AddUserToGroupRequest, extra_body, False, ("group_id", group_id), ("user_ids", user_ids)), idempotent=False, timeout=timeout, ) - def rotate_database_password( + def create_group( self, - id: str, - database_id: str, *, + description: str | None = None, + group_roles: list[str] | None = None, + name: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerDatabase: - """Call ``POST /v1/game-servers/{id}/databases/{databaseId}:rotate``.""" + ) -> m.CreateGroupResponse: + """Call ``POST /v1/groups``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/databases/{_path(database_id)}:rotate", - m.GameServerDatabase, + "/v1/groups", + m.CreateGroupResponse, query=_query(extra_query), - body=_body(m.RotateDatabasePasswordBody, extra_body, False), + body=_body( + m.CreateGroupRequest, + extra_body, + False, + ("description", description), + ("group_roles", group_roles), + ("name", name), + ), idempotent=False, timeout=timeout, ) - def set_primary_allocation( + def delete_group( self, id: str, - allocation_id: str, *, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/allocations/{allocationId}:primary``.""" + """Call ``DELETE /v1/groups/{id}``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}:primary", + "DELETE", + f"/v1/groups/{_path(id)}", m.SuccessResponse, query=_query(extra_query), - body=_body(m.SetPrimaryAllocationBody, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - def update_allocation( + def get_group( self, id: str, - allocation_id: str, *, - notes: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerAllocation: - """Call ``POST /v1/game-servers/{id}/allocations/{allocationId}``.""" + ) -> m.GetGroupResponse: + """Call ``GET /v1/groups/{id}``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}", - m.GameServerAllocation, + "GET", + f"/v1/groups/{_path(id)}", + m.GetGroupResponse, query=_query(extra_query), - body=_body(m.UpdateAllocationBody, extra_body, False, ("notes", notes)), + body=None, idempotent=False, timeout=timeout, ) - def update_docker_image( + def list_groups( self, - id: str, *, - docker_image: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + filter_name: str | None = None, + filter_status: m.Protov1Status | str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``PUT /v1/game-servers/{id}/docker-image``.""" + ) -> m.ListGroupsResponse: + """Call ``GET /v1/groups``.""" return self._client._call( - "PUT", - f"/v1/game-servers/{_path(id)}/docker-image", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.UpdateDockerImageBody, extra_body, False, ("docker_image", docker_image)), + "GET", + "/v1/groups", + m.ListGroupsResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("filterName", filter_name), + ("filterStatus", filter_status), + ("search", search), + ), + body=None, idempotent=False, timeout=timeout, ) - def update_schedule( + def list_groups_all( self, - id: str, - schedule_id: str, *, - day_of_month: str | None = None, - day_of_week: str | None = None, - hour: str | None = None, - is_active: bool | None = None, - minute: str | None = None, - month: str | None = None, - name: str | None = None, - only_when_online: bool | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + filter_name: str | None = None, + filter_status: m.Protov1Status | str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerSchedule: - """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}``.""" + ) -> Iterator[m.Group]: + """ + Every result of :meth:`list_groups`, reading page after page. + + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_groups( + page=page, + page_size=size, + filter_name=filter_name, + filter_status=filter_status, + search=search, + extra_query=extra_query, + timeout=timeout, + ) + items = res.groups + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + def remove_service_account_from_group( + self, + *, + group_id: str | None = None, + service_account_ids: list[str] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``DELETE /v1/groups/remove-service-account``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}", - m.GameServerSchedule, - query=_query(extra_query), - body=_body( - m.UpdateScheduleBody, - extra_body, - False, - ("day_of_month", day_of_month), - ("day_of_week", day_of_week), - ("hour", hour), - ("is_active", is_active), - ("minute", minute), - ("month", month), - ("name", name), - ("only_when_online", only_when_online), - ), + "DELETE", + "/v1/groups/remove-service-account", + m.SuccessResponse, + query=_query(extra_query, ("groupId", group_id), ("serviceAccountIds", service_account_ids)), + body=None, idempotent=False, timeout=timeout, ) - def update_schedule_task( + def remove_user_from_group( self, - id: str, - schedule_id: str, - task_id: str, *, - action: str | None = None, - continue_on_failure: bool | None = None, - payload: str | None = None, - sequence_id: int | None = None, - time_offset: int | None = None, - extra_body: dict[str, Any] | None = None, + group_id: str | None = None, + user_ids: list[str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """ - Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}/tasks/{taskId}``. - - Args: - sequence_id: Omitted leaves the task where it is. Set it to move the task in the run order. - """ + """Call ``DELETE /v1/groups/remove-user``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks/{_path(task_id)}", + "DELETE", + "/v1/groups/remove-user", m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.UpdateScheduleTaskBody, - extra_body, - False, - ("action", action), - ("continue_on_failure", continue_on_failure), - ("payload", payload), - ("sequence_id", sequence_id), - ("time_offset", time_offset), - ), + query=_query(extra_query, ("groupId", group_id), ("userIds", user_ids)), + body=None, idempotent=False, timeout=timeout, ) - def update_startup_variable( + def update_group( self, id: str, *, - key: str | None = None, - value: str | None = None, + description: str | None = None, + group_roles: list[str] | None = None, + name: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``PUT /v1/game-servers/{id}/startup``.""" + ) -> m.UpdateGroupResponse: + """Call ``PATCH /v1/groups/{id}``.""" return self._client._call( - "PUT", - f"/v1/game-servers/{_path(id)}/startup", - m.SuccessResponse, + "PATCH", + f"/v1/groups/{_path(id)}", + m.UpdateGroupResponse, query=_query(extra_query), - body=_body(m.UpdateStartupVariableBody, extra_body, False, ("key", key), ("value", value)), + body=_body( + m.UpdateGroupBody, + extra_body, + False, + ("description", description), + ("group_roles", group_roles), + ("name", name), + ), idempotent=False, timeout=timeout, ) - def upload_file( + +class HookScriptService(_Service): + """The NodeRings HookScriptService API.""" + + def delete_hook_script( self, id: str, *, - content: bytes | None = None, - directory: str | None = None, - filename: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/files:upload``.""" + """Call ``DELETE /v1/hook-scripts/{id}``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:upload", + "DELETE", + f"/v1/hook-scripts/{_path(id)}", m.SuccessResponse, query=_query(extra_query), - body=_body( - m.UploadFileBody, - extra_body, - False, - ("content", content), - ("directory", directory), - ("filename", filename), - ), + body=None, idempotent=False, timeout=timeout, ) - def write_file( + def list_hook_scripts( self, - id: str, *, - content: bytes | None = None, - path: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + subject: m.HookSubject | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``PUT /v1/game-servers/{id}/files``.""" + ) -> m.ListHookScriptsResponse: + """ + Call ``GET /v1/hook-scripts``. + + Args: + subject: Unspecified lists VM scripts, which is the previous behavior. + """ return self._client._call( - "PUT", - f"/v1/game-servers/{_path(id)}/files", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.WriteFileBody, extra_body, False, ("content", content), ("path", path)), + "GET", + "/v1/hook-scripts", + m.ListHookScriptsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("subject", subject)), + body=None, idempotent=False, timeout=timeout, ) - -class GameServerTemplateService(_Service): - """The NodeRings GameServerTemplateService API.""" - - def duplicate_game_server_template( + def list_hook_scripts_all( self, - id: str, *, - name: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + subject: m.HookSubject | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerTemplate: - """Call ``POST /v1/game-server-templates/{id}:duplicate``.""" - return self._client._call( - "POST", - f"/v1/game-server-templates/{_path(id)}:duplicate", - m.GameServerTemplate, - query=_query(extra_query), - body=_body(m.DuplicateGameServerTemplateBody, extra_body, False, ("name", name)), - idempotent=False, - timeout=timeout, - ) + ) -> Iterator[m.HookScript]: + """ + Every result of :meth:`list_hook_scripts`, reading page after page. - def import_game_server_template( + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_hook_scripts( + page=page, + page_size=size, + subject=subject, + extra_query=extra_query, + timeout=timeout, + ) + items = res.hook_scripts + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + def upsert_hook_script( self, *, - docker_image: str | None = None, - egg_id: int | None = None, - icon: str | None = None, - name: str | None = None, - nest_id: int | None = None, - platform_id: str | None = None, - startup: str | None = None, + enabled: bool | None = None, + hook: m.LifecycleHook | str | None = None, + script: str | None = None, + subject: m.HookSubject | str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerTemplate: - """Call ``POST /v1/game-server-templates:import``.""" + ) -> m.HookScript: + """ + Call ``PUT /v1/hook-scripts``. + + Args: + enabled: Omit to keep the stored value; create defaults to true + subject: LifecycleHook is the VM operation that triggers a provider hook script. + """ return self._client._call( - "POST", - "/v1/game-server-templates:import", - m.GameServerTemplate, + "PUT", + "/v1/hook-scripts", + m.HookScript, query=_query(extra_query), body=_body( - m.ImportGameServerTemplateRequest, + m.UpsertHookScriptRequest, extra_body, False, - ("docker_image", docker_image), - ("egg_id", egg_id), - ("icon", icon), - ("name", name), - ("nest_id", nest_id), - ("platform_id", platform_id), - ("startup", startup), + ("enabled", enabled), + ("hook", hook), + ("script", script), + ("subject", subject), ), idempotent=False, timeout=timeout, ) - def list_game_server_templates( + +class IPAMService(_Service): + """The NodeRings IPAMService API.""" + + def add_reserved_ip( self, + prefix_id: str, *, - platform_id: str | None = None, + ip_address: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListGameServerTemplatesResponse: - """Call ``GET /v1/game-server-templates``.""" + ) -> m.SuccessResponse: + """ + IP Reservation (manage reserved_ips array in prefix) + + It calls ``POST /v1/ipam/prefixes/{prefixId}/reserved-ips``. + + Args: + ip_address: Must be within prefix CIDR + """ return self._client._call( - "GET", - "/v1/game-server-templates", - m.ListGameServerTemplatesResponse, - query=_query(extra_query, ("platformId", platform_id)), - body=None, + "POST", + f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.AddReservedIPBody, extra_body, False, ("ip_address", ip_address)), idempotent=False, timeout=timeout, ) - def set_game_nest_ordering( + def add_reserved_prefix( self, + prefix_id: str, *, - catalog_key: str | None = None, - ordering_enabled: bool | None = None, - platform_id: str | None = None, + cidr: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/game-server-templates:nest-ordering``.""" + """ + Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-prefixes``. + + Args: + cidr: Must match prefix vm_assignment_prefix_length exactly + """ return self._client._call( "POST", - "/v1/game-server-templates:nest-ordering", + f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-prefixes", m.SuccessResponse, query=_query(extra_query), - body=_body( - m.SetGameNestOrderingRequest, - extra_body, - False, - ("catalog_key", catalog_key), - ("ordering_enabled", ordering_enabled), - ("platform_id", platform_id), - ), + body=_body(m.AddReservedPrefixBody, extra_body, False, ("cidr", cidr)), idempotent=False, timeout=timeout, ) - def update_game_server_template( + def assign_network_to_node( self, - id: str, + network_id: str, *, - confirmed: bool | None = None, - docker_image: str | None = None, - egg_id: int | None = None, - hidden: bool | None = None, - icon: str | None = None, - nest_id: int | None = None, - ordering_enabled: bool | None = None, - startup: str | None = None, - version_variable: str | None = None, + node_ids: list[str] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerTemplate: - """Call ``PATCH /v1/game-server-templates/{id}``.""" + ) -> m.SuccessResponse: + """ + Node-Network assignment + + It calls ``POST /v1/ipam/networks/{networkId}/assign-node``. + + Args: + node_ids: One or more node IDs to assign to this network + """ return self._client._call( - "PATCH", - f"/v1/game-server-templates/{_path(id)}", - m.GameServerTemplate, + "POST", + f"/v1/ipam/networks/{_path(network_id)}/assign-node", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.UpdateGameServerTemplateBody, - extra_body, - False, - ("confirmed", confirmed), - ("docker_image", docker_image), - ("egg_id", egg_id), - ("hidden", hidden), - ("icon", icon), - ("nest_id", nest_id), - ("ordering_enabled", ordering_enabled), - ("startup", startup), - ("version_variable", version_variable), - ), + body=_body(m.AssignNetworkToNodeBody, extra_body, False, ("node_ids", node_ids)), idempotent=False, timeout=timeout, ) - -class GroupService(_Service): - """The NodeRings GroupService API.""" - - def add_service_account_to_group( + def clear_all_prefix_reserved_i_ps( self, + prefix_id: str, *, - group_id: str | None = None, - service_account_ids: list[str] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/groups/add-service-account``.""" + """Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-ips/clear-all``.""" return self._client._call( "POST", - "/v1/groups/add-service-account", + f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/clear-all", m.SuccessResponse, query=_query(extra_query), - body=_body( - m.AddServiceAccountToGroupRequest, - extra_body, - False, - ("group_id", group_id), - ("service_account_ids", service_account_ids), - ), + body=_body(m.ClearAllPrefixReservedIPsBody, extra_body, False), idempotent=False, timeout=timeout, ) - def add_user_to_group( + def create_network( self, *, - group_id: str | None = None, - user_ids: list[str] | None = None, + description: str | None = None, + dns_servers: list[str] | None = None, + mac_address_prefix: str | None = None, + name: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/groups/add-user``.""" + """ + IPAM Network management + + It calls ``POST /v1/ipam/networks``. + + Args: + dns_servers: e.g., ["8.8.8.8", "8.8.4.4"] (can be any IPs) + mac_address_prefix: First 3 octets for MAC allocation within this network (e.g. BC:24:11). Default: BC:24:11. + """ return self._client._call( "POST", - "/v1/groups/add-user", + "/v1/ipam/networks", m.SuccessResponse, query=_query(extra_query), - body=_body(m.AddUserToGroupRequest, extra_body, False, ("group_id", group_id), ("user_ids", user_ids)), + body=_body( + m.CreateNetworkRequest, + extra_body, + False, + ("description", description), + ("dns_servers", dns_servers), + ("mac_address_prefix", mac_address_prefix), + ("name", name), + ), idempotent=False, timeout=timeout, ) - def create_group( + def create_prefix( self, *, + allocation_strategy: m.AllocationStrategy | str | None = None, + cidr: str | None = None, description: str | None = None, - group_roles: list[str] | None = None, - name: str | None = None, + gateway: str | None = None, + network_id: str | None = None, + reserved_ips: list[str] | None = None, + vm_assignment_prefix_length: int | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateGroupResponse: - """Call ``POST /v1/groups``.""" + ) -> m.SuccessResponse: + """ + Prefix management + + It calls ``POST /v1/ipam/prefixes``. + + Args: + cidr: e.g., "10.0.0.0/24" + gateway: e.g., "10.0.0.1" (must be within CIDR) + network_id: Optional: network this prefix belongs to (for DNS servers) + reserved_ips: e.g., ["10.0.0.100", "10.0.0.200"] (must be within CIDR) + vm_assignment_prefix_length: Required when cidr is IPv6 + """ return self._client._call( "POST", - "/v1/groups", - m.CreateGroupResponse, + "/v1/ipam/prefixes", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.CreateGroupRequest, + m.CreatePrefixRequest, extra_body, False, + ("allocation_strategy", allocation_strategy), + ("cidr", cidr), ("description", description), - ("group_roles", group_roles), - ("name", name), + ("gateway", gateway), + ("network_id", network_id), + ("reserved_ips", reserved_ips), + ("vm_assignment_prefix_length", vm_assignment_prefix_length), ), idempotent=False, timeout=timeout, ) - def delete_group( + def delete_network( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/groups/{id}``.""" + """Call ``DELETE /v1/ipam/networks/{id}``.""" return self._client._call( "DELETE", - f"/v1/groups/{_path(id)}", + f"/v1/ipam/networks/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -5889,215 +5575,278 @@ def delete_group( timeout=timeout, ) - def get_group( + def delete_prefix( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetGroupResponse: - """Call ``GET /v1/groups/{id}``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/ipam/prefixes/{id}``.""" return self._client._call( - "GET", - f"/v1/groups/{_path(id)}", - m.GetGroupResponse, + "DELETE", + f"/v1/ipam/prefixes/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_groups( + def get_network( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - filter_name: str | None = None, - filter_status: m.Protov1Status | str | None = None, - search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListGroupsResponse: - """Call ``GET /v1/groups``.""" + ) -> m.GetNetworkResponse: + """Call ``GET /v1/ipam/networks/{id}``.""" return self._client._call( "GET", - "/v1/groups", - m.ListGroupsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("filterName", filter_name), - ("filterStatus", filter_status), - ("search", search), - ), + f"/v1/ipam/networks/{_path(id)}", + m.GetNetworkResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_groups_all( + def get_node_network( self, + node_id: str, *, - page: int | None = None, - page_size: int | None = None, - filter_name: str | None = None, - filter_status: m.Protov1Status | str | None = None, - search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Group]: - """ - Every result of :meth:`list_groups`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_groups( - page=page, - page_size=size, - filter_name=filter_name, - filter_status=filter_status, - search=search, - extra_query=extra_query, - timeout=timeout, - ) - items = res.groups - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + ) -> m.GetNodeNetworkResponse: + """Call ``GET /v1/ipam/nodes/{nodeId}/network``.""" + return self._client._call( + "GET", + f"/v1/ipam/nodes/{_path(node_id)}/network", + m.GetNodeNetworkResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - def remove_service_account_from_group( + def get_prefix( self, + id: str, *, - group_id: str | None = None, - service_account_ids: list[str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/groups/remove-service-account``.""" + ) -> m.GetPrefixResponse: + """Call ``GET /v1/ipam/prefixes/{id}``.""" return self._client._call( - "DELETE", - "/v1/groups/remove-service-account", - m.SuccessResponse, - query=_query(extra_query, ("groupId", group_id), ("serviceAccountIds", service_account_ids)), + "GET", + f"/v1/ipam/prefixes/{_path(id)}", + m.GetPrefixResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def remove_user_from_group( + def get_prefix_utilization( self, + prefix_id: str, *, - group_id: str | None = None, - user_ids: list[str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/groups/remove-user``.""" + ) -> m.GetPrefixUtilizationResponse: + """ + Utility + + It calls ``GET /v1/ipam/prefixes/{prefixId}/utilization``. + """ return self._client._call( - "DELETE", - "/v1/groups/remove-user", - m.SuccessResponse, - query=_query(extra_query, ("groupId", group_id), ("userIds", user_ids)), + "GET", + f"/v1/ipam/prefixes/{_path(prefix_id)}/utilization", + m.GetPrefixUtilizationResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def update_group( + def list_allocations( self, - id: str, *, - description: str | None = None, - group_roles: list[str] | None = None, - name: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + prefix_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateGroupResponse: - """Call ``PATCH /v1/groups/{id}``.""" + ) -> m.ListAllocationsResponse: + """ + IP Allocation (read-only - allocations are managed automatically) + + It calls ``GET /v1/ipam/allocations``. + + Args: + prefix_id: Filter by prefix ID (required for filtering allocations) + """ return self._client._call( - "PATCH", - f"/v1/groups/{_path(id)}", - m.UpdateGroupResponse, - query=_query(extra_query), - body=_body( - m.UpdateGroupBody, - extra_body, - False, - ("description", description), - ("group_roles", group_roles), - ("name", name), - ), + "GET", + "/v1/ipam/allocations", + m.ListAllocationsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("prefixId", prefix_id)), + body=None, idempotent=False, timeout=timeout, ) + def list_allocations_all( + self, + *, + page: int | None = None, + page_size: int | None = None, + prefix_id: str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> Iterator[m.IPAllocation]: + """ + Every result of :meth:`list_allocations`, reading page after page. -class HookScriptService(_Service): - """The NodeRings HookScriptService API.""" + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_allocations( + page=page, + page_size=size, + prefix_id=prefix_id, + extra_query=extra_query, + timeout=timeout, + ) + items = res.allocations + for item in items: + yield item + seen += len(items) + if len(items) < size: + return + page += 1 - def delete_hook_script( + def list_available_i_ps( self, - id: str, + prefix_id: str, *, + limit: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/hook-scripts/{id}``.""" + ) -> m.ListAvailableIPsResponse: + """ + Call ``GET /v1/ipam/prefixes/{prefixId}/available-ips``. + + Args: + limit: Limit number of IPs returned (default: 100) + """ return self._client._call( - "DELETE", - f"/v1/hook-scripts/{_path(id)}", - m.SuccessResponse, + "GET", + f"/v1/ipam/prefixes/{_path(prefix_id)}/available-ips", + m.ListAvailableIPsResponse, + query=_query(extra_query, ("limit", limit)), + body=None, + idempotent=False, + timeout=timeout, + ) + + def list_network_nodes( + self, + network_id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.ListNetworkNodesResponse: + """Call ``GET /v1/ipam/networks/{networkId}/nodes``.""" + return self._client._call( + "GET", + f"/v1/ipam/networks/{_path(network_id)}/nodes", + m.ListNetworkNodesResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_hook_scripts( + def list_networks( self, *, page: int | None = None, page_size: int | None = None, - subject: m.HookSubject | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListHookScriptsResponse: + ) -> m.ListNetworksResponse: + """Call ``GET /v1/ipam/networks``.""" + return self._client._call( + "GET", + "/v1/ipam/networks", + m.ListNetworksResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), + body=None, + idempotent=False, + timeout=timeout, + ) + + def list_networks_all( + self, + *, + page: int | None = None, + page_size: int | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> Iterator[m.Network]: """ - Call ``GET /v1/hook-scripts``. + Every result of :meth:`list_networks`, reading page after page. - Args: - subject: Unspecified lists VM scripts, which is the previous behavior. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_networks(page=page, page_size=size, extra_query=extra_query, timeout=timeout) + items = res.networks + for item in items: + yield item + seen += len(items) + if len(items) < size: + return + page += 1 + + def list_prefixes( + self, + *, + page: int | None = None, + page_size: int | None = None, + filter_network_id: str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.ListPrefixesResponse: + """Call ``GET /v1/ipam/prefixes``.""" return self._client._call( "GET", - "/v1/hook-scripts", - m.ListHookScriptsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("subject", subject)), + "/v1/ipam/prefixes", + m.ListPrefixesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterNetworkId", filter_network_id)), body=None, idempotent=False, timeout=timeout, ) - def list_hook_scripts_all( + def list_prefixes_all( self, *, page: int | None = None, page_size: int | None = None, - subject: m.HookSubject | str | None = None, + filter_network_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.HookScript]: + ) -> Iterator[m.Prefix]: """ - Every result of :meth:`list_hook_scripts`, reading page after page. + Every result of :meth:`list_prefixes`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -6105,161 +5854,99 @@ def list_hook_scripts_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_hook_scripts( + res = self.list_prefixes( page=page, page_size=size, - subject=subject, + filter_network_id=filter_network_id, extra_query=extra_query, timeout=timeout, ) - items = res.hook_scripts + items = res.prefixes for item in items: yield item seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + if len(items) < size: return page += 1 - def upsert_hook_script( + def remove_reserved_ip( self, + prefix_id: str, + ip_address: str, *, - enabled: bool | None = None, - hook: m.LifecycleHook | str | None = None, - script: str | None = None, - subject: m.HookSubject | str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.HookScript: - """ - Call ``PUT /v1/hook-scripts``. - - Args: - enabled: Omit to keep the stored value; create defaults to true - subject: LifecycleHook is the VM operation that triggers a provider hook script. - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/ipam/prefixes/{prefixId}/reserved-ips/{ipAddress}``.""" return self._client._call( - "PUT", - "/v1/hook-scripts", - m.HookScript, + "DELETE", + f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/{_path(ip_address)}", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.UpsertHookScriptRequest, - extra_body, - False, - ("enabled", enabled), - ("hook", hook), - ("script", script), - ("subject", subject), - ), + body=None, idempotent=False, timeout=timeout, ) - -class IPAMService(_Service): - """The NodeRings IPAMService API.""" - - def add_reserved_ip( + def remove_reserved_prefix( self, prefix_id: str, *, - ip_address: str | None = None, - extra_body: dict[str, Any] | None = None, + cidr: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """ - IP Reservation (manage reserved_ips array in prefix) - - It calls ``POST /v1/ipam/prefixes/{prefixId}/reserved-ips``. - - Args: - ip_address: Must be within prefix CIDR - """ + """Call ``DELETE /v1/ipam/prefixes/{prefixId}/reserved-prefixes``.""" return self._client._call( - "POST", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips", + "DELETE", + f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-prefixes", m.SuccessResponse, - query=_query(extra_query), - body=_body(m.AddReservedIPBody, extra_body, False, ("ip_address", ip_address)), + query=_query(extra_query, ("cidr", cidr)), + body=None, idempotent=False, timeout=timeout, ) - def add_reserved_prefix( + def reserve_all_prefix_i_ps( self, prefix_id: str, *, - cidr: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """ - Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-prefixes``. - - Args: - cidr: Must match prefix vm_assignment_prefix_length exactly - """ + """Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-ips/reserve-all``.""" return self._client._call( "POST", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-prefixes", + f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/reserve-all", m.SuccessResponse, query=_query(extra_query), - body=_body(m.AddReservedPrefixBody, extra_body, False, ("cidr", cidr)), + body=_body(m.ReserveAllPrefixIPsBody, extra_body, False), idempotent=False, timeout=timeout, ) - def assign_network_to_node( + def unassign_network_from_node( self, - network_id: str, - *, - node_ids: list[str] | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Node-Network assignment - - It calls ``POST /v1/ipam/networks/{networkId}/assign-node``. - - Args: - node_ids: One or more node IDs to assign to this network - """ - return self._client._call( - "POST", - f"/v1/ipam/networks/{_path(network_id)}/assign-node", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.AssignNetworkToNodeBody, extra_body, False, ("node_ids", node_ids)), - idempotent=False, - timeout=timeout, - ) - - def clear_all_prefix_reserved_i_ps( - self, - prefix_id: str, + node_id: str, *, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-ips/clear-all``.""" + """Call ``POST /v1/ipam/nodes/{nodeId}/unassign-network``.""" return self._client._call( "POST", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/clear-all", + f"/v1/ipam/nodes/{_path(node_id)}/unassign-network", m.SuccessResponse, query=_query(extra_query), - body=_body(m.ClearAllPrefixReservedIPsBody, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - def create_network( + def update_network( self, + id: str, *, description: str | None = None, dns_servers: list[str] | None = None, @@ -6268,23 +5955,20 @@ def create_network( extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> m.UpdateNetworkResponse: """ - IPAM Network management - - It calls ``POST /v1/ipam/networks``. + Call ``PATCH /v1/ipam/networks/{id}``. Args: - dns_servers: e.g., ["8.8.8.8", "8.8.4.4"] (can be any IPs) - mac_address_prefix: First 3 octets for MAC allocation within this network (e.g. BC:24:11). Default: BC:24:11. + mac_address_prefix: First 3 octets for MAC allocation within this network. Empty = leave unchanged on update. """ return self._client._call( - "POST", - "/v1/ipam/networks", - m.SuccessResponse, + "PATCH", + f"/v1/ipam/networks/{_path(id)}", + m.UpdateNetworkResponse, query=_query(extra_query), body=_body( - m.CreateNetworkRequest, + m.UpdateNetworkBody, extra_body, False, ("description", description), @@ -6296,203 +5980,136 @@ def create_network( timeout=timeout, ) - def create_prefix( + def update_prefix( self, + id: str, *, allocation_strategy: m.AllocationStrategy | str | None = None, - cidr: str | None = None, description: str | None = None, gateway: str | None = None, network_id: str | None = None, reserved_ips: list[str] | None = None, - vm_assignment_prefix_length: int | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Prefix management - - It calls ``POST /v1/ipam/prefixes``. - - Args: - cidr: e.g., "10.0.0.0/24" - gateway: e.g., "10.0.0.1" (must be within CIDR) - network_id: Optional: network this prefix belongs to (for DNS servers) - reserved_ips: e.g., ["10.0.0.100", "10.0.0.200"] (must be within CIDR) - vm_assignment_prefix_length: Required when cidr is IPv6 - """ + ) -> m.UpdatePrefixResponse: + """Call ``PATCH /v1/ipam/prefixes/{id}``.""" return self._client._call( - "POST", - "/v1/ipam/prefixes", - m.SuccessResponse, + "PATCH", + f"/v1/ipam/prefixes/{_path(id)}", + m.UpdatePrefixResponse, query=_query(extra_query), body=_body( - m.CreatePrefixRequest, + m.UpdatePrefixBody, extra_body, False, ("allocation_strategy", allocation_strategy), - ("cidr", cidr), ("description", description), ("gateway", gateway), ("network_id", network_id), ("reserved_ips", reserved_ips), - ("vm_assignment_prefix_length", vm_assignment_prefix_length), ), idempotent=False, timeout=timeout, ) - def delete_network( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/ipam/networks/{id}``.""" - return self._client._call( - "DELETE", - f"/v1/ipam/networks/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def delete_prefix( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/ipam/prefixes/{id}``.""" - return self._client._call( - "DELETE", - f"/v1/ipam/prefixes/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def get_network( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetNetworkResponse: - """Call ``GET /v1/ipam/networks/{id}``.""" - return self._client._call( - "GET", - f"/v1/ipam/networks/{_path(id)}", - m.GetNetworkResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - def get_node_network( - self, - node_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetNodeNetworkResponse: - """Call ``GET /v1/ipam/nodes/{nodeId}/network``.""" - return self._client._call( - "GET", - f"/v1/ipam/nodes/{_path(node_id)}/network", - m.GetNodeNetworkResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) +class InstantAppService(_Service): + """The NodeRings InstantAppService API.""" - def get_prefix( + def get_instant_app( self, id: str, *, + slug: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPrefixResponse: - """Call ``GET /v1/ipam/prefixes/{id}``.""" + ) -> m.InstantApp: + """Call ``GET /v1/instantapps/{id}``.""" return self._client._call( "GET", - f"/v1/ipam/prefixes/{_path(id)}", - m.GetPrefixResponse, - query=_query(extra_query), + f"/v1/instantapps/{_path(id)}", + m.InstantApp, + query=_query(extra_query, ("slug", slug)), body=None, idempotent=False, timeout=timeout, ) - def get_prefix_utilization( + def get_instant_app_2( self, - prefix_id: str, + slug: str, *, + id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPrefixUtilizationResponse: + ) -> m.InstantApp: """ - Utility + Call ``GET /v1/instantapps/slug/{slug}``. - It calls ``GET /v1/ipam/prefixes/{prefixId}/utilization``. + Args: + id: Exactly one of id or slug must be set. """ return self._client._call( "GET", - f"/v1/ipam/prefixes/{_path(prefix_id)}/utilization", - m.GetPrefixUtilizationResponse, - query=_query(extra_query), + f"/v1/instantapps/slug/{_path(slug)}", + m.InstantApp, + query=_query(extra_query, ("id", id)), body=None, idempotent=False, timeout=timeout, ) - def list_allocations( + def list_instant_apps( self, *, page: int | None = None, page_size: int | None = None, - prefix_id: str | None = None, + query: str | None = None, + categories: list[str] | None = None, + distro: m.Distro | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListAllocationsResponse: + ) -> m.ListInstantAppsResponse: """ - IP Allocation (read-only - allocations are managed automatically) - - It calls ``GET /v1/ipam/allocations``. + Call ``GET /v1/instantapps``. Args: - prefix_id: Filter by prefix ID (required for filtering allocations) + page_size: -1 returns all apps (create/reinstall picker); otherwise 1..100. + query: Case-insensitive match on name or slug. + categories: Filter: app must include all listed categories when non-empty. + distro: - DISTRO_UBUNTU_22_04: Ubuntu distributions - DISTRO_FEDORA_43: Fedora distributions - DISTRO_DEBIAN_12: Debian distributions - DISTRO_CENTOS_9: CentOS distributions - DISTRO_ROCKY_9: Rocky Linux distributions - DISTRO_ALMALINUX_9: AlmaLinux distributions """ return self._client._call( "GET", - "/v1/ipam/allocations", - m.ListAllocationsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("prefixId", prefix_id)), + "/v1/instantapps", + m.ListInstantAppsResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("query", query), + ("categories", categories), + ("distro", distro), + ), body=None, idempotent=False, timeout=timeout, ) - def list_allocations_all( + def list_instant_apps_all( self, *, page: int | None = None, page_size: int | None = None, - prefix_id: str | None = None, + query: str | None = None, + categories: list[str] | None = None, + distro: m.Distro | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.IPAllocation]: + ) -> Iterator[m.InstantApp]: """ - Every result of :meth:`list_allocations`, reading page after page. + Every result of :meth:`list_instant_apps`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -6500,92 +6117,144 @@ def list_allocations_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_allocations( + res = self.list_instant_apps( page=page, page_size=size, - prefix_id=prefix_id, + query=query, + categories=categories, + distro=distro, extra_query=extra_query, timeout=timeout, ) - items = res.allocations + items = res.instant_apps for item in items: yield item seen += len(items) - if len(items) < size: + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): return page += 1 - def list_available_i_ps( + +class InviteService(_Service): + """The NodeRings InviteService API.""" + + def accept_invite( self, - prefix_id: str, *, - limit: int | None = None, + invite_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListAvailableIPsResponse: - """ - Call ``GET /v1/ipam/prefixes/{prefixId}/available-ips``. - - Args: - limit: Limit number of IPs returned (default: 100) - """ - return self._client._call( + ) -> m.SuccessResponse: + """Call ``GET /v1/invites/accept``.""" + return self._client._call( "GET", - f"/v1/ipam/prefixes/{_path(prefix_id)}/available-ips", - m.ListAvailableIPsResponse, - query=_query(extra_query, ("limit", limit)), + "/v1/invites/accept", + m.SuccessResponse, + query=_query(extra_query, ("inviteId", invite_id)), body=None, idempotent=False, timeout=timeout, ) - def list_network_nodes( + def create_invite( self, - network_id: str, *, + group_id: str | None = None, + invitee_emails: list[str] | None = None, + role_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListNetworkNodesResponse: - """Call ``GET /v1/ipam/networks/{networkId}/nodes``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/invites``.""" + return self._client._call( + "POST", + "/v1/invites", + m.SuccessResponse, + query=_query(extra_query), + body=_body( + m.CreateInviteRequest, + extra_body, + False, + ("group_id", group_id), + ("invitee_emails", invitee_emails), + ("role_id", role_id), + ), + idempotent=False, + timeout=timeout, + ) + + def decline_invite( + self, + *, + invite_id: str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``GET /v1/invites/decline``.""" return self._client._call( "GET", - f"/v1/ipam/networks/{_path(network_id)}/nodes", - m.ListNetworkNodesResponse, + "/v1/invites/decline", + m.SuccessResponse, + query=_query(extra_query, ("inviteId", invite_id)), + body=None, + idempotent=False, + timeout=timeout, + ) + + def delete_invite( + self, + id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``DELETE /v1/invites/{id}``.""" + return self._client._call( + "DELETE", + f"/v1/invites/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_networks( + def list_invites( self, *, page: int | None = None, page_size: int | None = None, + filter_email: str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListNetworksResponse: - """Call ``GET /v1/ipam/networks``.""" + ) -> m.ListInvitesResponse: + """Call ``GET /v1/invites``.""" return self._client._call( "GET", - "/v1/ipam/networks", - m.ListNetworksResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "/v1/invites", + m.ListInvitesResponse, + query=_query( + extra_query, ("page", page), ("pageSize", page_size), ("filterEmail", filter_email), ("search", search) + ), body=None, idempotent=False, timeout=timeout, ) - def list_networks_all( + def list_invites_all( self, *, page: int | None = None, page_size: int | None = None, + filter_email: str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Network]: + ) -> Iterator[m.Invite]: """ - Every result of :meth:`list_networks`, reading page after page. + Every result of :meth:`list_invites`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -6593,46 +6262,51 @@ def list_networks_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_networks(page=page, page_size=size, extra_query=extra_query, timeout=timeout) - items = res.networks + res = self.list_invites( + page=page, + page_size=size, + filter_email=filter_email, + search=search, + extra_query=extra_query, + timeout=timeout, + ) + items = res.invites for item in items: yield item seen += len(items) - if len(items) < size: + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): return page += 1 - def list_prefixes( + def list_my_invites( self, *, page: int | None = None, page_size: int | None = None, - filter_network_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPrefixesResponse: - """Call ``GET /v1/ipam/prefixes``.""" + ) -> m.ListMyInvitesResponse: + """Call ``GET /v1/invites/me``.""" return self._client._call( "GET", - "/v1/ipam/prefixes", - m.ListPrefixesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterNetworkId", filter_network_id)), + "/v1/invites/me", + m.ListMyInvitesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def list_prefixes_all( + def list_my_invites_all( self, *, page: int | None = None, page_size: int | None = None, - filter_network_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Prefix]: + ) -> Iterator[m.Invite]: """ - Every result of :meth:`list_prefixes`, reading page after page. + Every result of :meth:`list_my_invites`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -6640,33 +6314,26 @@ def list_prefixes_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_prefixes( - page=page, - page_size=size, - filter_network_id=filter_network_id, - extra_query=extra_query, - timeout=timeout, - ) - items = res.prefixes + res = self.list_my_invites(page=page, page_size=size, extra_query=extra_query, timeout=timeout) + items = res.invites for item in items: yield item seen += len(items) - if len(items) < size: + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): return page += 1 - def remove_reserved_ip( + def resend_invite( self, - prefix_id: str, - ip_address: str, + invite_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/ipam/prefixes/{prefixId}/reserved-ips/{ipAddress}``.""" + """Call ``POST /v1/invites/resend/{inviteId}``.""" return self._client._call( - "DELETE", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/{_path(ip_address)}", + "POST", + f"/v1/invites/resend/{_path(invite_id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -6674,228 +6341,106 @@ def remove_reserved_ip( timeout=timeout, ) - def remove_reserved_prefix( - self, - prefix_id: str, - *, - cidr: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/ipam/prefixes/{prefixId}/reserved-prefixes``.""" - return self._client._call( - "DELETE", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-prefixes", - m.SuccessResponse, - query=_query(extra_query, ("cidr", cidr)), - body=None, - idempotent=False, - timeout=timeout, - ) - - def reserve_all_prefix_i_ps( + def update_invite( self, - prefix_id: str, *, + group_id: str | None = None, + invite_id: str | None = None, + role_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-ips/reserve-all``.""" + """Call ``PATCH /v1/invites``.""" return self._client._call( - "POST", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/reserve-all", + "PATCH", + "/v1/invites", m.SuccessResponse, query=_query(extra_query), - body=_body(m.ReserveAllPrefixIPsBody, extra_body, False), + body=_body( + m.UpdateInviteRequest, + extra_body, + False, + ("group_id", group_id), + ("invite_id", invite_id), + ("role_id", role_id), + ), idempotent=False, timeout=timeout, ) - def unassign_network_from_node( + +class InvoiceService(_Service): + """The NodeRings InvoiceService API.""" + + def get_invoice( self, - node_id: str, + invoice_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/ipam/nodes/{nodeId}/unassign-network``.""" + ) -> m.GetInvoiceResponse: + """ + GetInvoice retrieves a single invoice with line items + + It calls ``GET /v1/invoices/{invoiceId}``. + """ return self._client._call( - "POST", - f"/v1/ipam/nodes/{_path(node_id)}/unassign-network", - m.SuccessResponse, + "GET", + f"/v1/invoices/{_path(invoice_id)}", + m.GetInvoiceResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def update_network( + def list_invoices( self, - id: str, *, - description: str | None = None, - dns_servers: list[str] | None = None, - mac_address_prefix: str | None = None, - name: str | None = None, - extra_body: dict[str, Any] | None = None, + subscription_id: str | None = None, + status: m.InvoiceStatus | str | None = None, + page: int | None = None, + page_size: int | None = None, + order_by: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateNetworkResponse: + ) -> m.ListInvoicesResponse: """ - Call ``PATCH /v1/ipam/networks/{id}``. + ListInvoices lists invoices for a subscription or organization - Args: - mac_address_prefix: First 3 octets for MAC allocation within this network. Empty = leave unchanged on update. + It calls ``GET /v1/invoices``. """ return self._client._call( - "PATCH", - f"/v1/ipam/networks/{_path(id)}", - m.UpdateNetworkResponse, - query=_query(extra_query), - body=_body( - m.UpdateNetworkBody, - extra_body, - False, - ("description", description), - ("dns_servers", dns_servers), - ("mac_address_prefix", mac_address_prefix), - ("name", name), + "GET", + "/v1/invoices", + m.ListInvoicesResponse, + query=_query( + extra_query, + ("subscriptionId", subscription_id), + ("status", status), + ("page", page), + ("pageSize", page_size), + ("orderBy", order_by), ), + body=None, idempotent=False, timeout=timeout, ) - def update_prefix( - self, - id: str, - *, - allocation_strategy: m.AllocationStrategy | str | None = None, - description: str | None = None, - gateway: str | None = None, - network_id: str | None = None, - reserved_ips: list[str] | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.UpdatePrefixResponse: - """Call ``PATCH /v1/ipam/prefixes/{id}``.""" - return self._client._call( - "PATCH", - f"/v1/ipam/prefixes/{_path(id)}", - m.UpdatePrefixResponse, - query=_query(extra_query), - body=_body( - m.UpdatePrefixBody, - extra_body, - False, - ("allocation_strategy", allocation_strategy), - ("description", description), - ("gateway", gateway), - ("network_id", network_id), - ("reserved_ips", reserved_ips), - ), - idempotent=False, - timeout=timeout, - ) - - -class InstantAppService(_Service): - """The NodeRings InstantAppService API.""" - - def get_instant_app( - self, - id: str, - *, - slug: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.InstantApp: - """Call ``GET /v1/instantapps/{id}``.""" - return self._client._call( - "GET", - f"/v1/instantapps/{_path(id)}", - m.InstantApp, - query=_query(extra_query, ("slug", slug)), - body=None, - idempotent=False, - timeout=timeout, - ) - - def get_instant_app_2( - self, - slug: str, - *, - id: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.InstantApp: - """ - Call ``GET /v1/instantapps/slug/{slug}``. - - Args: - id: Exactly one of id or slug must be set. - """ - return self._client._call( - "GET", - f"/v1/instantapps/slug/{_path(slug)}", - m.InstantApp, - query=_query(extra_query, ("id", id)), - body=None, - idempotent=False, - timeout=timeout, - ) - - def list_instant_apps( - self, - *, - page: int | None = None, - page_size: int | None = None, - query: str | None = None, - categories: list[str] | None = None, - distro: m.Distro | str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListInstantAppsResponse: - """ - Call ``GET /v1/instantapps``. - - Args: - page_size: -1 returns all apps (create/reinstall picker); otherwise 1..100. - query: Case-insensitive match on name or slug. - categories: Filter: app must include all listed categories when non-empty. - distro: - DISTRO_UBUNTU_22_04: Ubuntu distributions - DISTRO_FEDORA_43: Fedora distributions - DISTRO_DEBIAN_12: Debian distributions - DISTRO_CENTOS_9: CentOS distributions - DISTRO_ROCKY_9: Rocky Linux distributions - DISTRO_ALMALINUX_9: AlmaLinux distributions - """ - return self._client._call( - "GET", - "/v1/instantapps", - m.ListInstantAppsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("query", query), - ("categories", categories), - ("distro", distro), - ), - body=None, - idempotent=False, - timeout=timeout, - ) - - def list_instant_apps_all( + def list_invoices_all( self, *, + subscription_id: str | None = None, + status: m.InvoiceStatus | str | None = None, page: int | None = None, page_size: int | None = None, - query: str | None = None, - categories: list[str] | None = None, - distro: m.Distro | str | None = None, + order_by: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.InstantApp]: + ) -> Iterator[m.Invoice]: """ - Every result of :meth:`list_instant_apps`, reading page after page. + Every result of :meth:`list_invoices`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -6903,16 +6448,16 @@ def list_instant_apps_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_instant_apps( + res = self.list_invoices( page=page, page_size=size, - query=query, - categories=categories, - distro=distro, + subscription_id=subscription_id, + status=status, + order_by=order_by, extra_query=extra_query, timeout=timeout, ) - items = res.instant_apps + items = res.invoices for item in items: yield item seen += len(items) @@ -6920,127 +6465,123 @@ def list_instant_apps_all( return page += 1 - -class InviteService(_Service): - """The NodeRings InviteService API.""" - - def accept_invite( + def pay_invoice( self, + invoice_id: str, *, - invite_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``GET /v1/invites/accept``.""" + ) -> m.PayInvoiceResponse: + """ + PayInvoice charges the organization's default card for an open or past-due invoice and + returns the updated invoice. Idempotent when the invoice is already paid. + + It calls ``POST /v1/invoices/{invoiceId}:pay``. + """ return self._client._call( - "GET", - "/v1/invites/accept", - m.SuccessResponse, - query=_query(extra_query, ("inviteId", invite_id)), - body=None, + "POST", + f"/v1/invoices/{_path(invoice_id)}:pay", + m.PayInvoiceResponse, + query=_query(extra_query), + body=_body(m.PayInvoiceBody, extra_body, False), idempotent=False, timeout=timeout, ) - def create_invite( + +class LiveValidationService(_Service): + """The NodeRings LiveValidationService API.""" + + def delete_plan_live_validation( self, + plan_id: str, *, - group_id: str | None = None, - invitee_emails: list[str] | None = None, - role_id: str | None = None, - extra_body: dict[str, Any] | None = None, + node_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/invites``.""" + """Call ``DELETE /v1/provider/plans/{planId}/live-validation``.""" return self._client._call( - "POST", - "/v1/invites", + "DELETE", + f"/v1/provider/plans/{_path(plan_id)}/live-validation", m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.CreateInviteRequest, - extra_body, - False, - ("group_id", group_id), - ("invitee_emails", invitee_emails), - ("role_id", role_id), - ), + query=_query(extra_query, ("nodeId", node_id)), + body=None, idempotent=False, timeout=timeout, ) - def decline_invite( + def get_plan_live_validation( self, + plan_id: str, *, - invite_id: str | None = None, + node_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``GET /v1/invites/decline``.""" + ) -> m.GetPlanLiveValidationResponse: + """Call ``GET /v1/provider/plans/{planId}/live-validation``.""" return self._client._call( "GET", - "/v1/invites/decline", - m.SuccessResponse, - query=_query(extra_query, ("inviteId", invite_id)), + f"/v1/provider/plans/{_path(plan_id)}/live-validation", + m.GetPlanLiveValidationResponse, + query=_query(extra_query, ("nodeId", node_id)), body=None, idempotent=False, timeout=timeout, ) - def delete_invite( + def list_eligible_nodes_for_plan( self, - id: str, + plan_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/invites/{id}``.""" + ) -> m.ListEligibleNodesForPlanResponse: + """Call ``GET /v1/provider/plans/{planId}/live-validation/nodes``.""" return self._client._call( - "DELETE", - f"/v1/invites/{_path(id)}", - m.SuccessResponse, + "GET", + f"/v1/provider/plans/{_path(plan_id)}/live-validation/nodes", + m.ListEligibleNodesForPlanResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_invites( + def list_plan_live_validation_benchmarks( self, + plan_id: str, *, + node_id: str | None = None, page: int | None = None, page_size: int | None = None, - filter_email: str | None = None, - search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListInvitesResponse: - """Call ``GET /v1/invites``.""" + ) -> m.ListPlanLiveValidationBenchmarksResponse: + """Call ``GET /v1/provider/plans/{planId}/live-validation/benchmarks``.""" return self._client._call( "GET", - "/v1/invites", - m.ListInvitesResponse, - query=_query( - extra_query, ("page", page), ("pageSize", page_size), ("filterEmail", filter_email), ("search", search) - ), + f"/v1/provider/plans/{_path(plan_id)}/live-validation/benchmarks", + m.ListPlanLiveValidationBenchmarksResponse, + query=_query(extra_query, ("nodeId", node_id), ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def list_invites_all( + def list_plan_live_validation_benchmarks_all( self, + plan_id: str, *, + node_id: str | None = None, page: int | None = None, page_size: int | None = None, - filter_email: str | None = None, - search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Invite]: + ) -> Iterator[m.PlanLiveValidationBenchmarkView]: """ - Every result of :meth:`list_invites`, reading page after page. + Every result of :meth:`list_plan_live_validation_benchmarks`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -7048,51 +6589,55 @@ def list_invites_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_invites( + res = self.list_plan_live_validation_benchmarks( + plan_id, page=page, page_size=size, - filter_email=filter_email, - search=search, + node_id=node_id, extra_query=extra_query, timeout=timeout, ) - items = res.invites + items = res.benchmarks for item in items: yield item seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + if len(items) < size: return page += 1 - def list_my_invites( + def list_plan_live_validations( self, *, + plan_id: str | None = None, + search: str | None = None, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListMyInvitesResponse: - """Call ``GET /v1/invites/me``.""" + ) -> m.ListPlanLiveValidationsResponse: + """Call ``GET /v1/provider/live-validations``.""" return self._client._call( "GET", - "/v1/invites/me", - m.ListMyInvitesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "/v1/provider/live-validations", + m.ListPlanLiveValidationsResponse, + query=_query(extra_query, ("planId", plan_id), ("search", search), ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def list_my_invites_all( + def list_plan_live_validations_all( self, *, + plan_id: str | None = None, + search: str | None = None, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Invite]: + ) -> Iterator[m.PlanLiveValidationView]: """ - Every result of :meth:`list_my_invites`, reading page after page. + Every result of :meth:`list_plan_live_validations`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -7100,8 +6645,15 @@ def list_my_invites_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_my_invites(page=page, page_size=size, extra_query=extra_query, timeout=timeout) - items = res.invites + res = self.list_plan_live_validations( + page=page, + page_size=size, + plan_id=plan_id, + search=search, + extra_query=extra_query, + timeout=timeout, + ) + items = res.validations for item in items: yield item seen += len(items) @@ -7109,265 +6661,250 @@ def list_my_invites_all( return page += 1 - def resend_invite( + def start_plan_live_validation( self, - invite_id: str, + plan_id: str, *, + include_benchmarking: bool | None = None, + node_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/invites/resend/{inviteId}``.""" + ) -> m.StartPlanLiveValidationResponse: + """Call ``POST /v1/provider/plans/{planId}/live-validation``.""" return self._client._call( "POST", - f"/v1/invites/resend/{_path(invite_id)}", - m.SuccessResponse, + f"/v1/provider/plans/{_path(plan_id)}/live-validation", + m.StartPlanLiveValidationResponse, query=_query(extra_query), - body=None, + body=_body( + m.StartPlanLiveValidationBody, + extra_body, + False, + ("include_benchmarking", include_benchmarking), + ("node_id", node_id), + ), idempotent=False, timeout=timeout, ) - def update_invite( + +class ManualPayoutService(_Service): + """The NodeRings ManualPayoutService API.""" + + def create_manual_payout( self, *, - group_id: str | None = None, - invite_id: str | None = None, - role_id: str | None = None, + account_holder_name: str | None = None, + account_number: str | None = None, + bank_name: str | None = None, + bic: str | None = None, + country: str | None = None, + iban: str | None = None, + notes: str | None = None, + routing_number: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``PATCH /v1/invites``.""" + ) -> m.CreateManualPayoutResponse: + """ + Call ``POST /v1/provider/manual-payout``. + + Args: + account_holder_name: Name of the account holder + account_number: Bank account number (for non-SEPA countries) + bank_name: Name of the bank + bic: Bank Identifier Code / SWIFT code (for SEPA countries) + country: ISO 3166-1 alpha-2 country code (e.g., "US", "GB", "DE") + iban: International Bank Account Number (for SEPA countries) + notes: User-provided notes about the payout account + routing_number: Routing number (for US accounts) or sort code (for UK accounts) + """ return self._client._call( - "PATCH", - "/v1/invites", - m.SuccessResponse, + "POST", + "/v1/provider/manual-payout", + m.CreateManualPayoutResponse, query=_query(extra_query), body=_body( - m.UpdateInviteRequest, + m.CreateManualPayoutRequest, extra_body, False, - ("group_id", group_id), - ("invite_id", invite_id), - ("role_id", role_id), + ("account_holder_name", account_holder_name), + ("account_number", account_number), + ("bank_name", bank_name), + ("bic", bic), + ("country", country), + ("iban", iban), + ("notes", notes), + ("routing_number", routing_number), ), idempotent=False, timeout=timeout, ) - -class InvoiceService(_Service): - """The NodeRings InvoiceService API.""" - - def get_invoice( + def delete_manual_payout( self, - invoice_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetInvoiceResponse: - """ - GetInvoice retrieves a single invoice with line items - - It calls ``GET /v1/invoices/{invoiceId}``. - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/provider/manual-payout``.""" return self._client._call( - "GET", - f"/v1/invoices/{_path(invoice_id)}", - m.GetInvoiceResponse, + "DELETE", + "/v1/provider/manual-payout", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_invoices( + def get_manual_payout( self, *, - subscription_id: str | None = None, - status: m.InvoiceStatus | str | None = None, - page: int | None = None, - page_size: int | None = None, - order_by: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListInvoicesResponse: - """ - ListInvoices lists invoices for a subscription or organization - - It calls ``GET /v1/invoices``. - """ + ) -> m.GetManualPayoutResponse: + """Call ``GET /v1/provider/manual-payout``.""" return self._client._call( "GET", - "/v1/invoices", - m.ListInvoicesResponse, - query=_query( - extra_query, - ("subscriptionId", subscription_id), - ("status", status), - ("page", page), - ("pageSize", page_size), - ("orderBy", order_by), - ), + "/v1/provider/manual-payout", + m.GetManualPayoutResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_invoices_all( - self, - *, - subscription_id: str | None = None, - status: m.InvoiceStatus | str | None = None, - page: int | None = None, - page_size: int | None = None, - order_by: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Invoice]: - """ - Every result of :meth:`list_invoices`, reading page after page. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_invoices( - page=page, - page_size=size, - subscription_id=subscription_id, - status=status, - order_by=order_by, - extra_query=extra_query, - timeout=timeout, - ) - items = res.invoices - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 +class MarketplaceService(_Service): + """The NodeRings MarketplaceService API.""" - def pay_invoice( + def get_marketplace_plan( self, - invoice_id: str, + plan_id: str, *, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.PayInvoiceResponse: - """ - PayInvoice charges the organization's default card for an open or past-due invoice and - returns the updated invoice. Idempotent when the invoice is already paid. - - It calls ``POST /v1/invoices/{invoiceId}:pay``. - """ + ) -> m.GetMarketplacePlanResponse: + """Call ``GET /v1/marketplace/plans/{planId}``.""" return self._client._call( - "POST", - f"/v1/invoices/{_path(invoice_id)}:pay", - m.PayInvoiceResponse, + "GET", + f"/v1/marketplace/plans/{_path(plan_id)}", + m.GetMarketplacePlanResponse, query=_query(extra_query), - body=_body(m.PayInvoiceBody, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - -class LiveValidationService(_Service): - """The NodeRings LiveValidationService API.""" - - def delete_plan_live_validation( + def get_provider( self, - plan_id: str, + provider_id: str, *, - node_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/provider/plans/{planId}/live-validation``.""" + ) -> m.GetProviderResponse: + """Call ``GET /v1/marketplace/providers/{providerId}``.""" return self._client._call( - "DELETE", - f"/v1/provider/plans/{_path(plan_id)}/live-validation", - m.SuccessResponse, - query=_query(extra_query, ("nodeId", node_id)), + "GET", + f"/v1/marketplace/providers/{_path(provider_id)}", + m.GetProviderResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_plan_live_validation( + def get_public_storefront( self, - plan_id: str, + slug: str, *, - node_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPlanLiveValidationResponse: - """Call ``GET /v1/provider/plans/{planId}/live-validation``.""" + ) -> m.GetPublicStorefrontResponse: + """Call ``GET /v1/public/storefronts/{slug}``.""" return self._client._call( "GET", - f"/v1/provider/plans/{_path(plan_id)}/live-validation", - m.GetPlanLiveValidationResponse, - query=_query(extra_query, ("nodeId", node_id)), + f"/v1/public/storefronts/{_path(slug)}", + m.GetPublicStorefrontResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_eligible_nodes_for_plan( + def get_public_storefront_by_id( self, - plan_id: str, + provider_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListEligibleNodesForPlanResponse: - """Call ``GET /v1/provider/plans/{planId}/live-validation/nodes``.""" + ) -> m.GetPublicStorefrontResponse: + """Call ``GET /v1/public/storefronts/by-id/{providerId}``.""" return self._client._call( "GET", - f"/v1/provider/plans/{_path(plan_id)}/live-validation/nodes", - m.ListEligibleNodesForPlanResponse, + f"/v1/public/storefronts/by-id/{_path(provider_id)}", + m.GetPublicStorefrontResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_plan_live_validation_benchmarks( + def list_available_addons( self, - plan_id: str, *, - node_id: str | None = None, + filter_provider_id: str | None = None, + vm_id: str | None = None, + filter_addon_type: m.AddonType | str | None = None, + filter_billing_type: m.BillingType | str | None = None, + search: str | None = None, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPlanLiveValidationBenchmarksResponse: - """Call ``GET /v1/provider/plans/{planId}/live-validation/benchmarks``.""" + ) -> m.ListAvailableAddonsResponse: + """ + Call ``GET /v1/marketplace/addons``. + + Args: + filter_billing_type: - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) + """ return self._client._call( "GET", - f"/v1/provider/plans/{_path(plan_id)}/live-validation/benchmarks", - m.ListPlanLiveValidationBenchmarksResponse, - query=_query(extra_query, ("nodeId", node_id), ("page", page), ("pageSize", page_size)), + "/v1/marketplace/addons", + m.ListAvailableAddonsResponse, + query=_query( + extra_query, + ("filterProviderId", filter_provider_id), + ("vmId", vm_id), + ("filterAddonType", filter_addon_type), + ("filterBillingType", filter_billing_type), + ("search", search), + ("page", page), + ("pageSize", page_size), + ), body=None, idempotent=False, timeout=timeout, ) - def list_plan_live_validation_benchmarks_all( + def list_available_addons_all( self, - plan_id: str, *, - node_id: str | None = None, + filter_provider_id: str | None = None, + vm_id: str | None = None, + filter_addon_type: m.AddonType | str | None = None, + filter_billing_type: m.BillingType | str | None = None, + search: str | None = None, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.PlanLiveValidationBenchmarkView]: + ) -> Iterator[m.Addon]: """ - Every result of :meth:`list_plan_live_validation_benchmarks`, reading page after page. + Every result of :meth:`list_available_addons`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -7375,55 +6912,127 @@ def list_plan_live_validation_benchmarks_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_plan_live_validation_benchmarks( - plan_id, + res = self.list_available_addons( page=page, page_size=size, - node_id=node_id, + filter_provider_id=filter_provider_id, + vm_id=vm_id, + filter_addon_type=filter_addon_type, + filter_billing_type=filter_billing_type, + search=search, extra_query=extra_query, timeout=timeout, ) - items = res.benchmarks + items = res.addons for item in items: yield item seen += len(items) - if len(items) < size: + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): return page += 1 - def list_plan_live_validations( + def list_available_plans( + self, + *, + filter_country: str | None = None, + filter_city: str | None = None, + filter_billing_type: m.BillingType | str | None = None, + filter_compute_type: m.ComputeType | str | None = None, + filter_compute_category: m.ComputeCategory | str | None = None, + filter_asset_type: m.AssetType | str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.ListAvailablePlansResponse: + """ + Call ``GET /v1/marketplace/plans``. + + Args: + filter_country: Optional filters Filter by country name (case-insensitive) + filter_city: Filter by city name (case-insensitive) + filter_billing_type: Filter by billing type - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) + filter_compute_type: Filter by compute type - COMPUTE_TYPE_GENERAL_COMPUTE: GC - General Compute (balanced performance) - COMPUTE_TYPE_HIGH_FREQUENCY: HF - High Frequency (CPU-optimized, high clock speeds) - COMPUTE_TYPE_HIGH_PERFORMANCE: HP - High Performance (next-gen CPUs, NVMe storage) - COMPUTE_TYPE_GENERAL_PURPOSE: GP - General Purpose (balanced dedicated resources) - COMPUTE_TYPE_CPU_OPTIMIZED: CPU - CPU Optimized (high CPU-to-memory ratio) - COMPUTE_TYPE_MEMORY_OPTIMIZED: MEM - Memory Optimized (high memory-to-CPU ratio) - COMPUTE_TYPE_STORAGE_OPTIMIZED: STO - Storage Optimized (high storage capacity) - COMPUTE_TYPE_VERY_HIGH_FREQUENCY: VHF - Very High Frequency (highest clock dedicated CPUs) - COMPUTE_TYPE_GAME_SERVER: GS - Game Server (per-CPU SKU dedicated plans, e.g. DC-GS-9950X-*) + filter_compute_category: Filter by compute category - COMPUTE_CATEGORY_SHARED_COMPUTE: Shared compute (shared resources, cost-effective) - COMPUTE_CATEGORY_DEDICATED_COMPUTE: Dedicated compute (dedicated resources, higher performance) + """ + return self._client._call( + "GET", + "/v1/marketplace/plans", + m.ListAvailablePlansResponse, + query=_query( + extra_query, + ("filterCountry", filter_country), + ("filterCity", filter_city), + ("filterBillingType", filter_billing_type), + ("filterComputeType", filter_compute_type), + ("filterComputeCategory", filter_compute_category), + ("filterAssetType", filter_asset_type), + ), + body=None, + idempotent=False, + timeout=timeout, + ) + + def list_available_regions( + self, + *, + filter_asset_type: m.AssetType | str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.ListAvailableRegionsResponse: + """ + Call ``GET /v1/marketplace/regions``. + + Args: + filter_asset_type: When set, only cities that sell a marketplace-listable plan of this asset type. Unspecified keeps every marketplace city (virtual machines and game servers). + """ + return self._client._call( + "GET", + "/v1/marketplace/regions", + m.ListAvailableRegionsResponse, + query=_query(extra_query, ("filterAssetType", filter_asset_type)), + body=None, + idempotent=False, + timeout=timeout, + ) + + def list_marketplace_provider_directory( self, *, - plan_id: str | None = None, - search: str | None = None, page: int | None = None, page_size: int | None = None, + search: str | None = None, + filter_asset_type: m.AssetType | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPlanLiveValidationsResponse: - """Call ``GET /v1/provider/live-validations``.""" + ) -> m.ListMarketplaceProviderDirectoryResponse: + """Call ``GET /v1/marketplace/provider-directory``.""" return self._client._call( "GET", - "/v1/provider/live-validations", - m.ListPlanLiveValidationsResponse, - query=_query(extra_query, ("planId", plan_id), ("search", search), ("page", page), ("pageSize", page_size)), + "/v1/marketplace/provider-directory", + m.ListMarketplaceProviderDirectoryResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("search", search), + ("filterAssetType", filter_asset_type), + ), body=None, idempotent=False, timeout=timeout, ) - def list_plan_live_validations_all( + def list_marketplace_provider_directory_all( self, *, - plan_id: str | None = None, - search: str | None = None, page: int | None = None, page_size: int | None = None, + search: str | None = None, + filter_asset_type: m.AssetType | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.PlanLiveValidationView]: + ) -> Iterator[m.ProviderInfo]: """ - Every result of :meth:`list_plan_live_validations`, reading page after page. + Every result of :meth:`list_marketplace_provider_directory`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -7431,15 +7040,15 @@ def list_plan_live_validations_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_plan_live_validations( + res = self.list_marketplace_provider_directory( page=page, page_size=size, - plan_id=plan_id, search=search, + filter_asset_type=filter_asset_type, extra_query=extra_query, timeout=timeout, ) - items = res.validations + items = res.providers for item in items: yield item seen += len(items) @@ -7447,273 +7056,352 @@ def list_plan_live_validations_all( return page += 1 - def start_plan_live_validation( + def list_providers( self, - plan_id: str, *, - include_benchmarking: bool | None = None, - node_id: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + filter_plan_code: str | None = None, + filter_country: str | None = None, + filter_city: str | None = None, + filter_billing_type: m.BillingType | str | None = None, + search: str | None = None, + filter_ipv6_available_only: bool | None = None, + plan_price_sort: m.ProviderPlanPriceSort | str | None = None, + filter_unlimited_bandwidth_only: bool | None = None, + filter_ddos_providers: list[str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.StartPlanLiveValidationResponse: - """Call ``POST /v1/provider/plans/{planId}/live-validation``.""" + ) -> m.ListProvidersResponse: + """ + Call ``GET /v1/marketplace/providers``. + + Args: + filter_plan_code: Filter providers that offer this plan code (required) + filter_country: Filter by country name (required, case-insensitive) + filter_city: Filter by city name (required, case-insensitive) + filter_billing_type: Filter by billing type (subscription/fixed or usage-based) - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) + search: Search by organization name or description + plan_price_sort: How to order providers: default is newest first. When set, Recommendations (first three in newest-first order) stay pinned; the rest are ordered by the displayed list price for the selected plan and billing type. - PROVIDER_PLAN_PRICE_SORT_LEAST_EXPENSIVE_FIRST: Ascending among non-recommended providers: lowest list price first (usage: hourly, subscription: fixed monthly, free: 0) - PROVIDER_PLAN_PRICE_SORT_MOST_EXPENSIVE_FIRST: Descending among non-recommended providers: highest list price first + filter_unlimited_bandwidth_only: Only include providers where bandwidth egress is effectively unlimited for the selected plan (same basis as UI badge: overage_price if > 0 else unit_amount; unlimited when effective $/GB == 0). + filter_ddos_providers: When set, only organizations whose ddos_provider is one of these slugs are included. When empty, do not filter by DDoS. Mirrored by marketplace UI: all slugs "selected" = omit this. + """ return self._client._call( - "POST", - f"/v1/provider/plans/{_path(plan_id)}/live-validation", - m.StartPlanLiveValidationResponse, - query=_query(extra_query), - body=_body( - m.StartPlanLiveValidationBody, - extra_body, - False, - ("include_benchmarking", include_benchmarking), - ("node_id", node_id), + "GET", + "/v1/marketplace/providers", + m.ListProvidersResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("filterPlanCode", filter_plan_code), + ("filterCountry", filter_country), + ("filterCity", filter_city), + ("filterBillingType", filter_billing_type), + ("search", search), + ("filterIpv6AvailableOnly", filter_ipv6_available_only), + ("planPriceSort", plan_price_sort), + ("filterUnlimitedBandwidthOnly", filter_unlimited_bandwidth_only), + ("filterDdosProviders", filter_ddos_providers), ), + body=None, idempotent=False, timeout=timeout, ) - -class ManualPayoutService(_Service): - """The NodeRings ManualPayoutService API.""" - - def create_manual_payout( + def list_providers_all( self, *, - account_holder_name: str | None = None, - account_number: str | None = None, - bank_name: str | None = None, - bic: str | None = None, - country: str | None = None, - iban: str | None = None, - notes: str | None = None, - routing_number: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.CreateManualPayoutResponse: - """ - Call ``POST /v1/provider/manual-payout``. - - Args: - account_holder_name: Name of the account holder - account_number: Bank account number (for non-SEPA countries) - bank_name: Name of the bank - bic: Bank Identifier Code / SWIFT code (for SEPA countries) - country: ISO 3166-1 alpha-2 country code (e.g., "US", "GB", "DE") - iban: International Bank Account Number (for SEPA countries) - notes: User-provided notes about the payout account - routing_number: Routing number (for US accounts) or sort code (for UK accounts) + page: int | None = None, + page_size: int | None = None, + filter_plan_code: str | None = None, + filter_country: str | None = None, + filter_city: str | None = None, + filter_billing_type: m.BillingType | str | None = None, + search: str | None = None, + filter_ipv6_available_only: bool | None = None, + plan_price_sort: m.ProviderPlanPriceSort | str | None = None, + filter_unlimited_bandwidth_only: bool | None = None, + filter_ddos_providers: list[str] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> Iterator[m.ProviderInfo]: + """ + Every result of :meth:`list_providers`, reading page after page. + + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_providers( + page=page, + page_size=size, + filter_plan_code=filter_plan_code, + filter_country=filter_country, + filter_city=filter_city, + filter_billing_type=filter_billing_type, + search=search, + filter_ipv6_available_only=filter_ipv6_available_only, + plan_price_sort=plan_price_sort, + filter_unlimited_bandwidth_only=filter_unlimited_bandwidth_only, + filter_ddos_providers=filter_ddos_providers, + extra_query=extra_query, + timeout=timeout, + ) + items = res.providers + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + def list_public_storefronts( + self, + *, + page: int | None = None, + page_size: int | None = None, + search: str | None = None, + filter_country: str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.ListPublicStorefrontsResponse: + """Call ``GET /v1/public/storefronts``.""" return self._client._call( - "POST", - "/v1/provider/manual-payout", - m.CreateManualPayoutResponse, - query=_query(extra_query), - body=_body( - m.CreateManualPayoutRequest, - extra_body, - False, - ("account_holder_name", account_holder_name), - ("account_number", account_number), - ("bank_name", bank_name), - ("bic", bic), - ("country", country), - ("iban", iban), - ("notes", notes), - ("routing_number", routing_number), + "GET", + "/v1/public/storefronts", + m.ListPublicStorefrontsResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("search", search), + ("filterCountry", filter_country), ), + body=None, idempotent=False, timeout=timeout, ) - def delete_manual_payout( + def list_public_storefronts_all( self, *, + page: int | None = None, + page_size: int | None = None, + search: str | None = None, + filter_country: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/provider/manual-payout``.""" + ) -> Iterator[m.PublicStorefrontCard]: + """ + Every result of :meth:`list_public_storefronts`, reading page after page. + + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_public_storefronts( + page=page, + page_size=size, + search=search, + filter_country=filter_country, + extra_query=extra_query, + timeout=timeout, + ) + items = res.storefronts + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + def search_marketplace( + self, + *, + filter_billing_type: m.BillingType | str | None = None, + page: int | None = None, + page_size: int | None = None, + query: str | None = None, + turnstile_token: str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SearchMarketplaceResponse: + """ + Call ``POST /v1/marketplace/search``. + + Args: + turnstile_token: Cloudflare Turnstile token (required for anonymous callers when auth.turnstile.requireOnAnonymousMarketplaceSearch). + """ return self._client._call( - "DELETE", - "/v1/provider/manual-payout", - m.SuccessResponse, + "POST", + "/v1/marketplace/search", + m.SearchMarketplaceResponse, query=_query(extra_query), - body=None, + body=_body( + m.SearchMarketplaceRequest, + extra_body, + False, + ("filter_billing_type", filter_billing_type), + ("page", page), + ("page_size", page_size), + ("query", query), + ("turnstile_token", turnstile_token), + ), idempotent=False, timeout=timeout, ) - def get_manual_payout( + +class MetadataService(_Service): + """The NodeRings MetadataService API.""" + + def get_platform_versions( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetManualPayoutResponse: - """Call ``GET /v1/provider/manual-payout``.""" + ) -> m.PlatformVersions: + """ + GetPlatformVersions returns pinned versions for k3s, k3d, calico, liqo, liqoctl, and helm. + + It calls ``GET /v1/platform-versions``. + """ return self._client._call( "GET", - "/v1/provider/manual-payout", - m.GetManualPayoutResponse, + "/v1/platform-versions", + m.PlatformVersions, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - -class MarketplaceService(_Service): - """The NodeRings MarketplaceService API.""" - - def get_marketplace_plan( + def get_version( self, - plan_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetMarketplacePlanResponse: - """Call ``GET /v1/marketplace/plans/{planId}``.""" + ) -> m.Metadata: + """Call ``GET /v1/version``.""" return self._client._call( "GET", - f"/v1/marketplace/plans/{_path(plan_id)}", - m.GetMarketplacePlanResponse, + "/v1/version", + m.Metadata, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_provider( + def health_check( self, - provider_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderResponse: - """Call ``GET /v1/marketplace/providers/{providerId}``.""" + ) -> m.HealthCheckResponse: + """Call ``GET /v1/healthz``.""" return self._client._call( "GET", - f"/v1/marketplace/providers/{_path(provider_id)}", - m.GetProviderResponse, + "/v1/healthz", + m.HealthCheckResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_public_platform_stats( + def list_distros( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPublicPlatformStatsResponse: + ) -> m.ListDistrosResponse: """ - Platform-wide totals for the public homepage: Compute Instances and game servers - provisioned, DNS zones and records hosted, live storefronts. Anonymous and cached for a few - minutes; carries no tenant data. The frontend reads it once per build, not per page view. + ListDistros returns the guest OS catalog used by the virtual machine image picker. - It calls ``GET /v1/public/stats``. + It calls ``GET /v1/distros``. """ return self._client._call( "GET", - "/v1/public/stats", - m.GetPublicPlatformStatsResponse, + "/v1/distros", + m.ListDistrosResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_public_storefront( + +class MetricService(_Service): + """The NodeRings MetricService API.""" + + def get_metric( self, - slug: str, + id: str, *, + code: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPublicStorefrontResponse: - """Call ``GET /v1/public/storefronts/{slug}``.""" + ) -> m.GetMetricResponse: + """ + Get a specific metric by ID or code + + It calls ``GET /v1/metrics/{id}``. + + Args: + code: Alternative to id + """ return self._client._call( "GET", - f"/v1/public/storefronts/{_path(slug)}", - m.GetPublicStorefrontResponse, - query=_query(extra_query), + f"/v1/metrics/{_path(id)}", + m.GetMetricResponse, + query=_query(extra_query, ("code", code)), body=None, idempotent=False, timeout=timeout, ) - def get_public_storefront_by_id( + def list_metrics( self, - provider_id: str, *, + page: int | None = None, + page_size: int | None = None, + billable_only: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPublicStorefrontResponse: - """Call ``GET /v1/public/storefronts/by-id/{providerId}``.""" + ) -> m.ListMetricsResponse: + """ + List all available metrics + + It calls ``GET /v1/metrics``. + """ return self._client._call( "GET", - f"/v1/public/storefronts/by-id/{_path(provider_id)}", - m.GetPublicStorefrontResponse, - query=_query(extra_query), + "/v1/metrics", + m.ListMetricsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("billableOnly", billable_only)), body=None, idempotent=False, timeout=timeout, ) - def list_available_addons( + def list_metrics_all( self, *, - filter_provider_id: str | None = None, - vm_id: str | None = None, - filter_addon_type: m.AddonType | str | None = None, - filter_billing_type: m.BillingType | str | None = None, - search: str | None = None, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListAvailableAddonsResponse: - """ - Call ``GET /v1/marketplace/addons``. - - Args: - filter_billing_type: - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) - """ - return self._client._call( - "GET", - "/v1/marketplace/addons", - m.ListAvailableAddonsResponse, - query=_query( - extra_query, - ("filterProviderId", filter_provider_id), - ("vmId", vm_id), - ("filterAddonType", filter_addon_type), - ("filterBillingType", filter_billing_type), - ("search", search), - ("page", page), - ("pageSize", page_size), - ), - body=None, - idempotent=False, - timeout=timeout, - ) - - def list_available_addons_all( - self, - *, - filter_provider_id: str | None = None, - vm_id: str | None = None, - filter_addon_type: m.AddonType | str | None = None, - filter_billing_type: m.BillingType | str | None = None, - search: str | None = None, page: int | None = None, page_size: int | None = None, + billable_only: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Addon]: + ) -> Iterator[m.Metric]: """ - Every result of :meth:`list_available_addons`, reading page after page. + Every result of :meth:`list_metrics`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -7721,18 +7409,14 @@ def list_available_addons_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_available_addons( + res = self.list_metrics( page=page, page_size=size, - filter_provider_id=filter_provider_id, - vm_id=vm_id, - filter_addon_type=filter_addon_type, - filter_billing_type=filter_billing_type, - search=search, + billable_only=billable_only, extra_query=extra_query, timeout=timeout, ) - items = res.addons + items = res.metrics for item in items: yield item seen += len(items) @@ -7740,108 +7424,89 @@ def list_available_addons_all( return page += 1 - def list_available_plans( + +class MetricsCredentialService(_Service): + """The NodeRings MetricsCredentialService API.""" + + def create_metrics_write_credential( self, *, - filter_country: str | None = None, - filter_city: str | None = None, - filter_billing_type: m.BillingType | str | None = None, - filter_compute_type: m.ComputeType | str | None = None, - filter_compute_category: m.ComputeCategory | str | None = None, - filter_asset_type: m.AssetType | str | None = None, + agent_id: str | None = None, + expires_at: datetime | None = None, + name: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListAvailablePlansResponse: + ) -> m.CreateMetricsWriteCredentialResponse: """ - Call ``GET /v1/marketplace/plans``. + Call ``POST /v1/metrics-write-credentials``. Args: - filter_country: Optional filters Filter by country name (case-insensitive) - filter_city: Filter by city name (case-insensitive) - filter_billing_type: Filter by billing type - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) - filter_compute_type: Filter by compute type - COMPUTE_TYPE_GENERAL_COMPUTE: GC - General Compute (balanced performance) - COMPUTE_TYPE_HIGH_FREQUENCY: HF - High Frequency (CPU-optimized, high clock speeds) - COMPUTE_TYPE_HIGH_PERFORMANCE: HP - High Performance (next-gen CPUs, NVMe storage) - COMPUTE_TYPE_GENERAL_PURPOSE: GP - General Purpose (balanced dedicated resources) - COMPUTE_TYPE_CPU_OPTIMIZED: CPU - CPU Optimized (high CPU-to-memory ratio) - COMPUTE_TYPE_MEMORY_OPTIMIZED: MEM - Memory Optimized (high memory-to-CPU ratio) - COMPUTE_TYPE_STORAGE_OPTIMIZED: STO - Storage Optimized (high storage capacity) - COMPUTE_TYPE_VERY_HIGH_FREQUENCY: VHF - Very High Frequency (highest clock dedicated CPUs) - COMPUTE_TYPE_GAME_SERVER: GS - Game Server (per-CPU SKU dedicated plans, e.g. DC-GS-9950X-*) - filter_compute_category: Filter by compute category - COMPUTE_CATEGORY_SHARED_COMPUTE: Shared compute (shared resources, cost-effective) - COMPUTE_CATEGORY_DEDICATED_COMPUTE: Dedicated compute (dedicated resources, higher performance) + agent_id: Optional: omit or leave empty when the credential is not tied to an agent. + expires_at: Optional expiry; omit for non-expiring machine tokens. """ return self._client._call( - "GET", - "/v1/marketplace/plans", - m.ListAvailablePlansResponse, - query=_query( - extra_query, - ("filterCountry", filter_country), - ("filterCity", filter_city), - ("filterBillingType", filter_billing_type), - ("filterComputeType", filter_compute_type), - ("filterComputeCategory", filter_compute_category), - ("filterAssetType", filter_asset_type), + "POST", + "/v1/metrics-write-credentials", + m.CreateMetricsWriteCredentialResponse, + query=_query(extra_query), + body=_body( + m.CreateMetricsWriteCredentialRequest, + extra_body, + False, + ("agent_id", agent_id), + ("expires_at", expires_at), + ("name", name), ), - body=None, idempotent=False, timeout=timeout, ) - def list_available_regions( + def list_metrics_write_credentials( self, *, - filter_asset_type: m.AssetType | str | None = None, + agent_id: str | None = None, + include_revoked: bool | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListAvailableRegionsResponse: + ) -> m.ListMetricsWriteCredentialsResponse: """ - Call ``GET /v1/marketplace/regions``. + Call ``GET /v1/metrics-write-credentials``. Args: - filter_asset_type: When set, only cities that sell a marketplace-listable plan of this asset type. Unspecified keeps every marketplace city (virtual machines and game servers). + agent_id: Optional: omit or leave empty to list credentials for the whole organization. + page_size: -1 means fetch all; otherwise 1..100. """ return self._client._call( "GET", - "/v1/marketplace/regions", - m.ListAvailableRegionsResponse, - query=_query(extra_query, ("filterAssetType", filter_asset_type)), - body=None, - idempotent=False, - timeout=timeout, - ) - - def list_marketplace_provider_directory( - self, - *, - page: int | None = None, - page_size: int | None = None, - search: str | None = None, - filter_asset_type: m.AssetType | str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListMarketplaceProviderDirectoryResponse: - """Call ``GET /v1/marketplace/provider-directory``.""" - return self._client._call( - "GET", - "/v1/marketplace/provider-directory", - m.ListMarketplaceProviderDirectoryResponse, + "/v1/metrics-write-credentials", + m.ListMetricsWriteCredentialsResponse, query=_query( extra_query, + ("agentId", agent_id), + ("includeRevoked", include_revoked), ("page", page), ("pageSize", page_size), - ("search", search), - ("filterAssetType", filter_asset_type), ), body=None, idempotent=False, timeout=timeout, ) - def list_marketplace_provider_directory_all( + def list_metrics_write_credentials_all( self, *, + agent_id: str | None = None, + include_revoked: bool | None = None, page: int | None = None, page_size: int | None = None, - search: str | None = None, - filter_asset_type: m.AssetType | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.ProviderInfo]: + ) -> Iterator[m.MetricsWriteCredential]: """ - Every result of :meth:`list_marketplace_provider_directory`, reading page after page. + Every result of :meth:`list_metrics_write_credentials`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -7849,15 +7514,15 @@ def list_marketplace_provider_directory_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_marketplace_provider_directory( + res = self.list_metrics_write_credentials( page=page, page_size=size, - search=search, - filter_asset_type=filter_asset_type, + agent_id=agent_id, + include_revoked=include_revoked, extra_query=extra_query, timeout=timeout, ) - items = res.providers + items = res.credentials for item in items: yield item seen += len(items) @@ -7865,457 +7530,341 @@ def list_marketplace_provider_directory_all( return page += 1 - def list_providers( + def revoke_metrics_write_credential( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - filter_plan_code: str | None = None, - filter_country: str | None = None, - filter_city: str | None = None, - filter_billing_type: m.BillingType | str | None = None, - search: str | None = None, - filter_ipv6_available_only: bool | None = None, - plan_price_sort: m.ProviderPlanPriceSort | str | None = None, - filter_unlimited_bandwidth_only: bool | None = None, - filter_ddos_providers: list[str] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListProvidersResponse: - """ - Call ``GET /v1/marketplace/providers``. - - Args: - filter_plan_code: Filter providers that offer this plan code (required) - filter_country: Filter by country name (required, case-insensitive) - filter_city: Filter by city name (required, case-insensitive) - filter_billing_type: Filter by billing type (subscription/fixed or usage-based) - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) - search: Search by organization name or description - plan_price_sort: How to order providers: default is newest first. When set, Recommendations (first three in newest-first order) stay pinned; the rest are ordered by the displayed list price for the selected plan and billing type. - PROVIDER_PLAN_PRICE_SORT_LEAST_EXPENSIVE_FIRST: Ascending among non-recommended providers: lowest list price first (usage: hourly, subscription: fixed monthly, free: 0) - PROVIDER_PLAN_PRICE_SORT_MOST_EXPENSIVE_FIRST: Descending among non-recommended providers: highest list price first - filter_unlimited_bandwidth_only: Only include providers where bandwidth egress is effectively unlimited for the selected plan (same basis as UI badge: overage_price if > 0 else unit_amount; unlimited when effective $/GB == 0). - filter_ddos_providers: When set, only organizations whose ddos_provider is one of these slugs are included. When empty, do not filter by DDoS. Mirrored by marketplace UI: all slugs "selected" = omit this. - """ + ) -> m.SuccessResponse: + """Call ``POST /v1/metrics-write-credentials/{id}:revoke``.""" return self._client._call( - "GET", - "/v1/marketplace/providers", - m.ListProvidersResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("filterPlanCode", filter_plan_code), - ("filterCountry", filter_country), - ("filterCity", filter_city), - ("filterBillingType", filter_billing_type), - ("search", search), - ("filterIpv6AvailableOnly", filter_ipv6_available_only), - ("planPriceSort", plan_price_sort), - ("filterUnlimitedBandwidthOnly", filter_unlimited_bandwidth_only), - ("filterDdosProviders", filter_ddos_providers), - ), - body=None, + "POST", + f"/v1/metrics-write-credentials/{_path(id)}:revoke", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.RevokeMetricsWriteCredentialBody, extra_body, False), idempotent=False, timeout=timeout, ) - def list_providers_all( + def rotate_metrics_write_credential( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - filter_plan_code: str | None = None, - filter_country: str | None = None, - filter_city: str | None = None, - filter_billing_type: m.BillingType | str | None = None, - search: str | None = None, - filter_ipv6_available_only: bool | None = None, - plan_price_sort: m.ProviderPlanPriceSort | str | None = None, - filter_unlimited_bandwidth_only: bool | None = None, - filter_ddos_providers: list[str] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.ProviderInfo]: - """ - Every result of :meth:`list_providers`, reading page after page. + ) -> m.CreateMetricsWriteCredentialResponse: + """Call ``POST /v1/metrics-write-credentials/{id}:rotate``.""" + return self._client._call( + "POST", + f"/v1/metrics-write-credentials/{_path(id)}:rotate", + m.CreateMetricsWriteCredentialResponse, + query=_query(extra_query), + body=_body(m.RotateMetricsWriteCredentialBody, extra_body, False), + idempotent=False, + timeout=timeout, + ) - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_providers( - page=page, - page_size=size, - filter_plan_code=filter_plan_code, - filter_country=filter_country, - filter_city=filter_city, - filter_billing_type=filter_billing_type, - search=search, - filter_ipv6_available_only=filter_ipv6_available_only, - plan_price_sort=plan_price_sort, - filter_unlimited_bandwidth_only=filter_unlimited_bandwidth_only, - filter_ddos_providers=filter_ddos_providers, - extra_query=extra_query, - timeout=timeout, - ) - items = res.providers - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - def list_public_storefronts( - self, - *, - page: int | None = None, - page_size: int | None = None, - search: str | None = None, - filter_country: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListPublicStorefrontsResponse: - """Call ``GET /v1/public/storefronts``.""" - return self._client._call( - "GET", - "/v1/public/storefronts", - m.ListPublicStorefrontsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("search", search), - ("filterCountry", filter_country), - ), - body=None, - idempotent=False, - timeout=timeout, - ) - - def list_public_storefronts_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - search: str | None = None, - filter_country: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.PublicStorefrontCard]: - """ - Every result of :meth:`list_public_storefronts`, reading page after page. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_public_storefronts( - page=page, - page_size=size, - search=search, - filter_country=filter_country, - extra_query=extra_query, - timeout=timeout, - ) - items = res.storefronts - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 +class MonitoringService(_Service): + """The NodeRings MonitoringService API.""" - def search_marketplace( + def create_monitoring_launch( self, *, - filter_billing_type: m.BillingType | str | None = None, - page: int | None = None, - page_size: int | None = None, - query: str | None = None, - turnstile_token: str | None = None, + next: str | None = None, + resource_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SearchMarketplaceResponse: + ) -> m.CreateMonitoringLaunchResponse: """ - Call ``POST /v1/marketplace/search``. + CreateMonitoringLaunch returns a one-time URL (valid for about a minute) that signs the + caller into the organization's Grafana. Grafana role: Editor when the caller may also rotate + the monitoring token, otherwise Viewer. + + It calls ``POST /v1/monitoring/launch``. Args: - turnstile_token: Cloudflare Turnstile token (required for anonymous callers when auth.turnstile.requireOnAnonymousMarketplaceSearch). + next: Optional relative Grafana path to open, e.g. "/d/nr-vm/virtual-machine?var-resource=NR-..". Validated server side; only /d/, /dashboards and /explore paths are accepted. + resource_id: Optional VM or game server id (client orgs): open its dashboard. """ return self._client._call( "POST", - "/v1/marketplace/search", - m.SearchMarketplaceResponse, + "/v1/monitoring/launch", + m.CreateMonitoringLaunchResponse, query=_query(extra_query), body=_body( - m.SearchMarketplaceRequest, - extra_body, - False, - ("filter_billing_type", filter_billing_type), - ("page", page), - ("page_size", page_size), - ("query", query), - ("turnstile_token", turnstile_token), + m.CreateMonitoringLaunchRequest, extra_body, False, ("next", next), ("resource_id", resource_id) ), idempotent=False, timeout=timeout, ) - -class MetadataService(_Service): - """The NodeRings MetadataService API.""" - - def get_platform_versions( + def rotate_monitoring_datasource_token( self, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.PlatformVersions: + ) -> m.SuccessResponse: """ - GetPlatformVersions returns pinned versions for k3s, k3d, calico, liqo, liqoctl, and helm. + RotateMonitoringDatasourceToken replaces the organization's Grafana datasource token. - It calls ``GET /v1/platform-versions``. + It calls ``POST /v1/monitoring/datasource-token:rotate``. """ return self._client._call( - "GET", - "/v1/platform-versions", - m.PlatformVersions, + "POST", + "/v1/monitoring/datasource-token:rotate", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.RotateMonitoringDatasourceTokenRequest, extra_body, False), idempotent=False, timeout=timeout, ) - def get_version( + +class NodePlacementService(_Service): + """The NodeRings NodePlacementService API.""" + + def get_node_placement_policy( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.Metadata: - """Call ``GET /v1/version``.""" + ) -> m.GetNodePlacementPolicyResponse: + """Call ``GET /v1/node-placement-policy``.""" return self._client._call( "GET", - "/v1/version", - m.Metadata, + "/v1/node-placement-policy", + m.GetNodePlacementPolicyResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def health_check( + def update_node_placement_policy( self, *, + default_strategy: m.NodePlacementStrategy | str | None = None, + region_overrides: list[m.NodePlacementRegionOverride | dict[str, Any]] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.HealthCheckResponse: - """Call ``GET /v1/healthz``.""" + ) -> m.UpdateNodePlacementPolicyResponse: + """Call ``PUT /v1/node-placement-policy``.""" return self._client._call( - "GET", - "/v1/healthz", - m.HealthCheckResponse, + "PUT", + "/v1/node-placement-policy", + m.UpdateNodePlacementPolicyResponse, query=_query(extra_query), - body=None, + body=_body( + m.UpdateNodePlacementPolicyRequest, + extra_body, + False, + ("default_strategy", default_strategy), + ("region_overrides", region_overrides), + ), idempotent=False, timeout=timeout, ) - def list_distros( + +class NodeService(_Service): + """The NodeRings NodeService API.""" + + def create_node( self, *, + backup_storage_compression: m.BackupStorageCompression | str | None = None, + backup_storage_destination: str | None = None, + compute_type: m.NodeComputeType | str | None = None, + cpu_overallocate_percent: int | None = None, + maintenance_mode: bool | None = None, + memory_overallocate_percent: int | None = None, + metadata: dict[str, Any] | None = None, + name: str | None = None, + network_bridge: str | None = None, + network_model: str | None = None, + network_name: str | None = None, + network_vlan_id: int | None = None, + panel_node_id: int | None = None, + platform_id: str | None = None, + pterodactyl_location_id: int | None = None, + region_id: str | None = None, + storage_overallocate_percent: int | None = None, + topology_paste: str | None = None, + vm_storage_destination: str | None = None, + vmid_seed: int | None = None, + wings_node_name: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDistrosResponse: + ) -> m.SuccessResponse: """ - ListDistros returns the guest OS catalog used by the virtual machine image picker. + Call ``POST /v1/node``. - It calls ``GET /v1/distros``. + Args: + backup_storage_compression: Proxmox vzdump --compress (must not be UNSPECIFIED on create/update node). + compute_type: Compute product hosted by a node. Exclusive: a node is shared XOR dedicated (docs/README-DEDICATED-CPU-CORES.md, design decision D1). - NODE_COMPUTE_TYPE_SHARED: Shared vCPU hosting (CPU oversubscription allowed). Default. - NODE_COMPUTE_TYPE_DEDICATED: Dedicated pinned CPU cores (no CPU overallocation). + metadata: Optional node metadata (VirtFusion hypervisor_id / group_id live under metadata.virtfusion). + network_bridge: Node provisioning settings (server-side defaults applied when omitted) Proxmox Linux bridge for VM primary NIC. Default: vmbr0. + network_model: Proxmox NIC model for primary NIC. Default: virtio. + network_name: Proxmox net device key for primary NIC (net0, net1, ...). Default: net0. + network_vlan_id: 802.1Q VLAN tag on primary NIC (Proxmox tag=); 0 = untagged. + topology_paste: Raw topology paste (output of the documented lscpu/sysfs command block). Required when compute_type is dedicated; ignored otherwise. """ return self._client._call( - "GET", - "/v1/distros", - m.ListDistrosResponse, + "POST", + "/v1/node", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body( + m.CreateNodeRequest, + extra_body, + False, + ("backup_storage_compression", backup_storage_compression), + ("backup_storage_destination", backup_storage_destination), + ("compute_type", compute_type), + ("cpu_overallocate_percent", cpu_overallocate_percent), + ("maintenance_mode", maintenance_mode), + ("memory_overallocate_percent", memory_overallocate_percent), + ("metadata", metadata), + ("name", name), + ("network_bridge", network_bridge), + ("network_model", network_model), + ("network_name", network_name), + ("network_vlan_id", network_vlan_id), + ("panel_node_id", panel_node_id), + ("platform_id", platform_id), + ("pterodactyl_location_id", pterodactyl_location_id), + ("region_id", region_id), + ("storage_overallocate_percent", storage_overallocate_percent), + ("topology_paste", topology_paste), + ("vm_storage_destination", vm_storage_destination), + ("vmid_seed", vmid_seed), + ("wings_node_name", wings_node_name), + ), idempotent=False, timeout=timeout, ) - -class MetricService(_Service): - """The NodeRings MetricService API.""" - - def get_metric( + def delete_node( self, id: str, *, - code: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetMetricResponse: - """ - Get a specific metric by ID or code - - It calls ``GET /v1/metrics/{id}``. - - Args: - code: Alternative to id - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/node/{id}``.""" return self._client._call( - "GET", - f"/v1/metrics/{_path(id)}", - m.GetMetricResponse, - query=_query(extra_query, ("code", code)), + "DELETE", + f"/v1/node/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_metrics( + def get_node( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - billable_only: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListMetricsResponse: - """ - List all available metrics - - It calls ``GET /v1/metrics``. - """ + ) -> m.GetNodeResponse: + """Call ``GET /v1/node/{id}``.""" return self._client._call( "GET", - "/v1/metrics", - m.ListMetricsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("billableOnly", billable_only)), + f"/v1/node/{_path(id)}", + m.GetNodeResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_metrics_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - billable_only: bool | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Metric]: - """ - Every result of :meth:`list_metrics`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_metrics( - page=page, - page_size=size, - billable_only=billable_only, - extra_query=extra_query, - timeout=timeout, - ) - items = res.metrics - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - -class MetricsCredentialService(_Service): - """The NodeRings MetricsCredentialService API.""" - - def create_metrics_write_credential( + def get_node_cpu_map( self, + id: str, *, - agent_id: str | None = None, - expires_at: datetime | None = None, - name: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateMetricsWriteCredentialResponse: + ) -> m.GetNodeCPUMapResponse: """ - Call ``POST /v1/metrics-write-credentials``. + Dedicated CPU cores: full topology + per-CPU occupancy for the node topology board + (docs/README-DEDICATED-CPU-CORES.md §6.3/§8.3). - Args: - agent_id: Optional: omit or leave empty when the credential is not tied to an agent. - expires_at: Optional expiry; omit for non-expiring machine tokens. + It calls ``GET /v1/node/{id}/cpu-map``. """ return self._client._call( - "POST", - "/v1/metrics-write-credentials", - m.CreateMetricsWriteCredentialResponse, + "GET", + f"/v1/node/{_path(id)}/cpu-map", + m.GetNodeCPUMapResponse, query=_query(extra_query), - body=_body( - m.CreateMetricsWriteCredentialRequest, - extra_body, - False, - ("agent_id", agent_id), - ("expires_at", expires_at), - ("name", name), - ), + body=None, idempotent=False, timeout=timeout, ) - def list_metrics_write_credentials( + def list_nodes( self, *, - agent_id: str | None = None, - include_revoked: bool | None = None, page: int | None = None, page_size: int | None = None, + platform_id: str | None = None, + service_status: m.ServiceStatus | str | None = None, + expand: list[str] | None = None, + search: str | None = None, + region_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListMetricsWriteCredentialsResponse: + ) -> m.ListNodesResponse: """ - Call ``GET /v1/metrics-write-credentials``. + Call ``GET /v1/nodes``. Args: - agent_id: Optional: omit or leave empty to list credentials for the whole organization. - page_size: -1 means fetch all; otherwise 1..100. + platform_id: Optional filter; UUID format validated in ListNodes when set. """ return self._client._call( "GET", - "/v1/metrics-write-credentials", - m.ListMetricsWriteCredentialsResponse, + "/v1/nodes", + m.ListNodesResponse, query=_query( extra_query, - ("agentId", agent_id), - ("includeRevoked", include_revoked), ("page", page), ("pageSize", page_size), + ("platformId", platform_id), + ("serviceStatus", service_status), + ("expand", expand), + ("search", search), + ("regionId", region_id), ), body=None, idempotent=False, timeout=timeout, ) - def list_metrics_write_credentials_all( + def list_nodes_all( self, *, - agent_id: str | None = None, - include_revoked: bool | None = None, page: int | None = None, page_size: int | None = None, + platform_id: str | None = None, + service_status: m.ServiceStatus | str | None = None, + expand: list[str] | None = None, + search: str | None = None, + region_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.MetricsWriteCredential]: + ) -> Iterator[m.NodeWithExpandedRegion]: """ - Every result of :meth:`list_metrics_write_credentials`, reading page after page. + Every result of :meth:`list_nodes`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -8323,15 +7872,18 @@ def list_metrics_write_credentials_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_metrics_write_credentials( + res = self.list_nodes( page=page, page_size=size, - agent_id=agent_id, - include_revoked=include_revoked, + platform_id=platform_id, + service_status=service_status, + expand=expand, + search=search, + region_id=region_id, extra_query=extra_query, timeout=timeout, ) - items = res.credentials + items = res.nodes for item in items: yield item seen += len(items) @@ -8339,341 +7891,495 @@ def list_metrics_write_credentials_all( return page += 1 - def revoke_metrics_write_credential( + def update_node( self, id: str, *, + backup_storage_compression: m.BackupStorageCompression | str | None = None, + backup_storage_destination: str | None = None, + compute_type: m.NodeComputeType | str | None = None, + cpu_overallocate_percent: int | None = None, + maintenance_mode: bool | None = None, + memory_overallocate_percent: int | None = None, + metadata: dict[str, Any] | None = None, + network_bridge: str | None = None, + network_model: str | None = None, + network_name: str | None = None, + network_vlan_id: int | None = None, + panel_node_id: int | None = None, + pterodactyl_location_id: int | None = None, + region_id: str | None = None, + storage_overallocate_percent: int | None = None, + topology_paste: str | None = None, + vm_storage_destination: str | None = None, + vmid_seed: int | None = None, + wings_node_name: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/metrics-write-credentials/{id}:revoke``.""" + ) -> m.UpdateNodeResponse: + """ + Call ``PATCH /v1/node/{id}``. + + Args: + backup_storage_compression: Proxmox vzdump --compress (must not be UNSPECIFIED on create/update node). + compute_type: Compute product hosted by a node. Exclusive: a node is shared XOR dedicated (docs/README-DEDICATED-CPU-CORES.md, design decision D1). - NODE_COMPUTE_TYPE_SHARED: Shared vCPU hosting (CPU oversubscription allowed). Default. - NODE_COMPUTE_TYPE_DEDICATED: Dedicated pinned CPU cores (no CPU overallocation). + network_bridge: Node provisioning settings (empty string / absent = leave unchanged) + network_vlan_id: Omit to leave unchanged; 0 = untagged. + topology_paste: Topology re-paste for dedicated nodes. Rejected if it would orphan a currently allocated CPU. Empty = leave stored topology unchanged. + vmid_seed: Proxmox VMID seed. Zero means unchanged. Pterodactyl, VirtFusion, and SolusVM node edits omit it; the range applies only when a seed is sent. + """ return self._client._call( - "POST", - f"/v1/metrics-write-credentials/{_path(id)}:revoke", - m.SuccessResponse, + "PATCH", + f"/v1/node/{_path(id)}", + m.UpdateNodeResponse, query=_query(extra_query), - body=_body(m.RevokeMetricsWriteCredentialBody, extra_body, False), + body=_body( + m.UpdateNodeBody, + extra_body, + False, + ("backup_storage_compression", backup_storage_compression), + ("backup_storage_destination", backup_storage_destination), + ("compute_type", compute_type), + ("cpu_overallocate_percent", cpu_overallocate_percent), + ("maintenance_mode", maintenance_mode), + ("memory_overallocate_percent", memory_overallocate_percent), + ("metadata", metadata), + ("network_bridge", network_bridge), + ("network_model", network_model), + ("network_name", network_name), + ("network_vlan_id", network_vlan_id), + ("panel_node_id", panel_node_id), + ("pterodactyl_location_id", pterodactyl_location_id), + ("region_id", region_id), + ("storage_overallocate_percent", storage_overallocate_percent), + ("topology_paste", topology_paste), + ("vm_storage_destination", vm_storage_destination), + ("vmid_seed", vmid_seed), + ("wings_node_name", wings_node_name), + ), idempotent=False, timeout=timeout, ) - def rotate_metrics_write_credential( + def validate_node_topology( self, - id: str, *, + node_id: str | None = None, + topology_paste: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateMetricsWriteCredentialResponse: - """Call ``POST /v1/metrics-write-credentials/{id}:rotate``.""" + ) -> m.ValidateNodeTopologyResponse: + """ + Dedicated CPU cores: parse-preview of a topology paste without persisting. + + It calls ``POST /v1/node/topology/validate``. + + Args: + node_id: Optional node to cross-check the paste against (edit flow). When set, the parsed totals are compared with the node's Proxmox-reported CPU inventory (metadata.proxmox_cpu) and mismatches are returned as warnings. + topology_paste: Raw topology paste to validate without persisting. + """ return self._client._call( "POST", - f"/v1/metrics-write-credentials/{_path(id)}:rotate", - m.CreateMetricsWriteCredentialResponse, + "/v1/node/topology/validate", + m.ValidateNodeTopologyResponse, query=_query(extra_query), - body=_body(m.RotateMetricsWriteCredentialBody, extra_body, False), + body=_body( + m.ValidateNodeTopologyRequest, + extra_body, + False, + ("node_id", node_id), + ("topology_paste", topology_paste), + ), idempotent=False, timeout=timeout, ) -class MonitoringService(_Service): - """The NodeRings MonitoringService API.""" +class OAuth2Service(_Service): + """The NodeRings OAuth2Service API.""" - def create_monitoring_launch( + def authorize( self, *, - next: str | None = None, - resource_id: str | None = None, - extra_body: dict[str, Any] | None = None, + client_id: str | None = None, + response_type: str | None = None, + redirect_uri: str | None = None, + scope: str | None = None, + state: str | None = None, + code_challenge: str | None = None, + code_challenge_method: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateMonitoringLaunchResponse: + ) -> m.AuthorizeResponse: """ - CreateMonitoringLaunch returns a one-time URL (valid for about a minute) that signs the - caller into the organization's Grafana. Grafana role: Editor when the caller may also rotate - the monitoring token, otherwise Viewer. + Authorize initiates the OAuth2 authorization flow - It calls ``POST /v1/monitoring/launch``. + It calls ``GET /v1/oauth2/authorize``. Args: - next: Optional relative Grafana path to open, e.g. "/d/nr-vm/virtual-machine?var-resource=NR-..". Validated server side; only /d/, /dashboards and /explore paths are accepted. - resource_id: Optional VM or game server id (client orgs): open its dashboard. + state: CSRF protection + code_challenge: PKCE challenge + code_challenge_method: Only S256, not plain + """ + return self._client._call( + "GET", + "/v1/oauth2/authorize", + m.AuthorizeResponse, + query=_query( + extra_query, + ("clientId", client_id), + ("responseType", response_type), + ("redirectUri", redirect_uri), + ("scope", scope), + ("state", state), + ("codeChallenge", code_challenge), + ("codeChallengeMethod", code_challenge_method), + ), + body=None, + idempotent=False, + timeout=timeout, + ) + + def create_client( + self, + *, + client_type: str | None = None, + description: str | None = None, + name: str | None = None, + redirect_uris: list[str] | None = None, + requires_pkce: bool | None = None, + scopes: list[str] | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.CreateOAuth2ClientResponse: + """ + CreateClient creates a new OAuth2 client + + It calls ``POST /v1/oauth2/clients``. """ return self._client._call( "POST", - "/v1/monitoring/launch", - m.CreateMonitoringLaunchResponse, + "/v1/oauth2/clients", + m.CreateOAuth2ClientResponse, query=_query(extra_query), body=_body( - m.CreateMonitoringLaunchRequest, extra_body, False, ("next", next), ("resource_id", resource_id) + m.CreateOAuth2ClientRequest, + extra_body, + False, + ("client_type", client_type), + ("description", description), + ("name", name), + ("redirect_uris", redirect_uris), + ("requires_pkce", requires_pkce), + ("scopes", scopes), ), idempotent=False, timeout=timeout, ) - def rotate_monitoring_datasource_token( + def delete_client( self, + client_id: str, *, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: """ - RotateMonitoringDatasourceToken replaces the organization's Grafana datasource token. + DeleteClient deletes an OAuth2 client - It calls ``POST /v1/monitoring/datasource-token:rotate``. + It calls ``DELETE /v1/oauth2/clients/{clientId}``. """ return self._client._call( - "POST", - "/v1/monitoring/datasource-token:rotate", + "DELETE", + f"/v1/oauth2/clients/{_path(client_id)}", m.SuccessResponse, query=_query(extra_query), - body=_body(m.RotateMonitoringDatasourceTokenRequest, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - -class NodePlacementService(_Service): - """The NodeRings NodePlacementService API.""" - - def get_node_placement_policy( + def list_clients( self, *, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetNodePlacementPolicyResponse: - """Call ``GET /v1/node-placement-policy``.""" + ) -> m.ListOAuth2ClientsResponse: + """ + ListClients lists OAuth2 clients for the organization + + It calls ``GET /v1/oauth2/clients``. + """ return self._client._call( "GET", - "/v1/node-placement-policy", - m.GetNodePlacementPolicyResponse, - query=_query(extra_query), + "/v1/oauth2/clients", + m.ListOAuth2ClientsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def update_node_placement_policy( + def list_clients_all( self, *, - default_strategy: m.NodePlacementStrategy | str | None = None, - region_overrides: list[m.NodePlacementRegionOverride | dict[str, Any]] | None = None, + page: int | None = None, + page_size: int | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> Iterator[m.OAuth2Client]: + """ + Every result of :meth:`list_clients`, reading page after page. + + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_clients(page=page, page_size=size, extra_query=extra_query, timeout=timeout) + items = res.clients + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + def refresh_token( + self, + *, + client_id: str | None = None, + client_secret: str | None = None, + refresh_token: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateNodePlacementPolicyResponse: - """Call ``PUT /v1/node-placement-policy``.""" + ) -> m.TokenResponse: + """ + RefreshToken exchanges refresh token for new access token + + It calls ``POST /v1/oauth2/refresh``. + + Args: + client_secret: Optional for public clients + """ return self._client._call( - "PUT", - "/v1/node-placement-policy", - m.UpdateNodePlacementPolicyResponse, + "POST", + "/v1/oauth2/refresh", + m.TokenResponse, query=_query(extra_query), body=_body( - m.UpdateNodePlacementPolicyRequest, + m.RefreshTokenRequest, extra_body, False, - ("default_strategy", default_strategy), - ("region_overrides", region_overrides), + ("client_id", client_id), + ("client_secret", client_secret), + ("refresh_token", refresh_token), ), idempotent=False, timeout=timeout, ) - -class NodeService(_Service): - """The NodeRings NodeService API.""" - - def create_node( + def revoke_token( self, *, - backup_storage_compression: m.BackupStorageCompression | str | None = None, - backup_storage_destination: str | None = None, - compute_type: m.NodeComputeType | str | None = None, - cpu_overallocate_percent: int | None = None, - maintenance_mode: bool | None = None, - memory_overallocate_percent: int | None = None, - metadata: dict[str, Any] | None = None, - name: str | None = None, - network_bridge: str | None = None, - network_model: str | None = None, - network_name: str | None = None, - network_vlan_id: int | None = None, - panel_node_id: int | None = None, - platform_id: str | None = None, - pterodactyl_location_id: int | None = None, - region_id: str | None = None, - storage_overallocate_percent: int | None = None, - topology_paste: str | None = None, - vm_storage_destination: str | None = None, - vmid_seed: int | None = None, - wings_node_name: str | None = None, + client_id: str | None = None, + token: str | None = None, + token_type_hint: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: """ - Call ``POST /v1/node``. + RevokeToken revokes an access or refresh token + + It calls ``POST /v1/oauth2/revoke``. Args: - backup_storage_compression: Proxmox vzdump --compress (must not be UNSPECIFIED on create/update node). - compute_type: Compute product hosted by a node. Exclusive: a node is shared XOR dedicated (docs/README-DEDICATED-CPU-CORES.md, design decision D1). - NODE_COMPUTE_TYPE_SHARED: Shared vCPU hosting (CPU oversubscription allowed). Default. - NODE_COMPUTE_TYPE_DEDICATED: Dedicated pinned CPU cores (no CPU overallocation). - metadata: Optional node metadata (VirtFusion hypervisor_id / group_id live under metadata.virtfusion). - network_bridge: Node provisioning settings (server-side defaults applied when omitted) Proxmox Linux bridge for VM primary NIC. Default: vmbr0. - network_model: Proxmox NIC model for primary NIC. Default: virtio. - network_name: Proxmox net device key for primary NIC (net0, net1, ...). Default: net0. - network_vlan_id: 802.1Q VLAN tag on primary NIC (Proxmox tag=); 0 = untagged. - topology_paste: Raw topology paste (output of the documented lscpu/sysfs command block). Required when compute_type is dedicated; ignored otherwise. + token_type_hint: "access_token" or "refresh_token" """ return self._client._call( "POST", - "/v1/node", + "/v1/oauth2/revoke", m.SuccessResponse, query=_query(extra_query), body=_body( - m.CreateNodeRequest, + m.RevokeTokenRequest, extra_body, False, - ("backup_storage_compression", backup_storage_compression), - ("backup_storage_destination", backup_storage_destination), - ("compute_type", compute_type), - ("cpu_overallocate_percent", cpu_overallocate_percent), - ("maintenance_mode", maintenance_mode), - ("memory_overallocate_percent", memory_overallocate_percent), - ("metadata", metadata), - ("name", name), - ("network_bridge", network_bridge), - ("network_model", network_model), - ("network_name", network_name), - ("network_vlan_id", network_vlan_id), - ("panel_node_id", panel_node_id), - ("platform_id", platform_id), - ("pterodactyl_location_id", pterodactyl_location_id), - ("region_id", region_id), - ("storage_overallocate_percent", storage_overallocate_percent), - ("topology_paste", topology_paste), - ("vm_storage_destination", vm_storage_destination), - ("vmid_seed", vmid_seed), - ("wings_node_name", wings_node_name), + ("client_id", client_id), + ("token", token), + ("token_type_hint", token_type_hint), ), idempotent=False, timeout=timeout, ) - def delete_node( + def token( self, - id: str, *, + client_id: str | None = None, + client_secret: str | None = None, + code: str | None = None, + code_verifier: str | None = None, + grant_type: str | None = None, + redirect_uri: str | None = None, + refresh_token: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/node/{id}``.""" + ) -> m.TokenResponse: + """ + Token exchanges authorization code for access token + + It calls ``POST /v1/oauth2/token``. + + Args: + client_secret: Optional for public clients + code: Required for authorization_code grant + code_verifier: Required for PKCE + redirect_uri: Required for authorization_code grant + refresh_token: Required for refresh_token grant + """ return self._client._call( - "DELETE", - f"/v1/node/{_path(id)}", + "POST", + "/v1/oauth2/token", + m.TokenResponse, + query=_query(extra_query), + body=_body( + m.TokenRequest, + extra_body, + False, + ("client_id", client_id), + ("client_secret", client_secret), + ("code", code), + ("code_verifier", code_verifier), + ("grant_type", grant_type), + ("redirect_uri", redirect_uri), + ("refresh_token", refresh_token), + ), + idempotent=False, + timeout=timeout, + ) + + +class OrganizationService(_Service): + """The NodeRings OrganizationService API.""" + + def create_organization( + self, + *, + asn: int | None = None, + ddos_provider: str | None = None, + description: str | None = None, + hypervisor_driver: m.PlatformDriver | str | None = None, + name: str | None = None, + provider_logo_url: str | None = None, + provider_website_url: str | None = None, + type: m.OrganizationType | str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """ + Call ``POST /v1/organizations``. + + Args: + ddos_provider: DDoS partner slug (e.g. none, in-house, gcore, akamai, voxility). Provider orgs only. + hypervisor_driver: - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver. + provider_website_url: Required for provider organizations (http/https; scheme optional in input: server normalizes). + """ + return self._client._call( + "POST", + "/v1/organizations", m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body( + m.CreateOrganizationRequest, + extra_body, + False, + ("asn", asn), + ("ddos_provider", ddos_provider), + ("description", description), + ("hypervisor_driver", hypervisor_driver), + ("name", name), + ("provider_logo_url", provider_logo_url), + ("provider_website_url", provider_website_url), + ("type", type), + ), idempotent=False, timeout=timeout, ) - def get_node( + def delete_organization( self, - id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetNodeResponse: - """Call ``GET /v1/node/{id}``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/organizations``.""" return self._client._call( - "GET", - f"/v1/node/{_path(id)}", - m.GetNodeResponse, + "DELETE", + "/v1/organizations", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_node_cpu_map( + def get_organization( self, - id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetNodeCPUMapResponse: - """ - Dedicated CPU cores: full topology + per-CPU occupancy for the node topology board - (docs/README-DEDICATED-CPU-CORES.md §6.3/§8.3). - - It calls ``GET /v1/node/{id}/cpu-map``. - """ + ) -> m.GetOrganizationResponse: + """Call ``GET /v1/organization``.""" return self._client._call( "GET", - f"/v1/node/{_path(id)}/cpu-map", - m.GetNodeCPUMapResponse, + "/v1/organization", + m.GetOrganizationResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_nodes( + def list_organizations( self, *, page: int | None = None, page_size: int | None = None, - platform_id: str | None = None, - service_status: m.ServiceStatus | str | None = None, - expand: list[str] | None = None, - search: str | None = None, - region_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListNodesResponse: - """ - Call ``GET /v1/nodes``. - - Args: - platform_id: Optional filter; UUID format validated in ListNodes when set. - """ + ) -> m.ListOrganizationsResponse: + """Call ``GET /v1/organizations``.""" return self._client._call( "GET", - "/v1/nodes", - m.ListNodesResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("platformId", platform_id), - ("serviceStatus", service_status), - ("expand", expand), - ("search", search), - ("regionId", region_id), - ), + "/v1/organizations", + m.ListOrganizationsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def list_nodes_all( + def list_organizations_all( self, *, page: int | None = None, page_size: int | None = None, - platform_id: str | None = None, - service_status: m.ServiceStatus | str | None = None, - expand: list[str] | None = None, - search: str | None = None, - region_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.NodeWithExpandedRegion]: + ) -> Iterator[m.Organization]: """ - Every result of :meth:`list_nodes`, reading page after page. + Every result of :meth:`list_organizations`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -8681,18 +8387,8 @@ def list_nodes_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_nodes( - page=page, - page_size=size, - platform_id=platform_id, - service_status=service_status, - expand=expand, - search=search, - region_id=region_id, - extra_query=extra_query, - timeout=timeout, - ) - items = res.nodes + res = self.list_organizations(page=page, page_size=size, extra_query=extra_query, timeout=timeout) + items = res.organizations for item in items: yield item seen += len(items) @@ -8700,250 +8396,323 @@ def list_nodes_all( return page += 1 - def update_node( + def update_organization( self, - id: str, *, - backup_storage_compression: m.BackupStorageCompression | str | None = None, - backup_storage_destination: str | None = None, - compute_type: m.NodeComputeType | str | None = None, - cpu_overallocate_percent: int | None = None, - maintenance_mode: bool | None = None, - memory_overallocate_percent: int | None = None, - metadata: dict[str, Any] | None = None, - network_bridge: str | None = None, - network_model: str | None = None, - network_name: str | None = None, - network_vlan_id: int | None = None, - panel_node_id: int | None = None, - pterodactyl_location_id: int | None = None, - region_id: str | None = None, - storage_overallocate_percent: int | None = None, - topology_paste: str | None = None, - vm_storage_destination: str | None = None, - vmid_seed: int | None = None, - wings_node_name: str | None = None, + account_holder_name: str | None = None, + address: str | None = None, + address_city: str | None = None, + address_country: str | None = None, + address_line_1: str | None = None, + address_line_2: str | None = None, + address_postcode: str | None = None, + address_region: str | None = None, + asn: int | None = None, + billing_email: str | None = None, + ddos_provider: str | None = None, + description: str | None = None, + enforce_mfa: bool | None = None, + enforce_sso: bool | None = None, + enforce_verified_domain: bool | None = None, + name: str | None = None, + provider_logo_url: str | None = None, + provider_website_url: str | None = None, + social_accounts_json: str | None = None, + support_email: str | None = None, + support_phone: str | None = None, + tax_id: str | None = None, + vat_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateNodeResponse: + ) -> m.UpdateOrganizationResponse: """ - Call ``PATCH /v1/node/{id}``. + Call ``PATCH /v1/organizations``. Args: - backup_storage_compression: Proxmox vzdump --compress (must not be UNSPECIFIED on create/update node). - compute_type: Compute product hosted by a node. Exclusive: a node is shared XOR dedicated (docs/README-DEDICATED-CPU-CORES.md, design decision D1). - NODE_COMPUTE_TYPE_SHARED: Shared vCPU hosting (CPU oversubscription allowed). Default. - NODE_COMPUTE_TYPE_DEDICATED: Dedicated pinned CPU cores (no CPU overallocation). - network_bridge: Node provisioning settings (empty string / absent = leave unchanged) - network_vlan_id: Omit to leave unchanged; 0 = untagged. - topology_paste: Topology re-paste for dedicated nodes. Rejected if it would orphan a currently allocated CPU. Empty = leave stored topology unchanged. - vmid_seed: Proxmox VMID seed. Zero means unchanged. Pterodactyl, VirtFusion, and SolusVM node edits omit it; the range applies only when a seed is sent. + address_country: ISO 3166-1 alpha-2 (e.g. US, DE). + social_accounts_json: JSON array of up to 4 objects: [{"platform":"x","url":"https://..."}, ...]. platform must be one of: x, linkedin, instagram, facebook (Facebook/Meta). """ return self._client._call( "PATCH", - f"/v1/node/{_path(id)}", - m.UpdateNodeResponse, + "/v1/organizations", + m.UpdateOrganizationResponse, query=_query(extra_query), body=_body( - m.UpdateNodeBody, + m.UpdateOrganizationRequest, extra_body, False, - ("backup_storage_compression", backup_storage_compression), - ("backup_storage_destination", backup_storage_destination), - ("compute_type", compute_type), - ("cpu_overallocate_percent", cpu_overallocate_percent), - ("maintenance_mode", maintenance_mode), - ("memory_overallocate_percent", memory_overallocate_percent), - ("metadata", metadata), - ("network_bridge", network_bridge), - ("network_model", network_model), - ("network_name", network_name), - ("network_vlan_id", network_vlan_id), - ("panel_node_id", panel_node_id), - ("pterodactyl_location_id", pterodactyl_location_id), - ("region_id", region_id), - ("storage_overallocate_percent", storage_overallocate_percent), - ("topology_paste", topology_paste), - ("vm_storage_destination", vm_storage_destination), - ("vmid_seed", vmid_seed), - ("wings_node_name", wings_node_name), - ), - idempotent=False, - timeout=timeout, - ) - - def validate_node_topology( - self, - *, - node_id: str | None = None, - topology_paste: str | None = None, + ("account_holder_name", account_holder_name), + ("address", address), + ("address_city", address_city), + ("address_country", address_country), + ("address_line_1", address_line_1), + ("address_line_2", address_line_2), + ("address_postcode", address_postcode), + ("address_region", address_region), + ("asn", asn), + ("billing_email", billing_email), + ("ddos_provider", ddos_provider), + ("description", description), + ("enforce_mfa", enforce_mfa), + ("enforce_sso", enforce_sso), + ("enforce_verified_domain", enforce_verified_domain), + ("name", name), + ("provider_logo_url", provider_logo_url), + ("provider_website_url", provider_website_url), + ("social_accounts_json", social_accounts_json), + ("support_email", support_email), + ("support_phone", support_phone), + ("tax_id", tax_id), + ("vat_id", vat_id), + ), + idempotent=False, + timeout=timeout, + ) + + +class PaymentMethodService(_Service): + """The NodeRings PaymentMethodService API.""" + + def attach_payment_method( + self, + *, + create_setup_intent: bool | None = None, + metadata: dict[str, Any] | None = None, + payment_method_id: str | None = None, + payment_method_token: str | None = None, + set_as_default: bool | None = None, + setup_intent_id: str | None = None, + subscription_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ValidateNodeTopologyResponse: + ) -> m.AttachPaymentMethodResponse: """ - Dedicated CPU cores: parse-preview of a topology paste without persisting. + Attach a payment method to a subscription/organization Works for both providers (platform + subscriptions) and clients (provider plan subscriptions) Authorization: Check organization + type and rule engine (subscription.payment_method.manage.enabled) - It calls ``POST /v1/node/topology/validate``. + It calls ``POST /v1/payment-methods``. Args: - node_id: Optional node to cross-check the paste against (edit flow). When set, the parsed totals are compared with the node's Proxmox-reported CPU inventory (metadata.proxmox_cpu) and mismatches are returned as warnings. - topology_paste: Raw topology paste to validate without persisting. + create_setup_intent: Create an off-session SetupIntent and return its client secret. The browser confirms the card, then calls again with setup_intent_id. + metadata: Optional: custom metadata + payment_method_id: Payment method details. Provide one of: payment_method_id, payment_method_token, setup_intent_id, or create_setup_intent. Optional: Payment method ID (if using existing) + payment_method_token: Optional: Payment method token from frontend (Stripe.js, PayPal SDK) + set_as_default: Whether to set as default payment method + setup_intent_id: Confirmed SetupIntent (seti_...) after the browser finishes 3D Secure. + subscription_id: Subscription reference (required for client subscriptions to provider plans) For provider platform subscriptions, subscription_id is required """ return self._client._call( "POST", - "/v1/node/topology/validate", - m.ValidateNodeTopologyResponse, + "/v1/payment-methods", + m.AttachPaymentMethodResponse, query=_query(extra_query), body=_body( - m.ValidateNodeTopologyRequest, + m.AttachPaymentMethodRequest, extra_body, False, - ("node_id", node_id), - ("topology_paste", topology_paste), + ("create_setup_intent", create_setup_intent), + ("metadata", metadata), + ("payment_method_id", payment_method_id), + ("payment_method_token", payment_method_token), + ("set_as_default", set_as_default), + ("setup_intent_id", setup_intent_id), + ("subscription_id", subscription_id), ), idempotent=False, timeout=timeout, ) - -class OAuth2Service(_Service): - """The NodeRings OAuth2Service API.""" - - def authorize( + def list_payment_methods( self, *, - client_id: str | None = None, - response_type: str | None = None, - redirect_uri: str | None = None, - scope: str | None = None, - state: str | None = None, - code_challenge: str | None = None, - code_challenge_method: str | None = None, + subscription_id: str | None = None, + only_default: bool | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.AuthorizeResponse: + ) -> m.ListPaymentMethodsResponse: """ - Authorize initiates the OAuth2 authorization flow + List payment methods for an organization/subscription Returns payment method details (type, + last4, brand, expiry, is_default) - It calls ``GET /v1/oauth2/authorize``. + It calls ``GET /v1/payment-methods``. Args: - state: CSRF protection - code_challenge: PKCE challenge - code_challenge_method: Only S256, not plain + subscription_id: Filters Filter by subscription + only_default: Only return default payment method + page: Pagination """ return self._client._call( "GET", - "/v1/oauth2/authorize", - m.AuthorizeResponse, + "/v1/payment-methods", + m.ListPaymentMethodsResponse, query=_query( extra_query, - ("clientId", client_id), - ("responseType", response_type), - ("redirectUri", redirect_uri), - ("scope", scope), - ("state", state), - ("codeChallenge", code_challenge), - ("codeChallengeMethod", code_challenge_method), + ("subscriptionId", subscription_id), + ("onlyDefault", only_default), + ("page", page), + ("pageSize", page_size), ), body=None, idempotent=False, timeout=timeout, ) - def create_client( + def list_payment_methods_all( self, *, - client_type: str | None = None, - description: str | None = None, - name: str | None = None, - redirect_uris: list[str] | None = None, - requires_pkce: bool | None = None, - scopes: list[str] | None = None, + subscription_id: str | None = None, + only_default: bool | None = None, + page: int | None = None, + page_size: int | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> Iterator[m.PaymentMethod]: + """ + Every result of :meth:`list_payment_methods`, reading page after page. + + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_payment_methods( + page=page, + page_size=size, + subscription_id=subscription_id, + only_default=only_default, + extra_query=extra_query, + timeout=timeout, + ) + items = res.payment_methods + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + def remove_payment_method( + self, + payment_method_id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.RemovePaymentMethodResponse: + """ + Remove a payment method + Validation: + - Providers: Cannot remove if only one method exists (except on free plan) + - Clients: Cannot remove if only one method exists + - Cannot remove if payment method is currently in use for active + subscriptions + + It calls ``DELETE /v1/payment-methods/{paymentMethodId}``. + """ + return self._client._call( + "DELETE", + f"/v1/payment-methods/{_path(payment_method_id)}", + m.RemovePaymentMethodResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + def set_default_payment_method( + self, + payment_method_id: str, + *, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateOAuth2ClientResponse: + ) -> m.SetDefaultPaymentMethodResponse: """ - CreateClient creates a new OAuth2 client + Set a payment method as the default payment method Validates payment method belongs to + organization/subscription - It calls ``POST /v1/oauth2/clients``. + It calls ``POST /v1/payment-methods/{paymentMethodId}:set-default``. """ return self._client._call( "POST", - "/v1/oauth2/clients", - m.CreateOAuth2ClientResponse, + f"/v1/payment-methods/{_path(payment_method_id)}:set-default", + m.SetDefaultPaymentMethodResponse, query=_query(extra_query), - body=_body( - m.CreateOAuth2ClientRequest, - extra_body, - False, - ("client_type", client_type), - ("description", description), - ("name", name), - ("redirect_uris", redirect_uris), - ("requires_pkce", requires_pkce), - ("scopes", scopes), - ), + body=_body(m.SetDefaultPaymentMethodBody, extra_body, False), idempotent=False, timeout=timeout, ) - def delete_client( + +class PaymentService(_Service): + """The NodeRings PaymentService API.""" + + def get_payment( self, - client_id: str, + payment_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> m.GetPaymentResponse: """ - DeleteClient deletes an OAuth2 client + GetPayment retrieves a single payment with refunds - It calls ``DELETE /v1/oauth2/clients/{clientId}``. + It calls ``GET /v1/payments/{paymentId}``. """ return self._client._call( - "DELETE", - f"/v1/oauth2/clients/{_path(client_id)}", - m.SuccessResponse, + "GET", + f"/v1/payments/{_path(payment_id)}", + m.GetPaymentResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_clients( + def list_payments( self, *, + invoice_id: str | None = None, + status: m.PaymentStatus | str | None = None, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListOAuth2ClientsResponse: + ) -> m.ListPaymentsResponse: """ - ListClients lists OAuth2 clients for the organization + ListPayments lists payments for an invoice or organization - It calls ``GET /v1/oauth2/clients``. + It calls ``GET /v1/payments``. """ return self._client._call( "GET", - "/v1/oauth2/clients", - m.ListOAuth2ClientsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "/v1/payments", + m.ListPaymentsResponse, + query=_query( + extra_query, ("invoiceId", invoice_id), ("status", status), ("page", page), ("pageSize", page_size) + ), body=None, idempotent=False, timeout=timeout, ) - def list_clients_all( + def list_payments_all( self, *, + invoice_id: str | None = None, + status: m.PaymentStatus | str | None = None, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.OAuth2Client]: + ) -> Iterator[m.Payment]: """ - Every result of :meth:`list_clients`, reading page after page. + Every result of :meth:`list_payments`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -8951,8 +8720,15 @@ def list_clients_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_clients(page=page, page_size=size, extra_query=extra_query, timeout=timeout) - items = res.clients + res = self.list_payments( + page=page, + page_size=size, + invoice_id=invoice_id, + status=status, + extra_query=extra_query, + timeout=timeout, + ) + items = res.payments for item in items: yield item seen += len(items) @@ -8960,235 +8736,158 @@ def list_clients_all( return page += 1 - def refresh_token( - self, - *, - client_id: str | None = None, - client_secret: str | None = None, - refresh_token: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.TokenResponse: - """ - RefreshToken exchanges refresh token for new access token - - It calls ``POST /v1/oauth2/refresh``. - Args: - client_secret: Optional for public clients - """ - return self._client._call( - "POST", - "/v1/oauth2/refresh", - m.TokenResponse, - query=_query(extra_query), - body=_body( - m.RefreshTokenRequest, - extra_body, - False, - ("client_id", client_id), - ("client_secret", client_secret), - ("refresh_token", refresh_token), - ), - idempotent=False, - timeout=timeout, - ) +class PayoutConfigurationService(_Service): + """The NodeRings PayoutConfigurationService API.""" - def revoke_token( + def get_payout_configuration( self, *, - client_id: str | None = None, - token: str | None = None, - token_type_hint: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - RevokeToken revokes an access or refresh token - - It calls ``POST /v1/oauth2/revoke``. - - Args: - token_type_hint: "access_token" or "refresh_token" - """ + ) -> m.GetPayoutConfigurationResponse: + """Call ``GET /v1/provider/payout-configuration``.""" return self._client._call( - "POST", - "/v1/oauth2/revoke", - m.SuccessResponse, + "GET", + "/v1/provider/payout-configuration", + m.GetPayoutConfigurationResponse, query=_query(extra_query), - body=_body( - m.RevokeTokenRequest, - extra_body, - False, - ("client_id", client_id), - ("token", token), - ("token_type_hint", token_type_hint), - ), + body=None, idempotent=False, timeout=timeout, ) - def token( + def update_payout_configuration( self, *, - client_id: str | None = None, - client_secret: str | None = None, - code: str | None = None, - code_verifier: str | None = None, - grant_type: str | None = None, - redirect_uri: str | None = None, - refresh_token: str | None = None, + enabled: bool | None = None, + schedule_time: str | None = None, + schedule_timezone: str | None = None, + schedule_type: m.PayoutScheduleType | str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.TokenResponse: + ) -> m.GetPayoutConfigurationResponse: """ - Token exchanges authorization code for access token - - It calls ``POST /v1/oauth2/token``. + Call ``PUT /v1/provider/payout-configuration``. Args: - client_secret: Optional for public clients - code: Required for authorization_code grant - code_verifier: Required for PKCE - redirect_uri: Required for authorization_code grant - refresh_token: Required for refresh_token grant + enabled: Whether to enable/disable payout configuration + schedule_time: Required for daily/weekly/monthly, ignored for immediate. Format: HH:MM (24-hour) + schedule_timezone: IANA timezone - defaults to "UTC" + schedule_type: - PAYOUT_SCHEDULE_TYPE_IMMEDIATE: Transfer immediately when payment succeeds - PAYOUT_SCHEDULE_TYPE_DAILY: Transfer once per day at specified time - PAYOUT_SCHEDULE_TYPE_WEEKLY: Transfer once per week at specified time - PAYOUT_SCHEDULE_TYPE_MONTHLY: Transfer once per month at specified time """ return self._client._call( - "POST", - "/v1/oauth2/token", - m.TokenResponse, + "PUT", + "/v1/provider/payout-configuration", + m.GetPayoutConfigurationResponse, query=_query(extra_query), body=_body( - m.TokenRequest, + m.UpdatePayoutConfigurationRequest, extra_body, False, - ("client_id", client_id), - ("client_secret", client_secret), - ("code", code), - ("code_verifier", code_verifier), - ("grant_type", grant_type), - ("redirect_uri", redirect_uri), - ("refresh_token", refresh_token), + ("enabled", enabled), + ("schedule_time", schedule_time), + ("schedule_timezone", schedule_timezone), + ("schedule_type", schedule_type), ), idempotent=False, timeout=timeout, ) -class OrganizationService(_Service): - """The NodeRings OrganizationService API.""" - - def create_organization( - self, - *, - asn: int | None = None, - ddos_provider: str | None = None, - description: str | None = None, - hypervisor_driver: m.PlatformDriver | str | None = None, - name: str | None = None, - provider_logo_url: str | None = None, - provider_website_url: str | None = None, - type: m.OrganizationType | str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Call ``POST /v1/organizations``. - - Args: - ddos_provider: DDoS partner slug (e.g. none, in-house, gcore, akamai, voxility). Provider orgs only. - hypervisor_driver: - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver. - provider_website_url: Required for provider organizations (http/https; scheme optional in input: server normalizes). - """ - return self._client._call( - "POST", - "/v1/organizations", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.CreateOrganizationRequest, - extra_body, - False, - ("asn", asn), - ("ddos_provider", ddos_provider), - ("description", description), - ("hypervisor_driver", hypervisor_driver), - ("name", name), - ("provider_logo_url", provider_logo_url), - ("provider_website_url", provider_website_url), - ("type", type), - ), - idempotent=False, - timeout=timeout, - ) +class PayoutInvoiceService(_Service): + """The NodeRings PayoutInvoiceService API.""" - def delete_organization( + def get_payout_invoice( self, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/organizations``.""" + ) -> m.GetPayoutInvoiceResponse: + """Call ``GET /v1/provider/payout-invoices/{id}``.""" return self._client._call( - "DELETE", - "/v1/organizations", - m.SuccessResponse, + "GET", + f"/v1/provider/payout-invoices/{_path(id)}", + m.GetPayoutInvoiceResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_organization( + def get_provider_revenue( self, *, + start_date: datetime | None = None, + end_date: datetime | None = None, + plan_id: str | None = None, + client_organization_id: str | None = None, + include_pending: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetOrganizationResponse: - """Call ``GET /v1/organization``.""" + ) -> m.GetProviderRevenueResponse: + """ + Call ``GET /v1/provider/revenue``. + + Args: + start_date: Start date for revenue calculation (inclusive) + end_date: End date for revenue calculation (inclusive) + plan_id: Filter by plan ID (optional) + client_organization_id: Filter by client organization ID (optional) + include_pending: Include pending/processing payouts in calculations (default: true) + """ return self._client._call( "GET", - "/v1/organization", - m.GetOrganizationResponse, - query=_query(extra_query), + "/v1/provider/revenue", + m.GetProviderRevenueResponse, + query=_query( + extra_query, + ("startDate", start_date), + ("endDate", end_date), + ("planId", plan_id), + ("clientOrganizationId", client_organization_id), + ("includePending", include_pending), + ), body=None, idempotent=False, timeout=timeout, ) - def list_organizations( + def list_held_payouts( self, *, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListOrganizationsResponse: - """Call ``GET /v1/organizations``.""" + ) -> m.ListHeldPayoutsResponse: + """ + Paid client invoices whose payout to this provider is on hold, soonest release first. + + It calls ``GET /v1/provider/held-payouts``. + """ return self._client._call( "GET", - "/v1/organizations", - m.ListOrganizationsResponse, + "/v1/provider/held-payouts", + m.ListHeldPayoutsResponse, query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def list_organizations_all( + def list_held_payouts_all( self, *, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Organization]: + ) -> Iterator[m.HeldPayout]: """ - Every result of :meth:`list_organizations`, reading page after page. + Every result of :meth:`list_held_payouts`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -9196,8 +8895,8 @@ def list_organizations_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_organizations(page=page, page_size=size, extra_query=extra_query, timeout=timeout) - items = res.organizations + res = self.list_held_payouts(page=page, page_size=size, extra_query=extra_query, timeout=timeout) + items = res.held_payouts for item in items: yield item seen += len(items) @@ -9205,184 +8904,143 @@ def list_organizations_all( return page += 1 - def update_organization( + def list_payout_invoices( self, *, - account_holder_name: str | None = None, - address: str | None = None, - address_city: str | None = None, - address_country: str | None = None, - address_line_1: str | None = None, - address_line_2: str | None = None, - address_postcode: str | None = None, - address_region: str | None = None, - asn: int | None = None, - billing_email: str | None = None, - ddos_provider: str | None = None, - description: str | None = None, - enforce_mfa: bool | None = None, - enforce_sso: bool | None = None, - enforce_verified_domain: bool | None = None, - name: str | None = None, - provider_logo_url: str | None = None, - provider_website_url: str | None = None, - social_accounts_json: str | None = None, - support_email: str | None = None, - support_phone: str | None = None, - tax_id: str | None = None, - vat_id: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + status: m.PayoutStatus | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateOrganizationResponse: + ) -> m.ListPayoutInvoicesResponse: """ - Call ``PATCH /v1/organizations``. + Call ``GET /v1/provider/payout-invoices``. Args: - address_country: ISO 3166-1 alpha-2 (e.g. US, DE). - social_accounts_json: JSON array of up to 4 objects: [{"platform":"x","url":"https://..."}, ...]. platform must be one of: x, linkedin, instagram, facebook (Facebook/Meta). + status: Filter by payout status """ return self._client._call( - "PATCH", - "/v1/organizations", - m.UpdateOrganizationResponse, - query=_query(extra_query), - body=_body( - m.UpdateOrganizationRequest, - extra_body, - False, - ("account_holder_name", account_holder_name), - ("address", address), - ("address_city", address_city), - ("address_country", address_country), - ("address_line_1", address_line_1), - ("address_line_2", address_line_2), - ("address_postcode", address_postcode), - ("address_region", address_region), - ("asn", asn), - ("billing_email", billing_email), - ("ddos_provider", ddos_provider), - ("description", description), - ("enforce_mfa", enforce_mfa), - ("enforce_sso", enforce_sso), - ("enforce_verified_domain", enforce_verified_domain), - ("name", name), - ("provider_logo_url", provider_logo_url), - ("provider_website_url", provider_website_url), - ("social_accounts_json", social_accounts_json), - ("support_email", support_email), - ("support_phone", support_phone), - ("tax_id", tax_id), - ("vat_id", vat_id), - ), + "GET", + "/v1/provider/payout-invoices", + m.ListPayoutInvoicesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("status", status)), + body=None, idempotent=False, timeout=timeout, ) - -class PaymentMethodService(_Service): - """The NodeRings PaymentMethodService API.""" - - def attach_payment_method( + def list_payout_invoices_all( self, *, - create_setup_intent: bool | None = None, - metadata: dict[str, Any] | None = None, - payment_method_id: str | None = None, - payment_method_token: str | None = None, - set_as_default: bool | None = None, - setup_intent_id: str | None = None, - subscription_id: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + status: m.PayoutStatus | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.AttachPaymentMethodResponse: + ) -> Iterator[m.PayoutInvoice]: """ - Attach a payment method to a subscription/organization Works for both providers (platform - subscriptions) and clients (provider plan subscriptions) Authorization: Check organization - type and rule engine (subscription.payment_method.manage.enabled) - - It calls ``POST /v1/payment-methods``. + Every result of :meth:`list_payout_invoices`, reading page after page. - Args: - create_setup_intent: Create an off-session SetupIntent and return its client secret. The browser confirms the card, then calls again with setup_intent_id. - metadata: Optional: custom metadata - payment_method_id: Payment method details. Provide one of: payment_method_id, payment_method_token, setup_intent_id, or create_setup_intent. Optional: Payment method ID (if using existing) - payment_method_token: Optional: Payment method token from frontend (Stripe.js, PayPal SDK) - set_as_default: Whether to set as default payment method - setup_intent_id: Confirmed SetupIntent (seti_...) after the browser finishes 3D Secure. - subscription_id: Subscription reference (required for client subscriptions to provider plans) For provider platform subscriptions, subscription_id is required + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_payout_invoices( + page=page, + page_size=size, + status=status, + extra_query=extra_query, + timeout=timeout, + ) + items = res.payout_invoices + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + +class PermissionService(_Service): + """The NodeRings PermissionService API.""" + + def assign_permission_to_role( + self, + *, + permission_ids: list[str] | None = None, + role_id: str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``POST /v1/permissions/assign-to-role``.""" return self._client._call( "POST", - "/v1/payment-methods", - m.AttachPaymentMethodResponse, + "/v1/permissions/assign-to-role", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.AttachPaymentMethodRequest, + m.AssignPermissionToRoleRequest, extra_body, False, - ("create_setup_intent", create_setup_intent), - ("metadata", metadata), - ("payment_method_id", payment_method_id), - ("payment_method_token", payment_method_token), - ("set_as_default", set_as_default), - ("setup_intent_id", setup_intent_id), - ("subscription_id", subscription_id), + ("permission_ids", permission_ids), + ("role_id", role_id), ), idempotent=False, timeout=timeout, ) - def list_payment_methods( + def list_effective_permissions( + self, + *, + user_ids: list[str] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.ListEffectivePermissionsResponse: + """Call ``GET /v1/permissions/effective``.""" + return self._client._call( + "GET", + "/v1/permissions/effective", + m.ListEffectivePermissionsResponse, + query=_query(extra_query, ("userIds", user_ids)), + body=None, + idempotent=False, + timeout=timeout, + ) + + def list_permissions( self, *, - subscription_id: str | None = None, - only_default: bool | None = None, page: int | None = None, page_size: int | None = None, + filter_name: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPaymentMethodsResponse: - """ - List payment methods for an organization/subscription Returns payment method details (type, - last4, brand, expiry, is_default) - - It calls ``GET /v1/payment-methods``. - - Args: - subscription_id: Filters Filter by subscription - only_default: Only return default payment method - page: Pagination - """ + ) -> m.ListPermissionsResponse: + """Call ``GET /v1/permissions``.""" return self._client._call( "GET", - "/v1/payment-methods", - m.ListPaymentMethodsResponse, - query=_query( - extra_query, - ("subscriptionId", subscription_id), - ("onlyDefault", only_default), - ("page", page), - ("pageSize", page_size), - ), + "/v1/permissions", + m.ListPermissionsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterName", filter_name)), body=None, idempotent=False, timeout=timeout, ) - def list_payment_methods_all( + def list_permissions_all( self, *, - subscription_id: str | None = None, - only_default: bool | None = None, page: int | None = None, page_size: int | None = None, + filter_name: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.PaymentMethod]: + ) -> Iterator[m.Permission]: """ - Every result of :meth:`list_payment_methods`, reading page after page. + Every result of :meth:`list_permissions`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -9390,15 +9048,14 @@ def list_payment_methods_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_payment_methods( + res = self.list_permissions( page=page, page_size=size, - subscription_id=subscription_id, - only_default=only_default, + filter_name=filter_name, extra_query=extra_query, timeout=timeout, ) - items = res.payment_methods + items = res.permissions for item in items: yield item seen += len(items) @@ -9406,122 +9063,94 @@ def list_payment_methods_all( return page += 1 - def remove_payment_method( + def remove_permission_from_role( self, - payment_method_id: str, *, + permission_ids: list[str] | None = None, + role_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RemovePaymentMethodResponse: - """ - Remove a payment method - Validation: - - Providers: Cannot remove if only one method exists (except on free plan) - - Clients: Cannot remove if only one method exists - - Cannot remove if payment method is currently in use for active - subscriptions - - It calls ``DELETE /v1/payment-methods/{paymentMethodId}``. - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/permissions/remove-from-role``.""" return self._client._call( "DELETE", - f"/v1/payment-methods/{_path(payment_method_id)}", - m.RemovePaymentMethodResponse, - query=_query(extra_query), + "/v1/permissions/remove-from-role", + m.SuccessResponse, + query=_query(extra_query, ("permissionIds", permission_ids), ("roleId", role_id)), body=None, idempotent=False, timeout=timeout, ) - def set_default_payment_method( + +class PlanService(_Service): + """The NodeRings PlanService API.""" + + def list_plans( self, - payment_method_id: str, *, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + is_template: bool | None = None, + end_user: m.EndUser | str | None = None, + search: str | None = None, + asset_type: m.AssetType | str | None = None, + billing_type: m.BillingType | str | None = None, + filter_compute_type: str | None = None, + filter_code: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SetDefaultPaymentMethodResponse: + ) -> m.ListPlansResponse: """ - Set a payment method as the default payment method Validates payment method belongs to - organization/subscription - - It calls ``POST /v1/payment-methods/{paymentMethodId}:set-default``. - """ - return self._client._call( - "POST", - f"/v1/payment-methods/{_path(payment_method_id)}:set-default", - m.SetDefaultPaymentMethodResponse, - query=_query(extra_query), - body=_body(m.SetDefaultPaymentMethodBody, extra_body, False), - idempotent=False, - timeout=timeout, - ) - - -class PaymentService(_Service): - """The NodeRings PaymentService API.""" - - def get_payment( - self, - payment_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetPaymentResponse: - """ - GetPayment retrieves a single payment with refunds - - It calls ``GET /v1/payments/{paymentId}``. - """ - return self._client._call( - "GET", - f"/v1/payments/{_path(payment_id)}", - m.GetPaymentResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def list_payments( - self, - *, - invoice_id: str | None = None, - status: m.PaymentStatus | str | None = None, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListPaymentsResponse: - """ - ListPayments lists payments for an invoice or organization + Call ``GET /v1/plans``. - It calls ``GET /v1/payments``. + Args: + is_template: Filter to show only template plans (true) or only non-template plans (false) If not specified, shows both template and non-template plans + end_user: Filter by end user type (client, provider, or all) If not specified, shows plans for all end user types based on organization permissions + search: Search filter for plan name, code, or description + asset_type: Filter by asset type (vm, gameserver, etc.) + billing_type: Filter by billing type (subscription, usage, etc.) If not specified, shows plans for all billing types - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) + filter_compute_type: Filter by compute type (optional). If provided, only plans with matching compute type in their name are returned. Examples: "high performance", "high frequency", "general compute", "general purpose", "cpu optimized", "memory optimized", "storage optimized" Filtering is case-insensitive. + filter_code: Filter by plan code (optional). If provided, only plans with matching code are returned. Filtering is case-insensitive. Examples: "SC-GC-1C-1G-20", "DC-HF-4C-8G-160" Filtering is case-insensitive. """ return self._client._call( "GET", - "/v1/payments", - m.ListPaymentsResponse, + "/v1/plans", + m.ListPlansResponse, query=_query( - extra_query, ("invoiceId", invoice_id), ("status", status), ("page", page), ("pageSize", page_size) + extra_query, + ("page", page), + ("pageSize", page_size), + ("isTemplate", is_template), + ("endUser", end_user), + ("search", search), + ("assetType", asset_type), + ("billingType", billing_type), + ("filterComputeType", filter_compute_type), + ("filterCode", filter_code), ), body=None, idempotent=False, timeout=timeout, ) - def list_payments_all( + def list_plans_all( self, *, - invoice_id: str | None = None, - status: m.PaymentStatus | str | None = None, page: int | None = None, page_size: int | None = None, + is_template: bool | None = None, + end_user: m.EndUser | str | None = None, + search: str | None = None, + asset_type: m.AssetType | str | None = None, + billing_type: m.BillingType | str | None = None, + filter_compute_type: str | None = None, + filter_code: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Payment]: + ) -> Iterator[m.Plan]: """ - Every result of :meth:`list_payments`, reading page after page. + Every result of :meth:`list_plans`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -9529,15 +9158,20 @@ def list_payments_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_payments( + res = self.list_plans( page=page, page_size=size, - invoice_id=invoice_id, - status=status, + is_template=is_template, + end_user=end_user, + search=search, + asset_type=asset_type, + billing_type=billing_type, + filter_compute_type=filter_compute_type, + filter_code=filter_code, extra_query=extra_query, timeout=timeout, ) - items = res.payments + items = res.plans for item in items: yield item seen += len(items) @@ -9545,210 +9179,173 @@ def list_payments_all( return page += 1 + def subscribe( + self, + plan_id: str, + *, + billing_period: m.BillingPeriod | str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SubscribeResponse: + """ + Call ``POST /v1/plans/{planId}:subscribe``. -class PayoutConfigurationService(_Service): - """The NodeRings PayoutConfigurationService API.""" + Args: + billing_period: Optional billing period. If not provided, uses the plan's default billing period. If provided, validates that a PlanPrice exists for this billing period. If not available, returns a FailedPrecondition error. + """ + return self._client._call( + "POST", + f"/v1/plans/{_path(plan_id)}:subscribe", + m.SubscribeResponse, + query=_query(extra_query, ("billingPeriod", billing_period)), + body=None, + idempotent=False, + timeout=timeout, + ) - def get_payout_configuration( + +class PlatformService(_Service): + """The NodeRings PlatformService API.""" + + def assign_agent( self, + platform_id: str, *, + agent_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPayoutConfigurationResponse: - """Call ``GET /v1/provider/payout-configuration``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/platforms/{platformId}:AssignAgent``.""" return self._client._call( - "GET", - "/v1/provider/payout-configuration", - m.GetPayoutConfigurationResponse, + "POST", + f"/v1/platforms/{_path(platform_id)}:AssignAgent", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.AssignAgentBody, extra_body, False, ("agent_id", agent_id)), idempotent=False, timeout=timeout, ) - def update_payout_configuration( + def create_platform( self, *, - enabled: bool | None = None, - schedule_time: str | None = None, - schedule_timezone: str | None = None, - schedule_type: m.PayoutScheduleType | str | None = None, + agent_id: str | None = None, + assign_customer_ipv6: bool | None = None, + driver: m.PlatformDriver | str | None = None, + endpoint_url: str | None = None, + name: str | None = None, + panel_url: str | None = None, + pterodactyl: bool | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPayoutConfigurationResponse: + ) -> m.SuccessResponse: """ - Call ``PUT /v1/provider/payout-configuration``. + Call ``POST /v1/platform``. Args: - enabled: Whether to enable/disable payout configuration - schedule_time: Required for daily/weekly/monthly, ignored for immediate. Format: HH:MM (24-hour) - schedule_timezone: IANA timezone - defaults to "UTC" - schedule_type: - PAYOUT_SCHEDULE_TYPE_IMMEDIATE: Transfer immediately when payment succeeds - PAYOUT_SCHEDULE_TYPE_DAILY: Transfer once per day at specified time - PAYOUT_SCHEDULE_TYPE_WEEKLY: Transfer once per week at specified time - PAYOUT_SCHEDULE_TYPE_MONTHLY: Transfer once per month at specified time + assign_customer_ipv6: VirtFusion/SolusVM only. Rejected when the org driver is Proxmox. + driver: - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver. + panel_url: Panel base URL. Required when pterodactyl is true. A bare IP is stored as http://ip. + pterodactyl: When true, this platform is Pterodactyl. A hypervisor driver is not required. """ return self._client._call( - "PUT", - "/v1/provider/payout-configuration", - m.GetPayoutConfigurationResponse, + "POST", + "/v1/platform", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.UpdatePayoutConfigurationRequest, + m.CreatePlatformRequest, extra_body, False, - ("enabled", enabled), - ("schedule_time", schedule_time), - ("schedule_timezone", schedule_timezone), - ("schedule_type", schedule_type), + ("agent_id", agent_id), + ("assign_customer_ipv6", assign_customer_ipv6), + ("driver", driver), + ("endpoint_url", endpoint_url), + ("name", name), + ("panel_url", panel_url), + ("pterodactyl", pterodactyl), ), idempotent=False, timeout=timeout, ) - -class PayoutInvoiceService(_Service): - """The NodeRings PayoutInvoiceService API.""" - - def get_payout_invoice( + def delete_platform( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPayoutInvoiceResponse: - """Call ``GET /v1/provider/payout-invoices/{id}``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/platform/{id}``.""" return self._client._call( - "GET", - f"/v1/provider/payout-invoices/{_path(id)}", - m.GetPayoutInvoiceResponse, + "DELETE", + f"/v1/platform/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_provider_revenue( + def get_platform( self, + id: str, *, - start_date: datetime | None = None, - end_date: datetime | None = None, - plan_id: str | None = None, - client_organization_id: str | None = None, - include_pending: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderRevenueResponse: - """ - Call ``GET /v1/provider/revenue``. - - Args: - start_date: Start date for revenue calculation (inclusive) - end_date: End date for revenue calculation (inclusive) - plan_id: Filter by plan ID (optional) - client_organization_id: Filter by client organization ID (optional) - include_pending: Include pending/processing payouts in calculations (default: true) - """ + ) -> m.GetPlatformResponse: + """Call ``GET /v1/platform/{id}``.""" return self._client._call( "GET", - "/v1/provider/revenue", - m.GetProviderRevenueResponse, - query=_query( - extra_query, - ("startDate", start_date), - ("endDate", end_date), - ("planId", plan_id), - ("clientOrganizationId", client_organization_id), - ("includePending", include_pending), - ), + f"/v1/platform/{_path(id)}", + m.GetPlatformResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_held_payouts( + def list_platforms( self, *, page: int | None = None, page_size: int | None = None, + service_status: m.ServiceStatus | str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListHeldPayoutsResponse: - """ - Paid client invoices whose payout to this provider is on hold, soonest release first. - - It calls ``GET /v1/provider/held-payouts``. - """ + ) -> m.ListPlatformsResponse: + """Call ``GET /v1/platforms``.""" return self._client._call( "GET", - "/v1/provider/held-payouts", - m.ListHeldPayoutsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), - body=None, - idempotent=False, - timeout=timeout, - ) - - def list_held_payouts_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.HeldPayout]: - """ - Every result of :meth:`list_held_payouts`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_held_payouts(page=page, page_size=size, extra_query=extra_query, timeout=timeout) - items = res.held_payouts - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - def list_payout_invoices( - self, - *, - page: int | None = None, - page_size: int | None = None, - status: m.PayoutStatus | str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListPayoutInvoicesResponse: - """ - Call ``GET /v1/provider/payout-invoices``. - - Args: - status: Filter by payout status - """ - return self._client._call( - "GET", - "/v1/provider/payout-invoices", - m.ListPayoutInvoicesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("status", status)), + "/v1/platforms", + m.ListPlatformsResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("serviceStatus", service_status), + ("search", search), + ), body=None, idempotent=False, timeout=timeout, ) - def list_payout_invoices_all( + def list_platforms_all( self, *, page: int | None = None, page_size: int | None = None, - status: m.PayoutStatus | str | None = None, + service_status: m.ServiceStatus | str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.PayoutInvoice]: + ) -> Iterator[m.Platform]: """ - Every result of :meth:`list_payout_invoices`, reading page after page. + Every result of :meth:`list_platforms`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -9756,14 +9353,15 @@ def list_payout_invoices_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_payout_invoices( + res = self.list_platforms( page=page, page_size=size, - status=status, + service_status=service_status, + search=search, extra_query=extra_query, timeout=timeout, ) - items = res.payout_invoices + items = res.platforms for item in items: yield item seen += len(items) @@ -9771,85 +9369,107 @@ def list_payout_invoices_all( return page += 1 - -class PermissionService(_Service): - """The NodeRings PermissionService API.""" - - def assign_permission_to_role( + def unassign_agent( self, + platform_id: str, *, - permission_ids: list[str] | None = None, - role_id: str | None = None, + agent_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/permissions/assign-to-role``.""" + """Call ``POST /v1/platforms/{platformId}:UnassignAgent``.""" return self._client._call( "POST", - "/v1/permissions/assign-to-role", + f"/v1/platforms/{_path(platform_id)}:UnassignAgent", m.SuccessResponse, query=_query(extra_query), - body=_body( - m.AssignPermissionToRoleRequest, - extra_body, - False, - ("permission_ids", permission_ids), - ("role_id", role_id), - ), + body=_body(m.UnassignAgentBody, extra_body, False, ("agent_id", agent_id)), idempotent=False, timeout=timeout, ) - def list_effective_permissions( + def update_platform( self, + id: str, *, - user_ids: list[str] | None = None, + assign_customer_ipv6: bool | None = None, + endpoint_url: str | None = None, + name: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListEffectivePermissionsResponse: - """Call ``GET /v1/permissions/effective``.""" + ) -> m.UpdatePlatformResponse: + """ + Call ``PATCH /v1/platform/{id}``. + + Args: + assign_customer_ipv6: VirtFusion/SolusVM only. Unset means leave unchanged. True is rejected for Proxmox. + endpoint_url: Immutable after create. Empty or equal to the stored URL is ignored; any other value is rejected. + """ return self._client._call( - "GET", - "/v1/permissions/effective", - m.ListEffectivePermissionsResponse, - query=_query(extra_query, ("userIds", user_ids)), - body=None, + "PATCH", + f"/v1/platform/{_path(id)}", + m.UpdatePlatformResponse, + query=_query(extra_query), + body=_body( + m.UpdatePlatformBody, + extra_body, + False, + ("assign_customer_ipv6", assign_customer_ipv6), + ("endpoint_url", endpoint_url), + ("name", name), + ), idempotent=False, timeout=timeout, ) - def list_permissions( + +class PreflightService(_Service): + """The NodeRings PreflightService API.""" + + def list_preflight_checks( self, *, + plan_code: str | None = None, + plan_id: str | None = None, + issues_only: bool | None = None, page: int | None = None, page_size: int | None = None, - filter_name: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPermissionsResponse: - """Call ``GET /v1/permissions``.""" + ) -> m.ListPreflightChecksResponse: + """Call ``GET /v1/provider/preflight-checks``.""" return self._client._call( "GET", - "/v1/permissions", - m.ListPermissionsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterName", filter_name)), + "/v1/provider/preflight-checks", + m.ListPreflightChecksResponse, + query=_query( + extra_query, + ("planCode", plan_code), + ("planId", plan_id), + ("issuesOnly", issues_only), + ("page", page), + ("pageSize", page_size), + ), body=None, idempotent=False, timeout=timeout, ) - def list_permissions_all( + def list_preflight_checks_all( self, *, + plan_code: str | None = None, + plan_id: str | None = None, + issues_only: bool | None = None, page: int | None = None, page_size: int | None = None, - filter_name: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Permission]: + ) -> Iterator[m.PlanPreflightView]: """ - Every result of :meth:`list_permissions`, reading page after page. + Every result of :meth:`list_preflight_checks`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -9857,14 +9477,16 @@ def list_permissions_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_permissions( + res = self.list_preflight_checks( page=page, page_size=size, - filter_name=filter_name, + plan_code=plan_code, + plan_id=plan_id, + issues_only=issues_only, extra_query=extra_query, timeout=timeout, ) - items = res.permissions + items = res.plans for item in items: yield item seen += len(items) @@ -9872,413 +9494,415 @@ def list_permissions_all( return page += 1 - def remove_permission_from_role( + +class ProviderConnectService(_Service): + """The NodeRings ProviderConnectService API.""" + + def complete_connect_oauth( self, *, - permission_ids: list[str] | None = None, - role_id: str | None = None, + code: str | None = None, + state: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/permissions/remove-from-role``.""" + ) -> m.CompleteConnectOAuthResponse: + """ + Completes Stripe Connect OAuth after Stripe redirects back with a code. + + It calls ``POST /v1/provider/connect/oauth:complete``. + """ return self._client._call( - "DELETE", - "/v1/permissions/remove-from-role", - m.SuccessResponse, - query=_query(extra_query, ("permissionIds", permission_ids), ("roleId", role_id)), - body=None, + "POST", + "/v1/provider/connect/oauth:complete", + m.CompleteConnectOAuthResponse, + query=_query(extra_query), + body=_body(m.CompleteConnectOAuthRequest, extra_body, False, ("code", code), ("state", state)), idempotent=False, timeout=timeout, ) - -class PlanService(_Service): - """The NodeRings PlanService API.""" - - def list_plans( + def create_connect_account( self, *, - page: int | None = None, - page_size: int | None = None, - is_template: bool | None = None, - end_user: m.EndUser | str | None = None, - search: str | None = None, - asset_type: m.AssetType | str | None = None, - billing_type: m.BillingType | str | None = None, - filter_compute_type: str | None = None, - filter_code: str | None = None, + country: str | None = None, + email: str | None = None, + metadata: dict[str, Any] | None = None, + type: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPlansResponse: + ) -> m.CreateConnectAccountResponse: """ - Call ``GET /v1/plans``. + Call ``POST /v1/provider/connect/account``. Args: - is_template: Filter to show only template plans (true) or only non-template plans (false) If not specified, shows both template and non-template plans - end_user: Filter by end user type (client, provider, or all) If not specified, shows plans for all end user types based on organization permissions - search: Search filter for plan name, code, or description - asset_type: Filter by asset type (vm, gameserver, etc.) - billing_type: Filter by billing type (subscription, usage, etc.) If not specified, shows plans for all billing types - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) - filter_compute_type: Filter by compute type (optional). If provided, only plans with matching compute type in their name are returned. Examples: "high performance", "high frequency", "general compute", "general purpose", "cpu optimized", "memory optimized", "storage optimized" Filtering is case-insensitive. - filter_code: Filter by plan code (optional). If provided, only plans with matching code are returned. Filtering is case-insensitive. Examples: "SC-GC-1C-1G-20", "DC-HF-4C-8G-160" Filtering is case-insensitive. + country: ISO country code (e.g., "US") + metadata: Optional: custom metadata + type: Account type: "standard", "express", "custom" (Stripe) or "merchant" (PayPal). Always "standard" for dispute resolution """ return self._client._call( - "GET", - "/v1/plans", - m.ListPlansResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("isTemplate", is_template), - ("endUser", end_user), - ("search", search), - ("assetType", asset_type), - ("billingType", billing_type), - ("filterComputeType", filter_compute_type), - ("filterCode", filter_code), + "POST", + "/v1/provider/connect/account", + m.CreateConnectAccountResponse, + query=_query(extra_query), + body=_body( + m.CreateConnectAccountRequest, + extra_body, + False, + ("country", country), + ("email", email), + ("metadata", metadata), + ("type", type), ), - body=None, idempotent=False, timeout=timeout, ) - def list_plans_all( + def create_connect_tax_registration( self, *, - page: int | None = None, - page_size: int | None = None, - is_template: bool | None = None, - end_user: m.EndUser | str | None = None, - search: str | None = None, - asset_type: m.AssetType | str | None = None, - billing_type: m.BillingType | str | None = None, - filter_compute_type: str | None = None, - filter_code: str | None = None, + country: str | None = None, + registration_type: str | None = None, + state: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Plan]: + ) -> m.CreateConnectTaxRegistrationResponse: """ - Every result of :meth:`list_plans`, reading page after page. + Call ``POST /v1/provider/connect/tax-registrations``. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + Args: + registration_type: optional; defaults per country + state: required for US """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_plans( - page=page, - page_size=size, - is_template=is_template, - end_user=end_user, - search=search, - asset_type=asset_type, - billing_type=billing_type, - filter_compute_type=filter_compute_type, - filter_code=filter_code, - extra_query=extra_query, - timeout=timeout, - ) - items = res.plans - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + return self._client._call( + "POST", + "/v1/provider/connect/tax-registrations", + m.CreateConnectTaxRegistrationResponse, + query=_query(extra_query), + body=_body( + m.CreateConnectTaxRegistrationRequest, + extra_body, + False, + ("country", country), + ("registration_type", registration_type), + ("state", state), + ), + idempotent=False, + timeout=timeout, + ) - def subscribe( + def create_connect_tax_session( self, - plan_id: str, *, - billing_period: m.BillingPeriod | str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SubscribeResponse: + ) -> m.CreateConnectTaxSessionResponse: """ - Call ``POST /v1/plans/{planId}:subscribe``. + Creates a Stripe AccountSession client secret for Connect tax_settings / tax_registrations + embedded components (legacy; prefer native tax RPCs). - Args: - billing_period: Optional billing period. If not provided, uses the plan's default billing period. If provided, validates that a PlanPrice exists for this billing period. If not available, returns a FailedPrecondition error. + It calls ``POST /v1/provider/connect/tax-session``. """ return self._client._call( "POST", - f"/v1/plans/{_path(plan_id)}:subscribe", - m.SubscribeResponse, - query=_query(extra_query, ("billingPeriod", billing_period)), - body=None, + "/v1/provider/connect/tax-session", + m.CreateConnectTaxSessionResponse, + query=_query(extra_query), + body=dict(extra_body or {}), idempotent=False, timeout=timeout, ) - -class PlatformService(_Service): - """The NodeRings PlatformService API.""" - - def assign_agent( + def disconnect_connect_account( self, - platform_id: str, *, - agent_id: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/platforms/{platformId}:AssignAgent``.""" + """Call ``DELETE /v1/provider/connect/account``.""" return self._client._call( - "POST", - f"/v1/platforms/{_path(platform_id)}:AssignAgent", + "DELETE", + "/v1/provider/connect/account", m.SuccessResponse, query=_query(extra_query), - body=_body(m.AssignAgentBody, extra_body, False, ("agent_id", agent_id)), + body=None, idempotent=False, timeout=timeout, ) - def create_platform( + def expire_connect_tax_registration( self, + id: str, *, - agent_id: str | None = None, - assign_customer_ipv6: bool | None = None, - driver: m.PlatformDriver | str | None = None, - endpoint_url: str | None = None, - name: str | None = None, - panel_url: str | None = None, - pterodactyl: bool | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Call ``POST /v1/platform``. - - Args: - assign_customer_ipv6: VirtFusion/SolusVM only. Rejected when the org driver is Proxmox. - driver: - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver. - panel_url: Panel base URL. Required when pterodactyl is true. A bare IP is stored as http://ip. - pterodactyl: When true, this platform is Pterodactyl. A hypervisor driver is not required. - """ + ) -> m.ExpireConnectTaxRegistrationResponse: + """Call ``POST /v1/provider/connect/tax-registrations/{id}/expire``.""" return self._client._call( "POST", - "/v1/platform", - m.SuccessResponse, + f"/v1/provider/connect/tax-registrations/{_path(id)}/expire", + m.ExpireConnectTaxRegistrationResponse, query=_query(extra_query), - body=_body( - m.CreatePlatformRequest, - extra_body, - False, - ("agent_id", agent_id), - ("assign_customer_ipv6", assign_customer_ipv6), - ("driver", driver), - ("endpoint_url", endpoint_url), - ("name", name), - ("panel_url", panel_url), - ("pterodactyl", pterodactyl), - ), + body=_body(m.ExpireConnectTaxRegistrationBody, extra_body, False), idempotent=False, timeout=timeout, ) - def delete_platform( + def get_connect_account( self, - id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/platform/{id}``.""" + ) -> m.GetConnectAccountResponse: + """Call ``GET /v1/provider/connect/account``.""" return self._client._call( - "DELETE", - f"/v1/platform/{_path(id)}", - m.SuccessResponse, + "GET", + "/v1/provider/connect/account", + m.GetConnectAccountResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_platform( + def get_connect_tax_settings( self, - id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPlatformResponse: - """Call ``GET /v1/platform/{id}``.""" + ) -> m.GetConnectTaxSettingsResponse: + """Call ``GET /v1/provider/connect/tax-settings``.""" return self._client._call( "GET", - f"/v1/platform/{_path(id)}", - m.GetPlatformResponse, + "/v1/provider/connect/tax-settings", + m.GetConnectTaxSettingsResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_platforms( + def list_connect_tax_registrations( self, *, - page: int | None = None, - page_size: int | None = None, - service_status: m.ServiceStatus | str | None = None, - search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPlatformsResponse: - """Call ``GET /v1/platforms``.""" + ) -> m.ListConnectTaxRegistrationsResponse: + """Call ``GET /v1/provider/connect/tax-registrations``.""" return self._client._call( "GET", - "/v1/platforms", - m.ListPlatformsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("serviceStatus", service_status), - ("search", search), - ), + "/v1/provider/connect/tax-registrations", + m.ListConnectTaxRegistrationsResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_platforms_all( + def start_connect_oauth( self, *, - page: int | None = None, - page_size: int | None = None, - service_status: m.ServiceStatus | str | None = None, - search: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Platform]: + ) -> m.StartConnectOAuthResponse: """ - Every result of :meth:`list_platforms`, reading page after page. + Starts Stripe Connect OAuth so a provider can attach an existing Standard account. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + It calls ``POST /v1/provider/connect/oauth:start``. """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_platforms( - page=page, - page_size=size, - service_status=service_status, - search=search, - extra_query=extra_query, - timeout=timeout, - ) - items = res.platforms - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - def unassign_agent( - self, - platform_id: str, - *, - agent_id: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/platforms/{platformId}:UnassignAgent``.""" return self._client._call( "POST", - f"/v1/platforms/{_path(platform_id)}:UnassignAgent", - m.SuccessResponse, + "/v1/provider/connect/oauth:start", + m.StartConnectOAuthResponse, query=_query(extra_query), - body=_body(m.UnassignAgentBody, extra_body, False, ("agent_id", agent_id)), + body=_body(m.StartConnectOAuthRequest, extra_body, False), idempotent=False, timeout=timeout, ) - def update_platform( + def update_connect_tax_settings( self, - id: str, *, - assign_customer_ipv6: bool | None = None, - endpoint_url: str | None = None, - name: str | None = None, - extra_body: dict[str, Any] | None = None, + default_tax_behavior: str | None = None, + default_tax_code: str | None = None, + head_office: m.ConnectTaxAddress | dict[str, Any] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdatePlatformResponse: + ) -> m.UpdateConnectTaxSettingsResponse: """ - Call ``PATCH /v1/platform/{id}``. + Call ``PUT /v1/provider/connect/tax-settings``. Args: - assign_customer_ipv6: VirtFusion/SolusVM only. Unset means leave unchanged. True is rejected for Proxmox. - endpoint_url: Immutable after create. Empty or equal to the stored URL is ignored; any other value is rejected. + head_office: Structured address for Connect tax head office. """ return self._client._call( - "PATCH", - f"/v1/platform/{_path(id)}", - m.UpdatePlatformResponse, + "PUT", + "/v1/provider/connect/tax-settings", + m.UpdateConnectTaxSettingsResponse, query=_query(extra_query), body=_body( - m.UpdatePlatformBody, + m.UpdateConnectTaxSettingsRequest, extra_body, False, - ("assign_customer_ipv6", assign_customer_ipv6), - ("endpoint_url", endpoint_url), - ("name", name), + ("default_tax_behavior", default_tax_behavior), + ("default_tax_code", default_tax_code), + ("head_office", head_office), ), idempotent=False, timeout=timeout, ) -class PreflightService(_Service): - """The NodeRings PreflightService API.""" +class ProviderCustomerService(_Service): + """The NodeRings ProviderCustomerService API.""" - def list_preflight_checks( + def block_provider_customer_purchases( + self, + client_organization_id: str, + *, + message: str | None = None, + reason: m.ComplianceReason | str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """ + Call ``POST /v1/provider/customers/{clientOrganizationId}:block-purchases``. + + Args: + reason: Why a VM or purchase was seized/blocked. + """ + return self._client._call( + "POST", + f"/v1/provider/customers/{_path(client_organization_id)}:block-purchases", + m.SuccessResponse, + query=_query(extra_query), + body=_body( + m.BlockProviderCustomerPurchasesBody, extra_body, False, ("message", message), ("reason", reason) + ), + idempotent=False, + timeout=timeout, + ) + + def get_provider_customer( self, + client_organization_id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetProviderCustomerResponse: + """Call ``GET /v1/provider/customers/{clientOrganizationId}``.""" + return self._client._call( + "GET", + f"/v1/provider/customers/{_path(client_organization_id)}", + m.GetProviderCustomerResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + def get_provider_customer_billing( + self, + client_organization_id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetProviderCustomerBillingResponse: + """Call ``GET /v1/provider/customers/{clientOrganizationId}/billing``.""" + return self._client._call( + "GET", + f"/v1/provider/customers/{_path(client_organization_id)}/billing", + m.GetProviderCustomerBillingResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + def get_provider_customer_stats( + self, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetProviderCustomerStatsResponse: + """ + Path must not be `/customers/stats`: some gateways match + `/customers/{client_organization_id}` first and treat "stats" as a UUID field (validation + error). + + It calls ``GET /v1/provider/customer-stats``. + """ + return self._client._call( + "GET", + "/v1/provider/customer-stats", + m.GetProviderCustomerStatsResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + def list_provider_customer_assets( + self, + client_organization_id: str, *, - plan_code: str | None = None, - plan_id: str | None = None, - issues_only: bool | None = None, page: int | None = None, page_size: int | None = None, + search: str | None = None, + asset_type: m.ProviderCustomerAssetType | str | None = None, + activity_status: m.ProviderCustomerVMActivityStatus | str | None = None, + region_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPreflightChecksResponse: - """Call ``GET /v1/provider/preflight-checks``.""" + ) -> m.ListProviderCustomerAssetsResponse: + """ + Call ``GET /v1/provider/customers/{clientOrganizationId}/assets``. + + Args: + page_size: Same rules as ListProviderCustomers.page_size. + activity_status: When set (not UNSPECIFIED), only assets matching this activity status are returned. + region_id: When set to a non-empty UUID, only assets whose VM node is in this region are returned. + """ return self._client._call( "GET", - "/v1/provider/preflight-checks", - m.ListPreflightChecksResponse, + f"/v1/provider/customers/{_path(client_organization_id)}/assets", + m.ListProviderCustomerAssetsResponse, query=_query( extra_query, - ("planCode", plan_code), - ("planId", plan_id), - ("issuesOnly", issues_only), ("page", page), ("pageSize", page_size), + ("search", search), + ("assetType", asset_type), + ("activityStatus", activity_status), + ("regionId", region_id), ), body=None, idempotent=False, timeout=timeout, ) - def list_preflight_checks_all( + def list_provider_customer_assets_all( self, + client_organization_id: str, *, - plan_code: str | None = None, - plan_id: str | None = None, - issues_only: bool | None = None, page: int | None = None, page_size: int | None = None, + search: str | None = None, + asset_type: m.ProviderCustomerAssetType | str | None = None, + activity_status: m.ProviderCustomerVMActivityStatus | str | None = None, + region_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.PlanPreflightView]: + ) -> Iterator[m.ProviderCustomerAssetRow]: """ - Every result of :meth:`list_preflight_checks`, reading page after page. + Every result of :meth:`list_provider_customer_assets`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -10286,16 +9910,18 @@ def list_preflight_checks_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_preflight_checks( + res = self.list_provider_customer_assets( + client_organization_id, page=page, page_size=size, - plan_code=plan_code, - plan_id=plan_id, - issues_only=issues_only, + search=search, + asset_type=asset_type, + activity_status=activity_status, + region_id=region_id, extra_query=extra_query, timeout=timeout, ) - items = res.plans + items = res.assets for item in items: yield item seen += len(items) @@ -10303,415 +9929,435 @@ def list_preflight_checks_all( return page += 1 - -class ProviderConnectService(_Service): - """The NodeRings ProviderConnectService API.""" - - def complete_connect_oauth( + def list_provider_customers( self, *, - code: str | None = None, - state: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + search: str | None = None, + activity_filter: m.ProviderCustomerActivityFilter | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CompleteConnectOAuthResponse: + ) -> m.ListProviderCustomersResponse: """ - Completes Stripe Connect OAuth after Stripe redirects back with a code. + Call ``GET /v1/provider/customers``. - It calls ``POST /v1/provider/connect/oauth:complete``. + Args: + page: 0-based page (default 0). + page_size: -1 = all matches (no server row cap; prefer paginated 1..100 for large data sets). Otherwise 1..100 per page (see ListVirtualMachinesRequest). + search: Case-insensitive match on client organization name or any member email (owners/members via roles & groups). + activity_filter: Default / UNSPECIFIED means ALL (same as PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL). - PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL: All customers (any VM history with this provider, including when every VM is soft-deleted). """ return self._client._call( - "POST", - "/v1/provider/connect/oauth:complete", - m.CompleteConnectOAuthResponse, - query=_query(extra_query), - body=_body(m.CompleteConnectOAuthRequest, extra_body, False, ("code", code), ("state", state)), + "GET", + "/v1/provider/customers", + m.ListProviderCustomersResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("search", search), + ("activityFilter", activity_filter), + ), + body=None, idempotent=False, timeout=timeout, ) - def create_connect_account( + def list_provider_customers_all( self, *, - country: str | None = None, - email: str | None = None, - metadata: dict[str, Any] | None = None, - type: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + search: str | None = None, + activity_filter: m.ProviderCustomerActivityFilter | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateConnectAccountResponse: + ) -> Iterator[m.ProviderCustomerRow]: """ - Call ``POST /v1/provider/connect/account``. + Every result of :meth:`list_provider_customers`, reading page after page. - Args: - country: ISO country code (e.g., "US") - metadata: Optional: custom metadata - type: Account type: "standard", "express", "custom" (Stripe) or "merchant" (PayPal). Always "standard" for dispute resolution + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - return self._client._call( - "POST", - "/v1/provider/connect/account", - m.CreateConnectAccountResponse, - query=_query(extra_query), - body=_body( - m.CreateConnectAccountRequest, - extra_body, - False, - ("country", country), - ("email", email), - ("metadata", metadata), - ("type", type), - ), - idempotent=False, - timeout=timeout, - ) - - def create_connect_tax_registration( - self, - *, - country: str | None = None, - registration_type: str | None = None, - state: str | None = None, + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_provider_customers( + page=page, + page_size=size, + search=search, + activity_filter=activity_filter, + extra_query=extra_query, + timeout=timeout, + ) + items = res.customers + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + def restart_provider_customer_virtual_machine( + self, + client_organization_id: str, + virtual_machine_id: str, + *, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateConnectTaxRegistrationResponse: + ) -> m.VirtualMachine: """ - Call ``POST /v1/provider/connect/tax-registrations``. - - Args: - registration_type: optional; defaults per country - state: required for US + Call ``POST + /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:restart``. """ return self._client._call( "POST", - "/v1/provider/connect/tax-registrations", - m.CreateConnectTaxRegistrationResponse, + f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:restart", + m.VirtualMachine, query=_query(extra_query), - body=_body( - m.CreateConnectTaxRegistrationRequest, - extra_body, - False, - ("country", country), - ("registration_type", registration_type), - ("state", state), - ), + body=_body(m.RestartProviderCustomerVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) - def create_connect_tax_session( + def start_provider_customer_virtual_machine( self, + client_organization_id: str, + virtual_machine_id: str, *, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateConnectTaxSessionResponse: + ) -> m.VirtualMachine: """ - Creates a Stripe AccountSession client secret for Connect tax_settings / tax_registrations - embedded components (legacy; prefer native tax RPCs). - - It calls ``POST /v1/provider/connect/tax-session``. + Call ``POST + /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:start``. """ return self._client._call( "POST", - "/v1/provider/connect/tax-session", - m.CreateConnectTaxSessionResponse, + f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:start", + m.VirtualMachine, query=_query(extra_query), - body=dict(extra_body or {}), + body=_body(m.StartProviderCustomerVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) - def disconnect_connect_account( + def stop_provider_customer_virtual_machine( self, + client_organization_id: str, + virtual_machine_id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/provider/connect/account``.""" + ) -> m.VirtualMachine: + """ + Call ``POST + /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:stop``. + """ return self._client._call( - "DELETE", - "/v1/provider/connect/account", - m.SuccessResponse, + "POST", + f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:stop", + m.VirtualMachine, query=_query(extra_query), - body=None, + body=_body(m.StopProviderCustomerVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) - def expire_connect_tax_registration( + def suspend_provider_customer_virtual_machine( self, - id: str, + client_organization_id: str, + virtual_machine_id: str, *, + message: str | None = None, + reason: m.ComplianceReason | str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ExpireConnectTaxRegistrationResponse: - """Call ``POST /v1/provider/connect/tax-registrations/{id}/expire``.""" + ) -> m.VirtualMachine: + """ + Call ``POST + /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:suspend``. + + Args: + reason: Why a VM or purchase was seized/blocked. + """ return self._client._call( "POST", - f"/v1/provider/connect/tax-registrations/{_path(id)}/expire", - m.ExpireConnectTaxRegistrationResponse, + f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:suspend", + m.VirtualMachine, query=_query(extra_query), - body=_body(m.ExpireConnectTaxRegistrationBody, extra_body, False), + body=_body( + m.SuspendProviderCustomerVirtualMachineBody, extra_body, False, ("message", message), ("reason", reason) + ), idempotent=False, timeout=timeout, ) - def get_connect_account( + def unblock_provider_customer_purchases( self, + client_organization_id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetConnectAccountResponse: - """Call ``GET /v1/provider/connect/account``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/provider/customers/{clientOrganizationId}:unblock-purchases``.""" return self._client._call( - "GET", - "/v1/provider/connect/account", - m.GetConnectAccountResponse, + "POST", + f"/v1/provider/customers/{_path(client_organization_id)}:unblock-purchases", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.UnblockProviderCustomerPurchasesBody, extra_body, False), idempotent=False, timeout=timeout, ) - def get_connect_tax_settings( + def unblock_provider_customer_virtual_machine( self, + client_organization_id: str, + virtual_machine_id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetConnectTaxSettingsResponse: - """Call ``GET /v1/provider/connect/tax-settings``.""" + ) -> m.VirtualMachine: + """ + Call ``POST + /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:unblock``. + """ return self._client._call( - "GET", - "/v1/provider/connect/tax-settings", - m.GetConnectTaxSettingsResponse, + "POST", + f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:unblock", + m.VirtualMachine, query=_query(extra_query), - body=None, + body=_body(m.UnblockProviderCustomerVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) - def list_connect_tax_registrations( + +class ProviderDashboardPlansTabService(_Service): + """The NodeRings ProviderDashboardPlansTabService API.""" + + def get_dashboard_plans_tab_stats( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListConnectTaxRegistrationsResponse: - """Call ``GET /v1/provider/connect/tax-registrations``.""" + ) -> m.ProviderDashboardPlansTabStats: + """Call ``GET /v1/provider/dashboard/plans-tab-stats``.""" return self._client._call( "GET", - "/v1/provider/connect/tax-registrations", - m.ListConnectTaxRegistrationsResponse, + "/v1/provider/dashboard/plans-tab-stats", + m.ProviderDashboardPlansTabStats, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def start_connect_oauth( + +class ProviderDashboardService(_Service): + """The NodeRings ProviderDashboardService API.""" + + def get_dashboard_asset_sales_timeseries( self, *, - extra_body: dict[str, Any] | None = None, + range_days: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.StartConnectOAuthResponse: - """ - Starts Stripe Connect OAuth so a provider can attach an existing Standard account. - - It calls ``POST /v1/provider/connect/oauth:start``. - """ + ) -> m.GetDashboardAssetSalesTimeseriesResponse: + """Call ``GET /v1/provider/dashboard/asset-sales-timeseries``.""" return self._client._call( - "POST", - "/v1/provider/connect/oauth:start", - m.StartConnectOAuthResponse, - query=_query(extra_query), - body=_body(m.StartConnectOAuthRequest, extra_body, False), + "GET", + "/v1/provider/dashboard/asset-sales-timeseries", + m.GetDashboardAssetSalesTimeseriesResponse, + query=_query(extra_query, ("rangeDays", range_days)), + body=None, idempotent=False, timeout=timeout, ) - def update_connect_tax_settings( + def get_dashboard_billing_sales( self, *, - default_tax_behavior: str | None = None, - default_tax_code: str | None = None, - head_office: m.ConnectTaxAddress | dict[str, Any] | None = None, - extra_body: dict[str, Any] | None = None, + range_days: int | None = None, + include_prior_period: bool | None = None, + revenue_by_customer_page: int | None = None, + revenue_by_customer_page_size: int | None = None, + revenue_by_customer_email_filter: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateConnectTaxSettingsResponse: + ) -> m.GetDashboardBillingSalesResponse: """ - Call ``PUT /v1/provider/connect/tax-settings``. + Call ``GET /v1/provider/dashboard/billing-sales``. Args: - head_office: Structured address for Connect tax head office. + revenue_by_customer_page: Revenue-by-customer table (1-based page). Omit for defaults (page 1, page size 25). + revenue_by_customer_email_filter: Case-insensitive substring match on contact email, organization id, or organization name. """ return self._client._call( - "PUT", - "/v1/provider/connect/tax-settings", - m.UpdateConnectTaxSettingsResponse, - query=_query(extra_query), - body=_body( - m.UpdateConnectTaxSettingsRequest, - extra_body, - False, - ("default_tax_behavior", default_tax_behavior), - ("default_tax_code", default_tax_code), - ("head_office", head_office), + "GET", + "/v1/provider/dashboard/billing-sales", + m.GetDashboardBillingSalesResponse, + query=_query( + extra_query, + ("rangeDays", range_days), + ("includePriorPeriod", include_prior_period), + ("revenueByCustomerPage", revenue_by_customer_page), + ("revenueByCustomerPageSize", revenue_by_customer_page_size), + ("revenueByCustomerEmailFilter", revenue_by_customer_email_filter), ), + body=None, idempotent=False, timeout=timeout, ) - -class ProviderCustomerService(_Service): - """The NodeRings ProviderCustomerService API.""" - - def block_provider_customer_purchases( + def get_dashboard_customer_acquisition_timeseries( self, - client_organization_id: str, *, - message: str | None = None, - reason: m.ComplianceReason | str | None = None, - extra_body: dict[str, Any] | None = None, + range_days: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Call ``POST /v1/provider/customers/{clientOrganizationId}:block-purchases``. - - Args: - reason: Why a VM or purchase was seized/blocked. - """ + ) -> m.GetDashboardCustomerAcquisitionTimeseriesResponse: + """Call ``GET /v1/provider/dashboard/customer-acquisition-timeseries``.""" return self._client._call( - "POST", - f"/v1/provider/customers/{_path(client_organization_id)}:block-purchases", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.BlockProviderCustomerPurchasesBody, extra_body, False, ("message", message), ("reason", reason) - ), - idempotent=False, - timeout=timeout, + "GET", + "/v1/provider/dashboard/customer-acquisition-timeseries", + m.GetDashboardCustomerAcquisitionTimeseriesResponse, + query=_query(extra_query, ("rangeDays", range_days)), + body=None, + idempotent=False, + timeout=timeout, ) - def get_provider_customer( + def get_dashboard_summary( self, - client_organization_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderCustomerResponse: - """Call ``GET /v1/provider/customers/{clientOrganizationId}``.""" + ) -> m.GetDashboardSummaryResponse: + """Call ``GET /v1/provider/dashboard/summary``.""" return self._client._call( "GET", - f"/v1/provider/customers/{_path(client_organization_id)}", - m.GetProviderCustomerResponse, + "/v1/provider/dashboard/summary", + m.GetDashboardSummaryResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_provider_customer_billing( + def list_dashboard_addon_catalog_stats( self, - client_organization_id: str, *, + addon_search: str | None = None, + addon_type_filter: str | None = None, + addon_billing_type_filter: str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderCustomerBillingResponse: - """Call ``GET /v1/provider/customers/{clientOrganizationId}/billing``.""" + ) -> m.ListDashboardAddonCatalogStatsResponse: + """Call ``GET /v1/provider/dashboard/addon-catalog-stats``.""" return self._client._call( "GET", - f"/v1/provider/customers/{_path(client_organization_id)}/billing", - m.GetProviderCustomerBillingResponse, - query=_query(extra_query), + "/v1/provider/dashboard/addon-catalog-stats", + m.ListDashboardAddonCatalogStatsResponse, + query=_query( + extra_query, + ("addonSearch", addon_search), + ("addonTypeFilter", addon_type_filter), + ("addonBillingTypeFilter", addon_billing_type_filter), + ("page", page), + ("pageSize", page_size), + ), body=None, idempotent=False, timeout=timeout, ) - def get_provider_customer_stats( + def list_dashboard_addon_catalog_stats_all( self, *, + addon_search: str | None = None, + addon_type_filter: str | None = None, + addon_billing_type_filter: str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderCustomerStatsResponse: + ) -> Iterator[m.ProviderDashboardAddonCatalogRow]: """ - Path must not be `/customers/stats`: some gateways match - `/customers/{client_organization_id}` first and treat "stats" as a UUID field (validation - error). + Every result of :meth:`list_dashboard_addon_catalog_stats`, reading page after page. - It calls ``GET /v1/provider/customer-stats``. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - return self._client._call( - "GET", - "/v1/provider/customer-stats", - m.GetProviderCustomerStatsResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_dashboard_addon_catalog_stats( + page=page, + page_size=size, + addon_search=addon_search, + addon_type_filter=addon_type_filter, + addon_billing_type_filter=addon_billing_type_filter, + extra_query=extra_query, + timeout=timeout, + ) + items = res.addon_catalog + for item in items: + yield item + seen += len(items) + if len(items) < size: + return + page += 1 - def list_provider_customer_assets( + def list_dashboard_infrastructure( self, - client_organization_id: str, *, + platform_id: str | None = None, + region_id: str | None = None, page: int | None = None, page_size: int | None = None, - search: str | None = None, - asset_type: m.ProviderCustomerAssetType | str | None = None, - activity_status: m.ProviderCustomerVMActivityStatus | str | None = None, - region_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListProviderCustomerAssetsResponse: - """ - Call ``GET /v1/provider/customers/{clientOrganizationId}/assets``. - - Args: - page_size: Same rules as ListProviderCustomers.page_size. - activity_status: When set (not UNSPECIFIED), only assets matching this activity status are returned. - region_id: When set to a non-empty UUID, only assets whose VM node is in this region are returned. - """ + ) -> m.ListDashboardInfrastructureResponse: + """Call ``GET /v1/provider/dashboard/infrastructure``.""" return self._client._call( "GET", - f"/v1/provider/customers/{_path(client_organization_id)}/assets", - m.ListProviderCustomerAssetsResponse, + "/v1/provider/dashboard/infrastructure", + m.ListDashboardInfrastructureResponse, query=_query( extra_query, + ("platformId", platform_id), + ("regionId", region_id), ("page", page), ("pageSize", page_size), - ("search", search), - ("assetType", asset_type), - ("activityStatus", activity_status), - ("regionId", region_id), ), body=None, idempotent=False, timeout=timeout, ) - def list_provider_customer_assets_all( + def list_dashboard_infrastructure_all( self, - client_organization_id: str, *, + platform_id: str | None = None, + region_id: str | None = None, page: int | None = None, page_size: int | None = None, - search: str | None = None, - asset_type: m.ProviderCustomerAssetType | str | None = None, - activity_status: m.ProviderCustomerVMActivityStatus | str | None = None, - region_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.ProviderCustomerAssetRow]: + ) -> Iterator[m.ProviderDashboardNodeRollup]: """ - Every result of :meth:`list_provider_customer_assets`, reading page after page. + Every result of :meth:`list_dashboard_infrastructure`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -10719,72 +10365,92 @@ def list_provider_customer_assets_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_provider_customer_assets( - client_organization_id, + res = self.list_dashboard_infrastructure( page=page, page_size=size, - search=search, - asset_type=asset_type, - activity_status=activity_status, + platform_id=platform_id, region_id=region_id, extra_query=extra_query, timeout=timeout, ) - items = res.assets + items = res.by_node for item in items: yield item seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + if len(items) < size: return page += 1 - def list_provider_customers( + def list_dashboard_ipam( + self, + *, + network_id: str | None = None, + allocated_sample_ips_page: int | None = None, + allocated_sample_ips_page_size: int | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.ListDashboardIPAMResponse: + """Call ``GET /v1/provider/dashboard/ipam``.""" + return self._client._call( + "GET", + "/v1/provider/dashboard/ipam", + m.ListDashboardIPAMResponse, + query=_query( + extra_query, + ("networkId", network_id), + ("allocatedSampleIpsPage", allocated_sample_ips_page), + ("allocatedSampleIpsPageSize", allocated_sample_ips_page_size), + ), + body=None, + idempotent=False, + timeout=timeout, + ) + + def list_dashboard_ipam_assignments( self, *, + network_id: str | None = None, + search: str | None = None, + platform_id: str | None = None, page: int | None = None, page_size: int | None = None, - search: str | None = None, - activity_filter: m.ProviderCustomerActivityFilter | str | None = None, + ip_family: m.DashboardIPAMAssignmentIPFamily | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListProviderCustomersResponse: - """ - Call ``GET /v1/provider/customers``. - - Args: - page: 0-based page (default 0). - page_size: -1 = all matches (no server row cap; prefer paginated 1..100 for large data sets). Otherwise 1..100 per page (see ListVirtualMachinesRequest). - search: Case-insensitive match on client organization name or any member email (owners/members via roles & groups). - activity_filter: Default / UNSPECIFIED means ALL (same as PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL). - PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL: All customers (any VM history with this provider, including when every VM is soft-deleted). - """ + ) -> m.ListDashboardIPAMAssignmentsResponse: + """Call ``GET /v1/provider/dashboard/ipam/assignments``.""" return self._client._call( "GET", - "/v1/provider/customers", - m.ListProviderCustomersResponse, + "/v1/provider/dashboard/ipam/assignments", + m.ListDashboardIPAMAssignmentsResponse, query=_query( extra_query, + ("networkId", network_id), + ("search", search), + ("platformId", platform_id), ("page", page), ("pageSize", page_size), - ("search", search), - ("activityFilter", activity_filter), + ("ipFamily", ip_family), ), body=None, idempotent=False, timeout=timeout, ) - def list_provider_customers_all( + def list_dashboard_ipam_assignments_all( self, *, + network_id: str | None = None, + search: str | None = None, + platform_id: str | None = None, page: int | None = None, page_size: int | None = None, - search: str | None = None, - activity_filter: m.ProviderCustomerActivityFilter | str | None = None, + ip_family: m.DashboardIPAMAssignmentIPFamily | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.ProviderCustomerRow]: + ) -> Iterator[m.DashboardIPAMAssignmentRow]: """ - Every result of :meth:`list_provider_customers`, reading page after page. + Every result of :meth:`list_dashboard_ipam_assignments`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -10792,15 +10458,17 @@ def list_provider_customers_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_provider_customers( + res = self.list_dashboard_ipam_assignments( page=page, page_size=size, + network_id=network_id, search=search, - activity_filter=activity_filter, + platform_id=platform_id, + ip_family=ip_family, extra_query=extra_query, timeout=timeout, ) - items = res.customers + items = res.assignments for item in items: yield item seen += len(items) @@ -10808,622 +10476,792 @@ def list_provider_customers_all( return page += 1 - def restart_provider_customer_virtual_machine( + def list_dashboard_plan_subscription_stats( self, - client_organization_id: str, - virtual_machine_id: str, *, - extra_body: dict[str, Any] | None = None, + plan_search: str | None = None, + plan_billing_type_filter: str | None = None, + plan_asset_filter: str | None = None, + plans_page: int | None = None, + plans_page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: - """ - Call ``POST - /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:restart``. - """ + ) -> m.ListDashboardPlanSubscriptionStatsResponse: + """Call ``GET /v1/provider/dashboard/plan-subscription-stats``.""" return self._client._call( - "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:restart", - m.VirtualMachine, - query=_query(extra_query), - body=_body(m.RestartProviderCustomerVirtualMachineBody, extra_body, False), + "GET", + "/v1/provider/dashboard/plan-subscription-stats", + m.ListDashboardPlanSubscriptionStatsResponse, + query=_query( + extra_query, + ("planSearch", plan_search), + ("planBillingTypeFilter", plan_billing_type_filter), + ("planAssetFilter", plan_asset_filter), + ("plansPage", plans_page), + ("plansPageSize", plans_page_size), + ), + body=None, idempotent=False, timeout=timeout, ) - def start_provider_customer_virtual_machine( + def list_dashboard_ticket_statistics( self, - client_organization_id: str, - virtual_machine_id: str, *, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, + from_time: datetime | None = None, + to_time: datetime | None = None, + extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: - """ - Call ``POST - /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:start``. - """ + ) -> m.ListDashboardTicketStatisticsResponse: + """Call ``GET /v1/provider/dashboard/tickets/statistics``.""" return self._client._call( - "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:start", - m.VirtualMachine, - query=_query(extra_query), - body=_body(m.StartProviderCustomerVirtualMachineBody, extra_body, False), + "GET", + "/v1/provider/dashboard/tickets/statistics", + m.ListDashboardTicketStatisticsResponse, + query=_query(extra_query, ("fromTime", from_time), ("toTime", to_time)), + body=None, idempotent=False, timeout=timeout, ) - def stop_provider_customer_virtual_machine( + def list_dashboard_virtual_machines( self, - client_organization_id: str, - virtual_machine_id: str, *, - extra_body: dict[str, Any] | None = None, + platform_id: str | None = None, + region_id: str | None = None, + node_id: str | None = None, + customer_email_contains: str | None = None, + vm_page: int | None = None, + vm_page_size: int | None = None, + vmtemplate_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: - """ - Call ``POST - /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:stop``. - """ + ) -> m.ListDashboardVirtualMachinesResponse: + """Call ``GET /v1/provider/dashboard/virtual-machines``.""" return self._client._call( - "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:stop", - m.VirtualMachine, - query=_query(extra_query), - body=_body(m.StopProviderCustomerVirtualMachineBody, extra_body, False), + "GET", + "/v1/provider/dashboard/virtual-machines", + m.ListDashboardVirtualMachinesResponse, + query=_query( + extra_query, + ("platformId", platform_id), + ("regionId", region_id), + ("nodeId", node_id), + ("customerEmailContains", customer_email_contains), + ("vmPage", vm_page), + ("vmPageSize", vm_page_size), + ("vmtemplateId", vmtemplate_id), + ), + body=None, idempotent=False, timeout=timeout, ) - def suspend_provider_customer_virtual_machine( + +class ProviderNetworkService(_Service): + """The NodeRings ProviderNetworkService API.""" + + def get_smtp_outbound_provider_policy( self, - client_organization_id: str, - virtual_machine_id: str, *, - message: str | None = None, - reason: m.ComplianceReason | str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: - """ - Call ``POST - /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:suspend``. - - Args: - reason: Why a VM or purchase was seized/blocked. - """ + ) -> m.GetSMTPOutboundProviderPolicyResponse: + """Call ``GET /v1/provider/network/smtp-outbound-policy``.""" return self._client._call( - "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:suspend", - m.VirtualMachine, + "GET", + "/v1/provider/network/smtp-outbound-policy", + m.GetSMTPOutboundProviderPolicyResponse, query=_query(extra_query), - body=_body( - m.SuspendProviderCustomerVirtualMachineBody, extra_body, False, ("message", message), ("reason", reason) - ), + body=None, idempotent=False, timeout=timeout, ) - def unblock_provider_customer_purchases( + def list_virtual_machine_smtp_outbound_policies( self, - client_organization_id: str, *, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/provider/customers/{clientOrganizationId}:unblock-purchases``.""" + ) -> m.ListVirtualMachineSMTPOutboundPoliciesResponse: + """ + Call ``GET /v1/provider/network/smtp-outbound-policies``. + + Args: + search: Case-insensitive substring match on hostname, customer contact email, or exact virtual machine UUID. + """ return self._client._call( - "POST", - f"/v1/provider/customers/{_path(client_organization_id)}:unblock-purchases", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.UnblockProviderCustomerPurchasesBody, extra_body, False), + "GET", + "/v1/provider/network/smtp-outbound-policies", + m.ListVirtualMachineSMTPOutboundPoliciesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("search", search)), + body=None, idempotent=False, timeout=timeout, ) - def unblock_provider_customer_virtual_machine( + def list_virtual_machine_smtp_outbound_policies_all( + self, + *, + page: int | None = None, + page_size: int | None = None, + search: str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> Iterator[m.VirtualMachineSMTPOutboundPolicyView]: + """ + Every result of :meth:`list_virtual_machine_smtp_outbound_policies`, reading page after + page. + + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_virtual_machine_smtp_outbound_policies( + page=page, + page_size=size, + search=search, + extra_query=extra_query, + timeout=timeout, + ) + items = res.policies + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + def update_smtp_outbound_provider_policy( self, - client_organization_id: str, - virtual_machine_id: str, *, + block_by_default: bool | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: + ) -> m.GetSMTPOutboundProviderPolicyResponse: """ - Call ``POST - /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:unblock``. + Call ``PUT /v1/provider/network/smtp-outbound-policy``. + + Args: + block_by_default: Must accept false (allow-by-default). Proto3 required on bool rejects the zero value because there is no field presence without `optional`. """ return self._client._call( - "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:unblock", - m.VirtualMachine, + "PUT", + "/v1/provider/network/smtp-outbound-policy", + m.GetSMTPOutboundProviderPolicyResponse, query=_query(extra_query), - body=_body(m.UnblockProviderCustomerVirtualMachineBody, extra_body, False), + body=_body( + m.UpdateSMTPOutboundProviderPolicyRequest, extra_body, False, ("block_by_default", block_by_default) + ), idempotent=False, timeout=timeout, ) - -class ProviderDashboardPlansTabService(_Service): - """The NodeRings ProviderDashboardPlansTabService API.""" - - def get_dashboard_plans_tab_stats( + def update_virtual_machine_smtp_outbound_policy( self, + virtual_machine_id: str, *, + action: m.SMTPOutboundVMAction | str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ProviderDashboardPlansTabStats: - """Call ``GET /v1/provider/dashboard/plans-tab-stats``.""" + ) -> m.VirtualMachineSMTPOutboundPolicyView: + """Call ``PUT /v1/provider/network/smtp-outbound-policies/{virtualMachineId}``.""" return self._client._call( - "GET", - "/v1/provider/dashboard/plans-tab-stats", - m.ProviderDashboardPlansTabStats, + "PUT", + f"/v1/provider/network/smtp-outbound-policies/{_path(virtual_machine_id)}", + m.VirtualMachineSMTPOutboundPolicyView, query=_query(extra_query), - body=None, + body=_body(m.UpdateVirtualMachineSMTPOutboundPolicyBody, extra_body, False, ("action", action)), idempotent=False, timeout=timeout, ) -class ProviderDashboardService(_Service): - """The NodeRings ProviderDashboardService API.""" +class ProviderOnboardingService(_Service): + """The NodeRings ProviderOnboardingService API.""" - def get_dashboard_asset_sales_timeseries( + def get_provider_onboarding_checklist( self, *, - range_days: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetDashboardAssetSalesTimeseriesResponse: - """Call ``GET /v1/provider/dashboard/asset-sales-timeseries``.""" + ) -> m.GetProviderOnboardingChecklistResponse: + """Call ``GET /v1/provider/onboarding/checklist``.""" return self._client._call( "GET", - "/v1/provider/dashboard/asset-sales-timeseries", - m.GetDashboardAssetSalesTimeseriesResponse, - query=_query(extra_query, ("rangeDays", range_days)), + "/v1/provider/onboarding/checklist", + m.GetProviderOnboardingChecklistResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_dashboard_billing_sales( + +class ProviderPlanService(_Service): + """The NodeRings ProviderPlanService API.""" + + def calculate_plan_pricing( self, *, - range_days: int | None = None, - include_prior_period: bool | None = None, - revenue_by_customer_page: int | None = None, - revenue_by_customer_page_size: int | None = None, - revenue_by_customer_email_filter: str | None = None, + calc_config: m.PricingCalculationConfig | dict[str, Any] | None = None, + instances: list[m.ResourceInstanceInput | dict[str, Any]] | None = None, + plan_config: m.PlanPricingConfig | dict[str, Any] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetDashboardBillingSalesResponse: + ) -> m.CalculatePlanPricingResponse: """ - Call ``GET /v1/provider/dashboard/billing-sales``. + Call ``POST /v1/plans:calculate``. Args: - revenue_by_customer_page: Revenue-by-customer table (1-based page). Omit for defaults (page 1, page size 25). - revenue_by_customer_email_filter: Case-insensitive substring match on contact email, organization id, or organization name. + instances: Resource instances to calculate pricing for """ return self._client._call( - "GET", - "/v1/provider/dashboard/billing-sales", - m.GetDashboardBillingSalesResponse, - query=_query( - extra_query, - ("rangeDays", range_days), - ("includePriorPeriod", include_prior_period), - ("revenueByCustomerPage", revenue_by_customer_page), - ("revenueByCustomerPageSize", revenue_by_customer_page_size), - ("revenueByCustomerEmailFilter", revenue_by_customer_email_filter), + "POST", + "/v1/plans:calculate", + m.CalculatePlanPricingResponse, + query=_query(extra_query), + body=_body( + m.CalculatePlanPricingRequest, + extra_body, + False, + ("calc_config", calc_config), + ("instances", instances), + ("plan_config", plan_config), ), - body=None, idempotent=False, timeout=timeout, ) - def get_dashboard_customer_acquisition_timeseries( + def create_plan( self, *, - range_days: int | None = None, + cpu_limit: int | None = None, + cpu_units: int | None = None, + currency: str | None = None, + metadata: dict[str, Any] | None = None, + network_rate_limit_mbs: float | None = None, + node_ids: list[str] | None = None, + on_credit_exhaustion: str | None = None, + plan_id: str | None = None, + plan_prices: list[m.PlanPriceOverride | dict[str, Any]] | None = None, + region_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetDashboardCustomerAcquisitionTimeseriesResponse: - """Call ``GET /v1/provider/dashboard/customer-acquisition-timeseries``.""" + ) -> m.SuccessResponse: + """ + Call ``POST /v1/plans``. + + Args: + cpu_limit: Plan CPU/network scheduling overrides written into metadata.specifications. Proxmox cpulimit= (max CPU time); 0 = unlimited. Omitted = template value / 0. + cpu_units: Proxmox cpuunits= fair-share weight. Omitted = template value / 1024. + currency: Plan fields to override from template (name, description, and trial_days come from template) + metadata: Plan metadata. VirtFusion package_id lives under metadata.virtfusion.package_id. + network_rate_limit_mbs: Primary NIC rate limit in MB/s (Proxmox rate=); 0 = unlimited. + node_ids: Nodes this plan may sell on (must be catalog-eligible for the template). Required: at least one node_id (validated in Go). + on_credit_exhaustion: Provider choice when client prepaid credits are exhausted. Values: "suspend" (default), "continue_with_dunning". + plan_id: Template plan ID to clone from (required) + plan_prices: Plan prices with overrides (unit_amount_minor, currency, free_units per metric) + region_id: Region where this plan is offered (exactly one per plan). + """ return self._client._call( - "GET", - "/v1/provider/dashboard/customer-acquisition-timeseries", - m.GetDashboardCustomerAcquisitionTimeseriesResponse, - query=_query(extra_query, ("rangeDays", range_days)), - body=None, + "POST", + "/v1/plans", + m.SuccessResponse, + query=_query(extra_query), + body=_body( + m.CreatePlanRequest, + extra_body, + False, + ("cpu_limit", cpu_limit), + ("cpu_units", cpu_units), + ("currency", currency), + ("metadata", metadata), + ("network_rate_limit_mbs", network_rate_limit_mbs), + ("node_ids", node_ids), + ("on_credit_exhaustion", on_credit_exhaustion), + ("plan_id", plan_id), + ("plan_prices", plan_prices), + ("region_id", region_id), + ), idempotent=False, timeout=timeout, ) - def get_dashboard_summary( + def delete_plan( self, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetDashboardSummaryResponse: - """Call ``GET /v1/provider/dashboard/summary``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/plans/{id}``.""" return self._client._call( - "GET", - "/v1/provider/dashboard/summary", - m.GetDashboardSummaryResponse, + "DELETE", + f"/v1/plans/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_dashboard_addon_catalog_stats( + def list_assignable_nodes_for_plan( self, *, - addon_search: str | None = None, - addon_type_filter: str | None = None, - addon_billing_type_filter: str | None = None, - page: int | None = None, - page_size: int | None = None, + template_plan_id: str | None = None, + plan_id: str | None = None, + region_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDashboardAddonCatalogStatsResponse: - """Call ``GET /v1/provider/dashboard/addon-catalog-stats``.""" + ) -> m.ListAssignableNodesForPlanResponse: + """ + Nodes the provider may assign to a plan (catalog-eligible for tier/category). + + It calls ``GET /v1/provider/plans/assignable-nodes``. + + Args: + template_plan_id: Optional: set for create-from-template. Empty when plan_id is used. + plan_id: Optional: set for edit existing plan. Empty when template_plan_id is used. + """ return self._client._call( "GET", - "/v1/provider/dashboard/addon-catalog-stats", - m.ListDashboardAddonCatalogStatsResponse, + "/v1/provider/plans/assignable-nodes", + m.ListAssignableNodesForPlanResponse, query=_query( - extra_query, - ("addonSearch", addon_search), - ("addonTypeFilter", addon_type_filter), - ("addonBillingTypeFilter", addon_billing_type_filter), - ("page", page), - ("pageSize", page_size), + extra_query, ("templatePlanId", template_plan_id), ("planId", plan_id), ("regionId", region_id) ), body=None, idempotent=False, timeout=timeout, ) - def list_dashboard_addon_catalog_stats_all( + def update_plan( self, + id: str, *, - addon_search: str | None = None, - addon_type_filter: str | None = None, - addon_billing_type_filter: str | None = None, - page: int | None = None, - page_size: int | None = None, + addon_price_overrides: list[m.AddonPriceOverride | dict[str, Any]] | None = None, + cpu_limit: int | None = None, + cpu_units: int | None = None, + currency: str | None = None, + metadata: dict[str, Any] | None = None, + network_rate_limit_mbs: float | None = None, + node_ids: list[str] | None = None, + on_credit_exhaustion: str | None = None, + plan_prices: list[m.PlanPriceOverride | dict[str, Any]] | None = None, + region_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.ProviderDashboardAddonCatalogRow]: + ) -> m.SuccessResponse: """ - Every result of :meth:`list_dashboard_addon_catalog_stats`, reading page after page. + Call ``PATCH /v1/plans/{id}``. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + Args: + addon_price_overrides: Optional: Override prices for addons when updating plan + cpu_limit: Plan CPU/network scheduling overrides written into metadata.specifications. Only affects VMs created after the update (VMs snapshot plan values at create). + currency: Plan fields to update (name, description, and trial_days come from template, not updatable) + metadata: Plan metadata. VirtFusion package_id lives under metadata.virtfusion.package_id. + node_ids: When non-empty, replaces the plan's assigned nodes (same rules as create). Omitted / empty leaves existing assignments unchanged. + on_credit_exhaustion: Provider choice when client prepaid credits are exhausted. Values: "suspend" (default), "continue_with_dunning". + plan_prices: Plan prices with overrides (unit_amount_minor, currency, free_units per metric) + region_id: Region for this plan offer (optional on update). """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_dashboard_addon_catalog_stats( - page=page, - page_size=size, - addon_search=addon_search, - addon_type_filter=addon_type_filter, - addon_billing_type_filter=addon_billing_type_filter, - extra_query=extra_query, - timeout=timeout, - ) - items = res.addon_catalog - for item in items: - yield item - seen += len(items) - if len(items) < size: - return - page += 1 + return self._client._call( + "PATCH", + f"/v1/plans/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), + body=_body( + m.UpdatePlanBody, + extra_body, + False, + ("addon_price_overrides", addon_price_overrides), + ("cpu_limit", cpu_limit), + ("cpu_units", cpu_units), + ("currency", currency), + ("metadata", metadata), + ("network_rate_limit_mbs", network_rate_limit_mbs), + ("node_ids", node_ids), + ("on_credit_exhaustion", on_credit_exhaustion), + ("plan_prices", plan_prices), + ("region_id", region_id), + ), + idempotent=False, + timeout=timeout, + ) - def list_dashboard_infrastructure( + +class ProviderReviewService(_Service): + """The NodeRings ProviderReviewService API.""" + + def create_provider_review_reply( + self, + review_id: str, + *, + reply_message: str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.CreateProviderReviewReplyResponse: + """Call ``POST /v1/provider-reviews/{reviewId}/reply``.""" + return self._client._call( + "POST", + f"/v1/provider-reviews/{_path(review_id)}/reply", + m.CreateProviderReviewReplyResponse, + query=_query(extra_query), + body=_body(m.CreateProviderReviewReplyBody, extra_body, False, ("reply_message", reply_message)), + idempotent=False, + timeout=timeout, + ) + + def delete_provider_review_reply( + self, + review_id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.DeleteProviderReviewReplyResponse: + """Call ``DELETE /v1/provider-reviews/{reviewId}/reply``.""" + return self._client._call( + "DELETE", + f"/v1/provider-reviews/{_path(review_id)}/reply", + m.DeleteProviderReviewReplyResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + def list_provider_reviews( self, *, - platform_id: str | None = None, - region_id: str | None = None, page: int | None = None, page_size: int | None = None, + star_ratings: list[int] | None = None, + search: str | None = None, + reply_filter: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDashboardInfrastructureResponse: - """Call ``GET /v1/provider/dashboard/infrastructure``.""" + ) -> m.ListProviderReviewsResponse: + """ + Call ``GET /v1/provider-reviews``. + + Args: + star_ratings: Multi-select star filter (e.g. [5,4]); empty means any stars. + search: Case-insensitive substring match on review comment or provider reply; empty means no text filter. + reply_filter: Inbox: 0 = awaiting provider reply / empty reply (default), 1 = replied only, 2 = all reviews. + """ return self._client._call( "GET", - "/v1/provider/dashboard/infrastructure", - m.ListDashboardInfrastructureResponse, + "/v1/provider-reviews", + m.ListProviderReviewsResponse, query=_query( extra_query, - ("platformId", platform_id), - ("regionId", region_id), ("page", page), ("pageSize", page_size), + ("starRatings", star_ratings), + ("search", search), + ("replyFilter", reply_filter), ), body=None, idempotent=False, timeout=timeout, ) - def list_dashboard_infrastructure_all( + def update_provider_review_reply( self, + review_id: str, *, - platform_id: str | None = None, - region_id: str | None = None, - page: int | None = None, - page_size: int | None = None, + reply_message: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.ProviderDashboardNodeRollup]: - """ - Every result of :meth:`list_dashboard_infrastructure`, reading page after page. + ) -> m.UpdateProviderReviewReplyResponse: + """Call ``PATCH /v1/provider-reviews/{reviewId}/reply``.""" + return self._client._call( + "PATCH", + f"/v1/provider-reviews/{_path(review_id)}/reply", + m.UpdateProviderReviewReplyResponse, + query=_query(extra_query), + body=_body(m.UpdateProviderReviewReplyBody, extra_body, False, ("reply_message", reply_message)), + idempotent=False, + timeout=timeout, + ) - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_dashboard_infrastructure( - page=page, - page_size=size, - platform_id=platform_id, - region_id=region_id, - extra_query=extra_query, - timeout=timeout, - ) - items = res.by_node - for item in items: - yield item - seen += len(items) - if len(items) < size: - return - page += 1 - def list_dashboard_ipam( +class ProviderStorefrontService(_Service): + """The NodeRings ProviderStorefrontService API.""" + + def get_my_storefront( self, *, - network_id: str | None = None, - allocated_sample_ips_page: int | None = None, - allocated_sample_ips_page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDashboardIPAMResponse: - """Call ``GET /v1/provider/dashboard/ipam``.""" + ) -> m.GetMyStorefrontResponse: + """Call ``GET /v1/provider/storefront``.""" return self._client._call( "GET", - "/v1/provider/dashboard/ipam", - m.ListDashboardIPAMResponse, - query=_query( - extra_query, - ("networkId", network_id), - ("allocatedSampleIpsPage", allocated_sample_ips_page), - ("allocatedSampleIpsPageSize", allocated_sample_ips_page_size), - ), + "/v1/provider/storefront", + m.GetMyStorefrontResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_dashboard_ipam_assignments( + def opt_in_storefront( self, *, - network_id: str | None = None, - search: str | None = None, - platform_id: str | None = None, - page: int | None = None, - page_size: int | None = None, - ip_family: m.DashboardIPAMAssignmentIPFamily | str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDashboardIPAMAssignmentsResponse: - """Call ``GET /v1/provider/dashboard/ipam/assignments``.""" + ) -> m.GetMyStorefrontResponse: + """Call ``POST /v1/provider/storefront/opt-in``.""" return self._client._call( - "GET", - "/v1/provider/dashboard/ipam/assignments", - m.ListDashboardIPAMAssignmentsResponse, - query=_query( - extra_query, - ("networkId", network_id), - ("search", search), - ("platformId", platform_id), - ("page", page), - ("pageSize", page_size), - ("ipFamily", ip_family), - ), - body=None, + "POST", + "/v1/provider/storefront/opt-in", + m.GetMyStorefrontResponse, + query=_query(extra_query), + body=dict(extra_body or {}), idempotent=False, timeout=timeout, ) - def list_dashboard_ipam_assignments_all( + def opt_out_storefront( self, *, - network_id: str | None = None, - search: str | None = None, - platform_id: str | None = None, - page: int | None = None, - page_size: int | None = None, - ip_family: m.DashboardIPAMAssignmentIPFamily | str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.DashboardIPAMAssignmentRow]: - """ - Every result of :meth:`list_dashboard_ipam_assignments`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_dashboard_ipam_assignments( - page=page, - page_size=size, - network_id=network_id, - search=search, - platform_id=platform_id, - ip_family=ip_family, - extra_query=extra_query, - timeout=timeout, - ) - items = res.assignments - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + ) -> m.GetMyStorefrontResponse: + """Call ``POST /v1/provider/storefront/opt-out``.""" + return self._client._call( + "POST", + "/v1/provider/storefront/opt-out", + m.GetMyStorefrontResponse, + query=_query(extra_query), + body=dict(extra_body or {}), + idempotent=False, + timeout=timeout, + ) - def list_dashboard_plan_subscription_stats( + def preview_my_storefront( self, *, - plan_search: str | None = None, - plan_billing_type_filter: str | None = None, - plan_asset_filter: str | None = None, - plans_page: int | None = None, - plans_page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDashboardPlanSubscriptionStatsResponse: - """Call ``GET /v1/provider/dashboard/plan-subscription-stats``.""" + ) -> m.PreviewMyStorefrontResponse: + """Call ``GET /v1/provider/storefront/preview``.""" return self._client._call( "GET", - "/v1/provider/dashboard/plan-subscription-stats", - m.ListDashboardPlanSubscriptionStatsResponse, - query=_query( - extra_query, - ("planSearch", plan_search), - ("planBillingTypeFilter", plan_billing_type_filter), - ("planAssetFilter", plan_asset_filter), - ("plansPage", plans_page), - ("plansPageSize", plans_page_size), - ), + "/v1/provider/storefront/preview", + m.PreviewMyStorefrontResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_dashboard_ticket_statistics( + def submit_my_storefront( self, *, - from_time: datetime | None = None, - to_time: datetime | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDashboardTicketStatisticsResponse: - """Call ``GET /v1/provider/dashboard/tickets/statistics``.""" + ) -> m.GetMyStorefrontResponse: + """Call ``POST /v1/provider/storefront/submit``.""" return self._client._call( - "GET", - "/v1/provider/dashboard/tickets/statistics", - m.ListDashboardTicketStatisticsResponse, - query=_query(extra_query, ("fromTime", from_time), ("toTime", to_time)), - body=None, + "POST", + "/v1/provider/storefront/submit", + m.GetMyStorefrontResponse, + query=_query(extra_query), + body=dict(extra_body or {}), idempotent=False, timeout=timeout, ) - def list_dashboard_virtual_machines( + def update_my_storefront( self, *, - platform_id: str | None = None, - region_id: str | None = None, - node_id: str | None = None, - customer_email_contains: str | None = None, - vm_page: int | None = None, - vm_page_size: int | None = None, - vmtemplate_id: str | None = None, + about_markdown: str | None = None, + cover_image_url: str | None = None, + faqs: list[m.StorefrontFaq | dict[str, Any]] | None = None, + featured_plan_ids: list[str] | None = None, + highlight_custom: str | None = None, + highlight_custom_lines: list[str] | None = None, + highlight_keys: list[str] | None = None, + logo_image_url: str | None = None, + proposed_slug: str | None = None, + tagline: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDashboardVirtualMachinesResponse: - """Call ``GET /v1/provider/dashboard/virtual-machines``.""" + ) -> m.GetMyStorefrontResponse: + """Call ``PATCH /v1/provider/storefront``.""" return self._client._call( - "GET", - "/v1/provider/dashboard/virtual-machines", - m.ListDashboardVirtualMachinesResponse, - query=_query( - extra_query, - ("platformId", platform_id), - ("regionId", region_id), - ("nodeId", node_id), - ("customerEmailContains", customer_email_contains), - ("vmPage", vm_page), - ("vmPageSize", vm_page_size), - ("vmtemplateId", vmtemplate_id), + "PATCH", + "/v1/provider/storefront", + m.GetMyStorefrontResponse, + query=_query(extra_query), + body=_body( + m.UpdateMyStorefrontRequest, + extra_body, + False, + ("about_markdown", about_markdown), + ("cover_image_url", cover_image_url), + ("faqs", faqs), + ("featured_plan_ids", featured_plan_ids), + ("highlight_custom", highlight_custom), + ("highlight_custom_lines", highlight_custom_lines), + ("highlight_keys", highlight_keys), + ("logo_image_url", logo_image_url), + ("proposed_slug", proposed_slug), + ("tagline", tagline), ), - body=None, idempotent=False, timeout=timeout, ) -class ProviderNetworkService(_Service): - """The NodeRings ProviderNetworkService API.""" +class ProviderTicketNotificationService(_Service): + """The NodeRings ProviderTicketNotificationService API.""" - def get_smtp_outbound_provider_policy( + def get_provider_ticket_notification_policy( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetSMTPOutboundProviderPolicyResponse: - """Call ``GET /v1/provider/network/smtp-outbound-policy``.""" + ) -> m.GetProviderTicketNotificationPolicyResponse: + """Call ``GET /v1/provider/ticket-notification-policy``.""" return self._client._call( "GET", - "/v1/provider/network/smtp-outbound-policy", - m.GetSMTPOutboundProviderPolicyResponse, + "/v1/provider/ticket-notification-policy", + m.GetProviderTicketNotificationPolicyResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_virtual_machine_smtp_outbound_policies( + def send_provider_ticket_notification_test( self, *, - page: int | None = None, - page_size: int | None = None, - search: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListVirtualMachineSMTPOutboundPoliciesResponse: - """ - Call ``GET /v1/provider/network/smtp-outbound-policies``. - - Args: - search: Case-insensitive substring match on hostname, customer contact email, or exact virtual machine UUID. + ) -> m.SuccessResponse: + """Call ``POST /v1/provider/ticket-notification-policy:send-test``.""" + return self._client._call( + "POST", + "/v1/provider/ticket-notification-policy:send-test", + m.SuccessResponse, + query=_query(extra_query), + body=dict(extra_body or {}), + idempotent=False, + timeout=timeout, + ) + + def update_provider_ticket_notification_policy( + self, + *, + policy: m.ProviderTicketNotificationPolicy | dict[str, Any] | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetProviderTicketNotificationPolicyResponse: + """Call ``PUT /v1/provider/ticket-notification-policy``.""" + return self._client._call( + "PUT", + "/v1/provider/ticket-notification-policy", + m.GetProviderTicketNotificationPolicyResponse, + query=_query(extra_query), + body=_body(m.UpdateProviderTicketNotificationPolicyRequest, extra_body, False, ("policy", policy)), + idempotent=False, + timeout=timeout, + ) + + +class RefundService(_Service): + """The NodeRings RefundService API.""" + + def get_refund( + self, + refund_id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetRefundResponse: + """ + GetRefund retrieves a single refund with payment and invoice details + + It calls ``GET /v1/refunds/{refundId}``. """ return self._client._call( "GET", - "/v1/provider/network/smtp-outbound-policies", - m.ListVirtualMachineSMTPOutboundPoliciesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("search", search)), + f"/v1/refunds/{_path(refund_id)}", + m.GetRefundResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_virtual_machine_smtp_outbound_policies_all( + def list_refunds( self, *, + payment_id: str | None = None, + invoice_id: str | None = None, + status: m.RefundStatus | str | None = None, page: int | None = None, page_size: int | None = None, - search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.VirtualMachineSMTPOutboundPolicyView]: + ) -> m.ListRefundsResponse: """ - Every result of :meth:`list_virtual_machine_smtp_outbound_policies`, reading page after - page. + ListRefunds lists refunds for a payment, invoice, or organization + + It calls ``GET /v1/refunds``. + """ + return self._client._call( + "GET", + "/v1/refunds", + m.ListRefundsResponse, + query=_query( + extra_query, + ("paymentId", payment_id), + ("invoiceId", invoice_id), + ("status", status), + ("page", page), + ("pageSize", page_size), + ), + body=None, + idempotent=False, + timeout=timeout, + ) + + def list_refunds_all( + self, + *, + payment_id: str | None = None, + invoice_id: str | None = None, + status: m.RefundStatus | str | None = None, + page: int | None = None, + page_size: int | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> Iterator[m.Refund]: + """ + Every result of :meth:`list_refunds`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -11431,14 +11269,16 @@ def list_virtual_machine_smtp_outbound_policies_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_virtual_machine_smtp_outbound_policies( + res = self.list_refunds( page=page, page_size=size, - search=search, + payment_id=payment_id, + invoice_id=invoice_id, + status=status, extra_query=extra_query, timeout=timeout, ) - items = res.policies + items = res.refunds for item in items: yield item seen += len(items) @@ -11446,631 +11286,554 @@ def list_virtual_machine_smtp_outbound_policies_all( return page += 1 - def update_smtp_outbound_provider_policy( + +class RegionService(_Service): + """The NodeRings RegionService API.""" + + def create_region( self, *, - block_by_default: bool | None = None, + city_country_id: str | None = None, + datacenter_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetSMTPOutboundProviderPolicyResponse: - """ - Call ``PUT /v1/provider/network/smtp-outbound-policy``. - - Args: - block_by_default: Must accept false (allow-by-default). Proto3 required on bool rejects the zero value because there is no field presence without `optional`. - """ + ) -> m.Region: + """Call ``POST /v1/regions``.""" return self._client._call( - "PUT", - "/v1/provider/network/smtp-outbound-policy", - m.GetSMTPOutboundProviderPolicyResponse, + "POST", + "/v1/regions", + m.Region, query=_query(extra_query), body=_body( - m.UpdateSMTPOutboundProviderPolicyRequest, extra_body, False, ("block_by_default", block_by_default) + m.CreateRegionRequest, + extra_body, + False, + ("city_country_id", city_country_id), + ("datacenter_id", datacenter_id), ), idempotent=False, timeout=timeout, ) - def update_virtual_machine_smtp_outbound_policy( + def delete_region( self, - virtual_machine_id: str, + id: str, *, - action: m.SMTPOutboundVMAction | str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachineSMTPOutboundPolicyView: - """Call ``PUT /v1/provider/network/smtp-outbound-policies/{virtualMachineId}``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/regions/{id}``.""" return self._client._call( - "PUT", - f"/v1/provider/network/smtp-outbound-policies/{_path(virtual_machine_id)}", - m.VirtualMachineSMTPOutboundPolicyView, + "DELETE", + f"/v1/regions/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.UpdateVirtualMachineSMTPOutboundPolicyBody, extra_body, False, ("action", action)), + body=None, idempotent=False, timeout=timeout, ) - -class ProviderOnboardingService(_Service): - """The NodeRings ProviderOnboardingService API.""" - - def get_provider_onboarding_checklist( + def get_region( self, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderOnboardingChecklistResponse: - """Call ``GET /v1/provider/onboarding/checklist``.""" + ) -> m.Region: + """Call ``GET /v1/regions/{id}``.""" return self._client._call( "GET", - "/v1/provider/onboarding/checklist", - m.GetProviderOnboardingChecklistResponse, + f"/v1/regions/{_path(id)}", + m.Region, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - -class ProviderPlanService(_Service): - """The NodeRings ProviderPlanService API.""" - - def calculate_plan_pricing( + def list_countries_cities( self, *, - calc_config: m.PricingCalculationConfig | dict[str, Any] | None = None, - instances: list[m.ResourceInstanceInput | dict[str, Any]] | None = None, - plan_config: m.PlanPricingConfig | dict[str, Any] | None = None, - extra_body: dict[str, Any] | None = None, + query: str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CalculatePlanPricingResponse: - """ - Call ``POST /v1/plans:calculate``. - - Args: - instances: Resource instances to calculate pricing for - """ + ) -> m.ListCountriesCitiesResponse: + """Call ``GET /v1/countries-cities``.""" return self._client._call( - "POST", - "/v1/plans:calculate", - m.CalculatePlanPricingResponse, - query=_query(extra_query), - body=_body( - m.CalculatePlanPricingRequest, - extra_body, - False, - ("calc_config", calc_config), - ("instances", instances), - ("plan_config", plan_config), - ), + "GET", + "/v1/countries-cities", + m.ListCountriesCitiesResponse, + query=_query(extra_query, ("query", query), ("page", page), ("pageSize", page_size)), + body=None, idempotent=False, timeout=timeout, ) - def create_plan( + def list_countries_cities_all( self, *, - cpu_limit: int | None = None, - cpu_units: int | None = None, - currency: str | None = None, - metadata: dict[str, Any] | None = None, - network_rate_limit_mbs: float | None = None, - node_ids: list[str] | None = None, - on_credit_exhaustion: str | None = None, - plan_id: str | None = None, - plan_prices: list[m.PlanPriceOverride | dict[str, Any]] | None = None, - region_id: str | None = None, - extra_body: dict[str, Any] | None = None, + query: str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> Iterator[m.Country]: """ - Call ``POST /v1/plans``. + Every result of :meth:`list_countries_cities`, reading page after page. - Args: - cpu_limit: Plan CPU/network scheduling overrides written into metadata.specifications. Proxmox cpulimit= (max CPU time); 0 = unlimited. Omitted = template value / 0. - cpu_units: Proxmox cpuunits= fair-share weight. Omitted = template value / 1024. - currency: Plan fields to override from template (name, description, and trial_days come from template) - metadata: Plan metadata. VirtFusion package_id lives under metadata.virtfusion.package_id. - network_rate_limit_mbs: Primary NIC rate limit in MB/s (Proxmox rate=); 0 = unlimited. - node_ids: Nodes this plan may sell on (must be catalog-eligible for the template). Required: at least one node_id (validated in Go). - on_credit_exhaustion: Provider choice when client prepaid credits are exhausted. Values: "suspend" (default), "continue_with_dunning". - plan_id: Template plan ID to clone from (required) - plan_prices: Plan prices with overrides (unit_amount_minor, currency, free_units per metric) - region_id: Region where this plan is offered (exactly one per plan). + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - return self._client._call( - "POST", - "/v1/plans", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.CreatePlanRequest, - extra_body, - False, - ("cpu_limit", cpu_limit), - ("cpu_units", cpu_units), - ("currency", currency), - ("metadata", metadata), - ("network_rate_limit_mbs", network_rate_limit_mbs), - ("node_ids", node_ids), - ("on_credit_exhaustion", on_credit_exhaustion), - ("plan_id", plan_id), - ("plan_prices", plan_prices), - ("region_id", region_id), - ), - idempotent=False, - timeout=timeout, - ) + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_countries_cities( + page=page, + page_size=size, + query=query, + extra_query=extra_query, + timeout=timeout, + ) + items = res.countries + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 - def delete_plan( + def list_datacenters( self, - id: str, *, + query: str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/plans/{id}``.""" + ) -> m.ListDatacentersResponse: + """Call ``GET /v1/datacenters``.""" return self._client._call( - "DELETE", - f"/v1/plans/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), + "GET", + "/v1/datacenters", + m.ListDatacentersResponse, + query=_query(extra_query, ("query", query), ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def list_assignable_nodes_for_plan( + def list_datacenters_all( self, *, - template_plan_id: str | None = None, - plan_id: str | None = None, - region_id: str | None = None, + query: str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListAssignableNodesForPlanResponse: + ) -> Iterator[m.DatacenterInfo]: """ - Nodes the provider may assign to a plan (catalog-eligible for tier/category). - - It calls ``GET /v1/provider/plans/assignable-nodes``. + Every result of :meth:`list_datacenters`, reading page after page. - Args: - template_plan_id: Optional: set for create-from-template. Empty when plan_id is used. - plan_id: Optional: set for edit existing plan. Empty when template_plan_id is used. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_datacenters( + page=page, + page_size=size, + query=query, + extra_query=extra_query, + timeout=timeout, + ) + items = res.datacenters + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + def list_regions( + self, + *, + page: int | None = None, + page_size: int | None = None, + search: str | None = None, + platform_id: str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.ListRegionsResponse: + """Call ``GET /v1/regions``.""" return self._client._call( "GET", - "/v1/provider/plans/assignable-nodes", - m.ListAssignableNodesForPlanResponse, + "/v1/regions", + m.ListRegionsResponse, query=_query( - extra_query, ("templatePlanId", template_plan_id), ("planId", plan_id), ("regionId", region_id) + extra_query, ("page", page), ("pageSize", page_size), ("search", search), ("platformId", platform_id) ), body=None, idempotent=False, timeout=timeout, ) - def update_plan( + def list_regions_all( self, - id: str, *, - addon_price_overrides: list[m.AddonPriceOverride | dict[str, Any]] | None = None, - cpu_limit: int | None = None, - cpu_units: int | None = None, - currency: str | None = None, - metadata: dict[str, Any] | None = None, - network_rate_limit_mbs: float | None = None, - node_ids: list[str] | None = None, - on_credit_exhaustion: str | None = None, - plan_prices: list[m.PlanPriceOverride | dict[str, Any]] | None = None, - region_id: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + search: str | None = None, + platform_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> Iterator[m.Region]: """ - Call ``PATCH /v1/plans/{id}``. + Every result of :meth:`list_regions`, reading page after page. - Args: - addon_price_overrides: Optional: Override prices for addons when updating plan - cpu_limit: Plan CPU/network scheduling overrides written into metadata.specifications. Only affects VMs created after the update (VMs snapshot plan values at create). - currency: Plan fields to update (name, description, and trial_days come from template, not updatable) - metadata: Plan metadata. VirtFusion package_id lives under metadata.virtfusion.package_id. - node_ids: When non-empty, replaces the plan's assigned nodes (same rules as create). Omitted / empty leaves existing assignments unchanged. - on_credit_exhaustion: Provider choice when client prepaid credits are exhausted. Values: "suspend" (default), "continue_with_dunning". - plan_prices: Plan prices with overrides (unit_amount_minor, currency, free_units per metric) - region_id: Region for this plan offer (optional on update). + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - return self._client._call( - "PATCH", - f"/v1/plans/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.UpdatePlanBody, - extra_body, - False, - ("addon_price_overrides", addon_price_overrides), - ("cpu_limit", cpu_limit), - ("cpu_units", cpu_units), - ("currency", currency), - ("metadata", metadata), - ("network_rate_limit_mbs", network_rate_limit_mbs), - ("node_ids", node_ids), - ("on_credit_exhaustion", on_credit_exhaustion), - ("plan_prices", plan_prices), - ("region_id", region_id), - ), - idempotent=False, - timeout=timeout, - ) + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_regions( + page=page, + page_size=size, + search=search, + platform_id=platform_id, + extra_query=extra_query, + timeout=timeout, + ) + items = res.regions + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 -class ProviderReviewService(_Service): - """The NodeRings ProviderReviewService API.""" +class RoadmapService(_Service): + """The NodeRings RoadmapService API.""" - def create_provider_review_reply( + def create_roadmap_feature_request_comment( self, - review_id: str, + slug: str, *, - reply_message: str | None = None, + body: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateProviderReviewReplyResponse: - """Call ``POST /v1/provider-reviews/{reviewId}/reply``.""" + ) -> m.CreateRoadmapFeatureRequestCommentResponse: + """Call ``POST /v1/roadmap/requests/{slug}/comments``.""" return self._client._call( "POST", - f"/v1/provider-reviews/{_path(review_id)}/reply", - m.CreateProviderReviewReplyResponse, + f"/v1/roadmap/requests/{_path(slug)}/comments", + m.CreateRoadmapFeatureRequestCommentResponse, query=_query(extra_query), - body=_body(m.CreateProviderReviewReplyBody, extra_body, False, ("reply_message", reply_message)), + body=_body(m.CreateRoadmapFeatureRequestCommentBody, extra_body, False, ("body", body)), idempotent=False, timeout=timeout, ) - def delete_provider_review_reply( + def delete_roadmap_feature_request_comment( self, - review_id: str, + comment_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DeleteProviderReviewReplyResponse: - """Call ``DELETE /v1/provider-reviews/{reviewId}/reply``.""" + ) -> m.DeleteRoadmapFeatureRequestCommentResponse: + """Call ``DELETE /v1/roadmap/comments/{commentId}``.""" return self._client._call( "DELETE", - f"/v1/provider-reviews/{_path(review_id)}/reply", - m.DeleteProviderReviewReplyResponse, + f"/v1/roadmap/comments/{_path(comment_id)}", + m.DeleteRoadmapFeatureRequestCommentResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_provider_reviews( + def get_roadmap_feature_request( self, + slug: str, *, - page: int | None = None, - page_size: int | None = None, - star_ratings: list[int] | None = None, - search: str | None = None, - reply_filter: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListProviderReviewsResponse: - """ - Call ``GET /v1/provider-reviews``. - - Args: - star_ratings: Multi-select star filter (e.g. [5,4]); empty means any stars. - search: Case-insensitive substring match on review comment or provider reply; empty means no text filter. - reply_filter: Inbox: 0 = awaiting provider reply / empty reply (default), 1 = replied only, 2 = all reviews. - """ + ) -> m.GetRoadmapFeatureRequestResponse: + """Call ``GET /v1/roadmap/requests/{slug}``.""" return self._client._call( "GET", - "/v1/provider-reviews", - m.ListProviderReviewsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("starRatings", star_ratings), - ("search", search), - ("replyFilter", reply_filter), - ), + f"/v1/roadmap/requests/{_path(slug)}", + m.GetRoadmapFeatureRequestResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def update_provider_review_reply( + def get_roadmap_stats( self, - review_id: str, *, - reply_message: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateProviderReviewReplyResponse: - """Call ``PATCH /v1/provider-reviews/{reviewId}/reply``.""" + ) -> m.GetRoadmapStatsResponse: + """Call ``GET /v1/roadmap/stats``.""" return self._client._call( - "PATCH", - f"/v1/provider-reviews/{_path(review_id)}/reply", - m.UpdateProviderReviewReplyResponse, + "GET", + "/v1/roadmap/stats", + m.GetRoadmapStatsResponse, query=_query(extra_query), - body=_body(m.UpdateProviderReviewReplyBody, extra_body, False, ("reply_message", reply_message)), + body=None, idempotent=False, timeout=timeout, ) - -class ProviderStorefrontService(_Service): - """The NodeRings ProviderStorefrontService API.""" - - def get_my_storefront( + def list_roadmap_feature_request_comments( self, + slug: str, *, + page: int | None = None, + limit: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetMyStorefrontResponse: - """Call ``GET /v1/provider/storefront``.""" + ) -> m.ListRoadmapFeatureRequestCommentsResponse: + """Call ``GET /v1/roadmap/requests/{slug}/comments``.""" return self._client._call( "GET", - "/v1/provider/storefront", - m.GetMyStorefrontResponse, - query=_query(extra_query), + f"/v1/roadmap/requests/{_path(slug)}/comments", + m.ListRoadmapFeatureRequestCommentsResponse, + query=_query(extra_query, ("page", page), ("limit", limit)), body=None, idempotent=False, timeout=timeout, ) - def opt_in_storefront( - self, - *, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetMyStorefrontResponse: - """Call ``POST /v1/provider/storefront/opt-in``.""" - return self._client._call( - "POST", - "/v1/provider/storefront/opt-in", - m.GetMyStorefrontResponse, - query=_query(extra_query), - body=dict(extra_body or {}), - idempotent=False, - timeout=timeout, - ) - - def opt_out_storefront( + def list_roadmap_feature_requests( self, *, - extra_body: dict[str, Any] | None = None, + status: m.RoadmapRequestStatus | str | None = None, + product_slug: str | None = None, + search: str | None = None, + sort: str | None = None, + page: int | None = None, + limit: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetMyStorefrontResponse: - """Call ``POST /v1/provider/storefront/opt-out``.""" + ) -> m.ListRoadmapFeatureRequestsResponse: + """Call ``GET /v1/roadmap/requests``.""" return self._client._call( - "POST", - "/v1/provider/storefront/opt-out", - m.GetMyStorefrontResponse, - query=_query(extra_query), - body=dict(extra_body or {}), + "GET", + "/v1/roadmap/requests", + m.ListRoadmapFeatureRequestsResponse, + query=_query( + extra_query, + ("status", status), + ("productSlug", product_slug), + ("search", search), + ("sort", sort), + ("page", page), + ("limit", limit), + ), + body=None, idempotent=False, timeout=timeout, ) - def preview_my_storefront( + def list_roadmap_product_categories( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.PreviewMyStorefrontResponse: - """Call ``GET /v1/provider/storefront/preview``.""" + ) -> m.ListRoadmapProductCategoriesResponse: + """Call ``GET /v1/roadmap/products``.""" return self._client._call( "GET", - "/v1/provider/storefront/preview", - m.PreviewMyStorefrontResponse, + "/v1/roadmap/products", + m.ListRoadmapProductCategoriesResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def submit_my_storefront( + def remove_roadmap_feature_request_vote( self, + slug: str, *, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetMyStorefrontResponse: - """Call ``POST /v1/provider/storefront/submit``.""" + ) -> m.VoteRoadmapFeatureRequestResponse: + """Call ``DELETE /v1/roadmap/requests/{slug}/vote``.""" return self._client._call( - "POST", - "/v1/provider/storefront/submit", - m.GetMyStorefrontResponse, + "DELETE", + f"/v1/roadmap/requests/{_path(slug)}/vote", + m.VoteRoadmapFeatureRequestResponse, query=_query(extra_query), - body=dict(extra_body or {}), + body=None, idempotent=False, timeout=timeout, ) - def update_my_storefront( + def submit_roadmap_feature_request( self, *, - about_markdown: str | None = None, - cover_image_url: str | None = None, - faqs: list[m.StorefrontFaq | dict[str, Any]] | None = None, - featured_plan_ids: list[str] | None = None, - highlight_custom: str | None = None, - highlight_custom_lines: list[str] | None = None, - highlight_keys: list[str] | None = None, - logo_image_url: str | None = None, - proposed_slug: str | None = None, - tagline: str | None = None, + description: str | None = None, + product_slug: str | None = None, + title: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetMyStorefrontResponse: - """Call ``PATCH /v1/provider/storefront``.""" + ) -> m.SubmitRoadmapFeatureRequestResponse: + """Call ``POST /v1/roadmap/submit``.""" return self._client._call( - "PATCH", - "/v1/provider/storefront", - m.GetMyStorefrontResponse, + "POST", + "/v1/roadmap/submit", + m.SubmitRoadmapFeatureRequestResponse, query=_query(extra_query), body=_body( - m.UpdateMyStorefrontRequest, + m.SubmitRoadmapFeatureRequestRequest, extra_body, False, - ("about_markdown", about_markdown), - ("cover_image_url", cover_image_url), - ("faqs", faqs), - ("featured_plan_ids", featured_plan_ids), - ("highlight_custom", highlight_custom), - ("highlight_custom_lines", highlight_custom_lines), - ("highlight_keys", highlight_keys), - ("logo_image_url", logo_image_url), - ("proposed_slug", proposed_slug), - ("tagline", tagline), + ("description", description), + ("product_slug", product_slug), + ("title", title), ), idempotent=False, timeout=timeout, ) - -class ProviderTicketNotificationService(_Service): - """The NodeRings ProviderTicketNotificationService API.""" - - def get_provider_ticket_notification_policy( + def update_roadmap_feature_request_comment( self, + comment_id: str, *, + body: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderTicketNotificationPolicyResponse: - """Call ``GET /v1/provider/ticket-notification-policy``.""" + ) -> m.UpdateRoadmapFeatureRequestCommentResponse: + """Call ``PATCH /v1/roadmap/comments/{commentId}``.""" return self._client._call( - "GET", - "/v1/provider/ticket-notification-policy", - m.GetProviderTicketNotificationPolicyResponse, + "PATCH", + f"/v1/roadmap/comments/{_path(comment_id)}", + m.UpdateRoadmapFeatureRequestCommentResponse, query=_query(extra_query), - body=None, + body=_body(m.UpdateRoadmapFeatureRequestCommentBody, extra_body, False, ("body", body)), idempotent=False, timeout=timeout, ) - def send_provider_ticket_notification_test( + def vote_roadmap_feature_request( self, + slug: str, *, + type: m.RoadmapVoteType | str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/provider/ticket-notification-policy:send-test``.""" + ) -> m.VoteRoadmapFeatureRequestResponse: + """Call ``POST /v1/roadmap/requests/{slug}/vote``.""" return self._client._call( "POST", - "/v1/provider/ticket-notification-policy:send-test", - m.SuccessResponse, + f"/v1/roadmap/requests/{_path(slug)}/vote", + m.VoteRoadmapFeatureRequestResponse, query=_query(extra_query), - body=dict(extra_body or {}), + body=_body(m.VoteRoadmapFeatureRequestBody, extra_body, False, ("type", type)), idempotent=False, timeout=timeout, ) - def update_provider_ticket_notification_policy( + +class RoleService(_Service): + """The NodeRings RoleService API.""" + + def create_role( self, *, - policy: m.ProviderTicketNotificationPolicy | dict[str, Any] | None = None, + description: str | None = None, + group_ids: list[str] | None = None, + name: str | None = None, + permissions: list[str] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderTicketNotificationPolicyResponse: - """Call ``PUT /v1/provider/ticket-notification-policy``.""" + ) -> m.CreateRoleResponse: + """Call ``POST /v1/roles``.""" return self._client._call( - "PUT", - "/v1/provider/ticket-notification-policy", - m.GetProviderTicketNotificationPolicyResponse, + "POST", + "/v1/roles", + m.CreateRoleResponse, query=_query(extra_query), - body=_body(m.UpdateProviderTicketNotificationPolicyRequest, extra_body, False, ("policy", policy)), + body=_body( + m.CreateRoleRequest, + extra_body, + False, + ("description", description), + ("group_ids", group_ids), + ("name", name), + ("permissions", permissions), + ), idempotent=False, timeout=timeout, ) - -class RefundService(_Service): - """The NodeRings RefundService API.""" - - def get_refund( + def delete_role( self, - refund_id: str, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetRefundResponse: - """ - GetRefund retrieves a single refund with payment and invoice details - - It calls ``GET /v1/refunds/{refundId}``. - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/roles/{id}``.""" return self._client._call( - "GET", - f"/v1/refunds/{_path(refund_id)}", - m.GetRefundResponse, + "DELETE", + f"/v1/roles/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_refunds( + def list_roles( self, *, - payment_id: str | None = None, - invoice_id: str | None = None, - status: m.RefundStatus | str | None = None, page: int | None = None, page_size: int | None = None, + filter_name: str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListRefundsResponse: - """ - ListRefunds lists refunds for a payment, invoice, or organization - - It calls ``GET /v1/refunds``. - """ + ) -> m.ListRolesResponse: + """Call ``GET /v1/roles``.""" return self._client._call( "GET", - "/v1/refunds", - m.ListRefundsResponse, + "/v1/roles", + m.ListRolesResponse, query=_query( - extra_query, - ("paymentId", payment_id), - ("invoiceId", invoice_id), - ("status", status), - ("page", page), - ("pageSize", page_size), + extra_query, ("page", page), ("pageSize", page_size), ("filterName", filter_name), ("search", search) ), body=None, idempotent=False, timeout=timeout, ) - def list_refunds_all( + def list_roles_all( self, *, - payment_id: str | None = None, - invoice_id: str | None = None, - status: m.RefundStatus | str | None = None, page: int | None = None, page_size: int | None = None, + filter_name: str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Refund]: + ) -> Iterator[m.Role]: """ - Every result of :meth:`list_refunds`, reading page after page. + Every result of :meth:`list_roles`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -12078,16 +11841,15 @@ def list_refunds_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_refunds( + res = self.list_roles( page=page, page_size=size, - payment_id=payment_id, - invoice_id=invoice_id, - status=status, + filter_name=filter_name, + search=search, extra_query=extra_query, timeout=timeout, ) - items = res.refunds + items = res.roles for item in items: yield item seen += len(items) @@ -12095,213 +11857,192 @@ def list_refunds_all( return page += 1 + def replace_role_for_group( + self, + *, + group_id: str | None = None, + role_id: str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``PUT /v1/roles/replace-for-group``.""" + return self._client._call( + "PUT", + "/v1/roles/replace-for-group", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.ReplaceRoleForGroupRequest, extra_body, False, ("group_id", group_id), ("role_id", role_id)), + idempotent=False, + timeout=timeout, + ) -class RegionService(_Service): - """The NodeRings RegionService API.""" - - def create_region( + def replace_role_for_service_account( self, *, - city_country_id: str | None = None, - datacenter_id: str | None = None, + role_id: str | None = None, + service_account_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.Region: - """Call ``POST /v1/regions``.""" + ) -> m.SuccessResponse: + """Call ``PUT /v1/roles/replace-for-service-account``.""" return self._client._call( - "POST", - "/v1/regions", - m.Region, + "PUT", + "/v1/roles/replace-for-service-account", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.CreateRegionRequest, + m.ReplaceRoleForServiceAccountRequest, extra_body, False, - ("city_country_id", city_country_id), - ("datacenter_id", datacenter_id), + ("role_id", role_id), + ("service_account_id", service_account_id), ), idempotent=False, timeout=timeout, ) - def delete_region( + def replace_role_for_user( self, - id: str, *, + role_id: str | None = None, + user_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/regions/{id}``.""" + """Call ``PUT /v1/roles/replace-for-user``.""" return self._client._call( - "DELETE", - f"/v1/regions/{_path(id)}", + "PUT", + "/v1/roles/replace-for-user", m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.ReplaceRoleForUserRequest, extra_body, False, ("role_id", role_id), ("user_id", user_id)), idempotent=False, timeout=timeout, ) - def get_region( + def update_role( self, id: str, *, + description: str | None = None, + group_ids: list[str] | None = None, + name: str | None = None, + permissions: list[str] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.Region: - """Call ``GET /v1/regions/{id}``.""" + ) -> m.UpdateRoleResponse: + """Call ``PATCH /v1/roles/{id}``.""" return self._client._call( - "GET", - f"/v1/regions/{_path(id)}", - m.Region, + "PATCH", + f"/v1/roles/{_path(id)}", + m.UpdateRoleResponse, query=_query(extra_query), - body=None, + body=_body( + m.UpdateRoleBody, + extra_body, + False, + ("description", description), + ("group_ids", group_ids), + ("name", name), + ("permissions", permissions), + ), idempotent=False, timeout=timeout, ) - def list_countries_cities( + +class SSHKeyService(_Service): + """The NodeRings SSHKeyService API.""" + + def create_ssh_key( self, *, - query: str | None = None, - page: int | None = None, - page_size: int | None = None, + name: str | None = None, + public_key: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListCountriesCitiesResponse: - """Call ``GET /v1/countries-cities``.""" + ) -> m.CreateSSHKeyResponse: + """Call ``POST /v1/ssh-keys``.""" return self._client._call( - "GET", - "/v1/countries-cities", - m.ListCountriesCitiesResponse, - query=_query(extra_query, ("query", query), ("page", page), ("pageSize", page_size)), - body=None, + "POST", + "/v1/ssh-keys", + m.CreateSSHKeyResponse, + query=_query(extra_query), + body=_body(m.CreateSSHKeyRequest, extra_body, False, ("name", name), ("public_key", public_key)), idempotent=False, timeout=timeout, ) - def list_countries_cities_all( + def delete_ssh_key( self, + id: str, *, - query: str | None = None, - page: int | None = None, - page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Country]: - """ - Every result of :meth:`list_countries_cities`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_countries_cities( - page=page, - page_size=size, - query=query, - extra_query=extra_query, - timeout=timeout, - ) - items = res.countries - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + ) -> m.SuccessResponse: + """Call ``DELETE /v1/ssh-keys/{id}``.""" + return self._client._call( + "DELETE", + f"/v1/ssh-keys/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - def list_datacenters( + def get_ssh_key( self, + id: str, *, - query: str | None = None, - page: int | None = None, - page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDatacentersResponse: - """Call ``GET /v1/datacenters``.""" + ) -> m.GetSSHKeyResponse: + """Call ``GET /v1/ssh-keys/{id}``.""" return self._client._call( "GET", - "/v1/datacenters", - m.ListDatacentersResponse, - query=_query(extra_query, ("query", query), ("page", page), ("pageSize", page_size)), + f"/v1/ssh-keys/{_path(id)}", + m.GetSSHKeyResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_datacenters_all( - self, - *, - query: str | None = None, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.DatacenterInfo]: - """ - Every result of :meth:`list_datacenters`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_datacenters( - page=page, - page_size=size, - query=query, - extra_query=extra_query, - timeout=timeout, - ) - items = res.datacenters - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - def list_regions( + def list_ssh_keys( self, *, page: int | None = None, page_size: int | None = None, - search: str | None = None, - platform_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListRegionsResponse: - """Call ``GET /v1/regions``.""" + ) -> m.ListSSHKeysResponse: + """Call ``GET /v1/ssh-keys``.""" return self._client._call( "GET", - "/v1/regions", - m.ListRegionsResponse, - query=_query( - extra_query, ("page", page), ("pageSize", page_size), ("search", search), ("platformId", platform_id) - ), + "/v1/ssh-keys", + m.ListSSHKeysResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def list_regions_all( + def list_ssh_keys_all( self, *, page: int | None = None, page_size: int | None = None, - search: str | None = None, - platform_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Region]: + ) -> Iterator[m.SSHKey]: """ - Every result of :meth:`list_regions`, reading page after page. + Every result of :meth:`list_ssh_keys`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -12309,15 +12050,8 @@ def list_regions_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_regions( - page=page, - page_size=size, - search=search, - platform_id=platform_id, - extra_query=extra_query, - timeout=timeout, - ) - items = res.regions + res = self.list_ssh_keys(page=page, page_size=size, extra_query=extra_query, timeout=timeout) + items = res.ssh_keys for item in items: yield item seen += len(items) @@ -12326,264 +12060,250 @@ def list_regions_all( page += 1 -class RegisteredDomainService(_Service): - """The NodeRings RegisteredDomainService API.""" +class SecretService(_Service): + """The NodeRings SecretService API.""" - def approve_outgoing_transfer( + def create_secret( self, - name: str, *, + key: str | None = None, + value: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RegisteredDomain: - """Call ``POST /v1/registrar/domains/{name}/transfer-out/approve``.""" + ) -> m.CreateSecretResponse: + """Call ``POST /v1/secrets``.""" return self._client._call( "POST", - f"/v1/registrar/domains/{_path(name)}/transfer-out/approve", - m.RegisteredDomain, + "/v1/secrets", + m.CreateSecretResponse, query=_query(extra_query), - body=_body(m.ApproveOutgoingTransferBody, extra_body, False), + body=_body(m.CreateSecretRequest, extra_body, False, ("key", key), ("value", value)), idempotent=False, timeout=timeout, ) - def confirm_registrant_change( + def delete_secret( self, - token: str, + id: str, *, - approve: bool | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ConfirmRegistrantChangeResponse: - """ - Anonymous via the signed token from the approval email. - - It calls ``POST /v1/registrar/registrant-changes/{token}``. - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/secrets/{id}``.""" return self._client._call( - "POST", - f"/v1/registrar/registrant-changes/{_path(token)}", - m.ConfirmRegistrantChangeResponse, + "DELETE", + f"/v1/secrets/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.ConfirmRegistrantChangeBody, extra_body, False, ("approve", approve)), + body=None, idempotent=False, timeout=timeout, ) - def delete_domain_glue_record( + def get_secret( self, - name: str, - host: str, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/registrar/domains/{name}/glue/{host}``.""" + ) -> m.GetSecretResponse: + """Call ``GET /v1/secrets/{id}``.""" return self._client._call( - "DELETE", - f"/v1/registrar/domains/{_path(name)}/glue/{_path(host)}", - m.SuccessResponse, + "GET", + f"/v1/secrets/{_path(id)}", + m.GetSecretResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def delete_registered_domain( + def list_secrets( self, - name: str, *, - confirm_name: str | None = None, - confirmation_code: str | None = None, - reauth_token: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DeleteRegisteredDomainResponse: - """ - Two steps: without confirmation_code a code is emailed to the org owners. POST (not DELETE) - so the confirmation code and reauth token travel in the body, not in the URL. - - It calls ``POST /v1/registrar/domains/{name}/delete``. - - Args: - confirm_name: Typed confirmation: must equal name. - confirmation_code: Code emailed to the org owners (30 min). Empty = send a code. - """ + ) -> m.ListSecretsResponse: + """Call ``GET /v1/secrets``.""" return self._client._call( - "POST", - f"/v1/registrar/domains/{_path(name)}/delete", - m.DeleteRegisteredDomainResponse, - query=_query(extra_query), - body=_body( - m.DeleteRegisteredDomainBody, - extra_body, - False, - ("confirm_name", confirm_name), - ("confirmation_code", confirmation_code), - ("reauth_token", reauth_token), - ), + "GET", + "/v1/secrets", + m.ListSecretsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), + body=None, idempotent=False, timeout=timeout, ) - def get_domain_auth_code( + def list_secrets_all( self, - name: str, *, - reauth_token: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetDomainAuthCodeResponse: + ) -> Iterator[m.Secret]: """ - POST so the reauth token travels in the body. Sensitive response. - - It calls ``POST /v1/registrar/domains/{name}/auth-code``. + Every result of :meth:`list_secrets`, reading page after page. - Args: - reauth_token: Step-up token from ReauthenticateUser (10 minutes). + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_secrets(page=page, page_size=size, extra_query=extra_query, timeout=timeout) + items = res.secrets + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + def update_secret( + self, + id: str, + *, + value: str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``PATCH /v1/secrets/{id}``.""" return self._client._call( - "POST", - f"/v1/registrar/domains/{_path(name)}/auth-code", - m.GetDomainAuthCodeResponse, + "PATCH", + f"/v1/secrets/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.GetDomainAuthCodeBody, extra_body, False, ("reauth_token", reauth_token)), + body=_body(m.UpdateSecretBody, extra_body, False, ("value", value)), idempotent=False, timeout=timeout, ) - def get_registered_domain( + +class ServiceAccountService(_Service): + """The NodeRings ServiceAccountService API.""" + + def create_service_account( self, - name: str, *, + allowed_ips: list[str] | None = None, + description: str | None = None, + name: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RegisteredDomain: - """Call ``GET /v1/registrar/domains/{name}``.""" + ) -> m.ServiceAccountResponse: + """Call ``POST /v1/service-accounts``.""" return self._client._call( - "GET", - f"/v1/registrar/domains/{_path(name)}", - m.RegisteredDomain, + "POST", + "/v1/service-accounts", + m.ServiceAccountResponse, query=_query(extra_query), - body=None, + body=_body( + m.CreateServiceAccountRequest, + extra_body, + False, + ("allowed_ips", allowed_ips), + ("description", description), + ("name", name), + ), idempotent=False, timeout=timeout, ) - def list_domain_events( + def delete_service_account( self, - name: str, + id: str, *, - page: int | None = None, - page_size: int | None = None, - kinds: list[m.DomainEventKind | str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDomainEventsResponse: - """Call ``GET /v1/registrar/domains/{name}/events``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/service-accounts/{id}``.""" return self._client._call( - "GET", - f"/v1/registrar/domains/{_path(name)}/events", - m.ListDomainEventsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("kinds", kinds)), + "DELETE", + f"/v1/service-accounts/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_domain_events_all( + def generate_token( self, - name: str, + service_account_id: str, *, - page: int | None = None, - page_size: int | None = None, - kinds: list[m.DomainEventKind | str] | None = None, + expires_in_days: int | None = None, + name: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.DomainEvent]: - """ - Every result of :meth:`list_domain_events`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_domain_events( - name, - page=page, - page_size=size, - kinds=kinds, - extra_query=extra_query, - timeout=timeout, - ) - items = res.events - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + ) -> m.GenerateServiceAccountTokenResponse: + """Call ``POST /v1/service-accounts/{serviceAccountId}/tokens``.""" + return self._client._call( + "POST", + f"/v1/service-accounts/{_path(service_account_id)}/tokens", + m.GenerateServiceAccountTokenResponse, + query=_query(extra_query), + body=_body(m.GenerateTokenBody, extra_body, False, ("expires_in_days", expires_in_days), ("name", name)), + idempotent=False, + timeout=timeout, + ) - def list_domain_glue_records( + def get_service_account( self, - name: str, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDomainGlueRecordsResponse: - """Call ``GET /v1/registrar/domains/{name}/glue``.""" + ) -> m.ServiceAccountResponse: + """Call ``GET /v1/service-accounts/{id}``.""" return self._client._call( "GET", - f"/v1/registrar/domains/{_path(name)}/glue", - m.ListDomainGlueRecordsResponse, + f"/v1/service-accounts/{_path(id)}", + m.ServiceAccountResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_domain_invoices( + def list_service_accounts( self, - name: str, *, + include_inactive: bool | None = None, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDomainInvoicesResponse: - """ - Billing tab: paid invoices covering the domain (checkout orders and automatic renewals, - which have no order). Newest first. - - It calls ``GET /v1/registrar/domains/{name}/invoices``. - """ + ) -> m.ListServiceAccountsResponse: + """Call ``GET /v1/service-accounts``.""" return self._client._call( "GET", - f"/v1/registrar/domains/{_path(name)}/invoices", - m.ListDomainInvoicesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "/v1/service-accounts", + m.ListServiceAccountsResponse, + query=_query(extra_query, ("includeInactive", include_inactive), ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def list_domain_invoices_all( + def list_service_accounts_all( self, - name: str, *, + include_inactive: bool | None = None, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.DomainInvoice]: + ) -> Iterator[m.ServiceAccountResponse]: """ - Every result of :meth:`list_domain_invoices`, reading page after page. + Every result of :meth:`list_service_accounts`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -12591,14 +12311,14 @@ def list_domain_invoices_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_domain_invoices( - name, + res = self.list_service_accounts( page=page, page_size=size, + include_inactive=include_inactive, extra_query=extra_query, timeout=timeout, ) - items = res.invoices + items = res.service_accounts for item in items: yield item seen += len(items) @@ -12606,58 +12326,39 @@ def list_domain_invoices_all( return page += 1 - def list_registered_domains( + def list_tokens( self, + service_account_id: str, *, + include_inactive: bool | None = None, page: int | None = None, page_size: int | None = None, - states: list[m.RegisteredDomainState | str] | None = None, - search: str | None = None, - expiring_soon: bool | None = None, - needs_attention: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListRegisteredDomainsResponse: - """ - Call ``GET /v1/registrar/domains``. - - Args: - search: Substring match on the name. - expiring_soon: Renew-by within 30 days. - needs_attention: Has a hold, verification pending, failed renewal or pending transfer out. - """ + ) -> m.ListServiceAccountTokensResponse: + """Call ``GET /v1/service-accounts/{serviceAccountId}/tokens``.""" return self._client._call( "GET", - "/v1/registrar/domains", - m.ListRegisteredDomainsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("states", states), - ("search", search), - ("expiringSoon", expiring_soon), - ("needsAttention", needs_attention), - ), + f"/v1/service-accounts/{_path(service_account_id)}/tokens", + m.ListServiceAccountTokensResponse, + query=_query(extra_query, ("includeInactive", include_inactive), ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def list_registered_domains_all( + def list_tokens_all( self, + service_account_id: str, *, + include_inactive: bool | None = None, page: int | None = None, page_size: int | None = None, - states: list[m.RegisteredDomainState | str] | None = None, - search: str | None = None, - expiring_soon: bool | None = None, - needs_attention: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.RegisteredDomain]: + ) -> Iterator[m.ServiceAccountTokenInfo]: """ - Every result of :meth:`list_registered_domains`, reading page after page. + Every result of :meth:`list_tokens`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -12665,17 +12366,15 @@ def list_registered_domains_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_registered_domains( + res = self.list_tokens( + service_account_id, page=page, page_size=size, - states=states, - search=search, - expiring_soon=expiring_soon, - needs_attention=needs_attention, + include_inactive=include_inactive, extra_query=extra_query, timeout=timeout, ) - items = res.domains + items = res.tokens for item in items: yield item seen += len(items) @@ -12683,447 +12382,290 @@ def list_registered_domains_all( return page += 1 - def renew_domain( + def revoke_token( self, - name: str, + token_id: str, *, - idempotency_key: str | None = None, - years: int | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrder: - """ - Creates a renew order (checkout path, 3-D Secure possible). - - It calls ``POST /v1/registrar/domains/{name}/renew``. A retry of the same call cannot create - a second resource: the SDK sends an idempotency key. - - Args: - idempotency_key: A UUID that makes the create safe to retry. If you leave it out, the SDK sets a new one. - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/service-accounts/tokens/{tokenId}``.""" return self._client._call( - "POST", - f"/v1/registrar/domains/{_path(name)}/renew", - m.DomainOrder, + "DELETE", + f"/v1/service-accounts/tokens/{_path(token_id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.RenewDomainBody, extra_body, True, ("idempotency_key", idempotency_key), ("years", years)), - idempotent=True, + body=None, + idempotent=False, timeout=timeout, ) - def resend_registrant_verification( + def update_service_account( self, - name: str, + id: str, *, + allowed_ips: list[str] | None = None, + description: str | None = None, + is_active: bool | None = None, + name: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ResendRegistrantVerificationResponse: - """Call ``POST /v1/registrar/domains/{name}/verification/resend``.""" + ) -> m.ServiceAccountResponse: + """Call ``PATCH /v1/service-accounts/{id}``.""" return self._client._call( - "POST", - f"/v1/registrar/domains/{_path(name)}/verification/resend", - m.ResendRegistrantVerificationResponse, + "PATCH", + f"/v1/service-accounts/{_path(id)}", + m.ServiceAccountResponse, query=_query(extra_query), - body=_body(m.ResendRegistrantVerificationBody, extra_body, False), + body=_body( + m.UpdateServiceAccountBody, + extra_body, + False, + ("allowed_ips", allowed_ips), + ("description", description), + ("is_active", is_active), + ("name", name), + ), idempotent=False, timeout=timeout, ) - def reset_domain_auth_code( + +class SnapshotService(_Service): + """The NodeRings SnapshotService API.""" + + def create_snapshot( self, - name: str, - *, - reauth_token: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetDomainAuthCodeResponse: - """Call ``POST /v1/registrar/domains/{name}/auth-code/reset``.""" - return self._client._call( - "POST", - f"/v1/registrar/domains/{_path(name)}/auth-code/reset", - m.GetDomainAuthCodeResponse, - query=_query(extra_query), - body=_body(m.ResetDomainAuthCodeBody, extra_body, False, ("reauth_token", reauth_token)), - idempotent=False, - timeout=timeout, - ) - - def restore_domain( - self, - name: str, - *, - idempotency_key: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrder: - """ - Creates a restore order. - - It calls ``POST /v1/registrar/domains/{name}/restore``. A retry of the same call cannot - create a second resource: the SDK sends an idempotency key. - - Args: - idempotency_key: A UUID that makes the create safe to retry. If you leave it out, the SDK sets a new one. - """ - return self._client._call( - "POST", - f"/v1/registrar/domains/{_path(name)}/restore", - m.DomainOrder, - query=_query(extra_query), - body=_body(m.RestoreDomainBody, extra_body, True, ("idempotency_key", idempotency_key)), - idempotent=True, - timeout=timeout, - ) - - def retry_domain_transfer( - self, - order_item_id: str, + vm_id: str, *, - auth_code: str | None = None, + description: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrder: - """ - Resubmits a failed incoming transfer with a corrected auth code (restarts the registry - operation). Only while the order still holds the payment for the item; otherwise - TRANSFER_NEW_ORDER_REQUIRED. - - It calls ``POST /v1/registrar/order-items/{orderItemId}/retry-transfer``. - """ + ) -> m.CreateSnapshotResponse: + """Call ``POST /v1/virtual-machines/{vmId}/snapshots``.""" return self._client._call( "POST", - f"/v1/registrar/order-items/{_path(order_item_id)}/retry-transfer", - m.DomainOrder, + f"/v1/virtual-machines/{_path(vm_id)}/snapshots", + m.CreateSnapshotResponse, query=_query(extra_query), - body=_body(m.RetryDomainTransferBody, extra_body, False, ("auth_code", auth_code)), + body=_body(m.CreateSnapshotBody, extra_body, False, ("description", description)), idempotent=False, timeout=timeout, ) - def set_domain_auto_renew( + def delete_snapshot( self, - name: str, + vm_id: str, + snapshot_id: str, *, - auto_renew: bool | None = None, - mit_consent: bool | None = None, - payment_method_id: str | None = None, - whois_privacy_auto_renew: bool | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RegisteredDomain: - """ - Call ``PUT /v1/registrar/domains/{name}/auto-renew``. - - Args: - mit_consent: Required when turning auto-renew on. - payment_method_id: Card for this domain's renewals (empty = org default card). - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/virtual-machines/{vmId}/snapshots/{snapshotId}``.""" return self._client._call( - "PUT", - f"/v1/registrar/domains/{_path(name)}/auto-renew", - m.RegisteredDomain, + "DELETE", + f"/v1/virtual-machines/{_path(vm_id)}/snapshots/{_path(snapshot_id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.SetDomainAutoRenewBody, - extra_body, - False, - ("auto_renew", auto_renew), - ("mit_consent", mit_consent), - ("payment_method_id", payment_method_id), - ("whois_privacy_auto_renew", whois_privacy_auto_renew), - ), + body=None, idempotent=False, timeout=timeout, ) - def set_domain_dnssec( + def get_snapshot( self, - name: str, + vm_id: str, + snapshot_id: str, *, - dnskeys: list[m.DomainDnskeyRecord | dict[str, Any]] | None = None, - ds_records: list[m.DomainDSRecord | dict[str, Any]] | None = None, - mode: m.DomainDNSSECMode | str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RegisteredDomain: - """ - Mode + custom keys. - - It calls ``PUT /v1/registrar/domains/{name}/dnssec``. - - Args: - dnskeys: CUSTOM mode: DNSKEY records (or ds_records where supported). - mode: - DOMAIN_DNSSEC_MODE_MANAGED: NodeRings keys, pushed to the registry automatically. - DOMAIN_DNSSEC_MODE_CUSTOM: Customer-supplied DNSKEY/DS records (custom nameservers). - """ + ) -> m.GetSnapshotResponse: + """Call ``GET /v1/virtual-machines/{vmId}/snapshots/{snapshotId}``.""" return self._client._call( - "PUT", - f"/v1/registrar/domains/{_path(name)}/dnssec", - m.RegisteredDomain, + "GET", + f"/v1/virtual-machines/{_path(vm_id)}/snapshots/{_path(snapshot_id)}", + m.GetSnapshotResponse, query=_query(extra_query), - body=_body( - m.SetDomainDNSSECBody, - extra_body, - False, - ("dnskeys", dnskeys), - ("ds_records", ds_records), - ("mode", mode), - ), + body=None, idempotent=False, timeout=timeout, ) - def set_domain_nameservers( + def list_snapshots( self, - name: str, + vm_id: str, *, - nameservers: list[str] | None = None, - ns_mode: m.DomainNsMode | str | None = None, - extra_body: dict[str, Any] | None = None, + status: m.SnapshotStatus | str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RegisteredDomain: - """ - Call ``PUT /v1/registrar/domains/{name}/nameservers``. - - Args: - nameservers: Custom nameservers (2-13) when ns_mode is CUSTOM. - ns_mode: - DOMAIN_NS_MODE_NODERINGS: NodeRings DNS (cfg.PowerDNS.AssignedNameservers). - DOMAIN_NS_MODE_CUSTOM: Customer nameservers. - """ + ) -> m.ListSnapshotsResponse: + """Call ``GET /v1/virtual-machines/{vmId}/snapshots``.""" return self._client._call( - "PUT", - f"/v1/registrar/domains/{_path(name)}/nameservers", - m.RegisteredDomain, - query=_query(extra_query), - body=_body( - m.SetDomainNameserversBody, extra_body, False, ("nameservers", nameservers), ("ns_mode", ns_mode) - ), + "GET", + f"/v1/virtual-machines/{_path(vm_id)}/snapshots", + m.ListSnapshotsResponse, + query=_query(extra_query, ("status", status), ("page", page), ("pageSize", page_size)), + body=None, idempotent=False, timeout=timeout, ) - def set_domain_privacy( + def list_snapshots_all( self, - name: str, + vm_id: str, *, - enabled: bool | None = None, - idempotency_key: str | None = None, - extra_body: dict[str, Any] | None = None, + status: m.SnapshotStatus | str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SetDomainPrivacyResponse: + ) -> Iterator[m.Snapshot]: """ - Enabling may create a privacy order to pay (order_id in the response). - - It calls ``PUT /v1/registrar/domains/{name}/privacy``. A retry of the same call cannot - create a second resource: the SDK sends an idempotency key. + Every result of :meth:`list_snapshots`, reading page after page. - Args: - idempotency_key: A UUID that makes the create safe to retry. If you leave it out, the SDK sets a new one. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - return self._client._call( - "PUT", - f"/v1/registrar/domains/{_path(name)}/privacy", - m.SetDomainPrivacyResponse, - query=_query(extra_query), - body=_body( - m.SetDomainPrivacyBody, extra_body, True, ("enabled", enabled), ("idempotency_key", idempotency_key) - ), - idempotent=True, - timeout=timeout, - ) + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_snapshots( + vm_id, + page=page, + page_size=size, + status=status, + extra_query=extra_query, + timeout=timeout, + ) + items = res.snapshots + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 - def set_domain_transfer_lock( + def restore_snapshot( self, - name: str, + vm_id: str, + snapshot_id: str, *, - locked: bool | None = None, - reauth_token: str | None = None, + snapshot_name: str | None = None, + stop_vm: bool | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RegisteredDomain: - """ - Unlocking requires a step-up reauth_token. - - It calls ``PUT /v1/registrar/domains/{name}/lock``. - - Args: - reauth_token: Step-up token from ReauthenticateUser; required to unlock. - """ + ) -> m.SuccessResponse: + """Call ``POST /v1/virtual-machines/{vmId}/snapshots/{snapshotId}/restore``.""" return self._client._call( - "PUT", - f"/v1/registrar/domains/{_path(name)}/lock", - m.RegisteredDomain, + "POST", + f"/v1/virtual-machines/{_path(vm_id)}/snapshots/{_path(snapshot_id)}/restore", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.SetDomainTransferLockBody, extra_body, False, ("locked", locked), ("reauth_token", reauth_token) + m.RestoreSnapshotBody, extra_body, False, ("snapshot_name", snapshot_name), ("stop_vm", stop_vm) ), idempotent=False, timeout=timeout, ) - def update_domain_contacts( - self, - name: str, - *, - admin_contact_id: str | None = None, - reauth_token: str | None = None, - registrant_contact_id: str | None = None, - skip_transfer_lock: bool | None = None, - tech_contact_id: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateDomainContactsResponse: - """ - May start the change-of-registrant flow. - - It calls ``PUT /v1/registrar/domains/{name}/contacts``. - Args: - reauth_token: Required for a registrant change. - skip_transfer_lock: ICANN Transfer Policy opt-out of the 60-day lock after a registrant change. - """ - return self._client._call( - "PUT", - f"/v1/registrar/domains/{_path(name)}/contacts", - m.UpdateDomainContactsResponse, - query=_query(extra_query), - body=_body( - m.UpdateDomainContactsBody, - extra_body, - False, - ("admin_contact_id", admin_contact_id), - ("reauth_token", reauth_token), - ("registrant_contact_id", registrant_contact_id), - ("skip_transfer_lock", skip_transfer_lock), - ("tech_contact_id", tech_contact_id), - ), - idempotent=False, - timeout=timeout, - ) +class SubscriptionService(_Service): + """The NodeRings SubscriptionService API.""" - def upsert_domain_glue_record( + def cancel( self, - name: str, - host: str, *, - ipv4: list[str] | None = None, - ipv6: list[str] | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainGlueRecord: - """Call ``PUT /v1/registrar/domains/{name}/glue/{host}``.""" + ) -> m.CancelResponse: + """Call ``POST /v1/subscriptions:cancel``.""" return self._client._call( - "PUT", - f"/v1/registrar/domains/{_path(name)}/glue/{_path(host)}", - m.DomainGlueRecord, + "POST", + "/v1/subscriptions:cancel", + m.CancelResponse, query=_query(extra_query), - body=_body(m.UpsertDomainGlueRecordBody, extra_body, False, ("ipv4", ipv4), ("ipv6", ipv6)), + body=None, idempotent=False, timeout=timeout, ) - -class RegistrarAdminService(_Service): - """The NodeRings RegistrarAdminService API.""" - - def add_domain_hold( + def cancel_renewal( self, - name: str, *, - hold: m.DomainHold | str | None = None, - reason: str | None = None, + subscription_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.AdminRegisteredDomain: + ) -> m.CancelResponse: """ - Call ``POST /v1/registrar/admin/domains/{name}/holds``. + CancelRenewal: fixed-price plans stop renewing at current_period_end (VM stays; no refund). + Usage-based plans terminate immediately (same path as deleting the VM). - Args: - hold: Holds sit beside the state; any hold blocks risky mutations. + It calls ``POST /v1/subscriptions:cancel-renewal``. """ return self._client._call( "POST", - f"/v1/registrar/admin/domains/{_path(name)}/holds", - m.AdminRegisteredDomain, + "/v1/subscriptions:cancel-renewal", + m.CancelResponse, query=_query(extra_query), - body=_body(m.AddDomainHoldBody, extra_body, False, ("hold", hold), ("reason", reason)), + body=_body(m.CancelRenewalRequest, extra_body, False, ("subscription_id", subscription_id)), idempotent=False, timeout=timeout, ) - def get_registrar_balance( + def get_subscription_status( self, *, - provider: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetRegistrarBalanceResponse: - """ - Call ``GET /v1/registrar/admin/balance``. - - Args: - provider: Empty = configured default provider. - """ + ) -> m.GetSubscriptionStatusResponse: + """Call ``GET /v1/subscriptions:status``.""" return self._client._call( "GET", - "/v1/registrar/admin/balance", - m.GetRegistrarBalanceResponse, - query=_query(extra_query, ("provider", provider)), + "/v1/subscriptions:status", + m.GetSubscriptionStatusResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_all_domain_orders( + def list_subscriptions( self, *, page: int | None = None, page_size: int | None = None, - states: list[m.DomainOrderState | str] | None = None, - organization_id: str | None = None, + only_active: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListAllDomainOrdersResponse: - """Call ``GET /v1/registrar/admin/orders``.""" + ) -> m.ListSubscriptionsResponse: + """Call ``GET /v1/subscriptions``.""" return self._client._call( "GET", - "/v1/registrar/admin/orders", - m.ListAllDomainOrdersResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("states", states), - ("organizationId", organization_id), - ), + "/v1/subscriptions", + m.ListSubscriptionsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("onlyActive", only_active)), body=None, idempotent=False, timeout=timeout, ) - def list_all_domain_orders_all( + def list_subscriptions_all( self, *, page: int | None = None, page_size: int | None = None, - states: list[m.DomainOrderState | str] | None = None, - organization_id: str | None = None, + only_active: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.AdminDomainOrder]: + ) -> Iterator[m.Subscription]: """ - Every result of :meth:`list_all_domain_orders`, reading page after page. + Every result of :meth:`list_subscriptions`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -13131,15 +12673,14 @@ def list_all_domain_orders_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_all_domain_orders( + res = self.list_subscriptions( page=page, page_size=size, - states=states, - organization_id=organization_id, + only_active=only_active, extra_query=extra_query, timeout=timeout, ) - items = res.orders + items = res.subscriptions for item in items: yield item seen += len(items) @@ -13147,910 +12688,696 @@ def list_all_domain_orders_all( return page += 1 - def list_all_domains( + def retry_payment( self, *, - page: int | None = None, - page_size: int | None = None, - states: list[m.RegisteredDomainState | str] | None = None, - search: str | None = None, - organization_id: str | None = None, - holds: list[m.DomainHold | str] | None = None, + payment_method_id: str | None = None, + subscription_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListAllDomainsResponse: - """Call ``GET /v1/registrar/admin/domains``.""" - return self._client._call( - "GET", - "/v1/registrar/admin/domains", - m.ListAllDomainsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("states", states), - ("search", search), - ("organizationId", organization_id), - ("holds", holds), - ), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> m.RetryPaymentResponse: + """ + Call ``POST /v1/subscriptions:retry-payment``. - def list_all_domains_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - states: list[m.RegisteredDomainState | str] | None = None, - search: str | None = None, - organization_id: str | None = None, - holds: list[m.DomainHold | str] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.AdminRegisteredDomain]: - """ - Every result of :meth:`list_all_domains`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + Args: + payment_method_id: Optional: payment method ID to use for retry If not provided, uses the default payment method + subscription_id: Optional: subscription ID to retry payment for If not provided, retries payment for the user's active subscription """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_all_domains( - page=page, - page_size=size, - states=states, - search=search, - organization_id=organization_id, - holds=holds, - extra_query=extra_query, - timeout=timeout, - ) - items = res.domains - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - def list_tld_offerings( - self, - *, - page: int | None = None, - page_size: int | None = None, - provider: str | None = None, - search: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListTldOfferingsResponse: - """Call ``GET /v1/registrar/admin/tlds``.""" return self._client._call( - "GET", - "/v1/registrar/admin/tlds", - m.ListTldOfferingsResponse, - query=_query( - extra_query, ("page", page), ("pageSize", page_size), ("provider", provider), ("search", search) + "POST", + "/v1/subscriptions:retry-payment", + m.RetryPaymentResponse, + query=_query(extra_query), + body=_body( + m.RetryPaymentRequest, + extra_body, + False, + ("payment_method_id", payment_method_id), + ("subscription_id", subscription_id), ), - body=None, idempotent=False, timeout=timeout, ) - def list_tld_offerings_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - provider: str | None = None, - search: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.TldOffering]: - """ - Every result of :meth:`list_tld_offerings`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_tld_offerings( - page=page, - page_size=size, - provider=provider, - search=search, - extra_query=extra_query, - timeout=timeout, - ) - items = res.offerings - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - def move_domain_to_organization( + def undo_cancel_renewal( self, - name: str, *, - reason: str | None = None, - target_organization_id: str | None = None, + subscription_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.AdminRegisteredDomain: + ) -> m.CancelResponse: """ - Call ``POST /v1/registrar/admin/domains/{name}/move``. + UndoCancelRenewal clears cancel_at_period_end so the asset subscription renews again. - Args: - reason: Reference to both owners' written consent. + It calls ``POST /v1/subscriptions:undo-cancel-renewal``. """ return self._client._call( "POST", - f"/v1/registrar/admin/domains/{_path(name)}/move", - m.AdminRegisteredDomain, + "/v1/subscriptions:undo-cancel-renewal", + m.CancelResponse, query=_query(extra_query), - body=_body( - m.MoveDomainToOrganizationBody, - extra_body, - False, - ("reason", reason), - ("target_organization_id", target_organization_id), - ), + body=_body(m.UndoCancelRenewalRequest, extra_body, False, ("subscription_id", subscription_id)), idempotent=False, timeout=timeout, ) - def remove_domain_hold( + +class TicketService(_Service): + """The NodeRings TicketService API.""" + + def add_internal_comment( self, - name: str, + ticket_id: str, *, - hold: m.DomainHold | str | None = None, - reason: str | None = None, + comment: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.AdminRegisteredDomain: - """ - Call ``POST /v1/registrar/admin/domains/{name}/holds/remove``. - - Args: - hold: Holds sit beside the state; any hold blocks risky mutations. - """ + ) -> m.AddInternalCommentResponse: + """Call ``POST /v1/tickets/{ticketId}:internal-comment``.""" return self._client._call( "POST", - f"/v1/registrar/admin/domains/{_path(name)}/holds/remove", - m.AdminRegisteredDomain, + f"/v1/tickets/{_path(ticket_id)}:internal-comment", + m.AddInternalCommentResponse, query=_query(extra_query), - body=_body(m.RemoveDomainHoldBody, extra_body, False, ("hold", hold), ("reason", reason)), + body=_body(m.AddInternalCommentBody, extra_body, False, ("comment", comment)), idempotent=False, timeout=timeout, ) - def retry_registrar_operation( + def add_reply_to_ticket( self, + ticket_id: str, *, - order_item_id: str | None = None, - reason: str | None = None, - renewal_id: str | None = None, + reply_message: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """ - Call ``POST /v1/registrar/admin/operations/retry``. - - Args: - order_item_id: Exactly one of order_item_id / renewal_id. - """ + """Call ``POST /v1/tickets/{ticketId}:add-reply``.""" return self._client._call( "POST", - "/v1/registrar/admin/operations/retry", + f"/v1/tickets/{_path(ticket_id)}:add-reply", m.SuccessResponse, query=_query(extra_query), - body=_body( - m.RetryRegistrarOperationRequest, - extra_body, - False, - ("order_item_id", order_item_id), - ("reason", reason), - ("renewal_id", renewal_id), - ), + body=_body(m.AddReplyToTicketBody, extra_body, False, ("reply_message", reply_message)), idempotent=False, timeout=timeout, ) - def review_domain_order( + def confirm_ticket_attachment_upload( self, - id: str, *, - approve: bool | None = None, - reason: str | None = None, + upload_token: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.AdminDomainOrder: - """ - Approve or decline an order in in_review. - - It calls ``POST /v1/registrar/admin/orders/{id}/review``. - """ + ) -> m.TicketAttachment: + """Call ``POST /v1/tickets/attachments:confirm-upload``.""" return self._client._call( "POST", - f"/v1/registrar/admin/orders/{_path(id)}/review", - m.AdminDomainOrder, + "/v1/tickets/attachments:confirm-upload", + m.TicketAttachment, query=_query(extra_query), - body=_body(m.ReviewDomainOrderBody, extra_body, False, ("approve", approve), ("reason", reason)), + body=_body(m.ConfirmTicketAttachmentUploadRequest, extra_body, False, ("upload_token", upload_token)), idempotent=False, timeout=timeout, ) - def set_client_hold( + def create_ticket( self, - name: str, *, - enabled: bool | None = None, - reason: str | None = None, + template_id: str | None = None, + template_variables: dict[str, str] | None = None, + ticket: m.Ticket | dict[str, Any] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.AdminRegisteredDomain: - """ - Registry clientHold (suspends resolution). - - It calls ``PUT /v1/registrar/admin/domains/{name}/client-hold``. - """ + ) -> m.CreateTicketResponse: + """Call ``POST /v1/tickets``.""" return self._client._call( - "PUT", - f"/v1/registrar/admin/domains/{_path(name)}/client-hold", - m.AdminRegisteredDomain, + "POST", + "/v1/tickets", + m.CreateTicketResponse, query=_query(extra_query), - body=_body(m.SetClientHoldBody, extra_body, False, ("enabled", enabled), ("reason", reason)), + body=_body( + m.CreateTicketRequest, + extra_body, + False, + ("template_id", template_id), + ("template_variables", template_variables), + ("ticket", ticket), + ), idempotent=False, timeout=timeout, ) - def set_tld_offering( + def create_ticket_attachment_upload( self, - tld: str, + ticket_id: str, *, - blocked: bool | None = None, - blocked_reason: str | None = None, - category: m.TldCategory | str | None = None, - display_order: int | None = None, - eligibility: m.TldEligibility | str | None = None, - eligibility_note: str | None = None, - eligible_countries: list[str] | None = None, - enabled: bool | None = None, - featured: bool | None = None, - price_override: dict[str, Any] | None = None, - provider: str | None = None, - reason: str | None = None, - risk_note: str | None = None, - risk_tier: m.TldRiskTier | str | None = None, + file_name: str | None = None, + file_size: int | None = None, + mime_type: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.TldOffering: - """ - Enable/disable, feature, block, override price. - - It calls ``PUT /v1/registrar/admin/tlds/{tld}``. - - Args: - category: Grouping for "Show more extensions" in search and the pricing page (§8.2). - eligibility: Who may register under a TLD (§8.2). - TLD_ELIGIBILITY_RESIDENTS_ONLY: Registrant must be in one of eligible_countries (or meet the nexus rule in eligibility_note). - eligible_countries: Replaces the list when eligibility is RESIDENTS_ONLY. - price_override: Manual sell price / markup override; null clears it. - risk_tier: - TLD_RISK_TIER_HIGH: Cheap, frequently abused TLD: stricter checks at checkout. - """ + ) -> m.CreateTicketAttachmentUploadResponse: + """Call ``POST /v1/tickets/{ticketId}/attachments:upload``.""" return self._client._call( - "PUT", - f"/v1/registrar/admin/tlds/{_path(tld)}", - m.TldOffering, + "POST", + f"/v1/tickets/{_path(ticket_id)}/attachments:upload", + m.CreateTicketAttachmentUploadResponse, query=_query(extra_query), body=_body( - m.SetTldOfferingBody, + m.CreateTicketAttachmentUploadBody, extra_body, False, - ("blocked", blocked), - ("blocked_reason", blocked_reason), - ("category", category), - ("display_order", display_order), - ("eligibility", eligibility), - ("eligibility_note", eligibility_note), - ("eligible_countries", eligible_countries), - ("enabled", enabled), - ("featured", featured), - ("price_override", price_override), - ("provider", provider), - ("reason", reason), - ("risk_note", risk_note), - ("risk_tier", risk_tier), + ("file_name", file_name), + ("file_size", file_size), + ("mime_type", mime_type), ), idempotent=False, timeout=timeout, ) - def sync_domain( + def create_ticket_template( self, - name: str, *, + ticket_template: m.TicketTemplateInput | dict[str, Any] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.AdminRegisteredDomain: - """Call ``POST /v1/registrar/admin/domains/{name}/sync``.""" + ) -> m.TicketTemplate: + """Call ``POST /v1/ticket-templates``.""" return self._client._call( "POST", - f"/v1/registrar/admin/domains/{_path(name)}/sync", - m.AdminRegisteredDomain, + "/v1/ticket-templates", + m.TicketTemplate, query=_query(extra_query), - body=_body(m.SyncDomainBody, extra_body, False), + body=_body(m.CreateTicketTemplateRequest, extra_body, False, ("ticket_template", ticket_template)), idempotent=False, timeout=timeout, ) - def sync_tld_catalog( + def delete_ticket( self, + id: str, *, - provider: str | None = None, - reason: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SyncTldCatalogResponse: - """ - Queue registrar_catalog_sync now (it also runs daily at 03:30 UTC). - - It calls ``POST /v1/registrar/admin/tlds/sync``. - - Args: - provider: Empty = every configured provider. - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/tickets/{id}``.""" return self._client._call( - "POST", - "/v1/registrar/admin/tlds/sync", - m.SyncTldCatalogResponse, + "DELETE", + f"/v1/tickets/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.SyncTldCatalogRequest, extra_body, False, ("provider", provider), ("reason", reason)), + body=None, idempotent=False, timeout=timeout, ) - -class RoadmapService(_Service): - """The NodeRings RoadmapService API.""" - - def create_roadmap_feature_request_comment( + def delete_ticket_attachment( self, - slug: str, + attachment_id: str, *, - body: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateRoadmapFeatureRequestCommentResponse: - """Call ``POST /v1/roadmap/requests/{slug}/comments``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/tickets/attachments/{attachmentId}``.""" return self._client._call( - "POST", - f"/v1/roadmap/requests/{_path(slug)}/comments", - m.CreateRoadmapFeatureRequestCommentResponse, + "DELETE", + f"/v1/tickets/attachments/{_path(attachment_id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.CreateRoadmapFeatureRequestCommentBody, extra_body, False, ("body", body)), + body=None, idempotent=False, timeout=timeout, ) - def delete_roadmap_feature_request_comment( + def delete_ticket_template( self, - comment_id: str, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DeleteRoadmapFeatureRequestCommentResponse: - """Call ``DELETE /v1/roadmap/comments/{commentId}``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/ticket-templates/{id}``.""" return self._client._call( "DELETE", - f"/v1/roadmap/comments/{_path(comment_id)}", - m.DeleteRoadmapFeatureRequestCommentResponse, + f"/v1/ticket-templates/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_roadmap_feature_request( + def download_ticket_attachment( self, - slug: str, + attachment_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetRoadmapFeatureRequestResponse: - """Call ``GET /v1/roadmap/requests/{slug}``.""" + ) -> m.DownloadTicketAttachmentResponse: + """Call ``GET /v1/tickets/attachments/{attachmentId}:download``.""" return self._client._call( "GET", - f"/v1/roadmap/requests/{_path(slug)}", - m.GetRoadmapFeatureRequestResponse, + f"/v1/tickets/attachments/{_path(attachment_id)}:download", + m.DownloadTicketAttachmentResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_roadmap_stats( + def get_ticket( self, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetRoadmapStatsResponse: - """Call ``GET /v1/roadmap/stats``.""" + ) -> m.GetTicketResponse: + """Call ``GET /v1/tickets/{id}``.""" return self._client._call( "GET", - "/v1/roadmap/stats", - m.GetRoadmapStatsResponse, + f"/v1/tickets/{_path(id)}", + m.GetTicketResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_roadmap_feature_request_comments( + def get_ticket_template( self, - slug: str, + id: str, *, - page: int | None = None, - limit: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListRoadmapFeatureRequestCommentsResponse: - """Call ``GET /v1/roadmap/requests/{slug}/comments``.""" + ) -> m.TicketTemplate: + """Call ``GET /v1/ticket-templates/{id}``.""" return self._client._call( "GET", - f"/v1/roadmap/requests/{_path(slug)}/comments", - m.ListRoadmapFeatureRequestCommentsResponse, - query=_query(extra_query, ("page", page), ("limit", limit)), + f"/v1/ticket-templates/{_path(id)}", + m.TicketTemplate, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_roadmap_feature_requests( + def list_internal_comments( self, + ticket_id: str, *, - status: m.RoadmapRequestStatus | str | None = None, - product_slug: str | None = None, - search: str | None = None, - sort: str | None = None, - page: int | None = None, - limit: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListRoadmapFeatureRequestsResponse: - """Call ``GET /v1/roadmap/requests``.""" + ) -> m.ListInternalCommentsResponse: + """Call ``GET /v1/tickets/{ticketId}/internal-comments``.""" return self._client._call( "GET", - "/v1/roadmap/requests", - m.ListRoadmapFeatureRequestsResponse, - query=_query( - extra_query, - ("status", status), - ("productSlug", product_slug), - ("search", search), - ("sort", sort), - ("page", page), - ("limit", limit), - ), + f"/v1/tickets/{_path(ticket_id)}/internal-comments", + m.ListInternalCommentsResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_roadmap_product_categories( + def list_ticket_attachments( self, + ticket_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListRoadmapProductCategoriesResponse: - """Call ``GET /v1/roadmap/products``.""" + ) -> m.ListTicketAttachmentsResponse: + """Call ``GET /v1/tickets/{ticketId}/attachments``.""" return self._client._call( "GET", - "/v1/roadmap/products", - m.ListRoadmapProductCategoriesResponse, + f"/v1/tickets/{_path(ticket_id)}/attachments", + m.ListTicketAttachmentsResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def remove_roadmap_feature_request_vote( + def list_ticket_templates( self, - slug: str, *, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VoteRoadmapFeatureRequestResponse: - """Call ``DELETE /v1/roadmap/requests/{slug}/vote``.""" + ) -> m.ListTicketTemplatesResponse: + """Call ``GET /v1/ticket-templates``.""" return self._client._call( - "DELETE", - f"/v1/roadmap/requests/{_path(slug)}/vote", - m.VoteRoadmapFeatureRequestResponse, - query=_query(extra_query), + "GET", + "/v1/ticket-templates", + m.ListTicketTemplatesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def submit_roadmap_feature_request( + def list_tickets( self, *, - description: str | None = None, - product_slug: str | None = None, - title: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + filter_ticket_status: m.TicketStatus | str | None = None, + filter_case_type: m.CaseType | str | None = None, + filter_priority: m.TicketPriority | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SubmitRoadmapFeatureRequestResponse: - """Call ``POST /v1/roadmap/submit``.""" + ) -> m.ListTicketsResponse: + """Call ``GET /v1/tickets``.""" return self._client._call( - "POST", - "/v1/roadmap/submit", - m.SubmitRoadmapFeatureRequestResponse, - query=_query(extra_query), - body=_body( - m.SubmitRoadmapFeatureRequestRequest, - extra_body, - False, - ("description", description), - ("product_slug", product_slug), - ("title", title), + "GET", + "/v1/tickets", + m.ListTicketsResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("filterTicketStatus", filter_ticket_status), + ("filterCaseType", filter_case_type), + ("filterPriority", filter_priority), ), + body=None, idempotent=False, timeout=timeout, ) - def update_roadmap_feature_request_comment( + def list_tickets_all( self, - comment_id: str, *, - body: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + filter_ticket_status: m.TicketStatus | str | None = None, + filter_case_type: m.CaseType | str | None = None, + filter_priority: m.TicketPriority | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateRoadmapFeatureRequestCommentResponse: - """Call ``PATCH /v1/roadmap/comments/{commentId}``.""" - return self._client._call( - "PATCH", - f"/v1/roadmap/comments/{_path(comment_id)}", - m.UpdateRoadmapFeatureRequestCommentResponse, - query=_query(extra_query), - body=_body(m.UpdateRoadmapFeatureRequestCommentBody, extra_body, False, ("body", body)), - idempotent=False, - timeout=timeout, - ) + ) -> Iterator[m.Ticket]: + """ + Every result of :meth:`list_tickets`, reading page after page. - def vote_roadmap_feature_request( + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_tickets( + page=page, + page_size=size, + filter_ticket_status=filter_ticket_status, + filter_case_type=filter_case_type, + filter_priority=filter_priority, + extra_query=extra_query, + timeout=timeout, + ) + items = res.tickets + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + def search_tickets( self, - slug: str, *, - type: m.RoadmapVoteType | str | None = None, + filter_case_type: m.CaseType | str | None = None, + filter_priority: m.TicketPriority | str | None = None, + filter_ticket_status: m.TicketStatus | str | None = None, + include_highlights: bool | None = None, + page: int | None = None, + page_size: int | None = None, + query: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VoteRoadmapFeatureRequestResponse: - """Call ``POST /v1/roadmap/requests/{slug}/vote``.""" + ) -> m.SearchTicketsResponse: + """Call ``POST /v1/tickets:search``.""" return self._client._call( "POST", - f"/v1/roadmap/requests/{_path(slug)}/vote", - m.VoteRoadmapFeatureRequestResponse, + "/v1/tickets:search", + m.SearchTicketsResponse, query=_query(extra_query), - body=_body(m.VoteRoadmapFeatureRequestBody, extra_body, False, ("type", type)), + body=_body( + m.SearchTicketsRequest, + extra_body, + False, + ("filter_case_type", filter_case_type), + ("filter_priority", filter_priority), + ("filter_ticket_status", filter_ticket_status), + ("include_highlights", include_highlights), + ("page", page), + ("page_size", page_size), + ("query", query), + ), idempotent=False, timeout=timeout, ) - -class RoleService(_Service): - """The NodeRings RoleService API.""" - - def create_role( + def set_ticket_priority( self, + ticket_id: str, *, - description: str | None = None, - group_ids: list[str] | None = None, - name: str | None = None, - permissions: list[str] | None = None, + priority: m.TicketPriority | str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateRoleResponse: - """Call ``POST /v1/roles``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/tickets/{ticketId}:set-priority``.""" return self._client._call( "POST", - "/v1/roles", - m.CreateRoleResponse, + f"/v1/tickets/{_path(ticket_id)}:set-priority", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.CreateRoleRequest, - extra_body, - False, - ("description", description), - ("group_ids", group_ids), - ("name", name), - ("permissions", permissions), - ), + body=_body(m.SetTicketPriorityBody, extra_body, False, ("priority", priority)), idempotent=False, timeout=timeout, ) - def delete_role( + def set_ticket_status( self, - id: str, + ticket_id: str, *, + ticket_status: m.TicketStatus | str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/roles/{id}``.""" + """Call ``POST /v1/tickets/{ticketId}:set-status``.""" return self._client._call( - "DELETE", - f"/v1/roles/{_path(id)}", + "POST", + f"/v1/tickets/{_path(ticket_id)}:set-status", m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.SetTicketStatusBody, extra_body, False, ("ticket_status", ticket_status)), idempotent=False, timeout=timeout, ) - def list_roles( + def update_ticket_template( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - filter_name: str | None = None, - search: str | None = None, + ticket_template: m.TicketTemplateInput | dict[str, Any] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListRolesResponse: - """Call ``GET /v1/roles``.""" + ) -> m.TicketTemplate: + """Call ``PATCH /v1/ticket-templates/{id}``.""" return self._client._call( - "GET", - "/v1/roles", - m.ListRolesResponse, - query=_query( - extra_query, ("page", page), ("pageSize", page_size), ("filterName", filter_name), ("search", search) - ), - body=None, + "PATCH", + f"/v1/ticket-templates/{_path(id)}", + m.TicketTemplate, + query=_query(extra_query), + body=_body(m.UpdateTicketTemplateBody, extra_body, False, ("ticket_template", ticket_template)), idempotent=False, timeout=timeout, ) - def list_roles_all( + def upload_ticket_attachment_content( self, *, - page: int | None = None, - page_size: int | None = None, - filter_name: str | None = None, - search: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Role]: - """ - Every result of :meth:`list_roles`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_roles( - page=page, - page_size=size, - filter_name=filter_name, - search=search, - extra_query=extra_query, - timeout=timeout, - ) - items = res.roles - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - def replace_role_for_group( - self, - *, - group_id: str | None = None, - role_id: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``PUT /v1/roles/replace-for-group``.""" - return self._client._call( - "PUT", - "/v1/roles/replace-for-group", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.ReplaceRoleForGroupRequest, extra_body, False, ("group_id", group_id), ("role_id", role_id)), - idempotent=False, - timeout=timeout, - ) - - def replace_role_for_service_account( - self, - *, - role_id: str | None = None, - service_account_id: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``PUT /v1/roles/replace-for-service-account``.""" - return self._client._call( - "PUT", - "/v1/roles/replace-for-service-account", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.ReplaceRoleForServiceAccountRequest, - extra_body, - False, - ("role_id", role_id), - ("service_account_id", service_account_id), - ), - idempotent=False, - timeout=timeout, - ) - - def replace_role_for_user( - self, - *, - role_id: str | None = None, - user_id: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``PUT /v1/roles/replace-for-user``.""" - return self._client._call( - "PUT", - "/v1/roles/replace-for-user", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.ReplaceRoleForUserRequest, extra_body, False, ("role_id", role_id), ("user_id", user_id)), - idempotent=False, - timeout=timeout, - ) - - def update_role( - self, - id: str, - *, - description: str | None = None, - group_ids: list[str] | None = None, - name: str | None = None, - permissions: list[str] | None = None, + file_content: bytes | None = None, + upload_token: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateRoleResponse: - """Call ``PATCH /v1/roles/{id}``.""" + ) -> m.TicketAttachment: + """Call ``POST /v1/tickets/attachments:upload-content``.""" return self._client._call( - "PATCH", - f"/v1/roles/{_path(id)}", - m.UpdateRoleResponse, + "POST", + "/v1/tickets/attachments:upload-content", + m.TicketAttachment, query=_query(extra_query), body=_body( - m.UpdateRoleBody, + m.UploadTicketAttachmentContentRequest, extra_body, False, - ("description", description), - ("group_ids", group_ids), - ("name", name), - ("permissions", permissions), + ("file_content", file_content), + ("upload_token", upload_token), ), idempotent=False, timeout=timeout, ) -class SSHKeyService(_Service): - """The NodeRings SSHKeyService API.""" +class UsageReportService(_Service): + """The NodeRings UsageReportService API.""" - def create_ssh_key( + def batch_record_usage( self, *, - name: str | None = None, - public_key: str | None = None, + records: list[m.RecordUsageRequest | dict[str, Any]] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateSSHKeyResponse: - """Call ``POST /v1/ssh-keys``.""" + ) -> m.BatchRecordUsageResponse: + """ + Batch record multiple usage events (for bulk ingestion) + + It calls ``POST /v1/usage/record:batch``. + """ return self._client._call( "POST", - "/v1/ssh-keys", - m.CreateSSHKeyResponse, + "/v1/usage/record:batch", + m.BatchRecordUsageResponse, query=_query(extra_query), - body=_body(m.CreateSSHKeyRequest, extra_body, False, ("name", name), ("public_key", public_key)), + body=_body(m.BatchRecordUsageRequest, extra_body, False, ("records", records)), idempotent=False, timeout=timeout, ) - def delete_ssh_key( + def get_usage_record( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/ssh-keys/{id}``.""" + ) -> m.GetUsageRecordResponse: + """ + Get a specific usage record by ID + + It calls ``GET /v1/usage/records/{id}``. + """ return self._client._call( - "DELETE", - f"/v1/ssh-keys/{_path(id)}", - m.SuccessResponse, + "GET", + f"/v1/usage/records/{_path(id)}", + m.GetUsageRecordResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_ssh_key( + def get_usage_report( self, - id: str, *, + subscription_id: str | None = None, + metric_id: str | None = None, + billing_period_start: datetime | None = None, + billing_period_end: datetime | None = None, + include_billed: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetSSHKeyResponse: - """Call ``GET /v1/ssh-keys/{id}``.""" + ) -> m.GetUsageReportResponse: + """ + Get aggregated usage report for a billing period + + It calls ``GET /v1/usage/report``. + + Args: + subscription_id: Required filters + metric_id: Optional filters + billing_period_start: Billing period (if not provided, uses current billing period) + include_billed: Options Include already billed records + """ return self._client._call( "GET", - f"/v1/ssh-keys/{_path(id)}", - m.GetSSHKeyResponse, - query=_query(extra_query), + "/v1/usage/report", + m.GetUsageReportResponse, + query=_query( + extra_query, + ("subscriptionId", subscription_id), + ("metricId", metric_id), + ("billingPeriodStart", billing_period_start), + ("billingPeriodEnd", billing_period_end), + ("includeBilled", include_billed), + ), body=None, idempotent=False, timeout=timeout, ) - def list_ssh_keys( + def list_usage_records( self, *, + subscription_id: str | None = None, + metric_id: str | None = None, + usage_record_status: m.UsageRecordStatus | str | None = None, + start_time: datetime | None = None, + end_time: datetime | None = None, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListSSHKeysResponse: - """Call ``GET /v1/ssh-keys``.""" + ) -> m.ListUsageRecordsResponse: + """ + List usage records with filters + + It calls ``GET /v1/usage/records``. + + Args: + subscription_id: Filters + start_time: Time range + page: Pagination + """ return self._client._call( "GET", - "/v1/ssh-keys", - m.ListSSHKeysResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "/v1/usage/records", + m.ListUsageRecordsResponse, + query=_query( + extra_query, + ("subscriptionId", subscription_id), + ("metricId", metric_id), + ("usageRecordStatus", usage_record_status), + ("startTime", start_time), + ("endTime", end_time), + ("page", page), + ("pageSize", page_size), + ), body=None, idempotent=False, timeout=timeout, ) - def list_ssh_keys_all( + def list_usage_records_all( self, *, + subscription_id: str | None = None, + metric_id: str | None = None, + usage_record_status: m.UsageRecordStatus | str | None = None, + start_time: datetime | None = None, + end_time: datetime | None = None, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.SSHKey]: + ) -> Iterator[m.UsageRecord]: """ - Every result of :meth:`list_ssh_keys`, reading page after page. + Every result of :meth:`list_usage_records`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -14058,315 +13385,344 @@ def list_ssh_keys_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_ssh_keys(page=page, page_size=size, extra_query=extra_query, timeout=timeout) - items = res.ssh_keys - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - -class SecretService(_Service): - """The NodeRings SecretService API.""" + res = self.list_usage_records( + page=page, + page_size=size, + subscription_id=subscription_id, + metric_id=metric_id, + usage_record_status=usage_record_status, + start_time=start_time, + end_time=end_time, + extra_query=extra_query, + timeout=timeout, + ) + items = res.usage_records + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 - def create_secret( + def record_usage( self, *, - key: str | None = None, - value: str | None = None, + event_id: str | None = None, + external_id: str | None = None, + metric_code: str | None = None, + metric_id: str | None = None, + properties: dict[str, Any] | None = None, + quantity: str | None = None, + subscription_id: str | None = None, + timestamp: datetime | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateSecretResponse: - """Call ``POST /v1/secrets``.""" + ) -> m.RecordUsageResponse: + """ + Record a single usage event (from Prometheus or other monitoring systems) + + It calls ``POST /v1/usage/record``. + + Args: + event_id: For idempotent writes + external_id: External integration + metric_id: Metric reference (either metric_id or metric_code must be provided) + properties: Additional metadata (region, instance_id, etc.) + quantity: Decimal as string + subscription_id: Subscription reference + """ return self._client._call( "POST", - "/v1/secrets", - m.CreateSecretResponse, + "/v1/usage/record", + m.RecordUsageResponse, query=_query(extra_query), - body=_body(m.CreateSecretRequest, extra_body, False, ("key", key), ("value", value)), + body=_body( + m.RecordUsageRequest, + extra_body, + False, + ("event_id", event_id), + ("external_id", external_id), + ("metric_code", metric_code), + ("metric_id", metric_id), + ("properties", properties), + ("quantity", quantity), + ("subscription_id", subscription_id), + ("timestamp", timestamp), + ), idempotent=False, timeout=timeout, ) - def delete_secret( + +class UserService(_Service): + """The NodeRings UserService API.""" + + def change_password( self, - id: str, *, + new_password: str | None = None, + old_password: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/secrets/{id}``.""" + """Call ``POST /v1/auth/change-password``.""" return self._client._call( - "DELETE", - f"/v1/secrets/{_path(id)}", + "POST", + "/v1/auth/change-password", m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body( + m.ChangePasswordRequest, + extra_body, + False, + ("new_password", new_password), + ("old_password", old_password), + ), idempotent=False, timeout=timeout, ) - def get_secret( + def complete_sso_link( self, - id: str, *, + password: str | None = None, + ticket: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetSecretResponse: - """Call ``GET /v1/secrets/{id}``.""" + ) -> m.LoginResponse: + """Call ``POST /v1/auth/sso/link``.""" return self._client._call( - "GET", - f"/v1/secrets/{_path(id)}", - m.GetSecretResponse, + "POST", + "/v1/auth/sso/link", + m.LoginResponse, query=_query(extra_query), - body=None, + body=_body(m.CompleteSSOLinkRequest, extra_body, False, ("password", password), ("ticket", ticket)), idempotent=False, timeout=timeout, ) - def list_secrets( + def delete_user( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListSecretsResponse: - """Call ``GET /v1/secrets``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/users/{id}``.""" return self._client._call( - "GET", - "/v1/secrets", - m.ListSecretsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "DELETE", + f"/v1/users/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_secrets_all( + def disable_mfa( self, *, - page: int | None = None, - page_size: int | None = None, + code: str | None = None, + password: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Secret]: + ) -> m.SuccessResponse: """ - Every result of :meth:`list_secrets`, reading page after page. + Call ``POST /v1/auth/mfa/disable``. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + Args: + code: Current TOTP or an unused recovery code. + password: Required when the user has a local password. """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_secrets(page=page, page_size=size, extra_query=extra_query, timeout=timeout) - items = res.secrets - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + return self._client._call( + "POST", + "/v1/auth/mfa/disable", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.DisableMFARequest, extra_body, False, ("code", code), ("password", password)), + idempotent=False, + timeout=timeout, + ) - def update_secret( + def enroll_mfa_totp( self, - id: str, *, - value: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``PATCH /v1/secrets/{id}``.""" + ) -> m.EnrollMFATOTPResponse: + """Call ``POST /v1/auth/mfa/enroll``.""" return self._client._call( - "PATCH", - f"/v1/secrets/{_path(id)}", - m.SuccessResponse, + "POST", + "/v1/auth/mfa/enroll", + m.EnrollMFATOTPResponse, query=_query(extra_query), - body=_body(m.UpdateSecretBody, extra_body, False, ("value", value)), + body=_body(m.EnrollMFATOTPRequest, extra_body, False), idempotent=False, timeout=timeout, ) - -class ServiceAccountService(_Service): - """The NodeRings ServiceAccountService API.""" - - def create_service_account( + def exchange_sso_code( self, *, - allowed_ips: list[str] | None = None, - description: str | None = None, - name: str | None = None, + code: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ServiceAccountResponse: - """Call ``POST /v1/service-accounts``.""" + ) -> m.LoginResponse: + """Call ``POST /v1/auth/sso/exchange``.""" return self._client._call( "POST", - "/v1/service-accounts", - m.ServiceAccountResponse, + "/v1/auth/sso/exchange", + m.LoginResponse, query=_query(extra_query), - body=_body( - m.CreateServiceAccountRequest, - extra_body, - False, - ("allowed_ips", allowed_ips), - ("description", description), - ("name", name), - ), + body=_body(m.ExchangeSSOCodeRequest, extra_body, False, ("code", code)), idempotent=False, timeout=timeout, ) - def delete_service_account( + def forgot_password( self, - id: str, *, + email: str | None = None, + turnstile_token: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/service-accounts/{id}``.""" + """ + Call ``POST /v1/auth/forgot-password``. + + Args: + turnstile_token: Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled). + """ return self._client._call( - "DELETE", - f"/v1/service-accounts/{_path(id)}", + "POST", + "/v1/auth/forgot-password", m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body( + m.ForgotPasswordRequest, extra_body, False, ("email", email), ("turnstile_token", turnstile_token) + ), idempotent=False, timeout=timeout, ) - def generate_token( + def get_active_sessions( self, - service_account_id: str, *, - expires_in_days: int | None = None, - name: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GenerateServiceAccountTokenResponse: - """Call ``POST /v1/service-accounts/{serviceAccountId}/tokens``.""" + ) -> m.GetActiveSessionsResponse: + """Call ``GET /v1/auth/sessions``.""" return self._client._call( - "POST", - f"/v1/service-accounts/{_path(service_account_id)}/tokens", - m.GenerateServiceAccountTokenResponse, + "GET", + "/v1/auth/sessions", + m.GetActiveSessionsResponse, query=_query(extra_query), - body=_body(m.GenerateTokenBody, extra_body, False, ("expires_in_days", expires_in_days), ("name", name)), + body=None, idempotent=False, timeout=timeout, ) - def get_service_account( + def get_mfa_status( self, - id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ServiceAccountResponse: - """Call ``GET /v1/service-accounts/{id}``.""" + ) -> m.GetMFAStatusResponse: + """Call ``GET /v1/auth/mfa/status``.""" return self._client._call( "GET", - f"/v1/service-accounts/{_path(id)}", - m.ServiceAccountResponse, + "/v1/auth/mfa/status", + m.GetMFAStatusResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_service_accounts( + def get_user( self, + id: str, *, - include_inactive: bool | None = None, - page: int | None = None, - page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListServiceAccountsResponse: - """Call ``GET /v1/service-accounts``.""" + ) -> m.GetUserResponse: + """Call ``GET /v1/users/{id}``.""" return self._client._call( "GET", - "/v1/service-accounts", - m.ListServiceAccountsResponse, - query=_query(extra_query, ("includeInactive", include_inactive), ("page", page), ("pageSize", page_size)), + f"/v1/users/{_path(id)}", + m.GetUserResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_service_accounts_all( + def list_linked_identities( self, *, - include_inactive: bool | None = None, - page: int | None = None, - page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.ServiceAccountResponse]: - """ - Every result of :meth:`list_service_accounts`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_service_accounts( - page=page, - page_size=size, - include_inactive=include_inactive, - extra_query=extra_query, - timeout=timeout, - ) - items = res.service_accounts - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + ) -> m.ListLinkedIdentitiesResponse: + """Call ``GET /v1/auth/identities``.""" + return self._client._call( + "GET", + "/v1/auth/identities", + m.ListLinkedIdentitiesResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - def list_tokens( + def list_users( self, - service_account_id: str, *, - include_inactive: bool | None = None, page: int | None = None, page_size: int | None = None, + filter_email: str | None = None, + filter_status: m.Protov1Status | str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListServiceAccountTokensResponse: - """Call ``GET /v1/service-accounts/{serviceAccountId}/tokens``.""" + ) -> m.ListUsersResponse: + """Call ``GET /v1/users``.""" return self._client._call( "GET", - f"/v1/service-accounts/{_path(service_account_id)}/tokens", - m.ListServiceAccountTokensResponse, - query=_query(extra_query, ("includeInactive", include_inactive), ("page", page), ("pageSize", page_size)), + "/v1/users", + m.ListUsersResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("filterEmail", filter_email), + ("filterStatus", filter_status), + ("search", search), + ), body=None, idempotent=False, timeout=timeout, ) - def list_tokens_all( + def list_users_all( self, - service_account_id: str, *, - include_inactive: bool | None = None, page: int | None = None, page_size: int | None = None, + filter_email: str | None = None, + filter_status: m.Protov1Status | str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.ServiceAccountTokenInfo]: + ) -> Iterator[m.User]: """ - Every result of :meth:`list_tokens`, reading page after page. + Every result of :meth:`list_users`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -14374,15 +13730,16 @@ def list_tokens_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_tokens( - service_account_id, + res = self.list_users( page=page, page_size=size, - include_inactive=include_inactive, + filter_email=filter_email, + filter_status=filter_status, + search=search, extra_query=extra_query, timeout=timeout, ) - items = res.tokens + items = res.users for item in items: yield item seen += len(items) @@ -14390,517 +13747,600 @@ def list_tokens_all( return page += 1 - def revoke_token( - self, - token_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/service-accounts/tokens/{tokenId}``.""" - return self._client._call( - "DELETE", - f"/v1/service-accounts/tokens/{_path(token_id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def update_service_account( + def login( self, - id: str, *, - allowed_ips: list[str] | None = None, - description: str | None = None, - is_active: bool | None = None, - name: str | None = None, + email: str | None = None, + password: str | None = None, + turnstile_token: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ServiceAccountResponse: - """Call ``PATCH /v1/service-accounts/{id}``.""" + ) -> m.LoginResponse: + """ + Call ``POST /v1/auth/login``. + + Args: + turnstile_token: Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled). + """ return self._client._call( - "PATCH", - f"/v1/service-accounts/{_path(id)}", - m.ServiceAccountResponse, + "POST", + "/v1/auth/login", + m.LoginResponse, query=_query(extra_query), body=_body( - m.UpdateServiceAccountBody, + m.LoginRequest, extra_body, False, - ("allowed_ips", allowed_ips), - ("description", description), - ("is_active", is_active), - ("name", name), + ("email", email), + ("password", password), + ("turnstile_token", turnstile_token), ), idempotent=False, timeout=timeout, ) - -class SnapshotService(_Service): - """The NodeRings SnapshotService API.""" - - def create_snapshot( + def login_mfa_verify( self, - vm_id: str, *, - description: str | None = None, + code: str | None = None, + login_session_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateSnapshotResponse: - """Call ``POST /v1/virtual-machines/{vmId}/snapshots``.""" + ) -> m.LoginResponse: + """ + Call ``POST /v1/auth/login/mfa``. + + Args: + code: Authenticator TOTP code or a one-time recovery code. + """ return self._client._call( "POST", - f"/v1/virtual-machines/{_path(vm_id)}/snapshots", - m.CreateSnapshotResponse, + "/v1/auth/login/mfa", + m.LoginResponse, query=_query(extra_query), - body=_body(m.CreateSnapshotBody, extra_body, False, ("description", description)), + body=_body( + m.LoginMFAVerifyRequest, extra_body, False, ("code", code), ("login_session_id", login_session_id) + ), idempotent=False, timeout=timeout, ) - def delete_snapshot( + def logout( self, - vm_id: str, - snapshot_id: str, *, + invalidate_all: bool | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/virtual-machines/{vmId}/snapshots/{snapshotId}``.""" + """Call ``POST /v1/auth/logout``.""" return self._client._call( - "DELETE", - f"/v1/virtual-machines/{_path(vm_id)}/snapshots/{_path(snapshot_id)}", + "POST", + "/v1/auth/logout", m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.LogoutRequest, extra_body, False, ("invalidate_all", invalidate_all)), idempotent=False, timeout=timeout, ) - def get_snapshot( + def regenerate_mfa_backup_codes( self, - vm_id: str, - snapshot_id: str, *, + code: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetSnapshotResponse: - """Call ``GET /v1/virtual-machines/{vmId}/snapshots/{snapshotId}``.""" + ) -> m.RegenerateMFABackupCodesResponse: + """Call ``POST /v1/auth/mfa/backup-codes/regenerate``.""" return self._client._call( - "GET", - f"/v1/virtual-machines/{_path(vm_id)}/snapshots/{_path(snapshot_id)}", - m.GetSnapshotResponse, + "POST", + "/v1/auth/mfa/backup-codes/regenerate", + m.RegenerateMFABackupCodesResponse, query=_query(extra_query), - body=None, + body=_body(m.RegenerateMFABackupCodesRequest, extra_body, False, ("code", code)), idempotent=False, timeout=timeout, ) - def list_snapshots( + def register_user( self, - vm_id: str, *, - status: m.SnapshotStatus | str | None = None, - page: int | None = None, - page_size: int | None = None, + email: str | None = None, + first_name: str | None = None, + last_name: str | None = None, + password: str | None = None, + turnstile_token: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListSnapshotsResponse: - """Call ``GET /v1/virtual-machines/{vmId}/snapshots``.""" + ) -> m.SuccessResponse: + """ + Call ``POST /v1/auth/register``. + + Args: + turnstile_token: Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled). + """ return self._client._call( - "GET", - f"/v1/virtual-machines/{_path(vm_id)}/snapshots", - m.ListSnapshotsResponse, - query=_query(extra_query, ("status", status), ("page", page), ("pageSize", page_size)), - body=None, + "POST", + "/v1/auth/register", + m.SuccessResponse, + query=_query(extra_query), + body=_body( + m.RegisterUserRequest, + extra_body, + False, + ("email", email), + ("first_name", first_name), + ("last_name", last_name), + ("password", password), + ("turnstile_token", turnstile_token), + ), idempotent=False, timeout=timeout, ) - def list_snapshots_all( + def resend_verification_email( self, - vm_id: str, *, - status: m.SnapshotStatus | str | None = None, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Snapshot]: + email: str | None = None, + turnstile_token: str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: """ - Every result of :meth:`list_snapshots`, reading page after page. + Call ``POST /v1/auth/resend-verification-email``. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + Args: + turnstile_token: Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled). """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_snapshots( - vm_id, - page=page, - page_size=size, - status=status, - extra_query=extra_query, - timeout=timeout, - ) - items = res.snapshots - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + return self._client._call( + "POST", + "/v1/auth/resend-verification-email", + m.SuccessResponse, + query=_query(extra_query), + body=_body( + m.ResendVerificationEmailRequest, + extra_body, + False, + ("email", email), + ("turnstile_token", turnstile_token), + ), + idempotent=False, + timeout=timeout, + ) - def restore_snapshot( + def reset_password( self, - vm_id: str, - snapshot_id: str, *, - snapshot_name: str | None = None, - stop_vm: bool | None = None, + email: str | None = None, + new_password: str | None = None, + reset_token: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/virtual-machines/{vmId}/snapshots/{snapshotId}/restore``.""" + """Call ``POST /v1/auth/reset-password``.""" return self._client._call( "POST", - f"/v1/virtual-machines/{_path(vm_id)}/snapshots/{_path(snapshot_id)}/restore", + "/v1/auth/reset-password", m.SuccessResponse, query=_query(extra_query), body=_body( - m.RestoreSnapshotBody, extra_body, False, ("snapshot_name", snapshot_name), ("stop_vm", stop_vm) + m.ResetPasswordRequest, + extra_body, + False, + ("email", email), + ("new_password", new_password), + ("reset_token", reset_token), ), idempotent=False, timeout=timeout, ) - -class SubscriptionService(_Service): - """The NodeRings SubscriptionService API.""" - - def cancel( + def set_password( self, *, + new_password: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CancelResponse: - """Call ``POST /v1/subscriptions:cancel``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/auth/set-password``.""" return self._client._call( "POST", - "/v1/subscriptions:cancel", - m.CancelResponse, + "/v1/auth/set-password", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.SetPasswordRequest, extra_body, False, ("new_password", new_password)), idempotent=False, timeout=timeout, ) - def cancel_renewal( + def unlink_identity( self, + provider: str, *, - subscription_id: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CancelResponse: - """ - CancelRenewal: fixed-price plans stop renewing at current_period_end (VM stays; no refund). - Usage-based plans terminate immediately (same path as deleting the VM). - - It calls ``POST /v1/subscriptions:cancel-renewal``. - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/auth/identities/{provider}``.""" return self._client._call( - "POST", - "/v1/subscriptions:cancel-renewal", - m.CancelResponse, + "DELETE", + f"/v1/auth/identities/{_path(provider)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.CancelRenewalRequest, extra_body, False, ("subscription_id", subscription_id)), + body=None, idempotent=False, timeout=timeout, ) - def get_subscription_status( + def update_user( self, + id: str, *, + allow_org_invites: bool | None = None, + email: str | None = None, + first_name: str | None = None, + group_ids: list[str] | None = None, + last_name: str | None = None, + user_roles: list[str] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetSubscriptionStatusResponse: - """Call ``GET /v1/subscriptions:status``.""" + ) -> m.UpdateUserResponse: + """Call ``PATCH /v1/users/{id}``.""" return self._client._call( - "GET", - "/v1/subscriptions:status", - m.GetSubscriptionStatusResponse, + "PATCH", + f"/v1/users/{_path(id)}", + m.UpdateUserResponse, query=_query(extra_query), - body=None, + body=_body( + m.UpdateUserBody, + extra_body, + False, + ("allow_org_invites", allow_org_invites), + ("email", email), + ("first_name", first_name), + ("group_ids", group_ids), + ("last_name", last_name), + ("user_roles", user_roles), + ), idempotent=False, timeout=timeout, ) - def list_subscriptions( + def verify_email( self, *, - page: int | None = None, - page_size: int | None = None, - only_active: bool | None = None, + user_id: str | None = None, + code: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListSubscriptionsResponse: - """Call ``GET /v1/subscriptions``.""" + ) -> m.SuccessResponse: + """Call ``GET /v1/auth/verify-email``.""" return self._client._call( "GET", - "/v1/subscriptions", - m.ListSubscriptionsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("onlyActive", only_active)), + "/v1/auth/verify-email", + m.SuccessResponse, + query=_query(extra_query, ("userId", user_id), ("code", code)), body=None, idempotent=False, timeout=timeout, ) - def list_subscriptions_all( + def verify_mfa_enrollment( self, *, - page: int | None = None, - page_size: int | None = None, - only_active: bool | None = None, + code: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Subscription]: - """ - Every result of :meth:`list_subscriptions`, reading page after page. + ) -> m.VerifyMFAEnrollmentResponse: + """Call ``POST /v1/auth/mfa/verify-enrollment``.""" + return self._client._call( + "POST", + "/v1/auth/mfa/verify-enrollment", + m.VerifyMFAEnrollmentResponse, + query=_query(extra_query), + body=_body(m.VerifyMFAEnrollmentRequest, extra_body, False, ("code", code)), + idempotent=False, + timeout=timeout, + ) - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = self.list_subscriptions( - page=page, - page_size=size, - only_active=only_active, - extra_query=extra_query, - timeout=timeout, - ) - items = res.subscriptions - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - def retry_payment( +class VMTemplateService(_Service): + """The NodeRings VMTemplateService API.""" + + def create_vm_template( self, *, - payment_method_id: str | None = None, - subscription_id: str | None = None, + cloud_init_template_id: str | None = None, + distro: m.Distro | str | None = None, + name: str | None = None, + node_id: str | None = None, + proxmox_cpu_type: str | None = None, + template_id: int | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RetryPaymentResponse: + ) -> m.SuccessResponse: """ - Call ``POST /v1/subscriptions:retry-payment``. + Call ``POST /v1/vmtemplate``. Args: - payment_method_id: Optional: payment method ID to use for retry If not provided, uses the default payment method - subscription_id: Optional: subscription ID to retry payment for If not provided, retries payment for the user's active subscription + distro: - DISTRO_UBUNTU_22_04: Ubuntu distributions - DISTRO_FEDORA_43: Fedora distributions - DISTRO_DEBIAN_12: Debian distributions - DISTRO_CENTOS_9: CentOS distributions - DISTRO_ROCKY_9: Rocky Linux distributions - DISTRO_ALMALINUX_9: AlmaLinux distributions + proxmox_cpu_type: Proxmox cpu= guest CPU model for VMs using this template. Default: host. """ return self._client._call( "POST", - "/v1/subscriptions:retry-payment", - m.RetryPaymentResponse, + "/v1/vmtemplate", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.RetryPaymentRequest, + m.CreateVMTemplateRequest, extra_body, False, - ("payment_method_id", payment_method_id), - ("subscription_id", subscription_id), + ("cloud_init_template_id", cloud_init_template_id), + ("distro", distro), + ("name", name), + ("node_id", node_id), + ("proxmox_cpu_type", proxmox_cpu_type), + ("template_id", template_id), ), idempotent=False, timeout=timeout, ) - def undo_cancel_renewal( + def delete_vm_template( self, + id: str, *, - subscription_id: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CancelResponse: - """ - UndoCancelRenewal clears cancel_at_period_end so the asset subscription renews again. - - It calls ``POST /v1/subscriptions:undo-cancel-renewal``. - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/vmtemplate/{id}``.""" return self._client._call( - "POST", - "/v1/subscriptions:undo-cancel-renewal", - m.CancelResponse, + "DELETE", + f"/v1/vmtemplate/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.UndoCancelRenewalRequest, extra_body, False, ("subscription_id", subscription_id)), + body=None, idempotent=False, timeout=timeout, ) - -class TicketService(_Service): - """The NodeRings TicketService API.""" - - def add_internal_comment( + def get_vm_template( self, - ticket_id: str, + id: str, *, - comment: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.AddInternalCommentResponse: - """Call ``POST /v1/tickets/{ticketId}:internal-comment``.""" + ) -> m.GetVMTemplateResponse: + """Call ``GET /v1/vmtemplate/{id}``.""" return self._client._call( - "POST", - f"/v1/tickets/{_path(ticket_id)}:internal-comment", - m.AddInternalCommentResponse, + "GET", + f"/v1/vmtemplate/{_path(id)}", + m.GetVMTemplateResponse, query=_query(extra_query), - body=_body(m.AddInternalCommentBody, extra_body, False, ("comment", comment)), + body=None, idempotent=False, timeout=timeout, ) - def add_reply_to_ticket( + def list_vm_templates( self, - ticket_id: str, *, - reply_message: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + search: str | None = None, + node_id: str | None = None, + platform_id: str | None = None, + distro: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/tickets/{ticketId}:add-reply``.""" + ) -> m.ListVMTemplatesResponse: + """Call ``GET /v1/vmtemplates``.""" return self._client._call( - "POST", - f"/v1/tickets/{_path(ticket_id)}:add-reply", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.AddReplyToTicketBody, extra_body, False, ("reply_message", reply_message)), + "GET", + "/v1/vmtemplates", + m.ListVMTemplatesResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("search", search), + ("nodeId", node_id), + ("platformId", platform_id), + ("distro", distro), + ), + body=None, idempotent=False, timeout=timeout, ) - def confirm_ticket_attachment_upload( + def list_vm_templates_all( self, *, - upload_token: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + search: str | None = None, + node_id: str | None = None, + platform_id: str | None = None, + distro: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.TicketAttachment: - """Call ``POST /v1/tickets/attachments:confirm-upload``.""" - return self._client._call( - "POST", - "/v1/tickets/attachments:confirm-upload", - m.TicketAttachment, - query=_query(extra_query), - body=_body(m.ConfirmTicketAttachmentUploadRequest, extra_body, False, ("upload_token", upload_token)), - idempotent=False, - timeout=timeout, - ) + ) -> Iterator[m.VMTemplate]: + """ + Every result of :meth:`list_vm_templates`, reading page after page. - def create_ticket( + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_vm_templates( + page=page, + page_size=size, + search=search, + node_id=node_id, + platform_id=platform_id, + distro=distro, + extra_query=extra_query, + timeout=timeout, + ) + items = res.vm_templates + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + def update_vm_template( self, + id: str, *, - template_id: str | None = None, - template_variables: dict[str, str] | None = None, - ticket: m.Ticket | dict[str, Any] | None = None, + cloud_init_template_id: str | None = None, + distro: m.Distro | str | None = None, + name: str | None = None, + node_id: str | None = None, + proxmox_cpu_type: str | None = None, + template_id: int | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateTicketResponse: - """Call ``POST /v1/tickets``.""" + ) -> m.UpdateVMTemplateResponse: + """ + Call ``PATCH /v1/vmtemplate/{id}``. + + Args: + distro: - DISTRO_UBUNTU_22_04: Ubuntu distributions - DISTRO_FEDORA_43: Fedora distributions - DISTRO_DEBIAN_12: Debian distributions - DISTRO_CENTOS_9: CentOS distributions - DISTRO_ROCKY_9: Rocky Linux distributions - DISTRO_ALMALINUX_9: AlmaLinux distributions + proxmox_cpu_type: Proxmox cpu= guest CPU model. Empty = leave unchanged on update. + """ return self._client._call( - "POST", - "/v1/tickets", - m.CreateTicketResponse, + "PATCH", + f"/v1/vmtemplate/{_path(id)}", + m.UpdateVMTemplateResponse, query=_query(extra_query), body=_body( - m.CreateTicketRequest, + m.UpdateVMTemplateBody, extra_body, False, + ("cloud_init_template_id", cloud_init_template_id), + ("distro", distro), + ("name", name), + ("node_id", node_id), + ("proxmox_cpu_type", proxmox_cpu_type), ("template_id", template_id), - ("template_variables", template_variables), - ("ticket", ticket), ), idempotent=False, timeout=timeout, ) - def create_ticket_attachment_upload( + +class VirtualMachineService(_Service): + """The NodeRings VirtualMachineService API.""" + + def attach_vm_firewall( self, - ticket_id: str, + id: str, *, - file_name: str | None = None, - file_size: int | None = None, - mime_type: str | None = None, + ruleset_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateTicketAttachmentUploadResponse: - """Call ``POST /v1/tickets/{ticketId}/attachments:upload``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/virtual-machines/{id}:attach-firewall``.""" return self._client._call( "POST", - f"/v1/tickets/{_path(ticket_id)}/attachments:upload", - m.CreateTicketAttachmentUploadResponse, + f"/v1/virtual-machines/{_path(id)}:attach-firewall", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.CreateTicketAttachmentUploadBody, - extra_body, - False, - ("file_name", file_name), - ("file_size", file_size), - ("mime_type", mime_type), - ), + body=_body(m.AttachVMFirewallBody, extra_body, False, ("ruleset_id", ruleset_id)), idempotent=False, timeout=timeout, ) - def create_ticket_template( + def create_virtual_machine( self, *, - ticket_template: m.TicketTemplateInput | dict[str, Any] | None = None, + cloud_init_user_data_id: str | None = None, + coupon: m.CouponInput | dict[str, Any] | None = None, + distro: m.Distro | str | None = None, + hostname: str | None = None, + idempotency_key: str | None = None, + instant_app_id: str | None = None, + instant_app_variables: dict[str, str] | None = None, + password: str | None = None, + plan_id: str | None = None, + region_id: str | None = None, + ssh_key_ids: list[str] | None = None, + tags: list[str] | None = None, + user_data: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.TicketTemplate: - """Call ``POST /v1/ticket-templates``.""" + ) -> m.CreateVirtualMachineResponse: + """ + Call ``POST /v1/virtual-machines``. A retry of the same call cannot create a second + resource: the SDK sends an idempotency key. + + Args: + cloud_init_user_data_id: Saved client cloud-init user_data profile ID. Replaces provider user_data at VM create. + coupon: Optional code on a resource create request. + distro: - DISTRO_UBUNTU_22_04: Ubuntu distributions - DISTRO_FEDORA_43: Fedora distributions - DISTRO_DEBIAN_12: Debian distributions - DISTRO_CENTOS_9: CentOS distributions - DISTRO_ROCKY_9: Rocky Linux distributions - DISTRO_ALMALINUX_9: AlmaLinux distributions + idempotency_key: A UUID that makes the create safe to retry. If you leave it out, the SDK sets a new one. + instant_app_id: Platform Instant App ID. Replaces provider user_data. Mutually exclusive with user_data and cloud_init_user_data_id. Requires password or ssh_key_ids. + instant_app_variables: Optional Instant App form overrides (schema from InstantApp.metadata.variables). Unknown keys are rejected. Omitted keys use catalog defaults. + password: Password for VM access. Either user_data, ssh_key_ids, or password must be provided, but only one. + region_id: Required region ID where the VM should be created + ssh_key_ids: SSH key IDs to use for VM access (one or more). Either user_data, ssh_key_ids, or password must be provided, but only one. + tags: Tags for categorizing the virtual machine (e.g., "database", "webserver") + user_data: User data for CloudInit. Either user_data, ssh_key_ids, password, or cloud_init_user_data_id must be provided, but only one. + """ return self._client._call( "POST", - "/v1/ticket-templates", - m.TicketTemplate, + "/v1/virtual-machines", + m.CreateVirtualMachineResponse, query=_query(extra_query), - body=_body(m.CreateTicketTemplateRequest, extra_body, False, ("ticket_template", ticket_template)), - idempotent=False, + body=_body( + m.CreateVirtualMachineRequest, + extra_body, + True, + ("cloud_init_user_data_id", cloud_init_user_data_id), + ("coupon", coupon), + ("distro", distro), + ("hostname", hostname), + ("idempotency_key", idempotency_key), + ("instant_app_id", instant_app_id), + ("instant_app_variables", instant_app_variables), + ("password", password), + ("plan_id", plan_id), + ("region_id", region_id), + ("ssh_key_ids", ssh_key_ids), + ("tags", tags), + ("user_data", user_data), + ), + idempotent=True, timeout=timeout, ) - def delete_ticket( + def delete_virtual_machine( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/tickets/{id}``.""" + """Call ``DELETE /v1/virtual-machines/{id}``.""" return self._client._call( "DELETE", - f"/v1/tickets/{_path(id)}", + f"/v1/virtual-machines/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -14908,193 +14348,212 @@ def delete_ticket( timeout=timeout, ) - def delete_ticket_attachment( + def detach_vm_firewall( self, - attachment_id: str, + id: str, *, + ruleset_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/tickets/attachments/{attachmentId}``.""" + """Call ``POST /v1/virtual-machines/{id}:detach-firewall``.""" return self._client._call( - "DELETE", - f"/v1/tickets/attachments/{_path(attachment_id)}", + "POST", + f"/v1/virtual-machines/{_path(id)}:detach-firewall", m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.DetachVMFirewallBody, extra_body, False, ("ruleset_id", ruleset_id)), idempotent=False, timeout=timeout, ) - def delete_ticket_template( + def disable_additional_ip( self, - id: str, + vm_id: str, *, + cancel_immediately: bool | None = None, + ip_address: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/ticket-templates/{id}``.""" - return self._client._call( - "DELETE", - f"/v1/ticket-templates/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) + """ + DisableAdditionalIP releases one additional IPv4 and updates ADDITIONAL-IP addon quantity. - def download_ticket_attachment( - self, - attachment_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.DownloadTicketAttachmentResponse: - """Call ``GET /v1/tickets/attachments/{attachmentId}:download``.""" + It calls ``POST /v1/virtual-machines/{vmId}:disable-additional-ip``. + + Args: + ip_address: Specific additional IPv4 to release. When empty, the most recently added address is removed. + """ return self._client._call( - "GET", - f"/v1/tickets/attachments/{_path(attachment_id)}:download", - m.DownloadTicketAttachmentResponse, + "POST", + f"/v1/virtual-machines/{_path(vm_id)}:disable-additional-ip", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body( + m.DisableAdditionalIPBody, + extra_body, + False, + ("cancel_immediately", cancel_immediately), + ("ip_address", ip_address), + ), idempotent=False, timeout=timeout, ) - def get_ticket( + def disable_backup( self, - id: str, + vm_id: str, *, + addon_id: str | None = None, + cancel_immediately: bool | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetTicketResponse: - """Call ``GET /v1/tickets/{id}``.""" + ) -> m.SuccessResponse: + """ + DisableBackup disables backup addon for a virtual machine + + It calls ``POST /v1/virtual-machines/{vmId}:disable-backup``. + """ return self._client._call( - "GET", - f"/v1/tickets/{_path(id)}", - m.GetTicketResponse, + "POST", + f"/v1/virtual-machines/{_path(vm_id)}:disable-backup", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body( + m.DisableBackupBody, + extra_body, + False, + ("addon_id", addon_id), + ("cancel_immediately", cancel_immediately), + ), idempotent=False, timeout=timeout, ) - def get_ticket_template( + def enable_additional_ip( self, - id: str, + vm_id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.TicketTemplate: - """Call ``GET /v1/ticket-templates/{id}``.""" + ) -> m.EnableAdditionalIPResponse: + """ + EnableAdditionalIP allocates an extra IPv4 from the VM primary prefix and subscribes to + ADDITIONAL-IP billing. + + It calls ``POST /v1/virtual-machines/{vmId}:enable-additional-ip``. + """ return self._client._call( - "GET", - f"/v1/ticket-templates/{_path(id)}", - m.TicketTemplate, + "POST", + f"/v1/virtual-machines/{_path(vm_id)}:enable-additional-ip", + m.EnableAdditionalIPResponse, query=_query(extra_query), - body=None, + body=_body(m.EnableAdditionalIPBody, extra_body, False), idempotent=False, timeout=timeout, ) - def list_internal_comments( + def enable_backup( self, - ticket_id: str, + vm_id: str, *, + addon_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListInternalCommentsResponse: - """Call ``GET /v1/tickets/{ticketId}/internal-comments``.""" + ) -> m.SuccessResponse: + """ + EnableBackup enables backup addon for a virtual machine + + It calls ``POST /v1/virtual-machines/{vmId}:enable-backup``. + """ return self._client._call( - "GET", - f"/v1/tickets/{_path(ticket_id)}/internal-comments", - m.ListInternalCommentsResponse, + "POST", + f"/v1/virtual-machines/{_path(vm_id)}:enable-backup", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.EnableBackupBody, extra_body, False, ("addon_id", addon_id)), idempotent=False, timeout=timeout, ) - def list_ticket_attachments( + def get_virtual_machine( self, - ticket_id: str, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListTicketAttachmentsResponse: - """Call ``GET /v1/tickets/{ticketId}/attachments``.""" + ) -> m.VirtualMachine: + """Call ``GET /v1/virtual-machines/{id}``.""" return self._client._call( "GET", - f"/v1/tickets/{_path(ticket_id)}/attachments", - m.ListTicketAttachmentsResponse, + f"/v1/virtual-machines/{_path(id)}", + m.VirtualMachine, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_ticket_templates( + def get_vnc_console( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListTicketTemplatesResponse: - """Call ``GET /v1/ticket-templates``.""" + ) -> m.GetVNCConsoleResponse: + """ + GetVNCConsole returns WebSocket URL for VNC console access. + + It calls ``GET /v1/virtual-machines/{id}/console``. + """ return self._client._call( "GET", - "/v1/ticket-templates", - m.ListTicketTemplatesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + f"/v1/virtual-machines/{_path(id)}/console", + m.GetVNCConsoleResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_tickets( + def list_virtual_machines( self, *, page: int | None = None, page_size: int | None = None, - filter_ticket_status: m.TicketStatus | str | None = None, - filter_case_type: m.CaseType | str | None = None, - filter_priority: m.TicketPriority | str | None = None, + filter_operation_status: m.OperationStatus | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListTicketsResponse: - """Call ``GET /v1/tickets``.""" + ) -> m.ListVirtualMachinesResponse: + """Call ``GET /v1/virtual-machines``.""" return self._client._call( "GET", - "/v1/tickets", - m.ListTicketsResponse, + "/v1/virtual-machines", + m.ListVirtualMachinesResponse, query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("filterTicketStatus", filter_ticket_status), - ("filterCaseType", filter_case_type), - ("filterPriority", filter_priority), + extra_query, ("page", page), ("pageSize", page_size), ("filterOperationStatus", filter_operation_status) ), body=None, idempotent=False, timeout=timeout, ) - def list_tickets_all( + def list_virtual_machines_all( self, *, page: int | None = None, page_size: int | None = None, - filter_ticket_status: m.TicketStatus | str | None = None, - filter_case_type: m.CaseType | str | None = None, - filter_priority: m.TicketPriority | str | None = None, + filter_operation_status: m.OperationStatus | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Ticket]: + ) -> Iterator[m.VirtualMachine]: """ - Every result of :meth:`list_tickets`, reading page after page. + Every result of :meth:`list_virtual_machines`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -15102,16 +14561,14 @@ def list_tickets_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_tickets( + res = self.list_virtual_machines( page=page, page_size=size, - filter_ticket_status=filter_ticket_status, - filter_case_type=filter_case_type, - filter_priority=filter_priority, + filter_operation_status=filter_operation_status, extra_query=extra_query, timeout=timeout, ) - items = res.tickets + items = res.virtual_machines for item in items: yield item seen += len(items) @@ -15119,292 +14576,393 @@ def list_tickets_all( return page += 1 - def search_tickets( + def list_vm_tags( self, *, - filter_case_type: m.CaseType | str | None = None, - filter_priority: m.TicketPriority | str | None = None, - filter_ticket_status: m.TicketStatus | str | None = None, - include_highlights: bool | None = None, - page: int | None = None, - page_size: int | None = None, - query: str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.ListVMTagsResponse: + """ + ListVMTags returns all unique tags from virtual machines belonging to the organization + + It calls ``GET /v1/virtual-machines/tags``. + """ + return self._client._call( + "GET", + "/v1/virtual-machines/tags", + m.ListVMTagsResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + def reinstall_virtual_machine( + self, + id: str, + *, + cloud_init_user_data_id: str | None = None, + distro: m.Distro | str | None = None, + hostname: str | None = None, + instant_app_id: str | None = None, + instant_app_variables: dict[str, str] | None = None, + password: str | None = None, + ssh_key_ids: list[str] | None = None, + user_data: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SearchTicketsResponse: - """Call ``POST /v1/tickets:search``.""" + ) -> m.VirtualMachine: + """ + Call ``POST /v1/virtual-machines/{id}:reinstall``. + + Args: + distro: - DISTRO_UBUNTU_22_04: Ubuntu distributions - DISTRO_FEDORA_43: Fedora distributions - DISTRO_DEBIAN_12: Debian distributions - DISTRO_CENTOS_9: CentOS distributions - DISTRO_ROCKY_9: Rocky Linux distributions - DISTRO_ALMALINUX_9: AlmaLinux distributions + instant_app_id: Platform Instant App. Same exclusivity rules as CreateVirtualMachineRequest. + instant_app_variables: Optional Instant App form overrides (same rules as CreateVirtualMachineRequest). + """ return self._client._call( "POST", - "/v1/tickets:search", - m.SearchTicketsResponse, + f"/v1/virtual-machines/{_path(id)}:reinstall", + m.VirtualMachine, query=_query(extra_query), body=_body( - m.SearchTicketsRequest, + m.ReinstallVirtualMachineBody, extra_body, False, - ("filter_case_type", filter_case_type), - ("filter_priority", filter_priority), - ("filter_ticket_status", filter_ticket_status), - ("include_highlights", include_highlights), - ("page", page), - ("page_size", page_size), - ("query", query), + ("cloud_init_user_data_id", cloud_init_user_data_id), + ("distro", distro), + ("hostname", hostname), + ("instant_app_id", instant_app_id), + ("instant_app_variables", instant_app_variables), + ("password", password), + ("ssh_key_ids", ssh_key_ids), + ("user_data", user_data), ), idempotent=False, timeout=timeout, ) - def set_ticket_priority( + def restart_virtual_machine( self, - ticket_id: str, + id: str, *, - priority: m.TicketPriority | str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/tickets/{ticketId}:set-priority``.""" + ) -> m.VirtualMachine: + """Call ``POST /v1/virtual-machines/{id}:restart``.""" return self._client._call( "POST", - f"/v1/tickets/{_path(ticket_id)}:set-priority", - m.SuccessResponse, + f"/v1/virtual-machines/{_path(id)}:restart", + m.VirtualMachine, query=_query(extra_query), - body=_body(m.SetTicketPriorityBody, extra_body, False, ("priority", priority)), + body=_body(m.RestartVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) - def set_ticket_status( + def start_virtual_machine( self, - ticket_id: str, + id: str, *, - ticket_status: m.TicketStatus | str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/tickets/{ticketId}:set-status``.""" + ) -> m.VirtualMachine: + """Call ``POST /v1/virtual-machines/{id}:start``.""" return self._client._call( "POST", - f"/v1/tickets/{_path(ticket_id)}:set-status", - m.SuccessResponse, + f"/v1/virtual-machines/{_path(id)}:start", + m.VirtualMachine, query=_query(extra_query), - body=_body(m.SetTicketStatusBody, extra_body, False, ("ticket_status", ticket_status)), + body=_body(m.StartVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) - def update_ticket_template( + def stop_virtual_machine( self, id: str, *, - ticket_template: m.TicketTemplateInput | dict[str, Any] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.TicketTemplate: - """Call ``PATCH /v1/ticket-templates/{id}``.""" + ) -> m.VirtualMachine: + """Call ``POST /v1/virtual-machines/{id}:stop``.""" return self._client._call( - "PATCH", - f"/v1/ticket-templates/{_path(id)}", - m.TicketTemplate, + "POST", + f"/v1/virtual-machines/{_path(id)}:stop", + m.VirtualMachine, query=_query(extra_query), - body=_body(m.UpdateTicketTemplateBody, extra_body, False, ("ticket_template", ticket_template)), + body=_body(m.StopVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) - def upload_ticket_attachment_content( + def update_virtual_machine( self, + id: str, *, - file_content: bytes | None = None, - upload_token: str | None = None, + add_tags: list[str] | None = None, + remove_tags: list[str] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.TicketAttachment: - """Call ``POST /v1/tickets/attachments:upload-content``.""" + ) -> m.VirtualMachine: + """ + Call ``PATCH /v1/virtual-machines/{id}``. + + Args: + add_tags: Tags to add to the virtual machine + remove_tags: Tags to remove from the virtual machine + """ return self._client._call( + "PATCH", + f"/v1/virtual-machines/{_path(id)}", + m.VirtualMachine, + query=_query(extra_query), + body=_body( + m.UpdateVirtualMachineBody, extra_body, False, ("add_tags", add_tags), ("remove_tags", remove_tags) + ), + idempotent=False, + timeout=timeout, + ) + + +class AsyncAddonService(_ServiceAsync): + """The NodeRings AddonService API.""" + + async def add_addon_to_subscription( + self, + subscription_id: str, + *, + addon_id: str | None = None, + addon_price_id: str | None = None, + quantity: int | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.AddAddonToSubscriptionResponse: + """ + Add an addon to a subscription + + It calls ``POST /v1/subscriptions/{subscriptionId}/addons``. + """ + return await self._client._call( "POST", - "/v1/tickets/attachments:upload-content", - m.TicketAttachment, + f"/v1/subscriptions/{_path(subscription_id)}/addons", + m.AddAddonToSubscriptionResponse, query=_query(extra_query), body=_body( - m.UploadTicketAttachmentContentRequest, + m.AddAddonToSubscriptionBody, extra_body, False, - ("file_content", file_content), - ("upload_token", upload_token), + ("addon_id", addon_id), + ("addon_price_id", addon_price_id), + ("quantity", quantity), ), idempotent=False, timeout=timeout, ) - -class UsageReportService(_Service): - """The NodeRings UsageReportService API.""" - - def batch_record_usage( + async def create_addon( self, *, - records: list[m.RecordUsageRequest | dict[str, Any]] | None = None, + addon_id: str | None = None, + currency: str | None = None, + maximum_charge: str | None = None, + minimum_charge: str | None = None, + percentage_value: float | None = None, + unit_amount: str | None = None, + zero_base_fallback_amount: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.BatchRecordUsageResponse: + ) -> m.SuccessResponse: """ - Batch record multiple usage events (for bulk ingestion) + Create an addon from a template addon - It calls ``POST /v1/usage/record:batch``. + It calls ``POST /v1/addons``. + + Args: + addon_id: Template addon ID to clone from (required) + currency: Currency for the addon price (required) + maximum_charge: Decimal string with 6 decimal places precision + minimum_charge: Decimal string with 6 decimal places precision + percentage_value: Optional: Override percentage value for percentage-based pricing formulas Only used when template addon has pricing_formula with type "percentage" Example: If template has 30% and you provide 25.0, the new addon will use 25% + unit_amount: Decimal string with 6 decimal places precision + zero_base_fallback_amount: Decimal string with 6 decimal places precision """ - return self._client._call( + return await self._client._call( "POST", - "/v1/usage/record:batch", - m.BatchRecordUsageResponse, + "/v1/addons", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.BatchRecordUsageRequest, extra_body, False, ("records", records)), + body=_body( + m.CreateAddonRequest, + extra_body, + False, + ("addon_id", addon_id), + ("currency", currency), + ("maximum_charge", maximum_charge), + ("minimum_charge", minimum_charge), + ("percentage_value", percentage_value), + ("unit_amount", unit_amount), + ("zero_base_fallback_amount", zero_base_fallback_amount), + ), idempotent=False, timeout=timeout, ) - def get_usage_record( + async def delete_addon( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetUsageRecordResponse: + ) -> m.SuccessResponse: """ - Get a specific usage record by ID + Delete an addon (soft delete) - It calls ``GET /v1/usage/records/{id}``. + It calls ``DELETE /v1/addons/{id}``. """ - return self._client._call( - "GET", - f"/v1/usage/records/{_path(id)}", - m.GetUsageRecordResponse, + return await self._client._call( + "DELETE", + f"/v1/addons/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_usage_report( + async def get_addon( self, + id: str, *, - subscription_id: str | None = None, - metric_id: str | None = None, - billing_period_start: datetime | None = None, - billing_period_end: datetime | None = None, - include_billed: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetUsageReportResponse: + ) -> m.GetAddonResponse: """ - Get aggregated usage report for a billing period - - It calls ``GET /v1/usage/report``. + Get a specific addon with its prices - Args: - subscription_id: Required filters - metric_id: Optional filters - billing_period_start: Billing period (if not provided, uses current billing period) - include_billed: Options Include already billed records + It calls ``GET /v1/addons/{id}``. """ - return self._client._call( + return await self._client._call( "GET", - "/v1/usage/report", - m.GetUsageReportResponse, - query=_query( - extra_query, - ("subscriptionId", subscription_id), - ("metricId", metric_id), - ("billingPeriodStart", billing_period_start), - ("billingPeriodEnd", billing_period_end), - ("includeBilled", include_billed), - ), + f"/v1/addons/{_path(id)}", + m.GetAddonResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_usage_records( + async def list_addon_subscriptions( self, + subscription_id: str, *, - subscription_id: str | None = None, - metric_id: str | None = None, - usage_record_status: m.UsageRecordStatus | str | None = None, - start_time: datetime | None = None, - end_time: datetime | None = None, - page: int | None = None, - page_size: int | None = None, + addon_status: m.AddonStatus | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListUsageRecordsResponse: + ) -> m.ListAddonSubscriptionsResponse: """ - List usage records with filters + List addon subscriptions for a subscription - It calls ``GET /v1/usage/records``. + It calls ``GET /v1/subscriptions/{subscriptionId}/addons``. Args: - subscription_id: Filters - start_time: Time range - page: Pagination + addon_status: Filter by status """ - return self._client._call( + return await self._client._call( "GET", - "/v1/usage/records", - m.ListUsageRecordsResponse, - query=_query( - extra_query, - ("subscriptionId", subscription_id), - ("metricId", metric_id), - ("usageRecordStatus", usage_record_status), - ("startTime", start_time), - ("endTime", end_time), - ("page", page), - ("pageSize", page_size), - ), + f"/v1/subscriptions/{_path(subscription_id)}/addons", + m.ListAddonSubscriptionsResponse, + query=_query(extra_query, ("addonStatus", addon_status)), body=None, idempotent=False, timeout=timeout, ) - def list_usage_records_all( + async def list_addons( self, *, - subscription_id: str | None = None, - metric_id: str | None = None, - usage_record_status: m.UsageRecordStatus | str | None = None, - start_time: datetime | None = None, - end_time: datetime | None = None, page: int | None = None, page_size: int | None = None, + subscription_id: str | None = None, + addon_type: m.AddonType | str | None = None, + is_template: bool | None = None, + billing_type: m.BillingType | str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.UsageRecord]: + ) -> m.ListAddonsResponse: """ - Every result of :meth:`list_usage_records`, reading page after page. + List available addons - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 + It calls ``GET /v1/addons``. + + Args: + subscription_id: Filter by compatible with subscription + addon_type: Filter by type + is_template: Filter by template status + billing_type: Filter by billing type (usage-based or fixed/subscription) - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) + search: Search filter for addon name, code, or description + """ + return await self._client._call( + "GET", + "/v1/addons", + m.ListAddonsResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("subscriptionId", subscription_id), + ("addonType", addon_type), + ("isTemplate", is_template), + ("billingType", billing_type), + ("search", search), + ), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def list_addons_all( + self, + *, + page: int | None = None, + page_size: int | None = None, + subscription_id: str | None = None, + addon_type: m.AddonType | str | None = None, + is_template: bool | None = None, + billing_type: m.BillingType | str | None = None, + search: str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> AsyncIterator[m.Addon]: + """ + Every result of :meth:`list_addons`, reading page after page. + + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_usage_records( + res = await self.list_addons( page=page, page_size=size, subscription_id=subscription_id, - metric_id=metric_id, - usage_record_status=usage_record_status, - start_time=start_time, - end_time=end_time, + addon_type=addon_type, + is_template=is_template, + billing_type=billing_type, + search=search, extra_query=extra_query, timeout=timeout, ) - items = res.usage_records + items = res.addons for item in items: yield item seen += len(items) @@ -15412,117 +14970,149 @@ def list_usage_records_all( return page += 1 - def record_usage( + async def remove_addon( self, + addon_subscription_id: str, *, - event_id: str | None = None, - external_id: str | None = None, - metric_code: str | None = None, - metric_id: str | None = None, - properties: dict[str, Any] | None = None, - quantity: str | None = None, - subscription_id: str | None = None, - timestamp: datetime | None = None, - extra_body: dict[str, Any] | None = None, + cancel_immediately: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RecordUsageResponse: + ) -> m.RemoveAddonResponse: """ - Record a single usage event (from Prometheus or other monitoring systems) + Remove an addon from a subscription. cancel_immediately=false keeps the add-on (and + IP/backup) until the parent subscription period ends; the renewal task then deprovisions it. - It calls ``POST /v1/usage/record``. + It calls ``DELETE /v1/addon-subscriptions/{addonSubscriptionId}``. Args: - event_id: For idempotent writes - external_id: External integration - metric_id: Metric reference (either metric_id or metric_code must be provided) - properties: Additional metadata (region, instance_id, etc.) - quantity: Decimal as string - subscription_id: Subscription reference + cancel_immediately: If false, cancels at period end """ - return self._client._call( - "POST", - "/v1/usage/record", - m.RecordUsageResponse, - query=_query(extra_query), - body=_body( - m.RecordUsageRequest, - extra_body, - False, - ("event_id", event_id), - ("external_id", external_id), - ("metric_code", metric_code), - ("metric_id", metric_id), - ("properties", properties), - ("quantity", quantity), - ("subscription_id", subscription_id), - ("timestamp", timestamp), - ), + return await self._client._call( + "DELETE", + f"/v1/addon-subscriptions/{_path(addon_subscription_id)}", + m.RemoveAddonResponse, + query=_query(extra_query, ("cancelImmediately", cancel_immediately)), + body=None, idempotent=False, timeout=timeout, ) + async def undo_cancel_addon( + self, + addon_subscription_id: str, + *, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.RemoveAddonResponse: + """ + UndoCancelAddon clears cancel_at_period_end so the add-on renews with the VM. -class UserService(_Service): - """The NodeRings UserService API.""" + It calls ``POST /v1/addon-subscriptions/{addonSubscriptionId}:undo-cancel``. + """ + return await self._client._call( + "POST", + f"/v1/addon-subscriptions/{_path(addon_subscription_id)}:undo-cancel", + m.RemoveAddonResponse, + query=_query(extra_query), + body=_body(m.UndoCancelAddonBody, extra_body, False), + idempotent=False, + timeout=timeout, + ) - def change_password( + async def update_addon( self, + id: str, *, - new_password: str | None = None, - old_password: str | None = None, + currency: str | None = None, + percentage_value: float | None = None, + unit_amount: str | None = None, + zero_base_fallback_amount: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/auth/change-password``.""" - return self._client._call( - "POST", - "/v1/auth/change-password", + """ + Update an addon (allows changing price and currency) + + It calls ``PATCH /v1/addons/{id}``. + + Args: + currency: Currency for the addon price (optional, must be 3 characters if provided) + percentage_value: Override percentage value for percentage-based pricing formula (optional, 0-100) + unit_amount: Decimal string with 6 decimal places precision + zero_base_fallback_amount: Decimal string with 6 decimal places precision + """ + return await self._client._call( + "PATCH", + f"/v1/addons/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=_body( - m.ChangePasswordRequest, + m.UpdateAddonBody, extra_body, False, - ("new_password", new_password), - ("old_password", old_password), + ("currency", currency), + ("percentage_value", percentage_value), + ("unit_amount", unit_amount), + ("zero_base_fallback_amount", zero_base_fallback_amount), ), idempotent=False, timeout=timeout, ) - def complete_sso_link( + +class AsyncAgentService(_ServiceAsync): + """The NodeRings AgentService API.""" + + async def create_agent( self, *, - password: str | None = None, - ticket: str | None = None, + agent_public_ip: str | None = None, + description: str | None = None, + gateway_region: m.AgentGatewayRegion | str | None = None, + hypervisor_driver: m.PlatformDriver | str | None = None, + name: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.LoginResponse: - """Call ``POST /v1/auth/sso/link``.""" - return self._client._call( + ) -> m.GetAgentResponse: + """ + Call ``POST /v1/agents``. + + Args: + hypervisor_driver: - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver. + """ + return await self._client._call( "POST", - "/v1/auth/sso/link", - m.LoginResponse, + "/v1/agents", + m.GetAgentResponse, query=_query(extra_query), - body=_body(m.CompleteSSOLinkRequest, extra_body, False, ("password", password), ("ticket", ticket)), + body=_body( + m.CreateAgentRequest, + extra_body, + False, + ("agent_public_ip", agent_public_ip), + ("description", description), + ("gateway_region", gateway_region), + ("hypervisor_driver", hypervisor_driver), + ("name", name), + ), idempotent=False, timeout=timeout, ) - def delete_user( + async def delete_agent( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/users/{id}``.""" - return self._client._call( + """Call ``DELETE /v1/agents/{id}``.""" + return await self._client._call( "DELETE", - f"/v1/users/{_path(id)}", + f"/v1/agents/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -15530,187 +15120,82 @@ def delete_user( timeout=timeout, ) - def disable_mfa( + async def generate_install_command( self, + id: str, *, - code: str | None = None, - password: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Call ``POST /v1/auth/mfa/disable``. - - Args: - code: Current TOTP or an unused recovery code. - password: Required when the user has a local password. - """ - return self._client._call( + ) -> m.GenerateInstallCommandResponse: + """Call ``POST /v1/agents/{id}:generateInstallCommand``.""" + return await self._client._call( "POST", - "/v1/auth/mfa/disable", - m.SuccessResponse, + f"/v1/agents/{_path(id)}:generateInstallCommand", + m.GenerateInstallCommandResponse, query=_query(extra_query), - body=_body(m.DisableMFARequest, extra_body, False, ("code", code), ("password", password)), + body=_body(m.GenerateInstallCommandBody, extra_body, False), idempotent=False, timeout=timeout, ) - def enroll_mfa_totp( + async def generate_peering_config( self, + id: str, *, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.EnrollMFATOTPResponse: - """Call ``POST /v1/auth/mfa/enroll``.""" - return self._client._call( + ) -> m.GeneratePeeringConfigResponse: + """Call ``POST /v1/agents/{id}:generatePeeringConfig``.""" + return await self._client._call( "POST", - "/v1/auth/mfa/enroll", - m.EnrollMFATOTPResponse, + f"/v1/agents/{_path(id)}:generatePeeringConfig", + m.GeneratePeeringConfigResponse, query=_query(extra_query), - body=_body(m.EnrollMFATOTPRequest, extra_body, False), + body=_body(m.GeneratePeeringConfigBody, extra_body, False), idempotent=False, timeout=timeout, ) - def exchange_sso_code( - self, - *, - code: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.LoginResponse: - """Call ``POST /v1/auth/sso/exchange``.""" - return self._client._call( - "POST", - "/v1/auth/sso/exchange", - m.LoginResponse, - query=_query(extra_query), - body=_body(m.ExchangeSSOCodeRequest, extra_body, False, ("code", code)), - idempotent=False, - timeout=timeout, - ) - - def forgot_password( - self, - *, - email: str | None = None, - turnstile_token: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Call ``POST /v1/auth/forgot-password``. - - Args: - turnstile_token: Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled). - """ - return self._client._call( - "POST", - "/v1/auth/forgot-password", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.ForgotPasswordRequest, extra_body, False, ("email", email), ("turnstile_token", turnstile_token) - ), - idempotent=False, - timeout=timeout, - ) - - def get_active_sessions( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetActiveSessionsResponse: - """Call ``GET /v1/auth/sessions``.""" - return self._client._call( - "GET", - "/v1/auth/sessions", - m.GetActiveSessionsResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def get_mfa_status( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetMFAStatusResponse: - """Call ``GET /v1/auth/mfa/status``.""" - return self._client._call( - "GET", - "/v1/auth/mfa/status", - m.GetMFAStatusResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def get_user( + async def get_agent( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetUserResponse: - """Call ``GET /v1/users/{id}``.""" - return self._client._call( - "GET", - f"/v1/users/{_path(id)}", - m.GetUserResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def list_linked_identities( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListLinkedIdentitiesResponse: - """Call ``GET /v1/auth/identities``.""" - return self._client._call( + ) -> m.GetAgentResponse: + """Call ``GET /v1/agents/{id}``.""" + return await self._client._call( "GET", - "/v1/auth/identities", - m.ListLinkedIdentitiesResponse, + f"/v1/agents/{_path(id)}", + m.GetAgentResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_users( + async def list_agents( self, *, page: int | None = None, page_size: int | None = None, - filter_email: str | None = None, - filter_status: m.Protov1Status | str | None = None, + gateway_region: m.AgentGatewayRegion | str | None = None, search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListUsersResponse: - """Call ``GET /v1/users``.""" - return self._client._call( + ) -> m.ListAgentsResponse: + """Call ``GET /v1/agents``.""" + return await self._client._call( "GET", - "/v1/users", - m.ListUsersResponse, + "/v1/agents", + m.ListAgentsResponse, query=_query( extra_query, ("page", page), ("pageSize", page_size), - ("filterEmail", filter_email), - ("filterStatus", filter_status), + ("gatewayRegion", gateway_region), ("search", search), ), body=None, @@ -15718,19 +15203,18 @@ def list_users( timeout=timeout, ) - def list_users_all( + async def list_agents_all( self, *, page: int | None = None, page_size: int | None = None, - filter_email: str | None = None, - filter_status: m.Protov1Status | str | None = None, + gateway_region: m.AgentGatewayRegion | str | None = None, search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.User]: + ) -> AsyncIterator[m.GetAgentResponse]: """ - Every result of :meth:`list_users`, reading page after page. + Every result of :meth:`list_agents`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -15738,16 +15222,15 @@ def list_users_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_users( + res = await self.list_agents( page=page, page_size=size, - filter_email=filter_email, - filter_status=filter_status, + gateway_region=gateway_region, search=search, extra_query=extra_query, timeout=timeout, ) - items = res.users + items = res.agents for item in items: yield item seen += len(items) @@ -15755,395 +15238,441 @@ def list_users_all( return page += 1 - def login( + async def update_agent( self, + id: str, *, - email: str | None = None, - password: str | None = None, - turnstile_token: str | None = None, + description: str | None = None, + hypervisor_driver: m.PlatformDriver | str | None = None, + name: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.LoginResponse: + ) -> m.UpdateAgentResponse: """ - Call ``POST /v1/auth/login``. + Call ``PATCH /v1/agents/{id}``. Args: - turnstile_token: Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled). + hypervisor_driver: - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver. """ - return self._client._call( - "POST", - "/v1/auth/login", - m.LoginResponse, + return await self._client._call( + "PATCH", + f"/v1/agents/{_path(id)}", + m.UpdateAgentResponse, query=_query(extra_query), body=_body( - m.LoginRequest, + m.UpdateAgentBody, extra_body, False, - ("email", email), - ("password", password), - ("turnstile_token", turnstile_token), + ("description", description), + ("hypervisor_driver", hypervisor_driver), + ("name", name), ), idempotent=False, timeout=timeout, ) - def login_mfa_verify( + async def upload_inbound_peering_config( self, + id: str, *, - code: str | None = None, - login_session_id: str | None = None, + kubeconfig: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.LoginResponse: + ) -> m.UploadInboundPeeringConfigResponse: """ - Call ``POST /v1/auth/login/mfa``. + Call ``POST /v1/agents/{id}:uploadInboundPeeringConfig``. Args: - code: Authenticator TOTP code or a one-time recovery code. + kubeconfig: Provider-generated peering-user kubeconfig YAML for neo as consumer. """ - return self._client._call( + return await self._client._call( "POST", - "/v1/auth/login/mfa", - m.LoginResponse, + f"/v1/agents/{_path(id)}:uploadInboundPeeringConfig", + m.UploadInboundPeeringConfigResponse, query=_query(extra_query), - body=_body( - m.LoginMFAVerifyRequest, extra_body, False, ("code", code), ("login_session_id", login_session_id) - ), + body=_body(m.UploadInboundPeeringConfigBody, extra_body, False, ("kubeconfig", kubeconfig)), idempotent=False, timeout=timeout, ) - def logout( + +class AsyncBackupService(_ServiceAsync): + """The NodeRings BackupService API.""" + + async def delete_backup( self, + vm_id: str, + backup_id: str, *, - invalidate_all: bool | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/auth/logout``.""" - return self._client._call( - "POST", - "/v1/auth/logout", + """Call ``DELETE /v1/virtual-machines/{vmId}/backups/{backupId}``.""" + return await self._client._call( + "DELETE", + f"/v1/virtual-machines/{_path(vm_id)}/backups/{_path(backup_id)}", m.SuccessResponse, query=_query(extra_query), - body=_body(m.LogoutRequest, extra_body, False, ("invalidate_all", invalidate_all)), + body=None, idempotent=False, timeout=timeout, ) - def reauthenticate_user( + async def get_backup( self, + vm_id: str, + backup_id: str, *, - code: str | None = None, - password: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ReauthenticateUserResponse: - """ - Step-up re-authentication: re-checks the password and/or the 2FA code and returns a - 10-minute token bound to the session. Required by sensitive actions (domain auth code, - transfer unlock, registrant change, domain delete). Service accounts cannot obtain it. - - It calls ``POST /v1/auth/reauthenticate``. - - Args: - code: Current TOTP or an unused recovery code; required when 2FA is enabled. - password: Required when the account has a local password. - """ - return self._client._call( - "POST", - "/v1/auth/reauthenticate", - m.ReauthenticateUserResponse, + ) -> m.GetBackupResponse: + """Call ``GET /v1/virtual-machines/{vmId}/backups/{backupId}``.""" + return await self._client._call( + "GET", + f"/v1/virtual-machines/{_path(vm_id)}/backups/{_path(backup_id)}", + m.GetBackupResponse, query=_query(extra_query), - body=_body(m.ReauthenticateUserRequest, extra_body, False, ("code", code), ("password", password)), + body=None, idempotent=False, timeout=timeout, ) - def regenerate_mfa_backup_codes( + async def list_backups( self, + vm_id: str, *, - code: str | None = None, - extra_body: dict[str, Any] | None = None, + status: m.BackupStatus | str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RegenerateMFABackupCodesResponse: - """Call ``POST /v1/auth/mfa/backup-codes/regenerate``.""" - return self._client._call( - "POST", - "/v1/auth/mfa/backup-codes/regenerate", - m.RegenerateMFABackupCodesResponse, - query=_query(extra_query), - body=_body(m.RegenerateMFABackupCodesRequest, extra_body, False, ("code", code)), - idempotent=False, - timeout=timeout, - ) - - def register_user( - self, + ) -> m.ListBackupsResponse: + """Call ``GET /v1/virtual-machines/{vmId}/backups``.""" + return await self._client._call( + "GET", + f"/v1/virtual-machines/{_path(vm_id)}/backups", + m.ListBackupsResponse, + query=_query(extra_query, ("status", status), ("page", page), ("pageSize", page_size)), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def list_backups_all( + self, + vm_id: str, *, - email: str | None = None, - first_name: str | None = None, - last_name: str | None = None, - password: str | None = None, - turnstile_token: str | None = None, - extra_body: dict[str, Any] | None = None, + status: m.BackupStatus | str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> AsyncIterator[m.Backup]: """ - Call ``POST /v1/auth/register``. + Every result of :meth:`list_backups`, reading page after page. - Args: - turnstile_token: Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled). + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - return self._client._call( + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_backups( + vm_id, + page=page, + page_size=size, + status=status, + extra_query=extra_query, + timeout=timeout, + ) + items = res.backups + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + async def restore_backup( + self, + vm_id: str, + backup_id: str, + *, + start_after_restore: bool | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``POST /v1/virtual-machines/{vmId}/backups/{backupId}/restore``.""" + return await self._client._call( "POST", - "/v1/auth/register", + f"/v1/virtual-machines/{_path(vm_id)}/backups/{_path(backup_id)}/restore", m.SuccessResponse, query=_query(extra_query), - body=_body( - m.RegisterUserRequest, - extra_body, - False, - ("email", email), - ("first_name", first_name), - ("last_name", last_name), - ("password", password), - ("turnstile_token", turnstile_token), - ), + body=_body(m.BackupRestoreBackupBody, extra_body, False, ("start_after_restore", start_after_restore)), idempotent=False, timeout=timeout, ) - def resend_verification_email( + +class AsyncBusinessMonitoringService(_ServiceAsync): + """The NodeRings BusinessMonitoringService API.""" + + async def create_business_monitoring_launch( self, *, - email: str | None = None, - turnstile_token: str | None = None, + next: str | None = None, + resource_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> m.CreateMonitoringLaunchResponse: """ - Call ``POST /v1/auth/resend-verification-email``. + Call ``POST /v1/monitoring/business/launch``. Args: - turnstile_token: Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled). + next: Optional relative Grafana path to open, e.g. "/d/nr-vm/virtual-machine?var-resource=NR-..". Validated server side; only /d/, /dashboards and /explore paths are accepted. + resource_id: Optional VM or game server id (client orgs): open its dashboard. """ - return self._client._call( + return await self._client._call( "POST", - "/v1/auth/resend-verification-email", - m.SuccessResponse, + "/v1/monitoring/business/launch", + m.CreateMonitoringLaunchResponse, query=_query(extra_query), body=_body( - m.ResendVerificationEmailRequest, - extra_body, - False, - ("email", email), - ("turnstile_token", turnstile_token), + m.CreateMonitoringLaunchRequest, extra_body, False, ("next", next), ("resource_id", resource_id) ), idempotent=False, timeout=timeout, ) - def reset_password( + async def rotate_business_monitoring_datasource_token( self, *, - email: str | None = None, - new_password: str | None = None, - reset_token: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/auth/reset-password``.""" - return self._client._call( + """Call ``POST /v1/monitoring/business/datasource-token:rotate``.""" + return await self._client._call( "POST", - "/v1/auth/reset-password", + "/v1/monitoring/business/datasource-token:rotate", m.SuccessResponse, query=_query(extra_query), - body=_body( - m.ResetPasswordRequest, - extra_body, - False, - ("email", email), - ("new_password", new_password), - ("reset_token", reset_token), - ), + body=_body(m.RotateMonitoringDatasourceTokenRequest, extra_body, False), idempotent=False, timeout=timeout, ) - def set_password( + +class AsyncChatService(_ServiceAsync): + """The NodeRings ChatService API.""" + + async def chat( self, *, - new_password: str | None = None, + conversation_id: str | None = None, + message: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/auth/set-password``.""" - return self._client._call( + ) -> m.ChatResponse: + """ + Chat provides a non-streaming chat endpoint + + It calls ``POST /v1/chat``. + + Args: + conversation_id: Conversation ID for maintaining context (optional, generated if not provided) + message: User's message + """ + return await self._client._call( "POST", - "/v1/auth/set-password", - m.SuccessResponse, + "/v1/chat", + m.ChatResponse, query=_query(extra_query), - body=_body(m.SetPasswordRequest, extra_body, False, ("new_password", new_password)), + body=_body(m.ChatRequest, extra_body, False, ("conversation_id", conversation_id), ("message", message)), idempotent=False, timeout=timeout, ) - def unlink_identity( + async def chat_anonymous( self, - provider: str, *, + conversation_id: str | None = None, + message: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/auth/identities/{provider}``.""" - return self._client._call( - "DELETE", - f"/v1/auth/identities/{_path(provider)}", - m.SuccessResponse, + ) -> m.ChatResponse: + """ + ChatAnonymous provides a non-streaming chat endpoint for anonymous users Session ID is + extracted from the cookie header (managed by the frontend) + + It calls ``POST /v1/chat/anonymous``. + + Args: + conversation_id: Conversation ID for maintaining context (optional, generated if not provided) + message: User's message + """ + return await self._client._call( + "POST", + "/v1/chat/anonymous", + m.ChatResponse, query=_query(extra_query), - body=None, + body=_body(m.ChatRequest, extra_body, False, ("conversation_id", conversation_id), ("message", message)), idempotent=False, timeout=timeout, ) - def update_user( + async def delete_conversation( self, - id: str, + conversation_id: str, *, - allow_org_invites: bool | None = None, - email: str | None = None, - first_name: str | None = None, - group_ids: list[str] | None = None, - last_name: str | None = None, - user_roles: list[str] | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateUserResponse: - """Call ``PATCH /v1/users/{id}``.""" - return self._client._call( - "PATCH", - f"/v1/users/{_path(id)}", - m.UpdateUserResponse, + ) -> m.SuccessResponse: + """ + DeleteConversation marks a conversation as deleted (soft delete) + + It calls ``DELETE /v1/chat/conversations/{conversationId}``. + """ + return await self._client._call( + "DELETE", + f"/v1/chat/conversations/{_path(conversation_id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.UpdateUserBody, - extra_body, - False, - ("allow_org_invites", allow_org_invites), - ("email", email), - ("first_name", first_name), - ("group_ids", group_ids), - ("last_name", last_name), - ("user_roles", user_roles), - ), + body=None, idempotent=False, timeout=timeout, ) - def verify_email( + async def get_conversation_history( self, + conversation_id: str, *, - user_id: str | None = None, - code: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``GET /v1/auth/verify-email``.""" - return self._client._call( + ) -> m.GetConversationHistoryResponse: + """ + GetConversationHistory returns the full message history for a conversation + + It calls ``GET /v1/chat/conversations/{conversationId}/history``. + """ + return await self._client._call( "GET", - "/v1/auth/verify-email", - m.SuccessResponse, - query=_query(extra_query, ("userId", user_id), ("code", code)), + f"/v1/chat/conversations/{_path(conversation_id)}/history", + m.GetConversationHistoryResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def verify_mfa_enrollment( + async def list_conversations( self, *, - code: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VerifyMFAEnrollmentResponse: - """Call ``POST /v1/auth/mfa/verify-enrollment``.""" - return self._client._call( - "POST", - "/v1/auth/mfa/verify-enrollment", - m.VerifyMFAEnrollmentResponse, - query=_query(extra_query), - body=_body(m.VerifyMFAEnrollmentRequest, extra_body, False, ("code", code)), + ) -> m.ListConversationsResponse: + """ + ListConversations returns all conversation IDs for the authenticated user + + It calls ``GET /v1/chat/conversations``. + """ + return await self._client._call( + "GET", + "/v1/chat/conversations", + m.ListConversationsResponse, + query=_query(extra_query), + body=None, idempotent=False, timeout=timeout, ) -class VMTemplateService(_Service): - """The NodeRings VMTemplateService API.""" +class AsyncClientDashboardService(_ServiceAsync): + """The NodeRings ClientDashboardService API.""" - def create_vm_template( + async def get_client_dashboard_billing( self, *, - cloud_init_template_id: str | None = None, - distro: m.Distro | str | None = None, - name: str | None = None, - node_id: str | None = None, - proxmox_cpu_type: str | None = None, - template_id: int | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Call ``POST /v1/vmtemplate``. + ) -> m.GetClientDashboardBillingResponse: + """Call ``GET /v1/client/dashboard/billing``.""" + return await self._client._call( + "GET", + "/v1/client/dashboard/billing", + m.GetClientDashboardBillingResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - Args: - distro: - DISTRO_UBUNTU_22_04: Ubuntu distributions - DISTRO_FEDORA_43: Fedora distributions - DISTRO_DEBIAN_12: Debian distributions - DISTRO_CENTOS_9: CentOS distributions - DISTRO_ROCKY_9: Rocky Linux distributions - DISTRO_ALMALINUX_9: AlmaLinux distributions - proxmox_cpu_type: Proxmox cpu= guest CPU model for VMs using this template. Default: host. - """ - return self._client._call( + async def get_client_dashboard_summary( + self, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetClientDashboardSummaryResponse: + """Call ``GET /v1/client/dashboard/summary``.""" + return await self._client._call( + "GET", + "/v1/client/dashboard/summary", + m.GetClientDashboardSummaryResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + +class AsyncClientProviderReviewService(_ServiceAsync): + """The NodeRings ClientProviderReviewService API.""" + + async def create_client_review( + self, + *, + comment: str | None = None, + star_rating: int | None = None, + virtual_machine_id: str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.CreateClientReviewResponse: + """Call ``POST /v1/provider-reviews``.""" + return await self._client._call( "POST", - "/v1/vmtemplate", - m.SuccessResponse, + "/v1/provider-reviews", + m.CreateClientReviewResponse, query=_query(extra_query), body=_body( - m.CreateVMTemplateRequest, + m.CreateClientReviewRequest, extra_body, False, - ("cloud_init_template_id", cloud_init_template_id), - ("distro", distro), - ("name", name), - ("node_id", node_id), - ("proxmox_cpu_type", proxmox_cpu_type), - ("template_id", template_id), + ("comment", comment), + ("star_rating", star_rating), + ("virtual_machine_id", virtual_machine_id), ), idempotent=False, timeout=timeout, ) - def delete_vm_template( + async def delete_client_review( self, - id: str, + review_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/vmtemplate/{id}``.""" - return self._client._call( + """Call ``DELETE /v1/provider-reviews/{reviewId}``.""" + return await self._client._call( "DELETE", - f"/v1/vmtemplate/{_path(id)}", + f"/v1/provider-reviews/{_path(review_id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -16151,69 +15680,60 @@ def delete_vm_template( timeout=timeout, ) - def get_vm_template( + async def get_client_review_for_virtual_machine( self, - id: str, + virtual_machine_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetVMTemplateResponse: - """Call ``GET /v1/vmtemplate/{id}``.""" - return self._client._call( + ) -> m.GetClientReviewForVirtualMachineResponse: + """Call ``GET /v1/provider-reviews/virtual-machines/{virtualMachineId}``.""" + return await self._client._call( "GET", - f"/v1/vmtemplate/{_path(id)}", - m.GetVMTemplateResponse, + f"/v1/provider-reviews/virtual-machines/{_path(virtual_machine_id)}", + m.GetClientReviewForVirtualMachineResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_vm_templates( + async def list_client_provider_review_assets( self, *, page: int | None = None, page_size: int | None = None, search: str | None = None, - node_id: str | None = None, - platform_id: str | None = None, - distro: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListVMTemplatesResponse: - """Call ``GET /v1/vmtemplates``.""" - return self._client._call( + ) -> m.ListClientProviderReviewAssetsResponse: + """ + Call ``GET /v1/client/provider-review-assets``. + + Args: + search: Optional filter (hostname / provider name), case-insensitive substring. + """ + return await self._client._call( "GET", - "/v1/vmtemplates", - m.ListVMTemplatesResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("search", search), - ("nodeId", node_id), - ("platformId", platform_id), - ("distro", distro), - ), + "/v1/client/provider-review-assets", + m.ListClientProviderReviewAssetsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("search", search)), body=None, idempotent=False, timeout=timeout, ) - def list_vm_templates_all( + async def list_client_provider_review_assets_all( self, *, page: int | None = None, page_size: int | None = None, search: str | None = None, - node_id: str | None = None, - platform_id: str | None = None, - distro: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.VMTemplate]: + ) -> AsyncIterator[m.ClientProviderReviewAssetItem]: """ - Every result of :meth:`list_vm_templates`, reading page after page. + Every result of :meth:`list_client_provider_review_assets`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -16221,17 +15741,14 @@ def list_vm_templates_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_vm_templates( + res = await self.list_client_provider_review_assets( page=page, page_size=size, search=search, - node_id=node_id, - platform_id=platform_id, - distro=distro, extra_query=extra_query, timeout=timeout, ) - items = res.vm_templates + items = res.assets for item in items: yield item seen += len(items) @@ -16239,146 +15756,74 @@ def list_vm_templates_all( return page += 1 - def update_vm_template( + async def update_client_review( self, - id: str, + review_id: str, *, - cloud_init_template_id: str | None = None, - distro: m.Distro | str | None = None, - name: str | None = None, - node_id: str | None = None, - proxmox_cpu_type: str | None = None, - template_id: int | None = None, + comment: str | None = None, + star_rating: int | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateVMTemplateResponse: - """ - Call ``PATCH /v1/vmtemplate/{id}``. - - Args: - distro: - DISTRO_UBUNTU_22_04: Ubuntu distributions - DISTRO_FEDORA_43: Fedora distributions - DISTRO_DEBIAN_12: Debian distributions - DISTRO_CENTOS_9: CentOS distributions - DISTRO_ROCKY_9: Rocky Linux distributions - DISTRO_ALMALINUX_9: AlmaLinux distributions - proxmox_cpu_type: Proxmox cpu= guest CPU model. Empty = leave unchanged on update. - """ - return self._client._call( + ) -> m.UpdateClientReviewResponse: + """Call ``PATCH /v1/provider-reviews/{reviewId}``.""" + return await self._client._call( "PATCH", - f"/v1/vmtemplate/{_path(id)}", - m.UpdateVMTemplateResponse, + f"/v1/provider-reviews/{_path(review_id)}", + m.UpdateClientReviewResponse, query=_query(extra_query), - body=_body( - m.UpdateVMTemplateBody, - extra_body, - False, - ("cloud_init_template_id", cloud_init_template_id), - ("distro", distro), - ("name", name), - ("node_id", node_id), - ("proxmox_cpu_type", proxmox_cpu_type), - ("template_id", template_id), - ), + body=_body(m.UpdateClientReviewBody, extra_body, False, ("comment", comment), ("star_rating", star_rating)), idempotent=False, timeout=timeout, ) -class VirtualMachineService(_Service): - """The NodeRings VirtualMachineService API.""" +class AsyncCloudInitTemplateService(_ServiceAsync): + """The NodeRings CloudInitTemplateService API.""" - def attach_vm_firewall( + async def create_cloud_init_template( self, - id: str, *, - ruleset_id: str | None = None, + name: str | None = None, + network_data: str | None = None, + storage: str | None = None, + user_data: str | None = None, + vendor_data: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/virtual-machines/{id}:attach-firewall``.""" - return self._client._call( + """Call ``POST /v1/cloudinittemplate``.""" + return await self._client._call( "POST", - f"/v1/virtual-machines/{_path(id)}:attach-firewall", + "/v1/cloudinittemplate", m.SuccessResponse, query=_query(extra_query), - body=_body(m.AttachVMFirewallBody, extra_body, False, ("ruleset_id", ruleset_id)), + body=_body( + m.CreateCloudInitTemplateRequest, + extra_body, + False, + ("name", name), + ("network_data", network_data), + ("storage", storage), + ("user_data", user_data), + ("vendor_data", vendor_data), + ), idempotent=False, timeout=timeout, ) - def create_virtual_machine( + async def delete_cloud_init_template( self, - *, - cloud_init_user_data_id: str | None = None, - coupon: m.CouponInput | dict[str, Any] | None = None, - distro: m.Distro | str | None = None, - hostname: str | None = None, - idempotency_key: str | None = None, - instant_app_id: str | None = None, - instant_app_variables: dict[str, str] | None = None, - password: str | None = None, - plan_id: str | None = None, - region_id: str | None = None, - ssh_key_ids: list[str] | None = None, - tags: list[str] | None = None, - user_data: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.CreateVirtualMachineResponse: - """ - Call ``POST /v1/virtual-machines``. A retry of the same call cannot create a second - resource: the SDK sends an idempotency key. - - Args: - cloud_init_user_data_id: Saved client cloud-init user_data profile ID. Replaces provider user_data at VM create. - coupon: Optional code on a resource create request. - distro: - DISTRO_UBUNTU_22_04: Ubuntu distributions - DISTRO_FEDORA_43: Fedora distributions - DISTRO_DEBIAN_12: Debian distributions - DISTRO_CENTOS_9: CentOS distributions - DISTRO_ROCKY_9: Rocky Linux distributions - DISTRO_ALMALINUX_9: AlmaLinux distributions - idempotency_key: A UUID that makes the create safe to retry. If you leave it out, the SDK sets a new one. - instant_app_id: Platform Instant App ID. Replaces provider user_data. Mutually exclusive with user_data and cloud_init_user_data_id. Requires password or ssh_key_ids. - instant_app_variables: Optional Instant App form overrides (schema from InstantApp.metadata.variables). Unknown keys are rejected. Omitted keys use catalog defaults. - password: Password for VM access. Either user_data, ssh_key_ids, or password must be provided, but only one. - region_id: Required region ID where the VM should be created - ssh_key_ids: SSH key IDs to use for VM access (one or more). Either user_data, ssh_key_ids, or password must be provided, but only one. - tags: Tags for categorizing the virtual machine (e.g., "database", "webserver") - user_data: User data for CloudInit. Either user_data, ssh_key_ids, password, or cloud_init_user_data_id must be provided, but only one. - """ - return self._client._call( - "POST", - "/v1/virtual-machines", - m.CreateVirtualMachineResponse, - query=_query(extra_query), - body=_body( - m.CreateVirtualMachineRequest, - extra_body, - True, - ("cloud_init_user_data_id", cloud_init_user_data_id), - ("coupon", coupon), - ("distro", distro), - ("hostname", hostname), - ("idempotency_key", idempotency_key), - ("instant_app_id", instant_app_id), - ("instant_app_variables", instant_app_variables), - ("password", password), - ("plan_id", plan_id), - ("region_id", region_id), - ("ssh_key_ids", ssh_key_ids), - ("tags", tags), - ("user_data", user_data), - ), - idempotent=True, - timeout=timeout, - ) - - def delete_virtual_machine( - self, - id: str, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/virtual-machines/{id}``.""" - return self._client._call( + """Call ``DELETE /v1/cloudinittemplate/{id}``.""" + return await self._client._call( "DELETE", - f"/v1/virtual-machines/{_path(id)}", + f"/v1/cloudinittemplate/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -16386,212 +15831,214 @@ def delete_virtual_machine( timeout=timeout, ) - def detach_vm_firewall( + async def get_cloud_init_template( self, id: str, *, - ruleset_id: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/virtual-machines/{id}:detach-firewall``.""" - return self._client._call( - "POST", - f"/v1/virtual-machines/{_path(id)}:detach-firewall", - m.SuccessResponse, + ) -> m.GetCloudInitTemplateResponse: + """Call ``GET /v1/cloudinittemplate/{id}``.""" + return await self._client._call( + "GET", + f"/v1/cloudinittemplate/{_path(id)}", + m.GetCloudInitTemplateResponse, query=_query(extra_query), - body=_body(m.DetachVMFirewallBody, extra_body, False, ("ruleset_id", ruleset_id)), + body=None, idempotent=False, timeout=timeout, ) - def disable_additional_ip( + async def list_cloud_init_templates( self, - vm_id: str, *, - cancel_immediately: bool | None = None, - ip_address: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + filter_is_template: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> m.ListCloudInitTemplatesResponse: """ - DisableAdditionalIP releases one additional IPv4 and updates ADDITIONAL-IP addon quantity. - - It calls ``POST /v1/virtual-machines/{vmId}:disable-additional-ip``. + Call ``GET /v1/cloudinittemplates``. Args: - ip_address: Specific additional IPv4 to release. When empty, the most recently added address is removed. + filter_is_template: If not set, returns both template and non-template. If true, returns only templates. If false, returns only non-templates. """ - return self._client._call( - "POST", - f"/v1/virtual-machines/{_path(vm_id)}:disable-additional-ip", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.DisableAdditionalIPBody, - extra_body, - False, - ("cancel_immediately", cancel_immediately), - ("ip_address", ip_address), + return await self._client._call( + "GET", + "/v1/cloudinittemplates", + m.ListCloudInitTemplatesResponse, + query=_query( + extra_query, ("page", page), ("pageSize", page_size), ("filterIsTemplate", filter_is_template) ), + body=None, idempotent=False, timeout=timeout, ) - def disable_backup( + async def list_cloud_init_templates_all( self, - vm_id: str, *, - addon_id: str | None = None, - cancel_immediately: bool | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + filter_is_template: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> AsyncIterator[m.CloudInitTemplate]: """ - DisableBackup disables backup addon for a virtual machine + Every result of :meth:`list_cloud_init_templates`, reading page after page. - It calls ``POST /v1/virtual-machines/{vmId}:disable-backup``. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - return self._client._call( - "POST", - f"/v1/virtual-machines/{_path(vm_id)}:disable-backup", - m.SuccessResponse, + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_cloud_init_templates( + page=page, + page_size=size, + filter_is_template=filter_is_template, + extra_query=extra_query, + timeout=timeout, + ) + items = res.cloud_init_templates + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + async def update_cloud_init_template( + self, + id: str, + *, + name: str | None = None, + network_data: str | None = None, + storage: str | None = None, + user_data: str | None = None, + vendor_data: str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.UpdateCloudInitTemplateResponse: + """Call ``PATCH /v1/cloudinittemplate/{id}``.""" + return await self._client._call( + "PATCH", + f"/v1/cloudinittemplate/{_path(id)}", + m.UpdateCloudInitTemplateResponse, query=_query(extra_query), body=_body( - m.DisableBackupBody, + m.UpdateCloudInitTemplateBody, extra_body, False, - ("addon_id", addon_id), - ("cancel_immediately", cancel_immediately), + ("name", name), + ("network_data", network_data), + ("storage", storage), + ("user_data", user_data), + ("vendor_data", vendor_data), ), idempotent=False, timeout=timeout, ) - def enable_additional_ip( + +class AsyncCloudInitUserDataService(_ServiceAsync): + """The NodeRings CloudInitUserDataService API.""" + + async def create_cloud_init_user_data( self, - vm_id: str, *, + description: str | None = None, + name: str | None = None, + user_data: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.EnableAdditionalIPResponse: - """ - EnableAdditionalIP allocates an extra IPv4 from the VM primary prefix and subscribes to - ADDITIONAL-IP billing. - - It calls ``POST /v1/virtual-machines/{vmId}:enable-additional-ip``. - """ - return self._client._call( + ) -> m.CloudInitUserData: + """Call ``POST /v1/cloudinituserdata``.""" + return await self._client._call( "POST", - f"/v1/virtual-machines/{_path(vm_id)}:enable-additional-ip", - m.EnableAdditionalIPResponse, + "/v1/cloudinituserdata", + m.CloudInitUserData, query=_query(extra_query), - body=_body(m.EnableAdditionalIPBody, extra_body, False), + body=_body( + m.CreateCloudInitUserDataRequest, + extra_body, + False, + ("description", description), + ("name", name), + ("user_data", user_data), + ), idempotent=False, timeout=timeout, ) - def enable_backup( + async def delete_cloud_init_user_data( self, - vm_id: str, + id: str, *, - addon_id: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """ - EnableBackup enables backup addon for a virtual machine - - It calls ``POST /v1/virtual-machines/{vmId}:enable-backup``. - """ - return self._client._call( - "POST", - f"/v1/virtual-machines/{_path(vm_id)}:enable-backup", + """Call ``DELETE /v1/cloudinituserdata/{id}``.""" + return await self._client._call( + "DELETE", + f"/v1/cloudinituserdata/{_path(id)}", m.SuccessResponse, query=_query(extra_query), - body=_body(m.EnableBackupBody, extra_body, False, ("addon_id", addon_id)), + body=None, idempotent=False, timeout=timeout, ) - def get_virtual_machine( + async def get_cloud_init_user_data( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: - """Call ``GET /v1/virtual-machines/{id}``.""" - return self._client._call( + ) -> m.CloudInitUserData: + """Call ``GET /v1/cloudinituserdata/{id}``.""" + return await self._client._call( "GET", - f"/v1/virtual-machines/{_path(id)}", - m.VirtualMachine, + f"/v1/cloudinituserdata/{_path(id)}", + m.CloudInitUserData, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_vnc_console( + async def list_cloud_init_user_data( self, - id: str, *, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetVNCConsoleResponse: - """ - GetVNCConsole returns WebSocket URL for VNC console access. - - It calls ``GET /v1/virtual-machines/{id}/console``. - """ - return self._client._call( + ) -> m.ListCloudInitUserDataResponse: + """Call ``GET /v1/cloudinituserdata``.""" + return await self._client._call( "GET", - f"/v1/virtual-machines/{_path(id)}/console", - m.GetVNCConsoleResponse, - query=_query(extra_query), + "/v1/cloudinituserdata", + m.ListCloudInitUserDataResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def list_virtual_machines( - self, - *, - page: int | None = None, - page_size: int | None = None, - filter_operation_status: m.OperationStatus | str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListVirtualMachinesResponse: - """Call ``GET /v1/virtual-machines``.""" - return self._client._call( - "GET", - "/v1/virtual-machines", - m.ListVirtualMachinesResponse, - query=_query( - extra_query, ("page", page), ("pageSize", page_size), ("filterOperationStatus", filter_operation_status) - ), - body=None, - idempotent=False, - timeout=timeout, - ) - - def list_virtual_machines_all( + async def list_cloud_init_user_data_all( self, *, page: int | None = None, page_size: int | None = None, - filter_operation_status: m.OperationStatus | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.VirtualMachine]: + ) -> AsyncIterator[m.CloudInitUserData]: """ - Every result of :meth:`list_virtual_machines`, reading page after page. + Every result of :meth:`list_cloud_init_user_data`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -16599,14 +16046,13 @@ def list_virtual_machines_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_virtual_machines( + res = await self.list_cloud_init_user_data( page=page, page_size=size, - filter_operation_status=filter_operation_status, extra_query=extra_query, timeout=timeout, ) - items = res.virtual_machines + items = res.profiles for item in items: yield item seen += len(items) @@ -16614,374 +16060,374 @@ def list_virtual_machines_all( return page += 1 - def list_vm_tags( + async def update_cloud_init_user_data( self, + id: str, *, + description: str | None = None, + name: str | None = None, + user_data: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListVMTagsResponse: - """ - ListVMTags returns all unique tags from virtual machines belonging to the organization - - It calls ``GET /v1/virtual-machines/tags``. - """ - return self._client._call( - "GET", - "/v1/virtual-machines/tags", - m.ListVMTagsResponse, + ) -> m.CloudInitUserData: + """Call ``PATCH /v1/cloudinituserdata/{id}``.""" + return await self._client._call( + "PATCH", + f"/v1/cloudinituserdata/{_path(id)}", + m.CloudInitUserData, query=_query(extra_query), - body=None, + body=_body( + m.UpdateCloudInitUserDataBody, + extra_body, + False, + ("description", description), + ("name", name), + ("user_data", user_data), + ), idempotent=False, timeout=timeout, ) - def reinstall_virtual_machine( + +class AsyncCouponService(_ServiceAsync): + """The NodeRings CouponService API.""" + + async def create_coupon( self, - id: str, *, - cloud_init_user_data_id: str | None = None, - distro: m.Distro | str | None = None, - hostname: str | None = None, - instant_app_id: str | None = None, - instant_app_variables: dict[str, str] | None = None, - password: str | None = None, - ssh_key_ids: list[str] | None = None, - user_data: str | None = None, + acknowledge_high_risk: bool | None = None, + amounts_off: dict[str, str] | None = None, + applies_to: list[str] | None = None, + asset_categories: list[str] | None = None, + asset_types: list[str] | None = None, + code: str | None = None, + credit_min_topup: str | None = None, + credit_valid_days: int | None = None, + description: str | None = None, + discount_type: m.CouponDiscountType | str | None = None, + duration: m.CouponDuration | str | None = None, + duration_days: int | None = None, + duration_in_periods: int | None = None, + first_time_customer_only: bool | None = None, + max_discount_amounts: dict[str, str] | None = None, + max_redemptions: int | None = None, + name: str | None = None, + no_expiry: bool | None = None, + once_per_customer: bool | None = None, + percent_off: str | None = None, + plan_ids: list[str] | None = None, + usage_metric_codes: list[str] | None = None, + valid_from: datetime | None = None, + valid_until: datetime | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: + ) -> m.CreateCouponResponse: """ - Call ``POST /v1/virtual-machines/{id}:reinstall``. + Call ``POST /v1/coupons``. Args: - distro: - DISTRO_UBUNTU_22_04: Ubuntu distributions - DISTRO_FEDORA_43: Fedora distributions - DISTRO_DEBIAN_12: Debian distributions - DISTRO_CENTOS_9: CentOS distributions - DISTRO_ROCKY_9: Rocky Linux distributions - DISTRO_ALMALINUX_9: AlmaLinux distributions - instant_app_id: Platform Instant App. Same exclusivity rules as CreateVirtualMachineRequest. - instant_app_variables: Optional Instant App form overrides (same rules as CreateVirtualMachineRequest). + acknowledge_high_risk: Required when the terms are effectively free or unlimited. + code: Optional first shared code created with the coupon. + credit_min_topup: USD a client must top up before a redeemed credit lot can be spent. Empty means no top-up is needed. + credit_valid_days: Lot lifetime after a credit code is redeemed. Defaults to 90. + discount_type: - COUPON_DISCOUNT_TYPE_CREDIT: A code that grants promotional credit instead of discounting a subscription. + duration: - COUPON_DURATION_ONCE: Discounts the next invoice only. - COUPON_DURATION_REPEATING: Discounts duration_in_periods invoices, or every invoice for duration_days. + once_per_customer: Defaults to true. + valid_until: Defaults to the configured validity window unless no_expiry is set. """ - return self._client._call( + return await self._client._call( "POST", - f"/v1/virtual-machines/{_path(id)}:reinstall", - m.VirtualMachine, + "/v1/coupons", + m.CreateCouponResponse, query=_query(extra_query), body=_body( - m.ReinstallVirtualMachineBody, + m.CreateCouponRequest, extra_body, False, - ("cloud_init_user_data_id", cloud_init_user_data_id), - ("distro", distro), - ("hostname", hostname), - ("instant_app_id", instant_app_id), - ("instant_app_variables", instant_app_variables), - ("password", password), - ("ssh_key_ids", ssh_key_ids), - ("user_data", user_data), + ("acknowledge_high_risk", acknowledge_high_risk), + ("amounts_off", amounts_off), + ("applies_to", applies_to), + ("asset_categories", asset_categories), + ("asset_types", asset_types), + ("code", code), + ("credit_min_topup", credit_min_topup), + ("credit_valid_days", credit_valid_days), + ("description", description), + ("discount_type", discount_type), + ("duration", duration), + ("duration_days", duration_days), + ("duration_in_periods", duration_in_periods), + ("first_time_customer_only", first_time_customer_only), + ("max_discount_amounts", max_discount_amounts), + ("max_redemptions", max_redemptions), + ("name", name), + ("no_expiry", no_expiry), + ("once_per_customer", once_per_customer), + ("percent_off", percent_off), + ("plan_ids", plan_ids), + ("usage_metric_codes", usage_metric_codes), + ("valid_from", valid_from), + ("valid_until", valid_until), ), idempotent=False, timeout=timeout, ) - def restart_virtual_machine( + async def create_coupon_code( self, - id: str, + coupon_id: str, *, + campaign: str | None = None, + channel: str | None = None, + code: str | None = None, + customer_org_ids: list[str] | None = None, + max_redemptions: int | None = None, + no_expiry: bool | None = None, + valid_from: datetime | None = None, + valid_until: datetime | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: - """Call ``POST /v1/virtual-machines/{id}:restart``.""" - return self._client._call( + ) -> m.CouponCode: + """ + Call ``POST /v1/coupons/{couponId}/codes``. + + Args: + code: Leave empty to generate a random code. + """ + return await self._client._call( "POST", - f"/v1/virtual-machines/{_path(id)}:restart", - m.VirtualMachine, + f"/v1/coupons/{_path(coupon_id)}/codes", + m.CouponCode, query=_query(extra_query), - body=_body(m.RestartVirtualMachineBody, extra_body, False), + body=_body( + m.CreateCouponCodeBody, + extra_body, + False, + ("campaign", campaign), + ("channel", channel), + ("code", code), + ("customer_org_ids", customer_org_ids), + ("max_redemptions", max_redemptions), + ("no_expiry", no_expiry), + ("valid_from", valid_from), + ("valid_until", valid_until), + ), idempotent=False, timeout=timeout, ) - def start_virtual_machine( + async def deactivate_coupon( self, id: str, *, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: - """Call ``POST /v1/virtual-machines/{id}:start``.""" - return self._client._call( + ) -> m.Coupon: + """ + Blocks new attachments; customers keep the periods they were promised. + + It calls ``POST /v1/coupons/{id}:deactivate``. + """ + return await self._client._call( "POST", - f"/v1/virtual-machines/{_path(id)}:start", - m.VirtualMachine, + f"/v1/coupons/{_path(id)}:deactivate", + m.Coupon, query=_query(extra_query), - body=_body(m.StartVirtualMachineBody, extra_body, False), + body=_body(m.DeactivateCouponBody, extra_body, False), idempotent=False, timeout=timeout, ) - def stop_virtual_machine( + async def export_coupon_codes( self, - id: str, + coupon_id: str, *, - extra_body: dict[str, Any] | None = None, + batch_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: - """Call ``POST /v1/virtual-machines/{id}:stop``.""" - return self._client._call( - "POST", - f"/v1/virtual-machines/{_path(id)}:stop", - m.VirtualMachine, - query=_query(extra_query), - body=_body(m.StopVirtualMachineBody, extra_body, False), + ) -> m.ExportCouponCodesResponse: + """Call ``GET /v1/coupons/{couponId}/codes:export``.""" + return await self._client._call( + "GET", + f"/v1/coupons/{_path(coupon_id)}/codes:export", + m.ExportCouponCodesResponse, + query=_query(extra_query, ("batchId", batch_id)), + body=None, idempotent=False, timeout=timeout, ) - def update_virtual_machine( + async def generate_coupon_codes( self, - id: str, + coupon_id: str, *, - add_tags: list[str] | None = None, - remove_tags: list[str] | None = None, + campaign: str | None = None, + channel: str | None = None, + count: int | None = None, + max_redemptions: int | None = None, + prefix: str | None = None, + valid_until: datetime | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: + ) -> m.GenerateCouponCodesResponse: """ - Call ``PATCH /v1/virtual-machines/{id}``. + Call ``POST /v1/coupons/{couponId}/codes:generate``. Args: - add_tags: Tags to add to the virtual machine - remove_tags: Tags to remove from the virtual machine - """ - return self._client._call( - "PATCH", - f"/v1/virtual-machines/{_path(id)}", - m.VirtualMachine, - query=_query(extra_query), - body=_body( - m.UpdateVirtualMachineBody, extra_body, False, ("add_tags", add_tags), ("remove_tags", remove_tags) - ), - idempotent=False, - timeout=timeout, - ) - - -class AsyncAddonService(_ServiceAsync): - """The NodeRings AddonService API.""" - - async def add_addon_to_subscription( - self, - subscription_id: str, - *, - addon_id: str | None = None, - addon_price_id: str | None = None, - quantity: int | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.AddAddonToSubscriptionResponse: - """ - Add an addon to a subscription - - It calls ``POST /v1/subscriptions/{subscriptionId}/addons``. + max_redemptions: Uses per code. Defaults to 1 (single-use). + prefix: Optional letters or digits put before each code as PREFIX-XXXXXXXXXX. """ return await self._client._call( "POST", - f"/v1/subscriptions/{_path(subscription_id)}/addons", - m.AddAddonToSubscriptionResponse, + f"/v1/coupons/{_path(coupon_id)}/codes:generate", + m.GenerateCouponCodesResponse, query=_query(extra_query), body=_body( - m.AddAddonToSubscriptionBody, + m.GenerateCouponCodesBody, extra_body, False, - ("addon_id", addon_id), - ("addon_price_id", addon_price_id), - ("quantity", quantity), + ("campaign", campaign), + ("channel", channel), + ("count", count), + ("max_redemptions", max_redemptions), + ("prefix", prefix), + ("valid_until", valid_until), ), idempotent=False, timeout=timeout, ) - async def create_addon( + async def get_coupon( self, + id: str, *, - addon_id: str | None = None, - currency: str | None = None, - maximum_charge: str | None = None, - minimum_charge: str | None = None, - percentage_value: float | None = None, - unit_amount: str | None = None, - zero_base_fallback_amount: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Create an addon from a template addon - - It calls ``POST /v1/addons``. - - Args: - addon_id: Template addon ID to clone from (required) - currency: Currency for the addon price (required) - maximum_charge: Decimal string with 6 decimal places precision - minimum_charge: Decimal string with 6 decimal places precision - percentage_value: Optional: Override percentage value for percentage-based pricing formulas Only used when template addon has pricing_formula with type "percentage" Example: If template has 30% and you provide 25.0, the new addon will use 25% - unit_amount: Decimal string with 6 decimal places precision - zero_base_fallback_amount: Decimal string with 6 decimal places precision - """ + ) -> m.Coupon: + """Call ``GET /v1/coupons/{id}``.""" return await self._client._call( - "POST", - "/v1/addons", - m.SuccessResponse, + "GET", + f"/v1/coupons/{_path(id)}", + m.Coupon, query=_query(extra_query), - body=_body( - m.CreateAddonRequest, - extra_body, - False, - ("addon_id", addon_id), - ("currency", currency), - ("maximum_charge", maximum_charge), - ("minimum_charge", minimum_charge), - ("percentage_value", percentage_value), - ("unit_amount", unit_amount), - ("zero_base_fallback_amount", zero_base_fallback_amount), - ), + body=None, idempotent=False, timeout=timeout, ) - async def delete_addon( + async def get_coupon_code_batch( self, - id: str, + coupon_id: str, + batch_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Delete an addon (soft delete) - - It calls ``DELETE /v1/addons/{id}``. - """ + ) -> m.CouponCodeBatch: + """Call ``GET /v1/coupons/{couponId}/code-batches/{batchId}``.""" return await self._client._call( - "DELETE", - f"/v1/addons/{_path(id)}", - m.SuccessResponse, + "GET", + f"/v1/coupons/{_path(coupon_id)}/code-batches/{_path(batch_id)}", + m.CouponCodeBatch, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_addon( + async def get_coupon_report( self, - id: str, + coupon_id: str, *, + group_by: m.CouponReportGroupBy | str | None = None, + code: str | None = None, + campaign: str | None = None, + channel: str | None = None, + start_time: datetime | None = None, + end_time: datetime | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetAddonResponse: + ) -> m.GetCouponReportResponse: """ - Get a specific addon with its prices + Attribution and ROI figures, grouped by code, campaign, channel, or asset type. - It calls ``GET /v1/addons/{id}``. + It calls ``GET /v1/coupons/{couponId}/report``. + + Args: + code: Narrow the report to one code, campaign, or channel. + start_time: Applications created in [start_time, end_time); open ends are unbounded. """ return await self._client._call( "GET", - f"/v1/addons/{_path(id)}", - m.GetAddonResponse, - query=_query(extra_query), + f"/v1/coupons/{_path(coupon_id)}/report", + m.GetCouponReportResponse, + query=_query( + extra_query, + ("groupBy", group_by), + ("code", code), + ("campaign", campaign), + ("channel", channel), + ("startTime", start_time), + ("endTime", end_time), + ), body=None, idempotent=False, timeout=timeout, ) - async def list_addon_subscriptions( + async def get_subscription_coupon( self, subscription_id: str, *, - addon_status: m.AddonStatus | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListAddonSubscriptionsResponse: - """ - List addon subscriptions for a subscription - - It calls ``GET /v1/subscriptions/{subscriptionId}/addons``. - - Args: - addon_status: Filter by status - """ + ) -> m.GetSubscriptionCouponResponse: + """Call ``GET /v1/subscriptions/{subscriptionId}/coupon``.""" return await self._client._call( "GET", - f"/v1/subscriptions/{_path(subscription_id)}/addons", - m.ListAddonSubscriptionsResponse, - query=_query(extra_query, ("addonStatus", addon_status)), + f"/v1/subscriptions/{_path(subscription_id)}/coupon", + m.GetSubscriptionCouponResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_addons( + async def list_coupon_code_batches( self, + coupon_id: str, *, page: int | None = None, page_size: int | None = None, - subscription_id: str | None = None, - addon_type: m.AddonType | str | None = None, - is_template: bool | None = None, - billing_type: m.BillingType | str | None = None, - search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListAddonsResponse: - """ - List available addons - - It calls ``GET /v1/addons``. - - Args: - subscription_id: Filter by compatible with subscription - addon_type: Filter by type - is_template: Filter by template status - billing_type: Filter by billing type (usage-based or fixed/subscription) - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) - search: Search filter for addon name, code, or description - """ + ) -> m.ListCouponCodeBatchesResponse: + """Call ``GET /v1/coupons/{couponId}/code-batches``.""" return await self._client._call( "GET", - "/v1/addons", - m.ListAddonsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("subscriptionId", subscription_id), - ("addonType", addon_type), - ("isTemplate", is_template), - ("billingType", billing_type), - ("search", search), - ), + f"/v1/coupons/{_path(coupon_id)}/code-batches", + m.ListCouponCodeBatchesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - async def list_addons_all( + async def list_coupon_code_batches_all( self, + coupon_id: str, *, page: int | None = None, page_size: int | None = None, - subscription_id: str | None = None, - addon_type: m.AddonType | str | None = None, - is_template: bool | None = None, - billing_type: m.BillingType | str | None = None, - search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Addon]: + ) -> AsyncIterator[m.CouponCodeBatch]: """ - Every result of :meth:`list_addons`, reading page after page. + Every result of :meth:`list_coupon_code_batches`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -16989,18 +16435,14 @@ async def list_addons_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_addons( + res = await self.list_coupon_code_batches( + coupon_id, page=page, page_size=size, - subscription_id=subscription_id, - addon_type=addon_type, - is_template=is_template, - billing_type=billing_type, - search=search, extra_query=extra_query, timeout=timeout, ) - items = res.addons + items = res.batches for item in items: yield item seen += len(items) @@ -17008,408 +16450,499 @@ async def list_addons_all( return page += 1 - async def remove_addon( + async def list_coupon_codes( self, - addon_subscription_id: str, + coupon_id: str, *, - cancel_immediately: bool | None = None, + page: int | None = None, + page_size: int | None = None, + batch_id: str | None = None, + campaign: str | None = None, + channel: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RemoveAddonResponse: - """ - Remove an addon from a subscription. cancel_immediately=false keeps the add-on (and - IP/backup) until the parent subscription period ends; the renewal task then deprovisions it. - - It calls ``DELETE /v1/addon-subscriptions/{addonSubscriptionId}``. - - Args: - cancel_immediately: If false, cancels at period end - """ + ) -> m.ListCouponCodesResponse: + """Call ``GET /v1/coupons/{couponId}/codes``.""" return await self._client._call( - "DELETE", - f"/v1/addon-subscriptions/{_path(addon_subscription_id)}", - m.RemoveAddonResponse, - query=_query(extra_query, ("cancelImmediately", cancel_immediately)), + "GET", + f"/v1/coupons/{_path(coupon_id)}/codes", + m.ListCouponCodesResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("batchId", batch_id), + ("campaign", campaign), + ("channel", channel), + ), body=None, idempotent=False, timeout=timeout, ) - async def undo_cancel_addon( + async def list_coupon_codes_all( self, - addon_subscription_id: str, + coupon_id: str, *, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + batch_id: str | None = None, + campaign: str | None = None, + channel: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RemoveAddonResponse: + ) -> AsyncIterator[m.CouponCode]: """ - UndoCancelAddon clears cancel_at_period_end so the add-on renews with the VM. + Every result of :meth:`list_coupon_codes`, reading page after page. - It calls ``POST /v1/addon-subscriptions/{addonSubscriptionId}:undo-cancel``. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_coupon_codes( + coupon_id, + page=page, + page_size=size, + batch_id=batch_id, + campaign=campaign, + channel=channel, + extra_query=extra_query, + timeout=timeout, + ) + items = res.codes + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + async def list_coupon_redemptions( + self, + coupon_id: str, + *, + page: int | None = None, + page_size: int | None = None, + asset_type: str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.ListCouponRedemptionsResponse: + """Call ``GET /v1/coupons/{couponId}/redemptions``.""" return await self._client._call( - "POST", - f"/v1/addon-subscriptions/{_path(addon_subscription_id)}:undo-cancel", - m.RemoveAddonResponse, - query=_query(extra_query), - body=_body(m.UndoCancelAddonBody, extra_body, False), + "GET", + f"/v1/coupons/{_path(coupon_id)}/redemptions", + m.ListCouponRedemptionsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("assetType", asset_type)), + body=None, idempotent=False, timeout=timeout, ) - async def update_addon( + async def list_coupon_redemptions_all( self, - id: str, + coupon_id: str, *, - currency: str | None = None, - percentage_value: float | None = None, - unit_amount: str | None = None, - zero_base_fallback_amount: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + asset_type: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> AsyncIterator[m.CouponRedemption]: """ - Update an addon (allows changing price and currency) + Every result of :meth:`list_coupon_redemptions`, reading page after page. - It calls ``PATCH /v1/addons/{id}``. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_coupon_redemptions( + coupon_id, + page=page, + page_size=size, + asset_type=asset_type, + extra_query=extra_query, + timeout=timeout, + ) + items = res.redemptions + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + async def list_coupons( + self, + *, + page: int | None = None, + page_size: int | None = None, + asset_type: str | None = None, + expiring_soon: bool | None = None, + search: str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.ListCouponsResponse: + """ + Call ``GET /v1/coupons``. Args: - currency: Currency for the addon price (optional, must be 3 characters if provided) - percentage_value: Override percentage value for percentage-based pricing formula (optional, 0-100) - unit_amount: Decimal string with 6 decimal places precision - zero_base_fallback_amount: Decimal string with 6 decimal places precision + expiring_soon: Only coupons whose validity ends within 14 days. """ return await self._client._call( - "PATCH", - f"/v1/addons/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.UpdateAddonBody, - extra_body, - False, - ("currency", currency), - ("percentage_value", percentage_value), - ("unit_amount", unit_amount), - ("zero_base_fallback_amount", zero_base_fallback_amount), + "GET", + "/v1/coupons", + m.ListCouponsResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("assetType", asset_type), + ("expiringSoon", expiring_soon), + ("search", search), ), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncAgentService(_ServiceAsync): - """The NodeRings AgentService API.""" - - async def create_agent( + async def list_coupons_all( self, *, - agent_public_ip: str | None = None, - description: str | None = None, - gateway_region: m.AgentGatewayRegion | str | None = None, - hypervisor_driver: m.PlatformDriver | str | None = None, - name: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + asset_type: str | None = None, + expiring_soon: bool | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetAgentResponse: + ) -> AsyncIterator[m.Coupon]: """ - Call ``POST /v1/agents``. + Every result of :meth:`list_coupons`, reading page after page. - Args: - hypervisor_driver: - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - return await self._client._call( - "POST", - "/v1/agents", - m.GetAgentResponse, - query=_query(extra_query), - body=_body( - m.CreateAgentRequest, - extra_body, - False, - ("agent_public_ip", agent_public_ip), - ("description", description), - ("gateway_region", gateway_region), - ("hypervisor_driver", hypervisor_driver), - ("name", name), - ), - idempotent=False, - timeout=timeout, - ) + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_coupons( + page=page, + page_size=size, + asset_type=asset_type, + expiring_soon=expiring_soon, + search=search, + extra_query=extra_query, + timeout=timeout, + ) + items = res.coupons + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 - async def delete_agent( + async def list_high_risk_coupons( self, - id: str, *, + page: int | None = None, + page_size: int | None = None, + provider_organization_id: str | None = None, + include_inactive: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/agents/{id}``.""" + ) -> m.ListHighRiskCouponsResponse: + """ + Platform admins only: high-risk coupons across all providers, most redeemed first. + + It calls ``GET /v1/admin/coupons/high-risk``. + + Args: + include_inactive: Also list inactive and banned coupons. + """ return await self._client._call( - "DELETE", - f"/v1/agents/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), + "GET", + "/v1/admin/coupons/high-risk", + m.ListHighRiskCouponsResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("providerOrganizationId", provider_organization_id), + ("includeInactive", include_inactive), + ), body=None, idempotent=False, timeout=timeout, ) - async def generate_install_command( + async def list_high_risk_coupons_all( self, - id: str, *, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + provider_organization_id: str | None = None, + include_inactive: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GenerateInstallCommandResponse: - """Call ``POST /v1/agents/{id}:generateInstallCommand``.""" - return await self._client._call( - "POST", - f"/v1/agents/{_path(id)}:generateInstallCommand", - m.GenerateInstallCommandResponse, - query=_query(extra_query), - body=_body(m.GenerateInstallCommandBody, extra_body, False), - idempotent=False, - timeout=timeout, - ) + ) -> AsyncIterator[m.HighRiskCoupon]: + """ + Every result of :meth:`list_high_risk_coupons`, reading page after page. - async def generate_peering_config( + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_high_risk_coupons( + page=page, + page_size=size, + provider_organization_id=provider_organization_id, + include_inactive=include_inactive, + extra_query=extra_query, + timeout=timeout, + ) + items = res.coupons + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + async def preview_coupon( self, - id: str, *, + billing_period: m.BillingPeriod | str | None = None, + code: str | None = None, + plan_id: str | None = None, + quantity: int | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GeneratePeeringConfigResponse: - """Call ``POST /v1/agents/{id}:generatePeeringConfig``.""" + ) -> m.PreviewCouponResponse: + """ + Checks a code against a plan without attaching it. + + It calls ``POST /v1/coupons:preview``. + """ return await self._client._call( "POST", - f"/v1/agents/{_path(id)}:generatePeeringConfig", - m.GeneratePeeringConfigResponse, + "/v1/coupons:preview", + m.PreviewCouponResponse, query=_query(extra_query), - body=_body(m.GeneratePeeringConfigBody, extra_body, False), + body=_body( + m.PreviewCouponRequest, + extra_body, + False, + ("billing_period", billing_period), + ("code", code), + ("plan_id", plan_id), + ("quantity", quantity), + ), idempotent=False, timeout=timeout, ) - async def get_agent( + async def redeem_coupon( self, - id: str, + subscription_id: str, *, + code: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetAgentResponse: - """Call ``GET /v1/agents/{id}``.""" + ) -> m.SubscriptionCoupon: + """Call ``POST /v1/subscriptions/{subscriptionId}/coupon``.""" return await self._client._call( - "GET", - f"/v1/agents/{_path(id)}", - m.GetAgentResponse, + "POST", + f"/v1/subscriptions/{_path(subscription_id)}/coupon", + m.SubscriptionCoupon, query=_query(extra_query), - body=None, + body=_body(m.RedeemCouponBody, extra_body, False, ("code", code)), idempotent=False, timeout=timeout, ) - async def list_agents( + async def remove_coupon( self, + subscription_id: str, *, - page: int | None = None, - page_size: int | None = None, - gateway_region: m.AgentGatewayRegion | str | None = None, - search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListAgentsResponse: - """Call ``GET /v1/agents``.""" + ) -> m.SubscriptionCoupon: + """Call ``DELETE /v1/subscriptions/{subscriptionId}/coupon``.""" return await self._client._call( - "GET", - "/v1/agents", - m.ListAgentsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("gatewayRegion", gateway_region), - ("search", search), - ), + "DELETE", + f"/v1/subscriptions/{_path(subscription_id)}/coupon", + m.SubscriptionCoupon, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_agents_all( + async def revoke_coupon( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - gateway_region: m.AgentGatewayRegion | str | None = None, - search: str | None = None, + confirm: bool | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.GetAgentResponse]: + ) -> m.RevokeCouponResponse: """ - Every result of :meth:`list_agents`, reading page after page. + Ends the discount for every customer from their next invoice. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + It calls ``POST /v1/coupons/{id}:revoke``. + + Args: + confirm: Must be true; revoking ends the discount for every customer. """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_agents( - page=page, - page_size=size, - gateway_region=gateway_region, - search=search, - extra_query=extra_query, - timeout=timeout, - ) - items = res.agents - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + return await self._client._call( + "POST", + f"/v1/coupons/{_path(id)}:revoke", + m.RevokeCouponResponse, + query=_query(extra_query), + body=_body(m.RevokeCouponBody, extra_body, False, ("confirm", confirm)), + idempotent=False, + timeout=timeout, + ) - async def update_agent( + async def update_coupon( self, id: str, *, + acknowledge_high_risk: bool | None = None, + add_amounts_off: dict[str, str] | None = None, description: str | None = None, - hypervisor_driver: m.PlatformDriver | str | None = None, + max_redemptions: int | None = None, name: str | None = None, + no_expiry: bool | None = None, + valid_until: datetime | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateAgentResponse: + ) -> m.Coupon: """ - Call ``PATCH /v1/agents/{id}``. + Call ``PATCH /v1/coupons/{id}``. Args: - hypervisor_driver: - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver. + add_amounts_off: Adds amounts for currencies the coupon does not list yet. Existing amounts are read-only. """ return await self._client._call( "PATCH", - f"/v1/agents/{_path(id)}", - m.UpdateAgentResponse, + f"/v1/coupons/{_path(id)}", + m.Coupon, query=_query(extra_query), body=_body( - m.UpdateAgentBody, + m.UpdateCouponBody, extra_body, False, + ("acknowledge_high_risk", acknowledge_high_risk), + ("add_amounts_off", add_amounts_off), ("description", description), - ("hypervisor_driver", hypervisor_driver), + ("max_redemptions", max_redemptions), ("name", name), + ("no_expiry", no_expiry), + ("valid_until", valid_until), ), idempotent=False, timeout=timeout, ) - async def upload_inbound_peering_config( + async def update_coupon_code( self, id: str, *, - kubeconfig: str | None = None, + active: bool | None = None, + campaign: str | None = None, + channel: str | None = None, + max_redemptions: int | None = None, + no_expiry: bool | None = None, + valid_until: datetime | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UploadInboundPeeringConfigResponse: - """ - Call ``POST /v1/agents/{id}:uploadInboundPeeringConfig``. - - Args: - kubeconfig: Provider-generated peering-user kubeconfig YAML for neo as consumer. - """ + ) -> m.CouponCode: + """Call ``PATCH /v1/coupon-codes/{id}``.""" return await self._client._call( - "POST", - f"/v1/agents/{_path(id)}:uploadInboundPeeringConfig", - m.UploadInboundPeeringConfigResponse, + "PATCH", + f"/v1/coupon-codes/{_path(id)}", + m.CouponCode, query=_query(extra_query), - body=_body(m.UploadInboundPeeringConfigBody, extra_body, False, ("kubeconfig", kubeconfig)), + body=_body( + m.UpdateCouponCodeBody, + extra_body, + False, + ("active", active), + ("campaign", campaign), + ("channel", channel), + ("max_redemptions", max_redemptions), + ("no_expiry", no_expiry), + ("valid_until", valid_until), + ), idempotent=False, timeout=timeout, ) -class AsyncBackupService(_ServiceAsync): - """The NodeRings BackupService API.""" +class AsyncCreditService(_ServiceAsync): + """The NodeRings CreditService API.""" - async def delete_backup( + async def get_credit_balance( self, - vm_id: str, - backup_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/virtual-machines/{vmId}/backups/{backupId}``.""" + ) -> m.GetCreditBalanceResponse: + """Call ``GET /v1/credits/balance``.""" return await self._client._call( - "DELETE", - f"/v1/virtual-machines/{_path(vm_id)}/backups/{_path(backup_id)}", - m.SuccessResponse, + "GET", + "/v1/credits/balance", + m.GetCreditBalanceResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_backup( + async def list_credit_ledger_entries( self, - vm_id: str, - backup_id: str, *, + page: int | None = None, + page_size: int | None = None, + entry_type: m.CreditLedgerEntryType | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetBackupResponse: - """Call ``GET /v1/virtual-machines/{vmId}/backups/{backupId}``.""" + ) -> m.ListCreditLedgerEntriesResponse: + """Call ``GET /v1/credits/ledger``.""" return await self._client._call( "GET", - f"/v1/virtual-machines/{_path(vm_id)}/backups/{_path(backup_id)}", - m.GetBackupResponse, - query=_query(extra_query), + "/v1/credits/ledger", + m.ListCreditLedgerEntriesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("entryType", entry_type)), body=None, idempotent=False, timeout=timeout, ) - async def list_backups( + async def list_credit_ledger_entries_all( self, - vm_id: str, *, - status: m.BackupStatus | str | None = None, page: int | None = None, page_size: int | None = None, + entry_type: m.CreditLedgerEntryType | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListBackupsResponse: - """Call ``GET /v1/virtual-machines/{vmId}/backups``.""" - return await self._client._call( - "GET", - f"/v1/virtual-machines/{_path(vm_id)}/backups", - m.ListBackupsResponse, - query=_query(extra_query, ("status", status), ("page", page), ("pageSize", page_size)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_backups_all( - self, - vm_id: str, - *, - status: m.BackupStatus | str | None = None, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Backup]: + ) -> AsyncIterator[m.CreditLedgerEntryProto]: """ - Every result of :meth:`list_backups`, reading page after page. + Every result of :meth:`list_credit_ledger_entries`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -17417,15 +16950,14 @@ async def list_backups_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_backups( - vm_id, + res = await self.list_credit_ledger_entries( page=page, page_size=size, - status=status, + entry_type=entry_type, extra_query=extra_query, timeout=timeout, ) - items = res.backups + items = res.entries for item in items: yield item seen += len(items) @@ -17433,594 +16965,516 @@ async def list_backups_all( return page += 1 - async def restore_backup( + async def list_promo_credit_grants( self, - vm_id: str, - backup_id: str, *, - start_after_restore: bool | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/virtual-machines/{vmId}/backups/{backupId}/restore``.""" + ) -> m.ListPromoCreditGrantsResponse: + """Call ``GET /v1/credits/promo``.""" return await self._client._call( - "POST", - f"/v1/virtual-machines/{_path(vm_id)}/backups/{_path(backup_id)}/restore", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.BackupRestoreBackupBody, extra_body, False, ("start_after_restore", start_after_restore)), + "GET", + "/v1/credits/promo", + m.ListPromoCreditGrantsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncBlogSubscriptionService(_ServiceAsync): - """The NodeRings BlogSubscriptionService API.""" - - async def confirm_blog_subscription( + async def list_promo_credit_grants_all( self, *, - token: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ConfirmBlogSubscriptionResponse: + ) -> AsyncIterator[m.PromoCreditGrant]: """ - Confirm an address with the token from the confirmation email. - - It calls ``POST /v1/blog/subscriptions/confirm``. + Every result of :meth:`list_promo_credit_grants`, reading page after page. - Args: - token: Token from the confirmation email link. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - return await self._client._call( - "POST", - "/v1/blog/subscriptions/confirm", - m.ConfirmBlogSubscriptionResponse, - query=_query(extra_query), - body=_body(m.ConfirmBlogSubscriptionRequest, extra_body, False, ("token", token)), - idempotent=False, - timeout=timeout, - ) + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_promo_credit_grants( + page=page, + page_size=size, + extra_query=extra_query, + timeout=timeout, + ) + items = res.grants + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 - async def subscribe_to_blog( + async def purchase_credits( self, *, - email: str | None = None, - source: str | None = None, - turnstile_token: str | None = None, - website: str | None = None, + amount: str | None = None, + payment_method_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SubscribeToBlogResponse: + ) -> m.PurchaseCreditsResponse: """ - Start a subscription and send the confirmation email. - - It calls ``POST /v1/blog/subscriptions``. + Call ``POST /v1/credits:purchase``. Args: - email: Address that should receive new posts. - source: Where the form was shown, for example "blog_index" or "post:what-noderings-is". - turnstile_token: Cloudflare Turnstile token from the widget. Required when the backend enables Turnstile for blog sign-ups. - website: Honeypot. Real readers never see or fill this field. + amount: Decimal string: USD amount to top-up + payment_method_id: Optional: payment method ID to charge. If omitted, the org's default payment method is used. """ return await self._client._call( "POST", - "/v1/blog/subscriptions", - m.SubscribeToBlogResponse, + "/v1/credits:purchase", + m.PurchaseCreditsResponse, query=_query(extra_query), body=_body( - m.SubscribeToBlogRequest, + m.PurchaseCreditsRequest, extra_body, False, - ("email", email), - ("source", source), - ("turnstile_token", turnstile_token), - ("website", website), + ("amount", amount), + ("payment_method_id", payment_method_id), ), idempotent=False, timeout=timeout, ) - async def unsubscribe_from_blog( + async def redeem_promo_code( self, *, - token: str | None = None, + code: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UnsubscribeFromBlogResponse: - """ - Stop emails with the token from an unsubscribe link. - - It calls ``POST /v1/blog/subscriptions/unsubscribe``. - - Args: - token: Token from the unsubscribe link in any blog email. - """ + ) -> m.RedeemPromoCodeResponse: + """Call ``POST /v1/credits:redeemPromoCode``.""" return await self._client._call( "POST", - "/v1/blog/subscriptions/unsubscribe", - m.UnsubscribeFromBlogResponse, + "/v1/credits:redeemPromoCode", + m.RedeemPromoCodeResponse, query=_query(extra_query), - body=_body(m.UnsubscribeFromBlogRequest, extra_body, False, ("token", token)), + body=_body(m.RedeemPromoCodeRequest, extra_body, False, ("code", code)), idempotent=False, timeout=timeout, ) -class AsyncBusinessMonitoringService(_ServiceAsync): - """The NodeRings BusinessMonitoringService API.""" +class AsyncDNSRecordService(_ServiceAsync): + """The NodeRings DnsRecordService API.""" - async def create_business_monitoring_launch( + async def check_dns_geo_record( self, + zone_id: str, *, - next: str | None = None, - resource_id: str | None = None, + continent: str | None = None, + country: str | None = None, + name: str | None = None, + region: str | None = None, + type: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateMonitoringLaunchResponse: - """ - Call ``POST /v1/monitoring/business/launch``. - - Args: - next: Optional relative Grafana path to open, e.g. "/d/nr-vm/virtual-machine?var-resource=NR-..". Validated server side; only /d/, /dashboards and /explore paths are accepted. - resource_id: Optional VM or game server id (client orgs): open its dashboard. - """ + ) -> m.CheckDNSGeoRecordResponse: + """Call ``POST /v1/dns/zones/{zoneId}/geo-records:check``.""" return await self._client._call( "POST", - "/v1/monitoring/business/launch", - m.CreateMonitoringLaunchResponse, + f"/v1/dns/zones/{_path(zone_id)}/geo-records:check", + m.CheckDNSGeoRecordResponse, query=_query(extra_query), body=_body( - m.CreateMonitoringLaunchRequest, extra_body, False, ("next", next), ("resource_id", resource_id) + m.CheckDNSGeoRecordBody, + extra_body, + False, + ("continent", continent), + ("country", country), + ("name", name), + ("region", region), + ("type", type), ), idempotent=False, timeout=timeout, ) - async def rotate_business_monitoring_datasource_token( + async def delete_dns_geo_record( self, + zone_id: str, *, - extra_body: dict[str, Any] | None = None, + name: str | None = None, + type: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/monitoring/business/datasource-token:rotate``.""" + """Call ``DELETE /v1/dns/zones/{zoneId}/geo-records``.""" return await self._client._call( - "POST", - "/v1/monitoring/business/datasource-token:rotate", + "DELETE", + f"/v1/dns/zones/{_path(zone_id)}/geo-records", m.SuccessResponse, - query=_query(extra_query), - body=_body(m.RotateMonitoringDatasourceTokenRequest, extra_body, False), + query=_query(extra_query, ("name", name), ("type", type)), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncChatService(_ServiceAsync): - """The NodeRings ChatService API.""" - - async def chat( + async def delete_dns_record( self, + zone_id: str, *, - conversation_id: str | None = None, - message: str | None = None, - extra_body: dict[str, Any] | None = None, + name: str | None = None, + type: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ChatResponse: - """ - Chat provides a non-streaming chat endpoint - - It calls ``POST /v1/chat``. - - Args: - conversation_id: Conversation ID for maintaining context (optional, generated if not provided) - message: User's message - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/dns/zones/{zoneId}/records``.""" return await self._client._call( - "POST", - "/v1/chat", - m.ChatResponse, - query=_query(extra_query), - body=_body(m.ChatRequest, extra_body, False, ("conversation_id", conversation_id), ("message", message)), + "DELETE", + f"/v1/dns/zones/{_path(zone_id)}/records", + m.SuccessResponse, + query=_query(extra_query, ("name", name), ("type", type)), + body=None, idempotent=False, timeout=timeout, ) - async def chat_anonymous( + async def get_dns_geo_record( self, + zone_id: str, *, - conversation_id: str | None = None, - message: str | None = None, - extra_body: dict[str, Any] | None = None, + name: str | None = None, + type: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ChatResponse: - """ - ChatAnonymous provides a non-streaming chat endpoint for anonymous users Session ID is - extracted from the cookie header (managed by the frontend) - - It calls ``POST /v1/chat/anonymous``. - - Args: - conversation_id: Conversation ID for maintaining context (optional, generated if not provided) - message: User's message - """ + ) -> m.DNSGeoRecord: + """Call ``GET /v1/dns/zones/{zoneId}/geo-records:get``.""" return await self._client._call( - "POST", - "/v1/chat/anonymous", - m.ChatResponse, - query=_query(extra_query), - body=_body(m.ChatRequest, extra_body, False, ("conversation_id", conversation_id), ("message", message)), + "GET", + f"/v1/dns/zones/{_path(zone_id)}/geo-records:get", + m.DNSGeoRecord, + query=_query(extra_query, ("name", name), ("type", type)), + body=None, idempotent=False, timeout=timeout, ) - async def delete_conversation( + async def list_dns_geo_locations( self, - conversation_id: str, *, + kind: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> m.ListDNSGeoLocationsResponse: """ - DeleteConversation marks a conversation as deleted (soft delete) + Call ``GET /v1/dns/geo-locations``. - It calls ``DELETE /v1/chat/conversations/{conversationId}``. + Args: + kind: Optional filter: continent, country, region, or group. """ return await self._client._call( - "DELETE", - f"/v1/chat/conversations/{_path(conversation_id)}", - m.SuccessResponse, - query=_query(extra_query), + "GET", + "/v1/dns/geo-locations", + m.ListDNSGeoLocationsResponse, + query=_query(extra_query, ("kind", kind)), body=None, idempotent=False, timeout=timeout, ) - async def get_conversation_history( + async def list_dns_geo_records( self, - conversation_id: str, + zone_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetConversationHistoryResponse: - """ - GetConversationHistory returns the full message history for a conversation - - It calls ``GET /v1/chat/conversations/{conversationId}/history``. - """ + ) -> m.ListDNSGeoRecordsResponse: + """Call ``GET /v1/dns/zones/{zoneId}/geo-records``.""" return await self._client._call( "GET", - f"/v1/chat/conversations/{_path(conversation_id)}/history", - m.GetConversationHistoryResponse, + f"/v1/dns/zones/{_path(zone_id)}/geo-records", + m.ListDNSGeoRecordsResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_conversations( + async def list_dns_records( self, + zone_id: str, *, + name: str | None = None, + type: str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListConversationsResponse: - """ - ListConversations returns all conversation IDs for the authenticated user - - It calls ``GET /v1/chat/conversations``. - """ + ) -> m.ListDNSRecordsResponse: + """Call ``GET /v1/dns/zones/{zoneId}/records``.""" return await self._client._call( "GET", - "/v1/chat/conversations", - m.ListConversationsResponse, - query=_query(extra_query), + f"/v1/dns/zones/{_path(zone_id)}/records", + m.ListDNSRecordsResponse, + query=_query(extra_query, ("name", name), ("type", type), ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) + async def list_dns_records_all( + self, + zone_id: str, + *, + name: str | None = None, + type: str | None = None, + page: int | None = None, + page_size: int | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> AsyncIterator[m.DNSRecord]: + """ + Every result of :meth:`list_dns_records`, reading page after page. -class AsyncClientDashboardService(_ServiceAsync): - """The NodeRings ClientDashboardService API.""" + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_dns_records( + zone_id, + page=page, + page_size=size, + name=name, + type=type, + extra_query=extra_query, + timeout=timeout, + ) + items = res.records + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 - async def get_client_dashboard_billing( + async def upsert_dns_geo_record( self, + zone_id: str, *, + record: m.DNSGeoRecord | dict[str, Any] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetClientDashboardBillingResponse: - """Call ``GET /v1/client/dashboard/billing``.""" + ) -> m.DNSGeoRecord: + """Call ``PUT /v1/dns/zones/{zoneId}/geo-records``.""" return await self._client._call( - "GET", - "/v1/client/dashboard/billing", - m.GetClientDashboardBillingResponse, + "PUT", + f"/v1/dns/zones/{_path(zone_id)}/geo-records", + m.DNSGeoRecord, query=_query(extra_query), - body=None, + body=_body(m.UpsertDNSGeoRecordBody, extra_body, False, ("record", record)), idempotent=False, timeout=timeout, ) - async def get_client_dashboard_summary( + async def upsert_dns_record( self, + zone_id: str, *, + record: m.DNSRecord | dict[str, Any] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetClientDashboardSummaryResponse: - """Call ``GET /v1/client/dashboard/summary``.""" + ) -> m.DNSRecord: + """Call ``PUT /v1/dns/zones/{zoneId}/records``.""" return await self._client._call( - "GET", - "/v1/client/dashboard/summary", - m.GetClientDashboardSummaryResponse, + "PUT", + f"/v1/dns/zones/{_path(zone_id)}/records", + m.DNSRecord, query=_query(extra_query), - body=None, + body=_body(m.UpsertDNSRecordBody, extra_body, False, ("record", record)), idempotent=False, timeout=timeout, ) -class AsyncClientProviderReviewService(_ServiceAsync): - """The NodeRings ClientProviderReviewService API.""" +class AsyncDNSZoneService(_ServiceAsync): + """The NodeRings DnsZoneService API.""" - async def create_client_review( + async def check_dns_zone_delegation( self, + id: str, *, - comment: str | None = None, - star_rating: int | None = None, - virtual_machine_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateClientReviewResponse: - """Call ``POST /v1/provider-reviews``.""" + ) -> m.GetDNSZoneResponse: + """Call ``POST /v1/dns/zones/{id}/check-delegation``.""" return await self._client._call( "POST", - "/v1/provider-reviews", - m.CreateClientReviewResponse, + f"/v1/dns/zones/{_path(id)}/check-delegation", + m.GetDNSZoneResponse, query=_query(extra_query), - body=_body( - m.CreateClientReviewRequest, - extra_body, - False, - ("comment", comment), - ("star_rating", star_rating), - ("virtual_machine_id", virtual_machine_id), - ), + body=_body(m.CheckDNSZoneDelegationBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def delete_client_review( + async def create_dns_zone( self, - review_id: str, *, + name: str | None = None, + records: list[m.DNSRecord | dict[str, Any]] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/provider-reviews/{reviewId}``.""" + ) -> m.CreateDNSZoneResponse: + """ + Call ``POST /v1/dns/zones``. + + Args: + records: Records the customer kept from the live-scan review. Empty means create a blank zone. + """ return await self._client._call( - "DELETE", - f"/v1/provider-reviews/{_path(review_id)}", - m.SuccessResponse, + "POST", + "/v1/dns/zones", + m.CreateDNSZoneResponse, query=_query(extra_query), - body=None, + body=_body(m.CreateDNSZoneRequest, extra_body, False, ("name", name), ("records", records)), idempotent=False, timeout=timeout, ) - async def get_client_review_for_virtual_machine( + async def delete_dns_zone( self, - virtual_machine_id: str, + id: str, *, + force: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetClientReviewForVirtualMachineResponse: - """Call ``GET /v1/provider-reviews/virtual-machines/{virtualMachineId}``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/dns/zones/{id}``.""" return await self._client._call( - "GET", - f"/v1/provider-reviews/virtual-machines/{_path(virtual_machine_id)}", - m.GetClientReviewForVirtualMachineResponse, - query=_query(extra_query), + "DELETE", + f"/v1/dns/zones/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query, ("force", force)), body=None, idempotent=False, timeout=timeout, ) - async def list_client_provider_review_assets( + async def export_dns_zone( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListClientProviderReviewAssetsResponse: - """ - Call ``GET /v1/client/provider-review-assets``. - - Args: - search: Optional filter (hostname / provider name), case-insensitive substring. - """ + ) -> m.ExportDNSZoneResponse: + """Call ``GET /v1/dns/zones/{id}/export``.""" return await self._client._call( "GET", - "/v1/client/provider-review-assets", - m.ListClientProviderReviewAssetsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("search", search)), + f"/v1/dns/zones/{_path(id)}/export", + m.ExportDNSZoneResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_client_provider_review_assets_all( + async def get_dns_zone( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.ClientProviderReviewAssetItem]: - """ - Every result of :meth:`list_client_provider_review_assets`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_client_provider_review_assets( - page=page, - page_size=size, - search=search, - extra_query=extra_query, - timeout=timeout, - ) - items = res.assets - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + ) -> m.GetDNSZoneResponse: + """Call ``GET /v1/dns/zones/{id}``.""" + return await self._client._call( + "GET", + f"/v1/dns/zones/{_path(id)}", + m.GetDNSZoneResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - async def update_client_review( + async def import_dns_records( self, - review_id: str, + zone_id: str, *, - comment: str | None = None, - star_rating: int | None = None, + records: list[m.DNSRecord | dict[str, Any]] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateClientReviewResponse: - """Call ``PATCH /v1/provider-reviews/{reviewId}``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/dns/zones/{zoneId}/records:import``.""" return await self._client._call( - "PATCH", - f"/v1/provider-reviews/{_path(review_id)}", - m.UpdateClientReviewResponse, + "POST", + f"/v1/dns/zones/{_path(zone_id)}/records:import", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.UpdateClientReviewBody, extra_body, False, ("comment", comment), ("star_rating", star_rating)), + body=_body(m.ImportDNSRecordsBody, extra_body, False, ("records", records)), idempotent=False, timeout=timeout, ) - -class AsyncCloudInitTemplateService(_ServiceAsync): - """The NodeRings CloudInitTemplateService API.""" - - async def create_cloud_init_template( + async def import_dns_zone( self, + id: str, *, - name: str | None = None, - network_data: str | None = None, - storage: str | None = None, - user_data: str | None = None, - vendor_data: str | None = None, + zone_text: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/cloudinittemplate``.""" + """Call ``POST /v1/dns/zones/{id}/import``.""" return await self._client._call( "POST", - "/v1/cloudinittemplate", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.CreateCloudInitTemplateRequest, - extra_body, - False, - ("name", name), - ("network_data", network_data), - ("storage", storage), - ("user_data", user_data), - ("vendor_data", vendor_data), - ), - idempotent=False, - timeout=timeout, - ) - - async def delete_cloud_init_template( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/cloudinittemplate/{id}``.""" - return await self._client._call( - "DELETE", - f"/v1/cloudinittemplate/{_path(id)}", + f"/v1/dns/zones/{_path(id)}/import", m.SuccessResponse, query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_cloud_init_template( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetCloudInitTemplateResponse: - """Call ``GET /v1/cloudinittemplate/{id}``.""" - return await self._client._call( - "GET", - f"/v1/cloudinittemplate/{_path(id)}", - m.GetCloudInitTemplateResponse, - query=_query(extra_query), - body=None, + body=_body(m.ImportDNSZoneBody, extra_body, False, ("zone_text", zone_text)), idempotent=False, timeout=timeout, ) - async def list_cloud_init_templates( + async def list_dns_zones( self, *, page: int | None = None, page_size: int | None = None, - filter_is_template: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListCloudInitTemplatesResponse: - """ - Call ``GET /v1/cloudinittemplates``. - - Args: - filter_is_template: If not set, returns both template and non-template. If true, returns only templates. If false, returns only non-templates. - """ + ) -> m.ListDNSZonesResponse: + """Call ``GET /v1/dns/zones``.""" return await self._client._call( "GET", - "/v1/cloudinittemplates", - m.ListCloudInitTemplatesResponse, - query=_query( - extra_query, ("page", page), ("pageSize", page_size), ("filterIsTemplate", filter_is_template) - ), + "/v1/dns/zones", + m.ListDNSZonesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - async def list_cloud_init_templates_all( + async def list_dns_zones_all( self, *, page: int | None = None, page_size: int | None = None, - filter_is_template: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.CloudInitTemplate]: + ) -> AsyncIterator[m.DNSZone]: """ - Every result of :meth:`list_cloud_init_templates`, reading page after page. + Every result of :meth:`list_dns_zones`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -18028,14 +17482,13 @@ async def list_cloud_init_templates_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_cloud_init_templates( + res = await self.list_dns_zones( page=page, page_size=size, - filter_is_template=filter_is_template, extra_query=extra_query, timeout=timeout, ) - items = res.cloud_init_templates + items = res.zones for item in items: yield item seen += len(items) @@ -18043,719 +17496,661 @@ async def list_cloud_init_templates_all( return page += 1 - async def update_cloud_init_template( + async def scan_dns_zone_records( self, - id: str, *, name: str | None = None, - network_data: str | None = None, - storage: str | None = None, - user_data: str | None = None, - vendor_data: str | None = None, - extra_body: dict[str, Any] | None = None, + zone_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateCloudInitTemplateResponse: - """Call ``PATCH /v1/cloudinittemplate/{id}``.""" + ) -> m.ScanDNSZoneRecordsResponse: + """Call ``GET /v1/dns/scan``.""" return await self._client._call( - "PATCH", - f"/v1/cloudinittemplate/{_path(id)}", - m.UpdateCloudInitTemplateResponse, - query=_query(extra_query), - body=_body( - m.UpdateCloudInitTemplateBody, - extra_body, - False, - ("name", name), - ("network_data", network_data), - ("storage", storage), - ("user_data", user_data), - ("vendor_data", vendor_data), - ), + "GET", + "/v1/dns/scan", + m.ScanDNSZoneRecordsResponse, + query=_query(extra_query, ("name", name), ("zoneId", zone_id)), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def scan_dns_zone_records_2( + self, + zone_id: str, + *, + name: str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.ScanDNSZoneRecordsResponse: + """Call ``GET /v1/dns/zones/{zoneId}/scan``.""" + return await self._client._call( + "GET", + f"/v1/dns/zones/{_path(zone_id)}/scan", + m.ScanDNSZoneRecordsResponse, + query=_query(extra_query, ("name", name)), + body=None, idempotent=False, timeout=timeout, ) -class AsyncCloudInitUserDataService(_ServiceAsync): - """The NodeRings CloudInitUserDataService API.""" +class AsyncDNSSECService(_ServiceAsync): + """The NodeRings DnssecService API.""" - async def create_cloud_init_user_data( + async def check_dnssec_ds( self, + zone_id: str, *, - description: str | None = None, - name: str | None = None, - user_data: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CloudInitUserData: - """Call ``POST /v1/cloudinituserdata``.""" + ) -> m.DNSSECInfo: + """Call ``POST /v1/dns/zones/{zoneId}/dnssec/check-ds``.""" return await self._client._call( "POST", - "/v1/cloudinituserdata", - m.CloudInitUserData, + f"/v1/dns/zones/{_path(zone_id)}/dnssec/check-ds", + m.DNSSECInfo, query=_query(extra_query), - body=_body( - m.CreateCloudInitUserDataRequest, - extra_body, - False, - ("description", description), - ("name", name), - ("user_data", user_data), - ), + body=_body(m.CheckDNSSECDSBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def delete_cloud_init_user_data( + async def disable_dnssec( self, - id: str, + zone_id: str, *, + force: bool | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/cloudinituserdata/{id}``.""" + ) -> m.DNSSECInfo: + """Call ``POST /v1/dns/zones/{zoneId}/dnssec/disable``.""" return await self._client._call( - "DELETE", - f"/v1/cloudinituserdata/{_path(id)}", - m.SuccessResponse, + "POST", + f"/v1/dns/zones/{_path(zone_id)}/dnssec/disable", + m.DNSSECInfo, query=_query(extra_query), - body=None, + body=_body(m.DisableDNSSECBody, extra_body, False, ("force", force)), idempotent=False, timeout=timeout, ) - async def get_cloud_init_user_data( + async def enable_dnssec( self, - id: str, + zone_id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CloudInitUserData: - """Call ``GET /v1/cloudinituserdata/{id}``.""" + ) -> m.DNSSECInfo: + """Call ``POST /v1/dns/zones/{zoneId}/dnssec/enable``.""" return await self._client._call( - "GET", - f"/v1/cloudinituserdata/{_path(id)}", - m.CloudInitUserData, + "POST", + f"/v1/dns/zones/{_path(zone_id)}/dnssec/enable", + m.DNSSECInfo, query=_query(extra_query), - body=None, + body=_body(m.EnableDNSSECBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def list_cloud_init_user_data( + async def get_dnssec( self, + zone_id: str, *, - page: int | None = None, - page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListCloudInitUserDataResponse: - """Call ``GET /v1/cloudinituserdata``.""" + ) -> m.DNSSECInfo: + """Call ``GET /v1/dns/zones/{zoneId}/dnssec``.""" return await self._client._call( "GET", - "/v1/cloudinituserdata", - m.ListCloudInitUserDataResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + f"/v1/dns/zones/{_path(zone_id)}/dnssec", + m.DNSSECInfo, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_cloud_init_user_data_all( + +class AsyncDomainService(_ServiceAsync): + """The NodeRings DomainService API.""" + + async def create_domain( self, *, - page: int | None = None, - page_size: int | None = None, + name: str | None = None, + verification_type: m.VerificationType | str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.CloudInitUserData]: - """ - Every result of :meth:`list_cloud_init_user_data`, reading page after page. + ) -> m.SuccessResponse: + """Call ``POST /v1/domain``.""" + return await self._client._call( + "POST", + "/v1/domain", + m.SuccessResponse, + query=_query(extra_query), + body=_body( + m.CreateDomainRequest, extra_body, False, ("name", name), ("verification_type", verification_type) + ), + idempotent=False, + timeout=timeout, + ) - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_cloud_init_user_data( - page=page, - page_size=size, - extra_query=extra_query, - timeout=timeout, - ) - items = res.profiles - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def update_cloud_init_user_data( + async def delete_domain( self, id: str, *, - description: str | None = None, - name: str | None = None, - user_data: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CloudInitUserData: - """Call ``PATCH /v1/cloudinituserdata/{id}``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/domain/{id}``.""" return await self._client._call( - "PATCH", - f"/v1/cloudinituserdata/{_path(id)}", - m.CloudInitUserData, + "DELETE", + f"/v1/domain/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.UpdateCloudInitUserDataBody, - extra_body, - False, - ("description", description), - ("name", name), - ("user_data", user_data), - ), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncCouponService(_ServiceAsync): - """The NodeRings CouponService API.""" - - async def create_coupon( + async def get_domain( self, *, - acknowledge_high_risk: bool | None = None, - amounts_off: dict[str, str] | None = None, - applies_to: list[str] | None = None, - asset_categories: list[str] | None = None, - asset_types: list[str] | None = None, - code: str | None = None, - credit_min_topup: str | None = None, - credit_valid_days: int | None = None, - description: str | None = None, - discount_type: m.CouponDiscountType | str | None = None, - duration: m.CouponDuration | str | None = None, - duration_days: int | None = None, - duration_in_periods: int | None = None, - first_time_customer_only: bool | None = None, - max_discount_amounts: dict[str, str] | None = None, - max_redemptions: int | None = None, - name: str | None = None, - no_expiry: bool | None = None, - once_per_customer: bool | None = None, - percent_off: str | None = None, - plan_ids: list[str] | None = None, - usage_metric_codes: list[str] | None = None, - valid_from: datetime | None = None, - valid_until: datetime | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateCouponResponse: - """ - Call ``POST /v1/coupons``. - - Args: - acknowledge_high_risk: Required when the terms are effectively free or unlimited. - code: Optional first shared code created with the coupon. - credit_min_topup: USD a client must top up before a redeemed credit lot can be spent. Empty means no top-up is needed. - credit_valid_days: Lot lifetime after a credit code is redeemed. Defaults to 90. - discount_type: - COUPON_DISCOUNT_TYPE_CREDIT: A code that grants promotional credit instead of discounting a subscription. - duration: - COUPON_DURATION_ONCE: Discounts the next invoice only. - COUPON_DURATION_REPEATING: Discounts duration_in_periods invoices, or every invoice for duration_days. - once_per_customer: Defaults to true. - valid_until: Defaults to the configured validity window unless no_expiry is set. - """ + ) -> m.GetDomainResponse: + """Call ``GET /v1/domain``.""" return await self._client._call( - "POST", - "/v1/coupons", - m.CreateCouponResponse, + "GET", + "/v1/domain", + m.GetDomainResponse, query=_query(extra_query), - body=_body( - m.CreateCouponRequest, - extra_body, - False, - ("acknowledge_high_risk", acknowledge_high_risk), - ("amounts_off", amounts_off), - ("applies_to", applies_to), - ("asset_categories", asset_categories), - ("asset_types", asset_types), - ("code", code), - ("credit_min_topup", credit_min_topup), - ("credit_valid_days", credit_valid_days), - ("description", description), - ("discount_type", discount_type), - ("duration", duration), - ("duration_days", duration_days), - ("duration_in_periods", duration_in_periods), - ("first_time_customer_only", first_time_customer_only), - ("max_discount_amounts", max_discount_amounts), - ("max_redemptions", max_redemptions), - ("name", name), - ("no_expiry", no_expiry), - ("once_per_customer", once_per_customer), - ("percent_off", percent_off), - ("plan_ids", plan_ids), - ("usage_metric_codes", usage_metric_codes), - ("valid_from", valid_from), - ("valid_until", valid_until), - ), + body=None, idempotent=False, timeout=timeout, ) - async def create_coupon_code( + async def verify_domain( self, - coupon_id: str, + id: str, *, - campaign: str | None = None, - channel: str | None = None, - code: str | None = None, - customer_org_ids: list[str] | None = None, - max_redemptions: int | None = None, - no_expiry: bool | None = None, - valid_from: datetime | None = None, - valid_until: datetime | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CouponCode: - """ - Call ``POST /v1/coupons/{couponId}/codes``. - - Args: - code: Leave empty to generate a random code. - """ + ) -> m.SuccessResponse: + """Call ``GET /v1/domain/verify/{id}``.""" return await self._client._call( - "POST", - f"/v1/coupons/{_path(coupon_id)}/codes", - m.CouponCode, + "GET", + f"/v1/domain/verify/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.CreateCouponCodeBody, - extra_body, - False, - ("campaign", campaign), - ("channel", channel), - ("code", code), - ("customer_org_ids", customer_org_ids), - ("max_redemptions", max_redemptions), - ("no_expiry", no_expiry), - ("valid_from", valid_from), - ("valid_until", valid_until), - ), + body=None, idempotent=False, timeout=timeout, ) - async def deactivate_coupon( + +class AsyncEnvironmentVariableService(_ServiceAsync): + """The NodeRings EnvironmentVariableService API.""" + + async def create_environment_variable( self, - id: str, *, + key: str | None = None, + value: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.Coupon: - """ - Blocks new attachments; customers keep the periods they were promised. - - It calls ``POST /v1/coupons/{id}:deactivate``. - """ + ) -> m.CreateEnvironmentVariableResponse: + """Call ``POST /v1/environment-variables``.""" return await self._client._call( "POST", - f"/v1/coupons/{_path(id)}:deactivate", - m.Coupon, + "/v1/environment-variables", + m.CreateEnvironmentVariableResponse, query=_query(extra_query), - body=_body(m.DeactivateCouponBody, extra_body, False), + body=_body(m.CreateEnvironmentVariableRequest, extra_body, False, ("key", key), ("value", value)), idempotent=False, timeout=timeout, ) - async def export_coupon_codes( + async def delete_environment_variable( self, - coupon_id: str, + id: str, *, - batch_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ExportCouponCodesResponse: - """Call ``GET /v1/coupons/{couponId}/codes:export``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/environment-variables/{id}``.""" return await self._client._call( - "GET", - f"/v1/coupons/{_path(coupon_id)}/codes:export", - m.ExportCouponCodesResponse, - query=_query(extra_query, ("batchId", batch_id)), + "DELETE", + f"/v1/environment-variables/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def generate_coupon_codes( + async def get_environment_variable( self, - coupon_id: str, + id: str, *, - campaign: str | None = None, - channel: str | None = None, - count: int | None = None, - max_redemptions: int | None = None, - prefix: str | None = None, - valid_until: datetime | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GenerateCouponCodesResponse: - """ - Call ``POST /v1/coupons/{couponId}/codes:generate``. - - Args: - max_redemptions: Uses per code. Defaults to 1 (single-use). - prefix: Optional letters or digits put before each code as PREFIX-XXXXXXXXXX. - """ + ) -> m.GetEnvironmentVariableResponse: + """Call ``GET /v1/environment-variables/{id}``.""" return await self._client._call( - "POST", - f"/v1/coupons/{_path(coupon_id)}/codes:generate", - m.GenerateCouponCodesResponse, + "GET", + f"/v1/environment-variables/{_path(id)}", + m.GetEnvironmentVariableResponse, query=_query(extra_query), - body=_body( - m.GenerateCouponCodesBody, - extra_body, - False, - ("campaign", campaign), - ("channel", channel), - ("count", count), - ("max_redemptions", max_redemptions), - ("prefix", prefix), - ("valid_until", valid_until), - ), + body=None, idempotent=False, timeout=timeout, ) - async def get_coupon( + async def list_environment_variables( self, - id: str, *, + page: int | None = None, + page_size: int | None = None, + filter_key: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.Coupon: - """Call ``GET /v1/coupons/{id}``.""" + ) -> m.ListEnvironmentVariablesResponse: + """Call ``GET /v1/environment-variables``.""" return await self._client._call( "GET", - f"/v1/coupons/{_path(id)}", - m.Coupon, - query=_query(extra_query), - body=None, + "/v1/environment-variables", + m.ListEnvironmentVariablesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterKey", filter_key)), + body=None, idempotent=False, timeout=timeout, ) - async def get_coupon_code_batch( + async def list_environment_variables_all( self, - coupon_id: str, - batch_id: str, *, + page: int | None = None, + page_size: int | None = None, + filter_key: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CouponCodeBatch: - """Call ``GET /v1/coupons/{couponId}/code-batches/{batchId}``.""" + ) -> AsyncIterator[m.EnvironmentVariable]: + """ + Every result of :meth:`list_environment_variables`, reading page after page. + + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_environment_variables( + page=page, + page_size=size, + filter_key=filter_key, + extra_query=extra_query, + timeout=timeout, + ) + items = res.environment_variables + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + async def update_environment_variable( + self, + id: str, + *, + value: str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``PATCH /v1/environment-variables/{id}``.""" return await self._client._call( - "GET", - f"/v1/coupons/{_path(coupon_id)}/code-batches/{_path(batch_id)}", - m.CouponCodeBatch, + "PATCH", + f"/v1/environment-variables/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.UpdateEnvironmentVariableBody, extra_body, False, ("value", value)), idempotent=False, timeout=timeout, ) - async def get_coupon_report( + +class AsyncExchangeRateService(_ServiceAsync): + """The NodeRings ExchangeRateService API.""" + + async def convert_currency( self, - coupon_id: str, *, - group_by: m.CouponReportGroupBy | str | None = None, - code: str | None = None, - campaign: str | None = None, - channel: str | None = None, - start_time: datetime | None = None, - end_time: datetime | None = None, + target_currency: str | None = None, + usd_amount: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetCouponReportResponse: + ) -> m.ConvertCurrencyResponse: """ - Attribution and ROI figures, grouped by code, campaign, channel, or asset type. + Convert an amount from USD to a target currency - It calls ``GET /v1/coupons/{couponId}/report``. + It calls ``POST /v1/exchange-rate/convert``. Args: - code: Narrow the report to one code, campaign, or channel. - start_time: Applications created in [start_time, end_time); open ends are unbounded. + target_currency: Target currency code (e.g., "EUR", "GBP", "JPY") + usd_amount: Amount in USD to convert """ return await self._client._call( - "GET", - f"/v1/coupons/{_path(coupon_id)}/report", - m.GetCouponReportResponse, - query=_query( - extra_query, - ("groupBy", group_by), - ("code", code), - ("campaign", campaign), - ("channel", channel), - ("startTime", start_time), - ("endTime", end_time), + "POST", + "/v1/exchange-rate/convert", + m.ConvertCurrencyResponse, + query=_query(extra_query), + body=_body( + m.ConvertCurrencyRequest, + extra_body, + False, + ("target_currency", target_currency), + ("usd_amount", usd_amount), ), - body=None, idempotent=False, timeout=timeout, ) - async def get_subscription_coupon( + async def get_all_exchange_rates( self, - subscription_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetSubscriptionCouponResponse: - """Call ``GET /v1/subscriptions/{subscriptionId}/coupon``.""" + ) -> m.GetAllExchangeRatesResponse: + """ + Get all exchange rates at once (returns map of currency codes to rates) + + It calls ``GET /v1/exchange-rate/rates``. + """ return await self._client._call( "GET", - f"/v1/subscriptions/{_path(subscription_id)}/coupon", - m.GetSubscriptionCouponResponse, + "/v1/exchange-rate/rates", + m.GetAllExchangeRatesResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_coupon_code_batches( + async def get_exchange_rate( self, - coupon_id: str, + currency_code: str, *, - page: int | None = None, - page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListCouponCodeBatchesResponse: - """Call ``GET /v1/coupons/{couponId}/code-batches``.""" + ) -> m.GetExchangeRateResponse: + """ + Get the current exchange rate for a specific currency (from USD) + + It calls ``GET /v1/exchange-rate/rate/{currencyCode}``. + """ return await self._client._call( "GET", - f"/v1/coupons/{_path(coupon_id)}/code-batches", - m.ListCouponCodeBatchesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + f"/v1/exchange-rate/rate/{_path(currency_code)}", + m.GetExchangeRateResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_coupon_code_batches_all( + async def list_supported_currencies( self, - coupon_id: str, *, - page: int | None = None, - page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.CouponCodeBatch]: + ) -> m.ListSupportedCurrenciesResponse: """ - Every result of :meth:`list_coupon_code_batches`, reading page after page. + List all supported currency codes - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + It calls ``GET /v1/exchange-rate/currencies``. """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_coupon_code_batches( - coupon_id, - page=page, - page_size=size, - extra_query=extra_query, - timeout=timeout, - ) - items = res.batches - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def list_coupon_codes( - self, - coupon_id: str, - *, - page: int | None = None, - page_size: int | None = None, - batch_id: str | None = None, - campaign: str | None = None, - channel: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListCouponCodesResponse: - """Call ``GET /v1/coupons/{couponId}/codes``.""" return await self._client._call( "GET", - f"/v1/coupons/{_path(coupon_id)}/codes", - m.ListCouponCodesResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("batchId", batch_id), - ("campaign", campaign), - ("channel", channel), - ), + "/v1/exchange-rate/currencies", + m.ListSupportedCurrenciesResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_coupon_codes_all( + +class AsyncFirewallService(_ServiceAsync): + """The NodeRings FirewallService API.""" + + async def create_firewall_address_group( self, - coupon_id: str, *, - page: int | None = None, - page_size: int | None = None, - batch_id: str | None = None, - campaign: str | None = None, - channel: str | None = None, + group: m.FirewallAddressGroupInput | dict[str, Any] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.CouponCode]: + ) -> m.CreateFirewallAddressGroupResponse: """ - Every result of :meth:`list_coupon_codes`, reading page after page. + Call ``POST /v1/firewall/address-groups``. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + Args: + group: FirewallAddressGroupInput is the client-provided payload for create/update. Clients must not provide id/timestamps (those are server-controlled). """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_coupon_codes( - coupon_id, - page=page, - page_size=size, - batch_id=batch_id, - campaign=campaign, - channel=channel, - extra_query=extra_query, - timeout=timeout, - ) - items = res.codes - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + return await self._client._call( + "POST", + "/v1/firewall/address-groups", + m.CreateFirewallAddressGroupResponse, + query=_query(extra_query), + body=_body(m.CreateFirewallAddressGroupRequest, extra_body, False, ("group", group)), + idempotent=False, + timeout=timeout, + ) - async def list_coupon_redemptions( + async def create_firewall_rule( self, - coupon_id: str, + ruleset_id: str, *, - page: int | None = None, - page_size: int | None = None, - asset_type: str | None = None, + rule: m.FirewallRuleInput | dict[str, Any] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListCouponRedemptionsResponse: - """Call ``GET /v1/coupons/{couponId}/redemptions``.""" + ) -> m.CreateFirewallRuleResponse: + """ + Call ``POST /v1/firewall/rulesets/{rulesetId}/rules``. + + Args: + rule: FirewallRuleInput is the client-provided rule payload for create/update. Clients must not provide id/ruleset_id/timestamps (those are server-controlled). + """ + return await self._client._call( + "POST", + f"/v1/firewall/rulesets/{_path(ruleset_id)}/rules", + m.CreateFirewallRuleResponse, + query=_query(extra_query), + body=_body(m.CreateFirewallRuleBody, extra_body, False, ("rule", rule)), + idempotent=False, + timeout=timeout, + ) + + async def create_firewall_rule_set( + self, + *, + ruleset: m.FirewallRuleSetInput | dict[str, Any] | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.CreateFirewallRuleSetResponse: + """Call ``POST /v1/firewall/rulesets``.""" + return await self._client._call( + "POST", + "/v1/firewall/rulesets", + m.CreateFirewallRuleSetResponse, + query=_query(extra_query), + body=_body(m.CreateFirewallRuleSetRequest, extra_body, False, ("ruleset", ruleset)), + idempotent=False, + timeout=timeout, + ) + + async def delete_firewall_address_group( + self, + id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``DELETE /v1/firewall/address-groups/{id}``.""" + return await self._client._call( + "DELETE", + f"/v1/firewall/address-groups/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def delete_firewall_rule( + self, + id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``DELETE /v1/firewall/rules/{id}``.""" + return await self._client._call( + "DELETE", + f"/v1/firewall/rules/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def delete_firewall_rule_set( + self, + id: str, + *, + force: bool | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``DELETE /v1/firewall/rulesets/{id}``.""" + return await self._client._call( + "DELETE", + f"/v1/firewall/rulesets/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query, ("force", force)), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def get_firewall_address_group( + self, + id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.FirewallAddressGroup: + """Call ``GET /v1/firewall/address-groups/{id}``.""" return await self._client._call( "GET", - f"/v1/coupons/{_path(coupon_id)}/redemptions", - m.ListCouponRedemptionsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("assetType", asset_type)), + f"/v1/firewall/address-groups/{_path(id)}", + m.FirewallAddressGroup, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_coupon_redemptions_all( + async def get_firewall_rule( self, - coupon_id: str, + id: str, *, - page: int | None = None, - page_size: int | None = None, - asset_type: str | None = None, + direction: m.FirewallDirection | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.CouponRedemption]: + ) -> m.FirewallRuleResource: """ - Every result of :meth:`list_coupon_redemptions`, reading page after page. + Call ``GET /v1/firewall/rules/{id}``. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + Args: + direction: Optional: Filter by direction. If not specified, returns the rule regardless of direction. """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_coupon_redemptions( - coupon_id, - page=page, - page_size=size, - asset_type=asset_type, - extra_query=extra_query, - timeout=timeout, - ) - items = res.redemptions - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + return await self._client._call( + "GET", + f"/v1/firewall/rules/{_path(id)}", + m.FirewallRuleResource, + query=_query(extra_query, ("direction", direction)), + body=None, + idempotent=False, + timeout=timeout, + ) - async def list_coupons( + async def get_firewall_rule_set( + self, + id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.FirewallRuleSet: + """Call ``GET /v1/firewall/rulesets/{id}``.""" + return await self._client._call( + "GET", + f"/v1/firewall/rulesets/{_path(id)}", + m.FirewallRuleSet, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def list_firewall_address_groups( self, *, page: int | None = None, page_size: int | None = None, - asset_type: str | None = None, - expiring_soon: bool | None = None, - search: str | None = None, + name: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListCouponsResponse: + ) -> m.ListFirewallAddressGroupsResponse: """ - Call ``GET /v1/coupons``. + Call ``GET /v1/firewall/address-groups``. Args: - expiring_soon: Only coupons whose validity ends within 14 days. + name: Note: family filter removed as address groups can now contain mixed IPv4/IPv6 """ return await self._client._call( "GET", - "/v1/coupons", - m.ListCouponsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("assetType", asset_type), - ("expiringSoon", expiring_soon), - ("search", search), - ), + "/v1/firewall/address-groups", + m.ListFirewallAddressGroupsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("name", name)), body=None, idempotent=False, timeout=timeout, ) - async def list_coupons_all( + async def list_firewall_address_groups_all( self, *, page: int | None = None, page_size: int | None = None, - asset_type: str | None = None, - expiring_soon: bool | None = None, - search: str | None = None, + name: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Coupon]: + ) -> AsyncIterator[m.FirewallAddressGroup]: """ - Every result of :meth:`list_coupons`, reading page after page. + Every result of :meth:`list_firewall_address_groups`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -18763,16 +18158,14 @@ async def list_coupons_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_coupons( + res = await self.list_firewall_address_groups( page=page, page_size=size, - asset_type=asset_type, - expiring_soon=expiring_soon, - search=search, + name=name, extra_query=extra_query, timeout=timeout, ) - items = res.coupons + items = res.groups for item in items: yield item seen += len(items) @@ -18780,52 +18173,50 @@ async def list_coupons_all( return page += 1 - async def list_high_risk_coupons( + async def list_firewall_rule_sets( self, *, page: int | None = None, page_size: int | None = None, - provider_organization_id: str | None = None, - include_inactive: bool | None = None, + name: str | None = None, + filter_attachment: m.FirewallRuleSetAttachmentFilter | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListHighRiskCouponsResponse: + ) -> m.ListFirewallRuleSetsResponse: """ - Platform admins only: high-risk coupons across all providers, most redeemed first. - - It calls ``GET /v1/admin/coupons/high-risk``. + Call ``GET /v1/firewall/rulesets``. Args: - include_inactive: Also list inactive and banned coupons. + filter_attachment: Optional: Filter by whether any virtual machine is attached to the ruleset. - FIREWALL_RULESET_ATTACHMENT_FILTER_UNSPECIFIED: All rulesets - FIREWALL_RULESET_ATTACHMENT_FILTER_ATTACHED: Rulesets with at least one VM attached - FIREWALL_RULESET_ATTACHMENT_FILTER_UNATTACHED: Rulesets with no VMs attached """ return await self._client._call( "GET", - "/v1/admin/coupons/high-risk", - m.ListHighRiskCouponsResponse, + "/v1/firewall/rulesets", + m.ListFirewallRuleSetsResponse, query=_query( extra_query, ("page", page), ("pageSize", page_size), - ("providerOrganizationId", provider_organization_id), - ("includeInactive", include_inactive), + ("name", name), + ("filterAttachment", filter_attachment), ), body=None, idempotent=False, timeout=timeout, ) - async def list_high_risk_coupons_all( + async def list_firewall_rule_sets_all( self, *, page: int | None = None, page_size: int | None = None, - provider_organization_id: str | None = None, - include_inactive: bool | None = None, + name: str | None = None, + filter_attachment: m.FirewallRuleSetAttachmentFilter | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.HighRiskCoupon]: + ) -> AsyncIterator[m.FirewallRuleSet]: """ - Every result of :meth:`list_high_risk_coupons`, reading page after page. + Every result of :meth:`list_firewall_rule_sets`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -18833,15 +18224,15 @@ async def list_high_risk_coupons_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_high_risk_coupons( + res = await self.list_firewall_rule_sets( page=page, page_size=size, - provider_organization_id=provider_organization_id, - include_inactive=include_inactive, + name=name, + filter_attachment=filter_attachment, extra_query=extra_query, timeout=timeout, ) - items = res.coupons + items = res.rulesets for item in items: yield item seen += len(items) @@ -18849,1697 +18240,1444 @@ async def list_high_risk_coupons_all( return page += 1 - async def preview_coupon( + async def list_firewall_rules( self, + ruleset_id: str, *, - billing_period: m.BillingPeriod | str | None = None, - code: str | None = None, - plan_id: str | None = None, - quantity: int | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + direction: m.FirewallDirection | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.PreviewCouponResponse: + ) -> m.ListFirewallRulesResponse: """ - Checks a code against a plan without attaching it. + Call ``GET /v1/firewall/rulesets/{rulesetId}/rules``. - It calls ``POST /v1/coupons:preview``. + Args: + direction: Optional: Filter by direction. If not specified, returns all rules regardless of direction. """ return await self._client._call( - "POST", - "/v1/coupons:preview", - m.PreviewCouponResponse, - query=_query(extra_query), - body=_body( - m.PreviewCouponRequest, - extra_body, - False, - ("billing_period", billing_period), - ("code", code), - ("plan_id", plan_id), - ("quantity", quantity), - ), + "GET", + f"/v1/firewall/rulesets/{_path(ruleset_id)}/rules", + m.ListFirewallRulesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("direction", direction)), + body=None, idempotent=False, timeout=timeout, ) - async def redeem_coupon( + async def list_firewall_rules_all( self, - subscription_id: str, + ruleset_id: str, *, - code: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + direction: m.FirewallDirection | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SubscriptionCoupon: - """Call ``POST /v1/subscriptions/{subscriptionId}/coupon``.""" - return await self._client._call( - "POST", - f"/v1/subscriptions/{_path(subscription_id)}/coupon", - m.SubscriptionCoupon, - query=_query(extra_query), - body=_body(m.RedeemCouponBody, extra_body, False, ("code", code)), - idempotent=False, - timeout=timeout, - ) + ) -> AsyncIterator[m.FirewallRuleResource]: + """ + Every result of :meth:`list_firewall_rules`, reading page after page. - async def remove_coupon( + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_firewall_rules( + ruleset_id, + page=page, + page_size=size, + direction=direction, + extra_query=extra_query, + timeout=timeout, + ) + items = res.rules + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + async def move_firewall_rule( self, - subscription_id: str, + id: str, *, + position: m.FirewallRulePosition | str | None = None, + target_rule_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SubscriptionCoupon: - """Call ``DELETE /v1/subscriptions/{subscriptionId}/coupon``.""" + ) -> m.FirewallRuleResource: + """ + Call ``POST /v1/firewall/rules/{id}/move``. + + Args: + target_rule_id: ID of the target rule to move relative to + """ return await self._client._call( - "DELETE", - f"/v1/subscriptions/{_path(subscription_id)}/coupon", - m.SubscriptionCoupon, + "POST", + f"/v1/firewall/rules/{_path(id)}/move", + m.FirewallRuleResource, query=_query(extra_query), - body=None, + body=_body( + m.MoveFirewallRuleBody, extra_body, False, ("position", position), ("target_rule_id", target_rule_id) + ), idempotent=False, timeout=timeout, ) - async def revoke_coupon( + async def update_firewall_address_group( self, id: str, *, - confirm: bool | None = None, + group: m.FirewallAddressGroupInput | dict[str, Any] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RevokeCouponResponse: + ) -> m.FirewallAddressGroup: """ - Ends the discount for every customer from their next invoice. - - It calls ``POST /v1/coupons/{id}:revoke``. + Call ``PATCH /v1/firewall/address-groups/{id}``. Args: - confirm: Must be true; revoking ends the discount for every customer. + group: FirewallAddressGroupInput is the client-provided payload for create/update. Clients must not provide id/timestamps (those are server-controlled). """ return await self._client._call( - "POST", - f"/v1/coupons/{_path(id)}:revoke", - m.RevokeCouponResponse, + "PATCH", + f"/v1/firewall/address-groups/{_path(id)}", + m.FirewallAddressGroup, query=_query(extra_query), - body=_body(m.RevokeCouponBody, extra_body, False, ("confirm", confirm)), + body=_body(m.UpdateFirewallAddressGroupBody, extra_body, False, ("group", group)), idempotent=False, timeout=timeout, ) - async def update_coupon( + async def update_firewall_rule( self, id: str, *, - acknowledge_high_risk: bool | None = None, - add_amounts_off: dict[str, str] | None = None, - description: str | None = None, - max_redemptions: int | None = None, - name: str | None = None, - no_expiry: bool | None = None, - valid_until: datetime | None = None, + rule: m.FirewallRuleInput | dict[str, Any] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.Coupon: + ) -> m.FirewallRuleResource: """ - Call ``PATCH /v1/coupons/{id}``. + Call ``PATCH /v1/firewall/rules/{id}``. Args: - add_amounts_off: Adds amounts for currencies the coupon does not list yet. Existing amounts are read-only. + rule: FirewallRuleInput is the client-provided rule payload for create/update. Clients must not provide id/ruleset_id/timestamps (those are server-controlled). """ return await self._client._call( "PATCH", - f"/v1/coupons/{_path(id)}", - m.Coupon, + f"/v1/firewall/rules/{_path(id)}", + m.FirewallRuleResource, query=_query(extra_query), - body=_body( - m.UpdateCouponBody, - extra_body, - False, - ("acknowledge_high_risk", acknowledge_high_risk), - ("add_amounts_off", add_amounts_off), - ("description", description), - ("max_redemptions", max_redemptions), - ("name", name), - ("no_expiry", no_expiry), - ("valid_until", valid_until), - ), + body=_body(m.UpdateFirewallRuleBody, extra_body, False, ("rule", rule)), idempotent=False, timeout=timeout, ) - async def update_coupon_code( + async def update_firewall_rule_set( self, id: str, *, - active: bool | None = None, - campaign: str | None = None, - channel: str | None = None, - max_redemptions: int | None = None, - no_expiry: bool | None = None, - valid_until: datetime | None = None, + ruleset: m.FirewallRuleSetInput | dict[str, Any] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CouponCode: - """Call ``PATCH /v1/coupon-codes/{id}``.""" + ) -> m.FirewallRuleSet: + """Call ``PATCH /v1/firewall/rulesets/{id}``.""" return await self._client._call( "PATCH", - f"/v1/coupon-codes/{_path(id)}", - m.CouponCode, + f"/v1/firewall/rulesets/{_path(id)}", + m.FirewallRuleSet, query=_query(extra_query), - body=_body( - m.UpdateCouponCodeBody, - extra_body, - False, - ("active", active), - ("campaign", campaign), - ("channel", channel), - ("max_redemptions", max_redemptions), - ("no_expiry", no_expiry), - ("valid_until", valid_until), - ), + body=_body(m.UpdateFirewallRuleSetBody, extra_body, False, ("ruleset", ruleset)), idempotent=False, timeout=timeout, ) -class AsyncCreditService(_ServiceAsync): - """The NodeRings CreditService API.""" +class AsyncGameServerService(_ServiceAsync): + """The NodeRings GameServerService API.""" - async def get_credit_balance( + async def archive_files( self, + id: str, *, + files: list[str] | None = None, + root: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetCreditBalanceResponse: - """Call ``GET /v1/credits/balance``.""" + ) -> m.ArchiveFilesResponse: + """Call ``POST /v1/game-servers/{id}/files:archive``.""" return await self._client._call( - "GET", - "/v1/credits/balance", - m.GetCreditBalanceResponse, + "POST", + f"/v1/game-servers/{_path(id)}/files:archive", + m.ArchiveFilesResponse, query=_query(extra_query), - body=None, + body=_body(m.ArchiveFilesBody, extra_body, False, ("files", files), ("root", root)), idempotent=False, timeout=timeout, ) - async def list_credit_ledger_entries( + async def change_game_server_game( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - entry_type: m.CreditLedgerEntryType | str | None = None, + accept_eula: bool | None = None, + environment: dict[str, str] | None = None, + template_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListCreditLedgerEntriesResponse: - """Call ``GET /v1/credits/ledger``.""" + ) -> m.GameServer: + """Call ``POST /v1/game-servers/{id}:changeGame``.""" return await self._client._call( - "GET", - "/v1/credits/ledger", - m.ListCreditLedgerEntriesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("entryType", entry_type)), - body=None, + "POST", + f"/v1/game-servers/{_path(id)}:changeGame", + m.GameServer, + query=_query(extra_query), + body=_body( + m.ChangeGameServerGameBody, + extra_body, + False, + ("accept_eula", accept_eula), + ("environment", environment), + ("template_id", template_id), + ), idempotent=False, timeout=timeout, ) - async def list_credit_ledger_entries_all( + async def copy_file( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - entry_type: m.CreditLedgerEntryType | str | None = None, + location: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.CreditLedgerEntryProto]: - """ - Every result of :meth:`list_credit_ledger_entries`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_credit_ledger_entries( - page=page, - page_size=size, - entry_type=entry_type, - extra_query=extra_query, - timeout=timeout, - ) - items = res.entries - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/files:copy``.""" + return await self._client._call( + "POST", + f"/v1/game-servers/{_path(id)}/files:copy", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.CopyFileBody, extra_body, False, ("location", location)), + idempotent=False, + timeout=timeout, + ) - async def list_promo_credit_grants( + async def create_allocation( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPromoCreditGrantsResponse: - """Call ``GET /v1/credits/promo``.""" + ) -> m.GameServerAllocation: + """Call ``POST /v1/game-servers/{id}/allocations``.""" return await self._client._call( - "GET", - "/v1/credits/promo", - m.ListPromoCreditGrantsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), - body=None, + "POST", + f"/v1/game-servers/{_path(id)}/allocations", + m.GameServerAllocation, + query=_query(extra_query), + body=_body(m.CreateAllocationBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def list_promo_credit_grants_all( + async def create_backup( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, + name: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.PromoCreditGrant]: - """ - Every result of :meth:`list_promo_credit_grants`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_promo_credit_grants( - page=page, - page_size=size, - extra_query=extra_query, - timeout=timeout, - ) - items = res.grants - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + ) -> m.GameServerBackup: + """Call ``POST /v1/game-servers/{id}/backups``.""" + return await self._client._call( + "POST", + f"/v1/game-servers/{_path(id)}/backups", + m.GameServerBackup, + query=_query(extra_query), + body=_body(m.CreateBackupBody, extra_body, False, ("name", name)), + idempotent=False, + timeout=timeout, + ) - async def purchase_credits( + async def create_database( self, + id: str, *, - amount: str | None = None, - payment_method_id: str | None = None, + database: str | None = None, + remote: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.PurchaseCreditsResponse: - """ - Call ``POST /v1/credits:purchase``. - - Args: - amount: Decimal string: USD amount to top-up - payment_method_id: Optional: payment method ID to charge. If omitted, the org's default payment method is used. - """ + ) -> m.GameServerDatabase: + """Call ``POST /v1/game-servers/{id}/databases``.""" return await self._client._call( "POST", - "/v1/credits:purchase", - m.PurchaseCreditsResponse, + f"/v1/game-servers/{_path(id)}/databases", + m.GameServerDatabase, query=_query(extra_query), - body=_body( - m.PurchaseCreditsRequest, - extra_body, - False, - ("amount", amount), - ("payment_method_id", payment_method_id), - ), + body=_body(m.CreateDatabaseBody, extra_body, False, ("database", database), ("remote", remote)), idempotent=False, timeout=timeout, ) - async def redeem_promo_code( + async def create_folder( self, + id: str, *, - code: str | None = None, + name: str | None = None, + root: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RedeemPromoCodeResponse: - """Call ``POST /v1/credits:redeemPromoCode``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/files:folder``.""" return await self._client._call( "POST", - "/v1/credits:redeemPromoCode", - m.RedeemPromoCodeResponse, + f"/v1/game-servers/{_path(id)}/files:folder", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.RedeemPromoCodeRequest, extra_body, False, ("code", code)), + body=_body(m.CreateFolderBody, extra_body, False, ("name", name), ("root", root)), idempotent=False, timeout=timeout, ) - -class AsyncDNSRecordService(_ServiceAsync): - """The NodeRings DnsRecordService API.""" - - async def check_dns_geo_record( + async def create_game_server( self, - zone_id: str, *, - continent: str | None = None, - country: str | None = None, + accept_eula: bool | None = None, + environment: dict[str, str] | None = None, + idempotency_key: str | None = None, name: str | None = None, - region: str | None = None, - type: str | None = None, + plan_id: str | None = None, + provider_organization_id: str | None = None, + region_id: str | None = None, + template_id: str | None = None, + version_value: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CheckDNSGeoRecordResponse: - """Call ``POST /v1/dns/zones/{zoneId}/geo-records:check``.""" + ) -> m.GameServer: + """ + Call ``POST /v1/game-servers``. A retry of the same call cannot create a second resource: + the SDK sends an idempotency key. + + Args: + accept_eula: accept_eula is the customer's agreement. Required when the egg has the EULA mark. + environment: environment overrides egg defaults. Only user-editable variables are accepted. + idempotency_key: A UUID that makes the create safe to retry. If you leave it out, the SDK sets a new one. + """ return await self._client._call( "POST", - f"/v1/dns/zones/{_path(zone_id)}/geo-records:check", - m.CheckDNSGeoRecordResponse, + "/v1/game-servers", + m.GameServer, query=_query(extra_query), body=_body( - m.CheckDNSGeoRecordBody, + m.CreateGameServerRequest, extra_body, - False, - ("continent", continent), - ("country", country), + True, + ("accept_eula", accept_eula), + ("environment", environment), + ("idempotency_key", idempotency_key), ("name", name), - ("region", region), - ("type", type), + ("plan_id", plan_id), + ("provider_organization_id", provider_organization_id), + ("region_id", region_id), + ("template_id", template_id), + ("version_value", version_value), ), - idempotent=False, + idempotent=True, timeout=timeout, ) - async def delete_dns_geo_record( + async def create_schedule( self, - zone_id: str, + id: str, *, + day_of_month: str | None = None, + day_of_week: str | None = None, + hour: str | None = None, + is_active: bool | None = None, + minute: str | None = None, + month: str | None = None, name: str | None = None, - type: str | None = None, + only_when_online: bool | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/dns/zones/{zoneId}/geo-records``.""" + ) -> m.GameServerSchedule: + """ + Call ``POST /v1/game-servers/{id}/schedules``. + + Args: + is_active: Omitted means the schedule is created enabled. + """ return await self._client._call( - "DELETE", - f"/v1/dns/zones/{_path(zone_id)}/geo-records", - m.SuccessResponse, - query=_query(extra_query, ("name", name), ("type", type)), - body=None, + "POST", + f"/v1/game-servers/{_path(id)}/schedules", + m.GameServerSchedule, + query=_query(extra_query), + body=_body( + m.CreateScheduleBody, + extra_body, + False, + ("day_of_month", day_of_month), + ("day_of_week", day_of_week), + ("hour", hour), + ("is_active", is_active), + ("minute", minute), + ("month", month), + ("name", name), + ("only_when_online", only_when_online), + ), idempotent=False, timeout=timeout, ) - async def delete_dns_record( + async def create_schedule_task( self, - zone_id: str, + id: str, + schedule_id: str, *, - name: str | None = None, - type: str | None = None, + action: str | None = None, + continue_on_failure: bool | None = None, + payload: str | None = None, + time_offset: int | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/dns/zones/{zoneId}/records``.""" + """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}/tasks``.""" return await self._client._call( - "DELETE", - f"/v1/dns/zones/{_path(zone_id)}/records", + "POST", + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks", m.SuccessResponse, - query=_query(extra_query, ("name", name), ("type", type)), - body=None, + query=_query(extra_query), + body=_body( + m.CreateScheduleTaskBody, + extra_body, + False, + ("action", action), + ("continue_on_failure", continue_on_failure), + ("payload", payload), + ("time_offset", time_offset), + ), idempotent=False, timeout=timeout, ) - async def get_dns_geo_record( + async def delete_allocation( self, - zone_id: str, + id: str, + allocation_id: str, *, - name: str | None = None, - type: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DNSGeoRecord: - """Call ``GET /v1/dns/zones/{zoneId}/geo-records:get``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}/allocations/{allocationId}``.""" return await self._client._call( - "GET", - f"/v1/dns/zones/{_path(zone_id)}/geo-records:get", - m.DNSGeoRecord, - query=_query(extra_query, ("name", name), ("type", type)), + "DELETE", + f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_dns_geo_locations( + async def delete_backup( self, + id: str, + backup_uuid: str, *, - kind: str | None = None, + truncate: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDNSGeoLocationsResponse: + ) -> m.SuccessResponse: """ - Call ``GET /v1/dns/geo-locations``. + Call ``DELETE /v1/game-servers/{id}/backups/{backupUuid}``. Args: - kind: Optional filter: continent, country, region, or group. + truncate: Restore only. When true, the panel deletes every file before extracting the backup. """ return await self._client._call( - "GET", - "/v1/dns/geo-locations", - m.ListDNSGeoLocationsResponse, - query=_query(extra_query, ("kind", kind)), + "DELETE", + f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}", + m.SuccessResponse, + query=_query(extra_query, ("truncate", truncate)), body=None, idempotent=False, timeout=timeout, ) - async def list_dns_geo_records( + async def delete_database( self, - zone_id: str, + id: str, + database_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDNSGeoRecordsResponse: - """Call ``GET /v1/dns/zones/{zoneId}/geo-records``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}/databases/{databaseId}``.""" return await self._client._call( - "GET", - f"/v1/dns/zones/{_path(zone_id)}/geo-records", - m.ListDNSGeoRecordsResponse, + "DELETE", + f"/v1/game-servers/{_path(id)}/databases/{_path(database_id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_dns_records( + async def delete_files( self, - zone_id: str, + id: str, *, - name: str | None = None, - type: str | None = None, - page: int | None = None, - page_size: int | None = None, + files: list[str] | None = None, + root: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDNSRecordsResponse: - """Call ``GET /v1/dns/zones/{zoneId}/records``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/files:delete``.""" return await self._client._call( - "GET", - f"/v1/dns/zones/{_path(zone_id)}/records", - m.ListDNSRecordsResponse, - query=_query(extra_query, ("name", name), ("type", type), ("page", page), ("pageSize", page_size)), - body=None, + "POST", + f"/v1/game-servers/{_path(id)}/files:delete", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.DeleteFilesBody, extra_body, False, ("files", files), ("root", root)), idempotent=False, timeout=timeout, ) - async def list_dns_records_all( - self, - zone_id: str, - *, - name: str | None = None, - type: str | None = None, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.DNSRecord]: - """ - Every result of :meth:`list_dns_records`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_dns_records( - zone_id, - page=page, - page_size=size, - name=name, - type=type, - extra_query=extra_query, - timeout=timeout, - ) - items = res.records - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def upsert_dns_geo_record( + async def delete_game_server( self, - zone_id: str, + id: str, *, - record: m.DNSGeoRecord | dict[str, Any] | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DNSGeoRecord: - """Call ``PUT /v1/dns/zones/{zoneId}/geo-records``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}``.""" return await self._client._call( - "PUT", - f"/v1/dns/zones/{_path(zone_id)}/geo-records", - m.DNSGeoRecord, + "DELETE", + f"/v1/game-servers/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.UpsertDNSGeoRecordBody, extra_body, False, ("record", record)), + body=None, idempotent=False, timeout=timeout, ) - async def upsert_dns_record( + async def delete_schedule( self, - zone_id: str, + id: str, + schedule_id: str, *, - record: m.DNSRecord | dict[str, Any] | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DNSRecord: - """Call ``PUT /v1/dns/zones/{zoneId}/records``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}/schedules/{scheduleId}``.""" return await self._client._call( - "PUT", - f"/v1/dns/zones/{_path(zone_id)}/records", - m.DNSRecord, + "DELETE", + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.UpsertDNSRecordBody, extra_body, False, ("record", record)), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncDNSZoneService(_ServiceAsync): - """The NodeRings DnsZoneService API.""" - - async def check_dns_zone_delegation( + async def delete_schedule_task( self, id: str, + schedule_id: str, + task_id: str, *, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetDNSZoneResponse: - """Call ``POST /v1/dns/zones/{id}/check-delegation``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}/schedules/{scheduleId}/tasks/{taskId}``.""" return await self._client._call( - "POST", - f"/v1/dns/zones/{_path(id)}/check-delegation", - m.GetDNSZoneResponse, + "DELETE", + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks/{_path(task_id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.CheckDNSZoneDelegationBody, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - async def create_dns_zone( + async def download_file( self, + id: str, *, - name: str | None = None, - records: list[m.DNSRecord | dict[str, Any]] | None = None, - extra_body: dict[str, Any] | None = None, + path: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateDNSZoneResponse: - """ - Call ``POST /v1/dns/zones``. - - Args: - records: Records the customer kept from the live-scan review. Empty means create a blank zone. - """ + ) -> m.DownloadFileResponse: + """Call ``GET /v1/game-servers/{id}/files/download``.""" return await self._client._call( - "POST", - "/v1/dns/zones", - m.CreateDNSZoneResponse, - query=_query(extra_query), - body=_body(m.CreateDNSZoneRequest, extra_body, False, ("name", name), ("records", records)), + "GET", + f"/v1/game-servers/{_path(id)}/files/download", + m.DownloadFileResponse, + query=_query(extra_query, ("path", path)), + body=None, idempotent=False, timeout=timeout, ) - async def delete_dns_zone( + async def execute_schedule( self, id: str, + schedule_id: str, *, - force: bool | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/dns/zones/{id}``.""" + """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}:execute``.""" return await self._client._call( - "DELETE", - f"/v1/dns/zones/{_path(id)}", + "POST", + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}:execute", m.SuccessResponse, - query=_query(extra_query, ("force", force)), - body=None, + query=_query(extra_query), + body=_body(m.ExecuteScheduleBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def export_dns_zone( + async def get_game_server( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ExportDNSZoneResponse: - """Call ``GET /v1/dns/zones/{id}/export``.""" + ) -> m.GameServer: + """Call ``GET /v1/game-servers/{id}``.""" return await self._client._call( "GET", - f"/v1/dns/zones/{_path(id)}/export", - m.ExportDNSZoneResponse, + f"/v1/game-servers/{_path(id)}", + m.GameServer, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_dns_zone( + async def get_game_server_resources( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetDNSZoneResponse: - """Call ``GET /v1/dns/zones/{id}``.""" + ) -> m.GameServerResources: + """Call ``GET /v1/game-servers/{id}/resources``.""" return await self._client._call( "GET", - f"/v1/dns/zones/{_path(id)}", - m.GetDNSZoneResponse, + f"/v1/game-servers/{_path(id)}/resources", + m.GameServerResources, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def import_dns_records( + async def get_startup( self, - zone_id: str, + id: str, *, - records: list[m.DNSRecord | dict[str, Any]] | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/dns/zones/{zoneId}/records:import``.""" + ) -> m.GetStartupResponse: + """Call ``GET /v1/game-servers/{id}/startup``.""" return await self._client._call( - "POST", - f"/v1/dns/zones/{_path(zone_id)}/records:import", - m.SuccessResponse, + "GET", + f"/v1/game-servers/{_path(id)}/startup", + m.GetStartupResponse, query=_query(extra_query), - body=_body(m.ImportDNSRecordsBody, extra_body, False, ("records", records)), + body=None, idempotent=False, timeout=timeout, ) - async def import_dns_zone( + async def list_allocations( self, id: str, *, - zone_text: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/dns/zones/{id}/import``.""" + ) -> m.ListGameServerAllocationsResponse: + """Call ``GET /v1/game-servers/{id}/allocations``.""" return await self._client._call( - "POST", - f"/v1/dns/zones/{_path(id)}/import", - m.SuccessResponse, + "GET", + f"/v1/game-servers/{_path(id)}/allocations", + m.ListGameServerAllocationsResponse, query=_query(extra_query), - body=_body(m.ImportDNSZoneBody, extra_body, False, ("zone_text", zone_text)), + body=None, idempotent=False, timeout=timeout, ) - async def list_dns_zones( + async def list_backups( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDNSZonesResponse: - """Call ``GET /v1/dns/zones``.""" + ) -> m.ListGameServerBackupsResponse: + """Call ``GET /v1/game-servers/{id}/backups``.""" return await self._client._call( "GET", - "/v1/dns/zones", - m.ListDNSZonesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + f"/v1/game-servers/{_path(id)}/backups", + m.ListGameServerBackupsResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_dns_zones_all( + async def list_databases( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.DNSZone]: - """ - Every result of :meth:`list_dns_zones`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_dns_zones( - page=page, - page_size=size, - extra_query=extra_query, - timeout=timeout, - ) - items = res.zones - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + ) -> m.ListDatabasesResponse: + """Call ``GET /v1/game-servers/{id}/databases``.""" + return await self._client._call( + "GET", + f"/v1/game-servers/{_path(id)}/databases", + m.ListDatabasesResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - async def scan_dns_zone_records( + async def list_files( self, + id: str, *, - name: str | None = None, - zone_id: str | None = None, + directory: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ScanDNSZoneRecordsResponse: - """Call ``GET /v1/dns/scan``.""" + ) -> m.ListFilesResponse: + """Call ``GET /v1/game-servers/{id}/files``.""" return await self._client._call( "GET", - "/v1/dns/scan", - m.ScanDNSZoneRecordsResponse, - query=_query(extra_query, ("name", name), ("zoneId", zone_id)), + f"/v1/game-servers/{_path(id)}/files", + m.ListFilesResponse, + query=_query(extra_query, ("directory", directory)), body=None, idempotent=False, timeout=timeout, ) - async def scan_dns_zone_records_2( + async def list_game_servers( self, - zone_id: str, *, - name: str | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ScanDNSZoneRecordsResponse: - """Call ``GET /v1/dns/zones/{zoneId}/scan``.""" + ) -> m.ListGameServersResponse: + """Call ``GET /v1/game-servers``.""" return await self._client._call( "GET", - f"/v1/dns/zones/{_path(zone_id)}/scan", - m.ScanDNSZoneRecordsResponse, - query=_query(extra_query, ("name", name)), + "/v1/game-servers", + m.ListGameServersResponse, + query=_query(extra_query, ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - -class AsyncDNSSECService(_ServiceAsync): - """The NodeRings DnssecService API.""" - - async def check_dnssec_ds( + async def list_order_games( self, - zone_id: str, *, - extra_body: dict[str, Any] | None = None, + plan_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DNSSECInfo: - """Call ``POST /v1/dns/zones/{zoneId}/dnssec/check-ds``.""" + ) -> m.ListOrderGamesResponse: + """Call ``GET /v1/game-servers:order-games``.""" return await self._client._call( - "POST", - f"/v1/dns/zones/{_path(zone_id)}/dnssec/check-ds", - m.DNSSECInfo, - query=_query(extra_query), - body=_body(m.CheckDNSSECDSBody, extra_body, False), + "GET", + "/v1/game-servers:order-games", + m.ListOrderGamesResponse, + query=_query(extra_query, ("planId", plan_id)), + body=None, idempotent=False, timeout=timeout, ) - async def disable_dnssec( + async def list_schedules( self, - zone_id: str, + id: str, *, - force: bool | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DNSSECInfo: - """Call ``POST /v1/dns/zones/{zoneId}/dnssec/disable``.""" + ) -> m.ListSchedulesResponse: + """Call ``GET /v1/game-servers/{id}/schedules``.""" return await self._client._call( - "POST", - f"/v1/dns/zones/{_path(zone_id)}/dnssec/disable", - m.DNSSECInfo, + "GET", + f"/v1/game-servers/{_path(id)}/schedules", + m.ListSchedulesResponse, query=_query(extra_query), - body=_body(m.DisableDNSSECBody, extra_body, False, ("force", force)), + body=None, idempotent=False, timeout=timeout, ) - async def enable_dnssec( + async def lock_backup( self, - zone_id: str, + id: str, + backup_uuid: str, *, + truncate: bool | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DNSSECInfo: - """Call ``POST /v1/dns/zones/{zoneId}/dnssec/enable``.""" + ) -> m.SuccessResponse: + """ + Call ``POST /v1/game-servers/{id}/backups/{backupUuid}:lock``. + + Args: + truncate: Restore only. When true, the panel deletes every file before extracting the backup. + """ return await self._client._call( "POST", - f"/v1/dns/zones/{_path(zone_id)}/dnssec/enable", - m.DNSSECInfo, + f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}:lock", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.EnableDNSSECBody, extra_body, False), + body=_body(m.LockBackupBody, extra_body, False, ("truncate", truncate)), idempotent=False, timeout=timeout, ) - async def get_dnssec( + async def open_console( self, - zone_id: str, + id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DNSSECInfo: - """Call ``GET /v1/dns/zones/{zoneId}/dnssec``.""" + ) -> m.OpenConsoleResponse: + """Call ``POST /v1/game-servers/{id}:console``.""" return await self._client._call( - "GET", - f"/v1/dns/zones/{_path(zone_id)}/dnssec", - m.DNSSECInfo, + "POST", + f"/v1/game-servers/{_path(id)}:console", + m.OpenConsoleResponse, query=_query(extra_query), - body=None, + body=_body(m.OpenConsoleBody, extra_body, False), idempotent=False, timeout=timeout, ) - -class AsyncDomainContactService(_ServiceAsync): - """The NodeRings DomainContactService API.""" - - async def create_domain_contact( + async def power_game_server( self, + id: str, *, - contact: m.DomainContactInput | dict[str, Any] | None = None, - tlds: list[str] | None = None, + signal: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainContact: - """ - Call ``POST /v1/registrar/contacts``. - - Args: - contact: Writable contact fields. ASCII only in v1; the server normalizes and validates. - tlds: Validate against the requirements of these TLDs too. - """ + ) -> m.GameServer: + """Call ``POST /v1/game-servers/{id}:power``.""" return await self._client._call( "POST", - "/v1/registrar/contacts", - m.DomainContact, + f"/v1/game-servers/{_path(id)}:power", + m.GameServer, query=_query(extra_query), - body=_body(m.CreateDomainContactRequest, extra_body, False, ("contact", contact), ("tlds", tlds)), + body=_body(m.PowerGameServerBody, extra_body, False, ("signal", signal)), idempotent=False, timeout=timeout, ) - async def delete_domain_contact( + async def read_file( self, id: str, *, + path: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/registrar/contacts/{id}``.""" + ) -> m.ReadFileResponse: + """Call ``GET /v1/game-servers/{id}/files/content``.""" return await self._client._call( - "DELETE", - f"/v1/registrar/contacts/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), + "GET", + f"/v1/game-servers/{_path(id)}/files/content", + m.ReadFileResponse, + query=_query(extra_query, ("path", path)), body=None, idempotent=False, timeout=timeout, ) - async def get_contact_schema( + async def reinstall_game_server( self, + id: str, *, - country: str | None = None, - tlds: list[str] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetContactSchemaResponse: - """ - Per-country rules and base field specs for the client-side (zod) schema. - - It calls ``GET /v1/registrar/contact-schema``. - - Args: - country: Limit country rules to one country (ISO alpha-2); empty = all. - tlds: Include extension field specs for these TLDs. - """ + ) -> m.GameServer: + """Call ``POST /v1/game-servers/{id}:reinstall``.""" return await self._client._call( - "GET", - "/v1/registrar/contact-schema", - m.GetContactSchemaResponse, - query=_query(extra_query, ("country", country), ("tlds", tlds)), - body=None, + "POST", + f"/v1/game-servers/{_path(id)}:reinstall", + m.GameServer, + query=_query(extra_query), + body=_body(m.ReinstallGameServerBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def get_domain_contact( + async def rename_file( self, id: str, *, + dest: str | None = None, + root: str | None = None, + source: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainContact: - """Call ``GET /v1/registrar/contacts/{id}``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/files:rename``.""" return await self._client._call( - "GET", - f"/v1/registrar/contacts/{_path(id)}", - m.DomainContact, + "POST", + f"/v1/game-servers/{_path(id)}/files:rename", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.RenameFileBody, extra_body, False, ("dest", dest), ("root", root), ("source", source)), idempotent=False, timeout=timeout, ) - async def list_domain_contacts( + async def rename_game_server( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - search: str | None = None, + name: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDomainContactsResponse: - """Call ``GET /v1/registrar/contacts``.""" + ) -> m.GameServer: + """Call ``POST /v1/game-servers/{id}:rename``.""" return await self._client._call( - "GET", - "/v1/registrar/contacts", - m.ListDomainContactsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("search", search)), - body=None, + "POST", + f"/v1/game-servers/{_path(id)}:rename", + m.GameServer, + query=_query(extra_query), + body=_body(m.RenameGameServerBody, extra_body, False, ("name", name)), idempotent=False, timeout=timeout, ) - async def list_domain_contacts_all( + async def restore_backup( self, + id: str, + backup_uuid: str, *, - page: int | None = None, - page_size: int | None = None, - search: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.DomainContact]: - """ - Every result of :meth:`list_domain_contacts`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_domain_contacts( - page=page, - page_size=size, - search=search, - extra_query=extra_query, - timeout=timeout, - ) - items = res.contacts - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def update_domain_contact( - self, - id: str, - *, - contact: m.DomainContactInput | dict[str, Any] | None = None, - tlds: list[str] | None = None, + truncate: bool | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateDomainContactResponse: + ) -> m.SuccessResponse: """ - Call ``PUT /v1/registrar/contacts/{id}``. + Call ``POST /v1/game-servers/{id}/backups/{backupUuid}:restore``. Args: - contact: Writable contact fields. ASCII only in v1; the server normalizes and validates. + truncate: Restore only. When true, the panel deletes every file before extracting the backup. """ return await self._client._call( - "PUT", - f"/v1/registrar/contacts/{_path(id)}", - m.UpdateDomainContactResponse, + "POST", + f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}:restore", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.UpdateDomainContactBody, extra_body, False, ("contact", contact), ("tlds", tlds)), + body=_body(m.GameServerRestoreBackupBody, extra_body, False, ("truncate", truncate)), idempotent=False, timeout=timeout, ) - async def validate_domain_contact( + async def rotate_database_password( self, + id: str, + database_id: str, *, - contact: m.DomainContactInput | dict[str, Any] | None = None, - tlds: list[str] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ValidateDomainContactResponse: - """ - Dry run for forms: errors, warnings and normalized values. - - It calls ``POST /v1/registrar/contacts/validate``. - - Args: - contact: Writable contact fields. ASCII only in v1; the server normalizes and validates. - """ + ) -> m.GameServerDatabase: + """Call ``POST /v1/game-servers/{id}/databases/{databaseId}:rotate``.""" return await self._client._call( "POST", - "/v1/registrar/contacts/validate", - m.ValidateDomainContactResponse, + f"/v1/game-servers/{_path(id)}/databases/{_path(database_id)}:rotate", + m.GameServerDatabase, query=_query(extra_query), - body=_body(m.ValidateDomainContactRequest, extra_body, False, ("contact", contact), ("tlds", tlds)), + body=_body(m.RotateDatabasePasswordBody, extra_body, False), idempotent=False, timeout=timeout, ) - -class AsyncDomainOrderService(_ServiceAsync): - """The NodeRings DomainOrderService API.""" - - async def cancel_domain_order( + async def set_primary_allocation( self, id: str, + allocation_id: str, *, - reason: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrder: - """Call ``POST /v1/registrar/orders/{id}/cancel``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/allocations/{allocationId}:primary``.""" return await self._client._call( "POST", - f"/v1/registrar/orders/{_path(id)}/cancel", - m.DomainOrder, + f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}:primary", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.CancelDomainOrderBody, extra_body, False, ("reason", reason)), + body=_body(m.SetPrimaryAllocationBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def checkout_domain_order( + async def update_allocation( self, id: str, + allocation_id: str, *, - accept_terms_version: str | None = None, - confirm_billing_country: bool | None = None, - evidence_country: str | None = None, - idempotency_key: str | None = None, - mit_consent: bool | None = None, - payment_method_id: str | None = None, + notes: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CheckoutDomainOrderResponse: - """ - Authorize payment and start processing. May return requires_action + client_secret. - - It calls ``POST /v1/registrar/orders/{id}/checkout``. A retry of the same call cannot create - a second resource: the SDK sends an idempotency key. - - Args: - accept_terms_version: Must equal the current terms version (no implicit acceptance). - confirm_billing_country: Customer confirmed a billing country that matches neither card nor IP. - evidence_country: Second proof of country when confirm_billing_country is set (ISO 3166-1 alpha-2). - idempotency_key: A UUID that makes the create safe to retry. If you leave it out, the SDK sets a new one. - mit_consent: Consent to merchant-initiated renewal charges. - payment_method_id: Card to charge. Domains are card-only: account credit and coupons never apply. - """ + ) -> m.GameServerAllocation: + """Call ``POST /v1/game-servers/{id}/allocations/{allocationId}``.""" return await self._client._call( "POST", - f"/v1/registrar/orders/{_path(id)}/checkout", - m.CheckoutDomainOrderResponse, + f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}", + m.GameServerAllocation, query=_query(extra_query), - body=_body( - m.CheckoutDomainOrderBody, - extra_body, - True, - ("accept_terms_version", accept_terms_version), - ("confirm_billing_country", confirm_billing_country), - ("evidence_country", evidence_country), - ("idempotency_key", idempotency_key), - ("mit_consent", mit_consent), - ("payment_method_id", payment_method_id), - ), - idempotent=True, + body=_body(m.UpdateAllocationBody, extra_body, False, ("notes", notes)), + idempotent=False, timeout=timeout, ) - async def confirm_domain_order( + async def update_docker_image( self, id: str, *, - payment_intent_id: str | None = None, + docker_image: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrder: - """ - After 3-D Secure: re-reads the PaymentIntent from Stripe and continues. - - It calls ``POST /v1/registrar/orders/{id}/confirm``. - """ + ) -> m.SuccessResponse: + """Call ``PUT /v1/game-servers/{id}/docker-image``.""" return await self._client._call( - "POST", - f"/v1/registrar/orders/{_path(id)}/confirm", - m.DomainOrder, + "PUT", + f"/v1/game-servers/{_path(id)}/docker-image", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.ConfirmDomainOrderBody, extra_body, False, ("payment_intent_id", payment_intent_id)), + body=_body(m.UpdateDockerImageBody, extra_body, False, ("docker_image", docker_image)), idempotent=False, timeout=timeout, ) - async def create_domain_order( + async def update_schedule( self, + id: str, + schedule_id: str, *, - contact_id: str | None = None, - idempotency_key: str | None = None, - items: list[m.DomainOrderItemInput | dict[str, Any]] | None = None, - nameservers: list[str] | None = None, - ns_mode: m.DomainNsMode | str | None = None, + day_of_month: str | None = None, + day_of_week: str | None = None, + hour: str | None = None, + is_active: bool | None = None, + minute: str | None = None, + month: str | None = None, + name: str | None = None, + only_when_online: bool | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrder: - """ - Call ``POST /v1/registrar/orders``. A retry of the same call cannot create a second - resource: the SDK sends an idempotency key. - - Args: - contact_id: Default registrant contact for all items. - idempotency_key: A UUID that makes the create safe to retry. If you leave it out, the SDK sets a new one. - ns_mode: - DOMAIN_NS_MODE_NODERINGS: NodeRings DNS (cfg.PowerDNS.AssignedNameservers). - DOMAIN_NS_MODE_CUSTOM: Customer nameservers. - """ + ) -> m.GameServerSchedule: + """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}``.""" return await self._client._call( "POST", - "/v1/registrar/orders", - m.DomainOrder, + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}", + m.GameServerSchedule, query=_query(extra_query), body=_body( - m.CreateDomainOrderRequest, + m.UpdateScheduleBody, extra_body, - True, - ("contact_id", contact_id), - ("idempotency_key", idempotency_key), - ("items", items), - ("nameservers", nameservers), - ("ns_mode", ns_mode), + False, + ("day_of_month", day_of_month), + ("day_of_week", day_of_week), + ("hour", hour), + ("is_active", is_active), + ("minute", minute), + ("month", month), + ("name", name), + ("only_when_online", only_when_online), ), - idempotent=True, + idempotent=False, timeout=timeout, ) - async def get_domain_order( + async def update_schedule_task( self, id: str, + schedule_id: str, + task_id: str, *, + action: str | None = None, + continue_on_failure: bool | None = None, + payload: str | None = None, + sequence_id: int | None = None, + time_offset: int | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrder: - """Call ``GET /v1/registrar/orders/{id}``.""" + ) -> m.SuccessResponse: + """ + Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}/tasks/{taskId}``. + + Args: + sequence_id: Omitted leaves the task where it is. Set it to move the task in the run order. + """ return await self._client._call( - "GET", - f"/v1/registrar/orders/{_path(id)}", - m.DomainOrder, + "POST", + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks/{_path(task_id)}", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body( + m.UpdateScheduleTaskBody, + extra_body, + False, + ("action", action), + ("continue_on_failure", continue_on_failure), + ("payload", payload), + ("sequence_id", sequence_id), + ("time_offset", time_offset), + ), idempotent=False, timeout=timeout, ) - async def list_domain_orders( + async def update_startup_variable( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - states: list[m.DomainOrderState | str] | None = None, + key: str | None = None, + value: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDomainOrdersResponse: - """Call ``GET /v1/registrar/orders``.""" + ) -> m.SuccessResponse: + """Call ``PUT /v1/game-servers/{id}/startup``.""" return await self._client._call( - "GET", - "/v1/registrar/orders", - m.ListDomainOrdersResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("states", states)), - body=None, + "PUT", + f"/v1/game-servers/{_path(id)}/startup", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.UpdateStartupVariableBody, extra_body, False, ("key", key), ("value", value)), idempotent=False, timeout=timeout, ) - async def list_domain_orders_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - states: list[m.DomainOrderState | str] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.DomainOrder]: - """ - Every result of :meth:`list_domain_orders`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_domain_orders( - page=page, - page_size=size, - states=states, - extra_query=extra_query, - timeout=timeout, - ) - items = res.orders - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def price_domain_order( + async def upload_file( self, id: str, *, - confirm_billing_country: bool | None = None, - evidence_country: str | None = None, - payment_method_id: str | None = None, + content: bytes | None = None, + directory: str | None = None, + filename: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrderQuote: - """ - Re-quote with live prices and tax (Stripe Tax). - - It calls ``POST /v1/registrar/orders/{id}/price``. - - Args: - confirm_billing_country: Customer confirmed a billing country that matches neither card nor IP (send when the quote had billing_country_confirmation_required). - evidence_country: Second proof of country with confirm_billing_country (ISO 3166-1 alpha-2, e.g. the phone number's country). Must equal the billing country. - payment_method_id: Card to quote with (its country is tax location evidence). Empty = default card. - """ + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/files:upload``.""" return await self._client._call( "POST", - f"/v1/registrar/orders/{_path(id)}/price", - m.DomainOrderQuote, + f"/v1/game-servers/{_path(id)}/files:upload", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.PriceDomainOrderBody, + m.UploadFileBody, extra_body, False, - ("confirm_billing_country", confirm_billing_country), - ("evidence_country", evidence_country), - ("payment_method_id", payment_method_id), + ("content", content), + ("directory", directory), + ("filename", filename), ), idempotent=False, timeout=timeout, ) - async def update_domain_order( + async def write_file( self, id: str, *, - add_items: list[m.DomainOrderItemInput | dict[str, Any]] | None = None, - contact_id: str | None = None, - item_updates: list[m.DomainOrderItemUpdate | dict[str, Any]] | None = None, - nameservers: list[str] | None = None, - ns_mode: m.DomainNsMode | str | None = None, - remove_item_ids: list[str] | None = None, + content: bytes | None = None, + path: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrder: - """ - Items, years, privacy, auto-renew, contact and DNS choices. - - It calls ``PATCH /v1/registrar/orders/{id}``. - - Args: - add_items: Items to add. - contact_id: Registrant contact for every item. - item_updates: Changes to existing items. - ns_mode: - DOMAIN_NS_MODE_NODERINGS: NodeRings DNS (cfg.PowerDNS.AssignedNameservers). - DOMAIN_NS_MODE_CUSTOM: Customer nameservers. - """ + ) -> m.SuccessResponse: + """Call ``PUT /v1/game-servers/{id}/files``.""" return await self._client._call( - "PATCH", - f"/v1/registrar/orders/{_path(id)}", - m.DomainOrder, + "PUT", + f"/v1/game-servers/{_path(id)}/files", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.UpdateDomainOrderBody, - extra_body, - False, - ("add_items", add_items), - ("contact_id", contact_id), - ("item_updates", item_updates), - ("nameservers", nameservers), - ("ns_mode", ns_mode), - ("remove_item_ids", remove_item_ids), - ), + body=_body(m.WriteFileBody, extra_body, False, ("content", content), ("path", path)), idempotent=False, timeout=timeout, ) -class AsyncDomainSearchService(_ServiceAsync): - """The NodeRings DomainSearchService API.""" +class AsyncGameServerTemplateService(_ServiceAsync): + """The NodeRings GameServerTemplateService API.""" - async def check_domains( + async def duplicate_game_server_template( self, + id: str, *, - names: list[str] | None = None, + name: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CheckDomainsResponse: - """ - Live, uncached availability (add-to-cart and checkout). Login required. - - It calls ``POST /v1/registrar/check``. - """ + ) -> m.GameServerTemplate: + """Call ``POST /v1/game-server-templates/{id}:duplicate``.""" return await self._client._call( "POST", - "/v1/registrar/check", - m.CheckDomainsResponse, + f"/v1/game-server-templates/{_path(id)}:duplicate", + m.GameServerTemplate, query=_query(extra_query), - body=_body(m.CheckDomainsRequest, extra_body, False, ("names", names)), + body=_body(m.DuplicateGameServerTemplateBody, extra_body, False, ("name", name)), idempotent=False, timeout=timeout, ) - async def check_transfer( + async def import_game_server_template( self, *, - names: list[str] | None = None, - extra_body: dict[str, Any] | None = None, + docker_image: str | None = None, + egg_id: int | None = None, + icon: str | None = None, + name: str | None = None, + nest_id: int | None = None, + platform_id: str | None = None, + startup: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CheckTransferResponse: - """ - Whether names can be transferred in, with price and warnings. - - It calls ``POST /v1/registrar/transfer-check``. - """ + ) -> m.GameServerTemplate: + """Call ``POST /v1/game-server-templates:import``.""" return await self._client._call( "POST", - "/v1/registrar/transfer-check", - m.CheckTransferResponse, + "/v1/game-server-templates:import", + m.GameServerTemplate, query=_query(extra_query), - body=_body(m.CheckTransferRequest, extra_body, False, ("names", names)), + body=_body( + m.ImportGameServerTemplateRequest, + extra_body, + False, + ("docker_image", docker_image), + ("egg_id", egg_id), + ("icon", icon), + ("name", name), + ("nest_id", nest_id), + ("platform_id", platform_id), + ("startup", startup), + ), idempotent=False, timeout=timeout, ) - async def get_tld_requirements( + async def list_game_server_templates( self, - tld: str, *, - operation: m.DomainOperation | str | None = None, + platform_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetTldRequirementsResponse: - """ - Contact fields a TLD needs for an operation (dynamic extension fields). - - It calls ``GET /v1/registrar/tlds/{tld}/requirements``. - """ + ) -> m.ListGameServerTemplatesResponse: + """Call ``GET /v1/game-server-templates``.""" return await self._client._call( "GET", - f"/v1/registrar/tlds/{_path(tld)}/requirements", - m.GetTldRequirementsResponse, - query=_query(extra_query, ("operation", operation)), + "/v1/game-server-templates", + m.ListGameServerTemplatesResponse, + query=_query(extra_query, ("platformId", platform_id)), body=None, idempotent=False, timeout=timeout, ) - async def list_tld_prices( + async def set_game_nest_ordering( self, *, - featured_only: bool | None = None, - category: m.TldCategory | str | None = None, - page: int | None = None, - page_size: int | None = None, + catalog_key: str | None = None, + ordering_enabled: bool | None = None, + platform_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListTldPricesResponse: - """ - Anonymous. Public TLD price list (registration, renewal, transfer, restore, privacy). - - It calls ``GET /v1/registrar/tlds``. - - Args: - category: Only TLDs of this category (unspecified = all enabled TLDs). - """ + ) -> m.SuccessResponse: + """Call ``POST /v1/game-server-templates:nest-ordering``.""" return await self._client._call( - "GET", - "/v1/registrar/tlds", - m.ListTldPricesResponse, - query=_query( - extra_query, - ("featuredOnly", featured_only), - ("category", category), - ("page", page), - ("pageSize", page_size), + "POST", + "/v1/game-server-templates:nest-ordering", + m.SuccessResponse, + query=_query(extra_query), + body=_body( + m.SetGameNestOrderingRequest, + extra_body, + False, + ("catalog_key", catalog_key), + ("ordering_enabled", ordering_enabled), + ("platform_id", platform_id), ), - body=None, idempotent=False, timeout=timeout, ) - async def list_tld_prices_all( - self, - *, - featured_only: bool | None = None, - category: m.TldCategory | str | None = None, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.TldPrice]: - """ - Every result of :meth:`list_tld_prices`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_tld_prices( - page=page, - page_size=size, - featured_only=featured_only, - category=category, - extra_query=extra_query, - timeout=timeout, - ) - items = res.tlds - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def search_domains( + async def update_game_server_template( self, + id: str, *, - category: m.TldCategory | str | None = None, - exact_only: bool | None = None, - include_suggestions: bool | None = None, - query: str | None = None, - tlds: list[str] | None = None, - turnstile_token: str | None = None, + confirmed: bool | None = None, + docker_image: str | None = None, + egg_id: int | None = None, + hidden: bool | None = None, + icon: str | None = None, + nest_id: int | None = None, + ordering_enabled: bool | None = None, + startup: str | None = None, + version_variable: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SearchDomainsResponse: - """ - Anonymous. Search a name, label or keywords; exact match first, then featured TLDs, then - suggestions. - - It calls ``POST /v1/registrar/search``. - - Args: - category: Grouping for "Show more extensions" in search and the pricing page (§8.2). - exact_only: Check only the exact name, served from the availability cache (type-ahead). - include_suggestions: Include registrar name suggestions (when the adapter supports them). - query: A name (evergreen-coffee.com), a label (evergreencoffee) or short keywords. - tlds: Restrict results to these TLDs (without leading dot). Empty = featured TLDs. - turnstile_token: Turnstile token; required for anonymous callers. - """ + ) -> m.GameServerTemplate: + """Call ``PATCH /v1/game-server-templates/{id}``.""" return await self._client._call( - "POST", - "/v1/registrar/search", - m.SearchDomainsResponse, + "PATCH", + f"/v1/game-server-templates/{_path(id)}", + m.GameServerTemplate, query=_query(extra_query), body=_body( - m.SearchDomainsRequest, + m.UpdateGameServerTemplateBody, extra_body, False, - ("category", category), - ("exact_only", exact_only), - ("include_suggestions", include_suggestions), - ("query", query), - ("tlds", tlds), - ("turnstile_token", turnstile_token), + ("confirmed", confirmed), + ("docker_image", docker_image), + ("egg_id", egg_id), + ("hidden", hidden), + ("icon", icon), + ("nest_id", nest_id), + ("ordering_enabled", ordering_enabled), + ("startup", startup), + ("version_variable", version_variable), ), idempotent=False, timeout=timeout, ) -class AsyncDomainService(_ServiceAsync): - """The NodeRings DomainService API.""" +class AsyncGroupService(_ServiceAsync): + """The NodeRings GroupService API.""" - async def create_domain( + async def add_service_account_to_group( self, *, - name: str | None = None, - verification_type: m.VerificationType | str | None = None, + group_id: str | None = None, + service_account_ids: list[str] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/domain``.""" + """Call ``POST /v1/groups/add-service-account``.""" return await self._client._call( "POST", - "/v1/domain", + "/v1/groups/add-service-account", m.SuccessResponse, query=_query(extra_query), body=_body( - m.CreateDomainRequest, extra_body, False, ("name", name), ("verification_type", verification_type) + m.AddServiceAccountToGroupRequest, + extra_body, + False, + ("group_id", group_id), + ("service_account_ids", service_account_ids), ), idempotent=False, timeout=timeout, ) - async def delete_domain( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/domain/{id}``.""" - return await self._client._call( - "DELETE", - f"/v1/domain/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_domain( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetDomainResponse: - """Call ``GET /v1/domain``.""" - return await self._client._call( - "GET", - "/v1/domain", - m.GetDomainResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def verify_domain( + async def add_user_to_group( self, - id: str, *, + group_id: str | None = None, + user_ids: list[str] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``GET /v1/domain/verify/{id}``.""" + """Call ``POST /v1/groups/add-user``.""" return await self._client._call( - "GET", - f"/v1/domain/verify/{_path(id)}", + "POST", + "/v1/groups/add-user", m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.AddUserToGroupRequest, extra_body, False, ("group_id", group_id), ("user_ids", user_ids)), idempotent=False, timeout=timeout, ) - -class AsyncEnvironmentVariableService(_ServiceAsync): - """The NodeRings EnvironmentVariableService API.""" - - async def create_environment_variable( + async def create_group( self, *, - key: str | None = None, - value: str | None = None, + description: str | None = None, + group_roles: list[str] | None = None, + name: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateEnvironmentVariableResponse: - """Call ``POST /v1/environment-variables``.""" + ) -> m.CreateGroupResponse: + """Call ``POST /v1/groups``.""" return await self._client._call( "POST", - "/v1/environment-variables", - m.CreateEnvironmentVariableResponse, + "/v1/groups", + m.CreateGroupResponse, query=_query(extra_query), - body=_body(m.CreateEnvironmentVariableRequest, extra_body, False, ("key", key), ("value", value)), + body=_body( + m.CreateGroupRequest, + extra_body, + False, + ("description", description), + ("group_roles", group_roles), + ("name", name), + ), idempotent=False, timeout=timeout, ) - async def delete_environment_variable( + async def delete_group( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/environment-variables/{id}``.""" + """Call ``DELETE /v1/groups/{id}``.""" return await self._client._call( "DELETE", - f"/v1/environment-variables/{_path(id)}", + f"/v1/groups/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -20547,55 +19685,66 @@ async def delete_environment_variable( timeout=timeout, ) - async def get_environment_variable( + async def get_group( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetEnvironmentVariableResponse: - """Call ``GET /v1/environment-variables/{id}``.""" + ) -> m.GetGroupResponse: + """Call ``GET /v1/groups/{id}``.""" return await self._client._call( "GET", - f"/v1/environment-variables/{_path(id)}", - m.GetEnvironmentVariableResponse, + f"/v1/groups/{_path(id)}", + m.GetGroupResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_environment_variables( + async def list_groups( self, *, page: int | None = None, page_size: int | None = None, - filter_key: str | None = None, + filter_name: str | None = None, + filter_status: m.Protov1Status | str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListEnvironmentVariablesResponse: - """Call ``GET /v1/environment-variables``.""" + ) -> m.ListGroupsResponse: + """Call ``GET /v1/groups``.""" return await self._client._call( "GET", - "/v1/environment-variables", - m.ListEnvironmentVariablesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterKey", filter_key)), + "/v1/groups", + m.ListGroupsResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("filterName", filter_name), + ("filterStatus", filter_status), + ("search", search), + ), body=None, idempotent=False, timeout=timeout, ) - async def list_environment_variables_all( + async def list_groups_all( self, *, page: int | None = None, page_size: int | None = None, - filter_key: str | None = None, + filter_name: str | None = None, + filter_status: m.Protov1Status | str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.EnvironmentVariable]: + ) -> AsyncIterator[m.Group]: """ - Every result of :meth:`list_environment_variables`, reading page after page. + Every result of :meth:`list_groups`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -20603,14 +19752,16 @@ async def list_environment_variables_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_environment_variables( + res = await self.list_groups( page=page, page_size=size, - filter_key=filter_key, + filter_name=filter_name, + filter_status=filter_status, + search=search, extra_query=extra_query, timeout=timeout, ) - items = res.environment_variables + items = res.groups for item in items: yield item seen += len(items) @@ -20618,229 +19769,387 @@ async def list_environment_variables_all( return page += 1 - async def update_environment_variable( + async def remove_service_account_from_group( self, - id: str, *, - value: str | None = None, - extra_body: dict[str, Any] | None = None, + group_id: str | None = None, + service_account_ids: list[str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``PATCH /v1/environment-variables/{id}``.""" + """Call ``DELETE /v1/groups/remove-service-account``.""" return await self._client._call( - "PATCH", - f"/v1/environment-variables/{_path(id)}", + "DELETE", + "/v1/groups/remove-service-account", m.SuccessResponse, - query=_query(extra_query), - body=_body(m.UpdateEnvironmentVariableBody, extra_body, False, ("value", value)), + query=_query(extra_query, ("groupId", group_id), ("serviceAccountIds", service_account_ids)), + body=None, idempotent=False, timeout=timeout, ) + async def remove_user_from_group( + self, + *, + group_id: str | None = None, + user_ids: list[str] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``DELETE /v1/groups/remove-user``.""" + return await self._client._call( + "DELETE", + "/v1/groups/remove-user", + m.SuccessResponse, + query=_query(extra_query, ("groupId", group_id), ("userIds", user_ids)), + body=None, + idempotent=False, + timeout=timeout, + ) -class AsyncExchangeRateService(_ServiceAsync): - """The NodeRings ExchangeRateService API.""" - - async def convert_currency( + async def update_group( self, + id: str, *, - target_currency: str | None = None, - usd_amount: str | None = None, + description: str | None = None, + group_roles: list[str] | None = None, + name: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ConvertCurrencyResponse: - """ - Convert an amount from USD to a target currency - - It calls ``POST /v1/exchange-rate/convert``. - - Args: - target_currency: Target currency code (e.g., "EUR", "GBP", "JPY") - usd_amount: Amount in USD to convert - """ + ) -> m.UpdateGroupResponse: + """Call ``PATCH /v1/groups/{id}``.""" return await self._client._call( - "POST", - "/v1/exchange-rate/convert", - m.ConvertCurrencyResponse, + "PATCH", + f"/v1/groups/{_path(id)}", + m.UpdateGroupResponse, query=_query(extra_query), body=_body( - m.ConvertCurrencyRequest, + m.UpdateGroupBody, extra_body, False, - ("target_currency", target_currency), - ("usd_amount", usd_amount), + ("description", description), + ("group_roles", group_roles), + ("name", name), ), idempotent=False, timeout=timeout, ) - async def get_all_exchange_rates( + +class AsyncHookScriptService(_ServiceAsync): + """The NodeRings HookScriptService API.""" + + async def delete_hook_script( self, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetAllExchangeRatesResponse: - """ - Get all exchange rates at once (returns map of currency codes to rates) - - It calls ``GET /v1/exchange-rate/rates``. - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/hook-scripts/{id}``.""" return await self._client._call( - "GET", - "/v1/exchange-rate/rates", - m.GetAllExchangeRatesResponse, + "DELETE", + f"/v1/hook-scripts/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_exchange_rate( + async def list_hook_scripts( self, - currency_code: str, *, + page: int | None = None, + page_size: int | None = None, + subject: m.HookSubject | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetExchangeRateResponse: + ) -> m.ListHookScriptsResponse: """ - Get the current exchange rate for a specific currency (from USD) + Call ``GET /v1/hook-scripts``. - It calls ``GET /v1/exchange-rate/rate/{currencyCode}``. + Args: + subject: Unspecified lists VM scripts, which is the previous behavior. """ return await self._client._call( "GET", - f"/v1/exchange-rate/rate/{_path(currency_code)}", - m.GetExchangeRateResponse, - query=_query(extra_query), + "/v1/hook-scripts", + m.ListHookScriptsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("subject", subject)), body=None, idempotent=False, timeout=timeout, ) - async def list_supported_currencies( + async def list_hook_scripts_all( self, *, + page: int | None = None, + page_size: int | None = None, + subject: m.HookSubject | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListSupportedCurrenciesResponse: + ) -> AsyncIterator[m.HookScript]: """ - List all supported currency codes + Every result of :meth:`list_hook_scripts`, reading page after page. - It calls ``GET /v1/exchange-rate/currencies``. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_hook_scripts( + page=page, + page_size=size, + subject=subject, + extra_query=extra_query, + timeout=timeout, + ) + items = res.hook_scripts + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + async def upsert_hook_script( + self, + *, + enabled: bool | None = None, + hook: m.LifecycleHook | str | None = None, + script: str | None = None, + subject: m.HookSubject | str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.HookScript: + """ + Call ``PUT /v1/hook-scripts``. + + Args: + enabled: Omit to keep the stored value; create defaults to true + subject: LifecycleHook is the VM operation that triggers a provider hook script. """ return await self._client._call( - "GET", - "/v1/exchange-rate/currencies", - m.ListSupportedCurrenciesResponse, + "PUT", + "/v1/hook-scripts", + m.HookScript, query=_query(extra_query), - body=None, + body=_body( + m.UpsertHookScriptRequest, + extra_body, + False, + ("enabled", enabled), + ("hook", hook), + ("script", script), + ("subject", subject), + ), idempotent=False, timeout=timeout, ) -class AsyncFirewallService(_ServiceAsync): - """The NodeRings FirewallService API.""" +class AsyncIPAMService(_ServiceAsync): + """The NodeRings IPAMService API.""" - async def create_firewall_address_group( + async def add_reserved_ip( self, + prefix_id: str, *, - group: m.FirewallAddressGroupInput | dict[str, Any] | None = None, + ip_address: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateFirewallAddressGroupResponse: + ) -> m.SuccessResponse: """ - Call ``POST /v1/firewall/address-groups``. + IP Reservation (manage reserved_ips array in prefix) + + It calls ``POST /v1/ipam/prefixes/{prefixId}/reserved-ips``. Args: - group: FirewallAddressGroupInput is the client-provided payload for create/update. Clients must not provide id/timestamps (those are server-controlled). + ip_address: Must be within prefix CIDR """ return await self._client._call( "POST", - "/v1/firewall/address-groups", - m.CreateFirewallAddressGroupResponse, + f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.CreateFirewallAddressGroupRequest, extra_body, False, ("group", group)), + body=_body(m.AddReservedIPBody, extra_body, False, ("ip_address", ip_address)), idempotent=False, timeout=timeout, ) - async def create_firewall_rule( + async def add_reserved_prefix( self, - ruleset_id: str, + prefix_id: str, *, - rule: m.FirewallRuleInput | dict[str, Any] | None = None, + cidr: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateFirewallRuleResponse: + ) -> m.SuccessResponse: """ - Call ``POST /v1/firewall/rulesets/{rulesetId}/rules``. + Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-prefixes``. Args: - rule: FirewallRuleInput is the client-provided rule payload for create/update. Clients must not provide id/ruleset_id/timestamps (those are server-controlled). + cidr: Must match prefix vm_assignment_prefix_length exactly """ return await self._client._call( "POST", - f"/v1/firewall/rulesets/{_path(ruleset_id)}/rules", - m.CreateFirewallRuleResponse, + f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-prefixes", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.CreateFirewallRuleBody, extra_body, False, ("rule", rule)), + body=_body(m.AddReservedPrefixBody, extra_body, False, ("cidr", cidr)), idempotent=False, timeout=timeout, ) - async def create_firewall_rule_set( + async def assign_network_to_node( self, + network_id: str, *, - ruleset: m.FirewallRuleSetInput | dict[str, Any] | None = None, + node_ids: list[str] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateFirewallRuleSetResponse: - """Call ``POST /v1/firewall/rulesets``.""" - return await self._client._call( - "POST", - "/v1/firewall/rulesets", - m.CreateFirewallRuleSetResponse, - query=_query(extra_query), - body=_body(m.CreateFirewallRuleSetRequest, extra_body, False, ("ruleset", ruleset)), + ) -> m.SuccessResponse: + """ + Node-Network assignment + + It calls ``POST /v1/ipam/networks/{networkId}/assign-node``. + + Args: + node_ids: One or more node IDs to assign to this network + """ + return await self._client._call( + "POST", + f"/v1/ipam/networks/{_path(network_id)}/assign-node", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.AssignNetworkToNodeBody, extra_body, False, ("node_ids", node_ids)), idempotent=False, timeout=timeout, ) - async def delete_firewall_address_group( + async def clear_all_prefix_reserved_i_ps( self, - id: str, + prefix_id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/firewall/address-groups/{id}``.""" + """Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-ips/clear-all``.""" return await self._client._call( - "DELETE", - f"/v1/firewall/address-groups/{_path(id)}", + "POST", + f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/clear-all", m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.ClearAllPrefixReservedIPsBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def delete_firewall_rule( + async def create_network( + self, + *, + description: str | None = None, + dns_servers: list[str] | None = None, + mac_address_prefix: str | None = None, + name: str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """ + IPAM Network management + + It calls ``POST /v1/ipam/networks``. + + Args: + dns_servers: e.g., ["8.8.8.8", "8.8.4.4"] (can be any IPs) + mac_address_prefix: First 3 octets for MAC allocation within this network (e.g. BC:24:11). Default: BC:24:11. + """ + return await self._client._call( + "POST", + "/v1/ipam/networks", + m.SuccessResponse, + query=_query(extra_query), + body=_body( + m.CreateNetworkRequest, + extra_body, + False, + ("description", description), + ("dns_servers", dns_servers), + ("mac_address_prefix", mac_address_prefix), + ("name", name), + ), + idempotent=False, + timeout=timeout, + ) + + async def create_prefix( + self, + *, + allocation_strategy: m.AllocationStrategy | str | None = None, + cidr: str | None = None, + description: str | None = None, + gateway: str | None = None, + network_id: str | None = None, + reserved_ips: list[str] | None = None, + vm_assignment_prefix_length: int | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """ + Prefix management + + It calls ``POST /v1/ipam/prefixes``. + + Args: + cidr: e.g., "10.0.0.0/24" + gateway: e.g., "10.0.0.1" (must be within CIDR) + network_id: Optional: network this prefix belongs to (for DNS servers) + reserved_ips: e.g., ["10.0.0.100", "10.0.0.200"] (must be within CIDR) + vm_assignment_prefix_length: Required when cidr is IPv6 + """ + return await self._client._call( + "POST", + "/v1/ipam/prefixes", + m.SuccessResponse, + query=_query(extra_query), + body=_body( + m.CreatePrefixRequest, + extra_body, + False, + ("allocation_strategy", allocation_strategy), + ("cidr", cidr), + ("description", description), + ("gateway", gateway), + ("network_id", network_id), + ("reserved_ips", reserved_ips), + ("vm_assignment_prefix_length", vm_assignment_prefix_length), + ), + idempotent=False, + timeout=timeout, + ) + + async def delete_network( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/firewall/rules/{id}``.""" + """Call ``DELETE /v1/ipam/networks/{id}``.""" return await self._client._call( "DELETE", - f"/v1/firewall/rules/{_path(id)}", + f"/v1/ipam/networks/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -20848,121 +20157,138 @@ async def delete_firewall_rule( timeout=timeout, ) - async def delete_firewall_rule_set( + async def delete_prefix( self, id: str, *, - force: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/firewall/rulesets/{id}``.""" + """Call ``DELETE /v1/ipam/prefixes/{id}``.""" return await self._client._call( "DELETE", - f"/v1/firewall/rulesets/{_path(id)}", + f"/v1/ipam/prefixes/{_path(id)}", m.SuccessResponse, - query=_query(extra_query, ("force", force)), + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_firewall_address_group( + async def get_network( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallAddressGroup: - """Call ``GET /v1/firewall/address-groups/{id}``.""" + ) -> m.GetNetworkResponse: + """Call ``GET /v1/ipam/networks/{id}``.""" return await self._client._call( "GET", - f"/v1/firewall/address-groups/{_path(id)}", - m.FirewallAddressGroup, + f"/v1/ipam/networks/{_path(id)}", + m.GetNetworkResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_firewall_rule( + async def get_node_network( self, - id: str, + node_id: str, *, - direction: m.FirewallDirection | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallRuleResource: - """ - Call ``GET /v1/firewall/rules/{id}``. - - Args: - direction: Optional: Filter by direction. If not specified, returns the rule regardless of direction. - """ + ) -> m.GetNodeNetworkResponse: + """Call ``GET /v1/ipam/nodes/{nodeId}/network``.""" return await self._client._call( "GET", - f"/v1/firewall/rules/{_path(id)}", - m.FirewallRuleResource, - query=_query(extra_query, ("direction", direction)), + f"/v1/ipam/nodes/{_path(node_id)}/network", + m.GetNodeNetworkResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_firewall_rule_set( + async def get_prefix( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallRuleSet: - """Call ``GET /v1/firewall/rulesets/{id}``.""" + ) -> m.GetPrefixResponse: + """Call ``GET /v1/ipam/prefixes/{id}``.""" return await self._client._call( "GET", - f"/v1/firewall/rulesets/{_path(id)}", - m.FirewallRuleSet, + f"/v1/ipam/prefixes/{_path(id)}", + m.GetPrefixResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_firewall_address_groups( + async def get_prefix_utilization( + self, + prefix_id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetPrefixUtilizationResponse: + """ + Utility + + It calls ``GET /v1/ipam/prefixes/{prefixId}/utilization``. + """ + return await self._client._call( + "GET", + f"/v1/ipam/prefixes/{_path(prefix_id)}/utilization", + m.GetPrefixUtilizationResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def list_allocations( self, *, page: int | None = None, page_size: int | None = None, - name: str | None = None, + prefix_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListFirewallAddressGroupsResponse: + ) -> m.ListAllocationsResponse: """ - Call ``GET /v1/firewall/address-groups``. + IP Allocation (read-only - allocations are managed automatically) + + It calls ``GET /v1/ipam/allocations``. Args: - name: Note: family filter removed as address groups can now contain mixed IPv4/IPv6 + prefix_id: Filter by prefix ID (required for filtering allocations) """ return await self._client._call( "GET", - "/v1/firewall/address-groups", - m.ListFirewallAddressGroupsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("name", name)), + "/v1/ipam/allocations", + m.ListAllocationsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("prefixId", prefix_id)), body=None, idempotent=False, timeout=timeout, ) - async def list_firewall_address_groups_all( + async def list_allocations_all( self, *, page: int | None = None, page_size: int | None = None, - name: str | None = None, + prefix_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.FirewallAddressGroup]: + ) -> AsyncIterator[m.IPAllocation]: """ - Every result of :meth:`list_firewall_address_groups`, reading page after page. + Every result of :meth:`list_allocations`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -20970,65 +20296,92 @@ async def list_firewall_address_groups_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_firewall_address_groups( + res = await self.list_allocations( page=page, page_size=size, - name=name, + prefix_id=prefix_id, extra_query=extra_query, timeout=timeout, ) - items = res.groups + items = res.allocations for item in items: yield item seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + if len(items) < size: return page += 1 - async def list_firewall_rule_sets( + async def list_available_i_ps( self, + prefix_id: str, *, - page: int | None = None, - page_size: int | None = None, - name: str | None = None, - filter_attachment: m.FirewallRuleSetAttachmentFilter | str | None = None, + limit: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListFirewallRuleSetsResponse: + ) -> m.ListAvailableIPsResponse: """ - Call ``GET /v1/firewall/rulesets``. + Call ``GET /v1/ipam/prefixes/{prefixId}/available-ips``. Args: - filter_attachment: Optional: Filter by whether any virtual machine is attached to the ruleset. - FIREWALL_RULESET_ATTACHMENT_FILTER_UNSPECIFIED: All rulesets - FIREWALL_RULESET_ATTACHMENT_FILTER_ATTACHED: Rulesets with at least one VM attached - FIREWALL_RULESET_ATTACHMENT_FILTER_UNATTACHED: Rulesets with no VMs attached + limit: Limit number of IPs returned (default: 100) """ return await self._client._call( "GET", - "/v1/firewall/rulesets", - m.ListFirewallRuleSetsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("name", name), - ("filterAttachment", filter_attachment), - ), + f"/v1/ipam/prefixes/{_path(prefix_id)}/available-ips", + m.ListAvailableIPsResponse, + query=_query(extra_query, ("limit", limit)), body=None, idempotent=False, timeout=timeout, ) - async def list_firewall_rule_sets_all( + async def list_network_nodes( self, + network_id: str, *, - page: int | None = None, - page_size: int | None = None, - name: str | None = None, - filter_attachment: m.FirewallRuleSetAttachmentFilter | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.FirewallRuleSet]: + ) -> m.ListNetworkNodesResponse: + """Call ``GET /v1/ipam/networks/{networkId}/nodes``.""" + return await self._client._call( + "GET", + f"/v1/ipam/networks/{_path(network_id)}/nodes", + m.ListNetworkNodesResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def list_networks( + self, + *, + page: int | None = None, + page_size: int | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.ListNetworksResponse: + """Call ``GET /v1/ipam/networks``.""" + return await self._client._call( + "GET", + "/v1/ipam/networks", + m.ListNetworksResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def list_networks_all( + self, + *, + page: int | None = None, + page_size: int | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> AsyncIterator[m.Network]: """ - Every result of :meth:`list_firewall_rule_sets`, reading page after page. + Every result of :meth:`list_networks`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -21036,60 +20389,51 @@ async def list_firewall_rule_sets_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_firewall_rule_sets( + res = await self.list_networks( page=page, page_size=size, - name=name, - filter_attachment=filter_attachment, extra_query=extra_query, timeout=timeout, ) - items = res.rulesets + items = res.networks for item in items: yield item seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + if len(items) < size: return page += 1 - async def list_firewall_rules( + async def list_prefixes( self, - ruleset_id: str, *, page: int | None = None, page_size: int | None = None, - direction: m.FirewallDirection | str | None = None, + filter_network_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListFirewallRulesResponse: - """ - Call ``GET /v1/firewall/rulesets/{rulesetId}/rules``. - - Args: - direction: Optional: Filter by direction. If not specified, returns all rules regardless of direction. - """ + ) -> m.ListPrefixesResponse: + """Call ``GET /v1/ipam/prefixes``.""" return await self._client._call( "GET", - f"/v1/firewall/rulesets/{_path(ruleset_id)}/rules", - m.ListFirewallRulesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("direction", direction)), + "/v1/ipam/prefixes", + m.ListPrefixesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterNetworkId", filter_network_id)), body=None, idempotent=False, timeout=timeout, ) - async def list_firewall_rules_all( + async def list_prefixes_all( self, - ruleset_id: str, *, page: int | None = None, page_size: int | None = None, - direction: m.FirewallDirection | str | None = None, + filter_network_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.FirewallRuleResource]: + ) -> AsyncIterator[m.Prefix]: """ - Every result of :meth:`list_firewall_rules`, reading page after page. + Every result of :meth:`list_prefixes`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -21097,494 +20441,491 @@ async def list_firewall_rules_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_firewall_rules( - ruleset_id, + res = await self.list_prefixes( page=page, page_size=size, - direction=direction, + filter_network_id=filter_network_id, extra_query=extra_query, timeout=timeout, ) - items = res.rules + items = res.prefixes for item in items: yield item seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + if len(items) < size: return page += 1 - async def move_firewall_rule( + async def remove_reserved_ip( self, - id: str, + prefix_id: str, + ip_address: str, *, - position: m.FirewallRulePosition | str | None = None, - target_rule_id: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallRuleResource: - """ - Call ``POST /v1/firewall/rules/{id}/move``. - - Args: - target_rule_id: ID of the target rule to move relative to - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/ipam/prefixes/{prefixId}/reserved-ips/{ipAddress}``.""" return await self._client._call( - "POST", - f"/v1/firewall/rules/{_path(id)}/move", - m.FirewallRuleResource, + "DELETE", + f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/{_path(ip_address)}", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.MoveFirewallRuleBody, extra_body, False, ("position", position), ("target_rule_id", target_rule_id) - ), + body=None, idempotent=False, timeout=timeout, ) - async def update_firewall_address_group( + async def remove_reserved_prefix( self, - id: str, + prefix_id: str, *, - group: m.FirewallAddressGroupInput | dict[str, Any] | None = None, - extra_body: dict[str, Any] | None = None, + cidr: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallAddressGroup: - """ - Call ``PATCH /v1/firewall/address-groups/{id}``. - - Args: - group: FirewallAddressGroupInput is the client-provided payload for create/update. Clients must not provide id/timestamps (those are server-controlled). - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/ipam/prefixes/{prefixId}/reserved-prefixes``.""" return await self._client._call( - "PATCH", - f"/v1/firewall/address-groups/{_path(id)}", - m.FirewallAddressGroup, - query=_query(extra_query), - body=_body(m.UpdateFirewallAddressGroupBody, extra_body, False, ("group", group)), + "DELETE", + f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-prefixes", + m.SuccessResponse, + query=_query(extra_query, ("cidr", cidr)), + body=None, idempotent=False, timeout=timeout, ) - async def update_firewall_rule( + async def reserve_all_prefix_i_ps( self, - id: str, + prefix_id: str, *, - rule: m.FirewallRuleInput | dict[str, Any] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallRuleResource: - """ - Call ``PATCH /v1/firewall/rules/{id}``. - - Args: - rule: FirewallRuleInput is the client-provided rule payload for create/update. Clients must not provide id/ruleset_id/timestamps (those are server-controlled). - """ + ) -> m.SuccessResponse: + """Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-ips/reserve-all``.""" return await self._client._call( - "PATCH", - f"/v1/firewall/rules/{_path(id)}", - m.FirewallRuleResource, + "POST", + f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/reserve-all", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.UpdateFirewallRuleBody, extra_body, False, ("rule", rule)), + body=_body(m.ReserveAllPrefixIPsBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def update_firewall_rule_set( + async def unassign_network_from_node( self, - id: str, + node_id: str, *, - ruleset: m.FirewallRuleSetInput | dict[str, Any] | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallRuleSet: - """Call ``PATCH /v1/firewall/rulesets/{id}``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/ipam/nodes/{nodeId}/unassign-network``.""" return await self._client._call( - "PATCH", - f"/v1/firewall/rulesets/{_path(id)}", - m.FirewallRuleSet, + "POST", + f"/v1/ipam/nodes/{_path(node_id)}/unassign-network", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.UpdateFirewallRuleSetBody, extra_body, False, ("ruleset", ruleset)), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncGameServerService(_ServiceAsync): - """The NodeRings GameServerService API.""" - - async def archive_files( + async def update_network( self, id: str, *, - files: list[str] | None = None, - root: str | None = None, + description: str | None = None, + dns_servers: list[str] | None = None, + mac_address_prefix: str | None = None, + name: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ArchiveFilesResponse: - """Call ``POST /v1/game-servers/{id}/files:archive``.""" + ) -> m.UpdateNetworkResponse: + """ + Call ``PATCH /v1/ipam/networks/{id}``. + + Args: + mac_address_prefix: First 3 octets for MAC allocation within this network. Empty = leave unchanged on update. + """ return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:archive", - m.ArchiveFilesResponse, + "PATCH", + f"/v1/ipam/networks/{_path(id)}", + m.UpdateNetworkResponse, query=_query(extra_query), - body=_body(m.ArchiveFilesBody, extra_body, False, ("files", files), ("root", root)), + body=_body( + m.UpdateNetworkBody, + extra_body, + False, + ("description", description), + ("dns_servers", dns_servers), + ("mac_address_prefix", mac_address_prefix), + ("name", name), + ), idempotent=False, timeout=timeout, ) - async def change_game_server_game( + async def update_prefix( self, id: str, *, - accept_eula: bool | None = None, - environment: dict[str, str] | None = None, - template_id: str | None = None, + allocation_strategy: m.AllocationStrategy | str | None = None, + description: str | None = None, + gateway: str | None = None, + network_id: str | None = None, + reserved_ips: list[str] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServer: - """Call ``POST /v1/game-servers/{id}:changeGame``.""" + ) -> m.UpdatePrefixResponse: + """Call ``PATCH /v1/ipam/prefixes/{id}``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}:changeGame", - m.GameServer, + "PATCH", + f"/v1/ipam/prefixes/{_path(id)}", + m.UpdatePrefixResponse, query=_query(extra_query), body=_body( - m.ChangeGameServerGameBody, + m.UpdatePrefixBody, extra_body, False, - ("accept_eula", accept_eula), - ("environment", environment), - ("template_id", template_id), + ("allocation_strategy", allocation_strategy), + ("description", description), + ("gateway", gateway), + ("network_id", network_id), + ("reserved_ips", reserved_ips), ), idempotent=False, timeout=timeout, ) - async def copy_file( + +class AsyncInstantAppService(_ServiceAsync): + """The NodeRings InstantAppService API.""" + + async def get_instant_app( self, id: str, *, - location: str | None = None, - extra_body: dict[str, Any] | None = None, + slug: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/files:copy``.""" + ) -> m.InstantApp: + """Call ``GET /v1/instantapps/{id}``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:copy", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.CopyFileBody, extra_body, False, ("location", location)), + "GET", + f"/v1/instantapps/{_path(id)}", + m.InstantApp, + query=_query(extra_query, ("slug", slug)), + body=None, idempotent=False, timeout=timeout, ) - async def create_allocation( + async def get_instant_app_2( self, - id: str, + slug: str, *, - extra_body: dict[str, Any] | None = None, + id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerAllocation: - """Call ``POST /v1/game-servers/{id}/allocations``.""" + ) -> m.InstantApp: + """ + Call ``GET /v1/instantapps/slug/{slug}``. + + Args: + id: Exactly one of id or slug must be set. + """ return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/allocations", - m.GameServerAllocation, - query=_query(extra_query), - body=_body(m.CreateAllocationBody, extra_body, False), + "GET", + f"/v1/instantapps/slug/{_path(slug)}", + m.InstantApp, + query=_query(extra_query, ("id", id)), + body=None, idempotent=False, timeout=timeout, ) - async def create_backup( + async def list_instant_apps( self, - id: str, *, - name: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + query: str | None = None, + categories: list[str] | None = None, + distro: m.Distro | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerBackup: - """Call ``POST /v1/game-servers/{id}/backups``.""" + ) -> m.ListInstantAppsResponse: + """ + Call ``GET /v1/instantapps``. + + Args: + page_size: -1 returns all apps (create/reinstall picker); otherwise 1..100. + query: Case-insensitive match on name or slug. + categories: Filter: app must include all listed categories when non-empty. + distro: - DISTRO_UBUNTU_22_04: Ubuntu distributions - DISTRO_FEDORA_43: Fedora distributions - DISTRO_DEBIAN_12: Debian distributions - DISTRO_CENTOS_9: CentOS distributions - DISTRO_ROCKY_9: Rocky Linux distributions - DISTRO_ALMALINUX_9: AlmaLinux distributions + """ return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/backups", - m.GameServerBackup, - query=_query(extra_query), - body=_body(m.CreateBackupBody, extra_body, False, ("name", name)), + "GET", + "/v1/instantapps", + m.ListInstantAppsResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("query", query), + ("categories", categories), + ("distro", distro), + ), + body=None, idempotent=False, timeout=timeout, ) - async def create_database( + async def list_instant_apps_all( self, - id: str, *, - database: str | None = None, - remote: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + query: str | None = None, + categories: list[str] | None = None, + distro: m.Distro | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerDatabase: - """Call ``POST /v1/game-servers/{id}/databases``.""" - return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/databases", - m.GameServerDatabase, - query=_query(extra_query), - body=_body(m.CreateDatabaseBody, extra_body, False, ("database", database), ("remote", remote)), - idempotent=False, - timeout=timeout, - ) + ) -> AsyncIterator[m.InstantApp]: + """ + Every result of :meth:`list_instant_apps`, reading page after page. - async def create_folder( + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_instant_apps( + page=page, + page_size=size, + query=query, + categories=categories, + distro=distro, + extra_query=extra_query, + timeout=timeout, + ) + items = res.instant_apps + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + +class AsyncInviteService(_ServiceAsync): + """The NodeRings InviteService API.""" + + async def accept_invite( self, - id: str, *, - name: str | None = None, - root: str | None = None, - extra_body: dict[str, Any] | None = None, + invite_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/files:folder``.""" + """Call ``GET /v1/invites/accept``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:folder", + "GET", + "/v1/invites/accept", m.SuccessResponse, - query=_query(extra_query), - body=_body(m.CreateFolderBody, extra_body, False, ("name", name), ("root", root)), + query=_query(extra_query, ("inviteId", invite_id)), + body=None, idempotent=False, timeout=timeout, ) - async def create_game_server( + async def create_invite( self, *, - accept_eula: bool | None = None, - environment: dict[str, str] | None = None, - idempotency_key: str | None = None, - name: str | None = None, - plan_id: str | None = None, - provider_organization_id: str | None = None, - region_id: str | None = None, - template_id: str | None = None, - version_value: str | None = None, + group_id: str | None = None, + invitee_emails: list[str] | None = None, + role_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServer: - """ - Call ``POST /v1/game-servers``. A retry of the same call cannot create a second resource: - the SDK sends an idempotency key. - - Args: - accept_eula: accept_eula is the customer's agreement. Required when the egg has the EULA mark. - environment: environment overrides egg defaults. Only user-editable variables are accepted. - idempotency_key: A UUID that makes the create safe to retry. If you leave it out, the SDK sets a new one. - """ + ) -> m.SuccessResponse: + """Call ``POST /v1/invites``.""" return await self._client._call( "POST", - "/v1/game-servers", - m.GameServer, + "/v1/invites", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.CreateGameServerRequest, + m.CreateInviteRequest, extra_body, - True, - ("accept_eula", accept_eula), - ("environment", environment), - ("idempotency_key", idempotency_key), - ("name", name), - ("plan_id", plan_id), - ("provider_organization_id", provider_organization_id), - ("region_id", region_id), - ("template_id", template_id), - ("version_value", version_value), + False, + ("group_id", group_id), + ("invitee_emails", invitee_emails), + ("role_id", role_id), ), - idempotent=True, + idempotent=False, timeout=timeout, ) - async def create_schedule( + async def decline_invite( self, - id: str, *, - day_of_month: str | None = None, - day_of_week: str | None = None, - hour: str | None = None, - is_active: bool | None = None, - minute: str | None = None, - month: str | None = None, - name: str | None = None, - only_when_online: bool | None = None, - extra_body: dict[str, Any] | None = None, + invite_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerSchedule: - """ - Call ``POST /v1/game-servers/{id}/schedules``. - - Args: - is_active: Omitted means the schedule is created enabled. - """ + ) -> m.SuccessResponse: + """Call ``GET /v1/invites/decline``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/schedules", - m.GameServerSchedule, - query=_query(extra_query), - body=_body( - m.CreateScheduleBody, - extra_body, - False, - ("day_of_month", day_of_month), - ("day_of_week", day_of_week), - ("hour", hour), - ("is_active", is_active), - ("minute", minute), - ("month", month), - ("name", name), - ("only_when_online", only_when_online), - ), + "GET", + "/v1/invites/decline", + m.SuccessResponse, + query=_query(extra_query, ("inviteId", invite_id)), + body=None, idempotent=False, timeout=timeout, ) - async def create_schedule_task( + async def delete_invite( self, id: str, - schedule_id: str, *, - action: str | None = None, - continue_on_failure: bool | None = None, - payload: str | None = None, - time_offset: int | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}/tasks``.""" + """Call ``DELETE /v1/invites/{id}``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks", + "DELETE", + f"/v1/invites/{_path(id)}", m.SuccessResponse, query=_query(extra_query), - body=_body( - m.CreateScheduleTaskBody, - extra_body, - False, - ("action", action), - ("continue_on_failure", continue_on_failure), - ("payload", payload), - ("time_offset", time_offset), - ), + body=None, idempotent=False, timeout=timeout, ) - async def delete_allocation( + async def list_invites( self, - id: str, - allocation_id: str, *, + page: int | None = None, + page_size: int | None = None, + filter_email: str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/game-servers/{id}/allocations/{allocationId}``.""" + ) -> m.ListInvitesResponse: + """Call ``GET /v1/invites``.""" return await self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}", - m.SuccessResponse, - query=_query(extra_query), + "GET", + "/v1/invites", + m.ListInvitesResponse, + query=_query( + extra_query, ("page", page), ("pageSize", page_size), ("filterEmail", filter_email), ("search", search) + ), body=None, idempotent=False, timeout=timeout, ) - async def delete_backup( + async def list_invites_all( self, - id: str, - backup_uuid: str, *, - truncate: bool | None = None, + page: int | None = None, + page_size: int | None = None, + filter_email: str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> AsyncIterator[m.Invite]: """ - Call ``DELETE /v1/game-servers/{id}/backups/{backupUuid}``. + Every result of :meth:`list_invites`, reading page after page. - Args: - truncate: Restore only. When true, the panel deletes every file before extracting the backup. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - return await self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}", - m.SuccessResponse, - query=_query(extra_query, ("truncate", truncate)), - body=None, - idempotent=False, - timeout=timeout, - ) + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_invites( + page=page, + page_size=size, + filter_email=filter_email, + search=search, + extra_query=extra_query, + timeout=timeout, + ) + items = res.invites + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 - async def delete_database( + async def list_my_invites( self, - id: str, - database_id: str, *, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/game-servers/{id}/databases/{databaseId}``.""" + ) -> m.ListMyInvitesResponse: + """Call ``GET /v1/invites/me``.""" return await self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}/databases/{_path(database_id)}", - m.SuccessResponse, - query=_query(extra_query), + "GET", + "/v1/invites/me", + m.ListMyInvitesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - async def delete_files( + async def list_my_invites_all( self, - id: str, *, - files: list[str] | None = None, - root: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/files:delete``.""" - return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:delete", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.DeleteFilesBody, extra_body, False, ("files", files), ("root", root)), - idempotent=False, - timeout=timeout, - ) + ) -> AsyncIterator[m.Invite]: + """ + Every result of :meth:`list_my_invites`, reading page after page. - async def delete_game_server( + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_my_invites( + page=page, + page_size=size, + extra_query=extra_query, + timeout=timeout, + ) + items = res.invites + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + async def resend_invite( self, - id: str, + invite_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/game-servers/{id}``.""" + """Call ``POST /v1/invites/resend/{inviteId}``.""" return await self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}", + "POST", + f"/v1/invites/resend/{_path(invite_id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -21592,3976 +20933,862 @@ async def delete_game_server( timeout=timeout, ) - async def delete_schedule( + async def update_invite( self, - id: str, - schedule_id: str, *, + group_id: str | None = None, + invite_id: str | None = None, + role_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/game-servers/{id}/schedules/{scheduleId}``.""" + """Call ``PATCH /v1/invites``.""" return await self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}", + "PATCH", + "/v1/invites", m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body( + m.UpdateInviteRequest, + extra_body, + False, + ("group_id", group_id), + ("invite_id", invite_id), + ("role_id", role_id), + ), idempotent=False, timeout=timeout, ) - async def delete_schedule_task( + +class AsyncInvoiceService(_ServiceAsync): + """The NodeRings InvoiceService API.""" + + async def get_invoice( self, - id: str, - schedule_id: str, - task_id: str, + invoice_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/game-servers/{id}/schedules/{scheduleId}/tasks/{taskId}``.""" + ) -> m.GetInvoiceResponse: + """ + GetInvoice retrieves a single invoice with line items + + It calls ``GET /v1/invoices/{invoiceId}``. + """ return await self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks/{_path(task_id)}", - m.SuccessResponse, + "GET", + f"/v1/invoices/{_path(invoice_id)}", + m.GetInvoiceResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def download_file( + async def list_invoices( self, - id: str, *, - path: str | None = None, + subscription_id: str | None = None, + status: m.InvoiceStatus | str | None = None, + page: int | None = None, + page_size: int | None = None, + order_by: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DownloadFileResponse: - """Call ``GET /v1/game-servers/{id}/files/download``.""" + ) -> m.ListInvoicesResponse: + """ + ListInvoices lists invoices for a subscription or organization + + It calls ``GET /v1/invoices``. + """ return await self._client._call( "GET", - f"/v1/game-servers/{_path(id)}/files/download", - m.DownloadFileResponse, - query=_query(extra_query, ("path", path)), + "/v1/invoices", + m.ListInvoicesResponse, + query=_query( + extra_query, + ("subscriptionId", subscription_id), + ("status", status), + ("page", page), + ("pageSize", page_size), + ("orderBy", order_by), + ), body=None, idempotent=False, timeout=timeout, ) - async def execute_schedule( + async def list_invoices_all( self, - id: str, - schedule_id: str, *, - extra_body: dict[str, Any] | None = None, + subscription_id: str | None = None, + status: m.InvoiceStatus | str | None = None, + page: int | None = None, + page_size: int | None = None, + order_by: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}:execute``.""" - return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}:execute", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.ExecuteScheduleBody, extra_body, False), - idempotent=False, - timeout=timeout, - ) + ) -> AsyncIterator[m.Invoice]: + """ + Every result of :meth:`list_invoices`, reading page after page. - async def get_game_server( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GameServer: - """Call ``GET /v1/game-servers/{id}``.""" - return await self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}", - m.GameServer, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_invoices( + page=page, + page_size=size, + subscription_id=subscription_id, + status=status, + order_by=order_by, + extra_query=extra_query, + timeout=timeout, + ) + items = res.invoices + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 - async def get_game_server_resources( + async def pay_invoice( self, - id: str, + invoice_id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerResources: - """Call ``GET /v1/game-servers/{id}/resources``.""" + ) -> m.PayInvoiceResponse: + """ + PayInvoice charges the organization's default card for an open or past-due invoice and + returns the updated invoice. Idempotent when the invoice is already paid. + + It calls ``POST /v1/invoices/{invoiceId}:pay``. + """ return await self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/resources", - m.GameServerResources, + "POST", + f"/v1/invoices/{_path(invoice_id)}:pay", + m.PayInvoiceResponse, query=_query(extra_query), - body=None, + body=_body(m.PayInvoiceBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def get_startup( + +class AsyncLiveValidationService(_ServiceAsync): + """The NodeRings LiveValidationService API.""" + + async def delete_plan_live_validation( self, - id: str, + plan_id: str, *, + node_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetStartupResponse: - """Call ``GET /v1/game-servers/{id}/startup``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/provider/plans/{planId}/live-validation``.""" return await self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/startup", - m.GetStartupResponse, - query=_query(extra_query), + "DELETE", + f"/v1/provider/plans/{_path(plan_id)}/live-validation", + m.SuccessResponse, + query=_query(extra_query, ("nodeId", node_id)), body=None, idempotent=False, timeout=timeout, ) - async def list_allocations( + async def get_plan_live_validation( self, - id: str, + plan_id: str, *, + node_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListGameServerAllocationsResponse: - """Call ``GET /v1/game-servers/{id}/allocations``.""" + ) -> m.GetPlanLiveValidationResponse: + """Call ``GET /v1/provider/plans/{planId}/live-validation``.""" return await self._client._call( "GET", - f"/v1/game-servers/{_path(id)}/allocations", - m.ListGameServerAllocationsResponse, - query=_query(extra_query), + f"/v1/provider/plans/{_path(plan_id)}/live-validation", + m.GetPlanLiveValidationResponse, + query=_query(extra_query, ("nodeId", node_id)), body=None, idempotent=False, timeout=timeout, ) - async def list_backups( + async def list_eligible_nodes_for_plan( self, - id: str, + plan_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListGameServerBackupsResponse: - """Call ``GET /v1/game-servers/{id}/backups``.""" + ) -> m.ListEligibleNodesForPlanResponse: + """Call ``GET /v1/provider/plans/{planId}/live-validation/nodes``.""" return await self._client._call( "GET", - f"/v1/game-servers/{_path(id)}/backups", - m.ListGameServerBackupsResponse, + f"/v1/provider/plans/{_path(plan_id)}/live-validation/nodes", + m.ListEligibleNodesForPlanResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_databases( + async def list_plan_live_validation_benchmarks( self, - id: str, + plan_id: str, *, + node_id: str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDatabasesResponse: - """Call ``GET /v1/game-servers/{id}/databases``.""" + ) -> m.ListPlanLiveValidationBenchmarksResponse: + """Call ``GET /v1/provider/plans/{planId}/live-validation/benchmarks``.""" return await self._client._call( "GET", - f"/v1/game-servers/{_path(id)}/databases", - m.ListDatabasesResponse, - query=_query(extra_query), + f"/v1/provider/plans/{_path(plan_id)}/live-validation/benchmarks", + m.ListPlanLiveValidationBenchmarksResponse, + query=_query(extra_query, ("nodeId", node_id), ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - async def list_files( + async def list_plan_live_validation_benchmarks_all( self, - id: str, + plan_id: str, *, - directory: str | None = None, + node_id: str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListFilesResponse: - """Call ``GET /v1/game-servers/{id}/files``.""" - return await self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/files", - m.ListFilesResponse, - query=_query(extra_query, ("directory", directory)), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> AsyncIterator[m.PlanLiveValidationBenchmarkView]: + """ + Every result of :meth:`list_plan_live_validation_benchmarks`, reading page after page. - async def list_game_servers( + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_plan_live_validation_benchmarks( + plan_id, + page=page, + page_size=size, + node_id=node_id, + extra_query=extra_query, + timeout=timeout, + ) + items = res.benchmarks + for item in items: + yield item + seen += len(items) + if len(items) < size: + return + page += 1 + + async def list_plan_live_validations( self, *, + plan_id: str | None = None, + search: str | None = None, + page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListGameServersResponse: - """Call ``GET /v1/game-servers``.""" + ) -> m.ListPlanLiveValidationsResponse: + """Call ``GET /v1/provider/live-validations``.""" return await self._client._call( "GET", - "/v1/game-servers", - m.ListGameServersResponse, - query=_query(extra_query, ("pageSize", page_size)), + "/v1/provider/live-validations", + m.ListPlanLiveValidationsResponse, + query=_query(extra_query, ("planId", plan_id), ("search", search), ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - async def list_order_games( + async def list_plan_live_validations_all( self, *, plan_id: str | None = None, + search: str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListOrderGamesResponse: - """Call ``GET /v1/game-servers:order-games``.""" - return await self._client._call( - "GET", - "/v1/game-servers:order-games", - m.ListOrderGamesResponse, - query=_query(extra_query, ("planId", plan_id)), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> AsyncIterator[m.PlanLiveValidationView]: + """ + Every result of :meth:`list_plan_live_validations`, reading page after page. - async def list_schedules( + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_plan_live_validations( + page=page, + page_size=size, + plan_id=plan_id, + search=search, + extra_query=extra_query, + timeout=timeout, + ) + items = res.validations + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + async def start_plan_live_validation( self, - id: str, + plan_id: str, *, + include_benchmarking: bool | None = None, + node_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListSchedulesResponse: - """Call ``GET /v1/game-servers/{id}/schedules``.""" + ) -> m.StartPlanLiveValidationResponse: + """Call ``POST /v1/provider/plans/{planId}/live-validation``.""" return await self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/schedules", - m.ListSchedulesResponse, + "POST", + f"/v1/provider/plans/{_path(plan_id)}/live-validation", + m.StartPlanLiveValidationResponse, query=_query(extra_query), - body=None, + body=_body( + m.StartPlanLiveValidationBody, + extra_body, + False, + ("include_benchmarking", include_benchmarking), + ("node_id", node_id), + ), idempotent=False, timeout=timeout, ) - async def lock_backup( + +class AsyncManualPayoutService(_ServiceAsync): + """The NodeRings ManualPayoutService API.""" + + async def create_manual_payout( self, - id: str, - backup_uuid: str, *, - truncate: bool | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Call ``POST /v1/game-servers/{id}/backups/{backupUuid}:lock``. + account_holder_name: str | None = None, + account_number: str | None = None, + bank_name: str | None = None, + bic: str | None = None, + country: str | None = None, + iban: str | None = None, + notes: str | None = None, + routing_number: str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.CreateManualPayoutResponse: + """ + Call ``POST /v1/provider/manual-payout``. Args: - truncate: Restore only. When true, the panel deletes every file before extracting the backup. + account_holder_name: Name of the account holder + account_number: Bank account number (for non-SEPA countries) + bank_name: Name of the bank + bic: Bank Identifier Code / SWIFT code (for SEPA countries) + country: ISO 3166-1 alpha-2 country code (e.g., "US", "GB", "DE") + iban: International Bank Account Number (for SEPA countries) + notes: User-provided notes about the payout account + routing_number: Routing number (for US accounts) or sort code (for UK accounts) """ return await self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}:lock", - m.SuccessResponse, + "/v1/provider/manual-payout", + m.CreateManualPayoutResponse, query=_query(extra_query), - body=_body(m.LockBackupBody, extra_body, False, ("truncate", truncate)), + body=_body( + m.CreateManualPayoutRequest, + extra_body, + False, + ("account_holder_name", account_holder_name), + ("account_number", account_number), + ("bank_name", bank_name), + ("bic", bic), + ("country", country), + ("iban", iban), + ("notes", notes), + ("routing_number", routing_number), + ), idempotent=False, timeout=timeout, ) - async def open_console( + async def delete_manual_payout( self, - id: str, *, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.OpenConsoleResponse: - """Call ``POST /v1/game-servers/{id}:console``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/provider/manual-payout``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}:console", - m.OpenConsoleResponse, + "DELETE", + "/v1/provider/manual-payout", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.OpenConsoleBody, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - async def power_game_server( + async def get_manual_payout( self, - id: str, *, - signal: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServer: - """Call ``POST /v1/game-servers/{id}:power``.""" + ) -> m.GetManualPayoutResponse: + """Call ``GET /v1/provider/manual-payout``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}:power", - m.GameServer, + "GET", + "/v1/provider/manual-payout", + m.GetManualPayoutResponse, query=_query(extra_query), - body=_body(m.PowerGameServerBody, extra_body, False, ("signal", signal)), + body=None, idempotent=False, timeout=timeout, ) - async def read_file( + +class AsyncMarketplaceService(_ServiceAsync): + """The NodeRings MarketplaceService API.""" + + async def get_marketplace_plan( self, - id: str, + plan_id: str, *, - path: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ReadFileResponse: - """Call ``GET /v1/game-servers/{id}/files/content``.""" + ) -> m.GetMarketplacePlanResponse: + """Call ``GET /v1/marketplace/plans/{planId}``.""" return await self._client._call( "GET", - f"/v1/game-servers/{_path(id)}/files/content", - m.ReadFileResponse, - query=_query(extra_query, ("path", path)), + f"/v1/marketplace/plans/{_path(plan_id)}", + m.GetMarketplacePlanResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def reinstall_game_server( + async def get_provider( self, - id: str, + provider_id: str, *, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServer: - """Call ``POST /v1/game-servers/{id}:reinstall``.""" + ) -> m.GetProviderResponse: + """Call ``GET /v1/marketplace/providers/{providerId}``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}:reinstall", - m.GameServer, + "GET", + f"/v1/marketplace/providers/{_path(provider_id)}", + m.GetProviderResponse, query=_query(extra_query), - body=_body(m.ReinstallGameServerBody, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - async def rename_file( + async def get_public_storefront( self, - id: str, + slug: str, *, - dest: str | None = None, - root: str | None = None, - source: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/files:rename``.""" + ) -> m.GetPublicStorefrontResponse: + """Call ``GET /v1/public/storefronts/{slug}``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:rename", - m.SuccessResponse, + "GET", + f"/v1/public/storefronts/{_path(slug)}", + m.GetPublicStorefrontResponse, query=_query(extra_query), - body=_body(m.RenameFileBody, extra_body, False, ("dest", dest), ("root", root), ("source", source)), + body=None, idempotent=False, timeout=timeout, ) - async def rename_game_server( + async def get_public_storefront_by_id( self, - id: str, + provider_id: str, *, - name: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServer: - """Call ``POST /v1/game-servers/{id}:rename``.""" + ) -> m.GetPublicStorefrontResponse: + """Call ``GET /v1/public/storefronts/by-id/{providerId}``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}:rename", - m.GameServer, + "GET", + f"/v1/public/storefronts/by-id/{_path(provider_id)}", + m.GetPublicStorefrontResponse, query=_query(extra_query), - body=_body(m.RenameGameServerBody, extra_body, False, ("name", name)), + body=None, idempotent=False, timeout=timeout, ) - async def restore_backup( + async def list_available_addons( self, - id: str, - backup_uuid: str, *, - truncate: bool | None = None, - extra_body: dict[str, Any] | None = None, + filter_provider_id: str | None = None, + vm_id: str | None = None, + filter_addon_type: m.AddonType | str | None = None, + filter_billing_type: m.BillingType | str | None = None, + search: str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> m.ListAvailableAddonsResponse: """ - Call ``POST /v1/game-servers/{id}/backups/{backupUuid}:restore``. + Call ``GET /v1/marketplace/addons``. Args: - truncate: Restore only. When true, the panel deletes every file before extracting the backup. + filter_billing_type: - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) """ return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}:restore", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.GameServerRestoreBackupBody, extra_body, False, ("truncate", truncate)), + "GET", + "/v1/marketplace/addons", + m.ListAvailableAddonsResponse, + query=_query( + extra_query, + ("filterProviderId", filter_provider_id), + ("vmId", vm_id), + ("filterAddonType", filter_addon_type), + ("filterBillingType", filter_billing_type), + ("search", search), + ("page", page), + ("pageSize", page_size), + ), + body=None, idempotent=False, timeout=timeout, ) - async def rotate_database_password( + async def list_available_addons_all( self, - id: str, - database_id: str, *, - extra_body: dict[str, Any] | None = None, + filter_provider_id: str | None = None, + vm_id: str | None = None, + filter_addon_type: m.AddonType | str | None = None, + filter_billing_type: m.BillingType | str | None = None, + search: str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerDatabase: - """Call ``POST /v1/game-servers/{id}/databases/{databaseId}:rotate``.""" - return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/databases/{_path(database_id)}:rotate", - m.GameServerDatabase, - query=_query(extra_query), - body=_body(m.RotateDatabasePasswordBody, extra_body, False), - idempotent=False, - timeout=timeout, - ) + ) -> AsyncIterator[m.Addon]: + """ + Every result of :meth:`list_available_addons`, reading page after page. - async def set_primary_allocation( + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_available_addons( + page=page, + page_size=size, + filter_provider_id=filter_provider_id, + vm_id=vm_id, + filter_addon_type=filter_addon_type, + filter_billing_type=filter_billing_type, + search=search, + extra_query=extra_query, + timeout=timeout, + ) + items = res.addons + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + async def list_available_plans( self, - id: str, - allocation_id: str, *, - extra_body: dict[str, Any] | None = None, + filter_country: str | None = None, + filter_city: str | None = None, + filter_billing_type: m.BillingType | str | None = None, + filter_compute_type: m.ComputeType | str | None = None, + filter_compute_category: m.ComputeCategory | str | None = None, + filter_asset_type: m.AssetType | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/allocations/{allocationId}:primary``.""" - return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}:primary", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.SetPrimaryAllocationBody, extra_body, False), - idempotent=False, - timeout=timeout, - ) - - async def update_allocation( - self, - id: str, - allocation_id: str, - *, - notes: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerAllocation: - """Call ``POST /v1/game-servers/{id}/allocations/{allocationId}``.""" - return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}", - m.GameServerAllocation, - query=_query(extra_query), - body=_body(m.UpdateAllocationBody, extra_body, False, ("notes", notes)), - idempotent=False, - timeout=timeout, - ) - - async def update_docker_image( - self, - id: str, - *, - docker_image: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``PUT /v1/game-servers/{id}/docker-image``.""" - return await self._client._call( - "PUT", - f"/v1/game-servers/{_path(id)}/docker-image", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.UpdateDockerImageBody, extra_body, False, ("docker_image", docker_image)), - idempotent=False, - timeout=timeout, - ) - - async def update_schedule( - self, - id: str, - schedule_id: str, - *, - day_of_month: str | None = None, - day_of_week: str | None = None, - hour: str | None = None, - is_active: bool | None = None, - minute: str | None = None, - month: str | None = None, - name: str | None = None, - only_when_online: bool | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerSchedule: - """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}``.""" - return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}", - m.GameServerSchedule, - query=_query(extra_query), - body=_body( - m.UpdateScheduleBody, - extra_body, - False, - ("day_of_month", day_of_month), - ("day_of_week", day_of_week), - ("hour", hour), - ("is_active", is_active), - ("minute", minute), - ("month", month), - ("name", name), - ("only_when_online", only_when_online), - ), - idempotent=False, - timeout=timeout, - ) - - async def update_schedule_task( - self, - id: str, - schedule_id: str, - task_id: str, - *, - action: str | None = None, - continue_on_failure: bool | None = None, - payload: str | None = None, - sequence_id: int | None = None, - time_offset: int | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}/tasks/{taskId}``. - - Args: - sequence_id: Omitted leaves the task where it is. Set it to move the task in the run order. - """ - return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks/{_path(task_id)}", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.UpdateScheduleTaskBody, - extra_body, - False, - ("action", action), - ("continue_on_failure", continue_on_failure), - ("payload", payload), - ("sequence_id", sequence_id), - ("time_offset", time_offset), - ), - idempotent=False, - timeout=timeout, - ) - - async def update_startup_variable( - self, - id: str, - *, - key: str | None = None, - value: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``PUT /v1/game-servers/{id}/startup``.""" - return await self._client._call( - "PUT", - f"/v1/game-servers/{_path(id)}/startup", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.UpdateStartupVariableBody, extra_body, False, ("key", key), ("value", value)), - idempotent=False, - timeout=timeout, - ) - - async def upload_file( - self, - id: str, - *, - content: bytes | None = None, - directory: str | None = None, - filename: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/files:upload``.""" - return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:upload", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.UploadFileBody, - extra_body, - False, - ("content", content), - ("directory", directory), - ("filename", filename), - ), - idempotent=False, - timeout=timeout, - ) - - async def write_file( - self, - id: str, - *, - content: bytes | None = None, - path: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``PUT /v1/game-servers/{id}/files``.""" - return await self._client._call( - "PUT", - f"/v1/game-servers/{_path(id)}/files", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.WriteFileBody, extra_body, False, ("content", content), ("path", path)), - idempotent=False, - timeout=timeout, - ) - - -class AsyncGameServerTemplateService(_ServiceAsync): - """The NodeRings GameServerTemplateService API.""" - - async def duplicate_game_server_template( - self, - id: str, - *, - name: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerTemplate: - """Call ``POST /v1/game-server-templates/{id}:duplicate``.""" - return await self._client._call( - "POST", - f"/v1/game-server-templates/{_path(id)}:duplicate", - m.GameServerTemplate, - query=_query(extra_query), - body=_body(m.DuplicateGameServerTemplateBody, extra_body, False, ("name", name)), - idempotent=False, - timeout=timeout, - ) - - async def import_game_server_template( - self, - *, - docker_image: str | None = None, - egg_id: int | None = None, - icon: str | None = None, - name: str | None = None, - nest_id: int | None = None, - platform_id: str | None = None, - startup: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerTemplate: - """Call ``POST /v1/game-server-templates:import``.""" - return await self._client._call( - "POST", - "/v1/game-server-templates:import", - m.GameServerTemplate, - query=_query(extra_query), - body=_body( - m.ImportGameServerTemplateRequest, - extra_body, - False, - ("docker_image", docker_image), - ("egg_id", egg_id), - ("icon", icon), - ("name", name), - ("nest_id", nest_id), - ("platform_id", platform_id), - ("startup", startup), - ), - idempotent=False, - timeout=timeout, - ) - - async def list_game_server_templates( - self, - *, - platform_id: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListGameServerTemplatesResponse: - """Call ``GET /v1/game-server-templates``.""" - return await self._client._call( - "GET", - "/v1/game-server-templates", - m.ListGameServerTemplatesResponse, - query=_query(extra_query, ("platformId", platform_id)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def set_game_nest_ordering( - self, - *, - catalog_key: str | None = None, - ordering_enabled: bool | None = None, - platform_id: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/game-server-templates:nest-ordering``.""" - return await self._client._call( - "POST", - "/v1/game-server-templates:nest-ordering", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.SetGameNestOrderingRequest, - extra_body, - False, - ("catalog_key", catalog_key), - ("ordering_enabled", ordering_enabled), - ("platform_id", platform_id), - ), - idempotent=False, - timeout=timeout, - ) - - async def update_game_server_template( - self, - id: str, - *, - confirmed: bool | None = None, - docker_image: str | None = None, - egg_id: int | None = None, - hidden: bool | None = None, - icon: str | None = None, - nest_id: int | None = None, - ordering_enabled: bool | None = None, - startup: str | None = None, - version_variable: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerTemplate: - """Call ``PATCH /v1/game-server-templates/{id}``.""" - return await self._client._call( - "PATCH", - f"/v1/game-server-templates/{_path(id)}", - m.GameServerTemplate, - query=_query(extra_query), - body=_body( - m.UpdateGameServerTemplateBody, - extra_body, - False, - ("confirmed", confirmed), - ("docker_image", docker_image), - ("egg_id", egg_id), - ("hidden", hidden), - ("icon", icon), - ("nest_id", nest_id), - ("ordering_enabled", ordering_enabled), - ("startup", startup), - ("version_variable", version_variable), - ), - idempotent=False, - timeout=timeout, - ) - - -class AsyncGroupService(_ServiceAsync): - """The NodeRings GroupService API.""" - - async def add_service_account_to_group( - self, - *, - group_id: str | None = None, - service_account_ids: list[str] | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/groups/add-service-account``.""" - return await self._client._call( - "POST", - "/v1/groups/add-service-account", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.AddServiceAccountToGroupRequest, - extra_body, - False, - ("group_id", group_id), - ("service_account_ids", service_account_ids), - ), - idempotent=False, - timeout=timeout, - ) - - async def add_user_to_group( - self, - *, - group_id: str | None = None, - user_ids: list[str] | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/groups/add-user``.""" - return await self._client._call( - "POST", - "/v1/groups/add-user", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.AddUserToGroupRequest, extra_body, False, ("group_id", group_id), ("user_ids", user_ids)), - idempotent=False, - timeout=timeout, - ) - - async def create_group( - self, - *, - description: str | None = None, - group_roles: list[str] | None = None, - name: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.CreateGroupResponse: - """Call ``POST /v1/groups``.""" - return await self._client._call( - "POST", - "/v1/groups", - m.CreateGroupResponse, - query=_query(extra_query), - body=_body( - m.CreateGroupRequest, - extra_body, - False, - ("description", description), - ("group_roles", group_roles), - ("name", name), - ), - idempotent=False, - timeout=timeout, - ) - - async def delete_group( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/groups/{id}``.""" - return await self._client._call( - "DELETE", - f"/v1/groups/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_group( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetGroupResponse: - """Call ``GET /v1/groups/{id}``.""" - return await self._client._call( - "GET", - f"/v1/groups/{_path(id)}", - m.GetGroupResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_groups( - self, - *, - page: int | None = None, - page_size: int | None = None, - filter_name: str | None = None, - filter_status: m.Protov1Status | str | None = None, - search: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListGroupsResponse: - """Call ``GET /v1/groups``.""" - return await self._client._call( - "GET", - "/v1/groups", - m.ListGroupsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("filterName", filter_name), - ("filterStatus", filter_status), - ("search", search), - ), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_groups_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - filter_name: str | None = None, - filter_status: m.Protov1Status | str | None = None, - search: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Group]: - """ - Every result of :meth:`list_groups`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_groups( - page=page, - page_size=size, - filter_name=filter_name, - filter_status=filter_status, - search=search, - extra_query=extra_query, - timeout=timeout, - ) - items = res.groups - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def remove_service_account_from_group( - self, - *, - group_id: str | None = None, - service_account_ids: list[str] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/groups/remove-service-account``.""" - return await self._client._call( - "DELETE", - "/v1/groups/remove-service-account", - m.SuccessResponse, - query=_query(extra_query, ("groupId", group_id), ("serviceAccountIds", service_account_ids)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def remove_user_from_group( - self, - *, - group_id: str | None = None, - user_ids: list[str] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/groups/remove-user``.""" - return await self._client._call( - "DELETE", - "/v1/groups/remove-user", - m.SuccessResponse, - query=_query(extra_query, ("groupId", group_id), ("userIds", user_ids)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def update_group( - self, - id: str, - *, - description: str | None = None, - group_roles: list[str] | None = None, - name: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateGroupResponse: - """Call ``PATCH /v1/groups/{id}``.""" - return await self._client._call( - "PATCH", - f"/v1/groups/{_path(id)}", - m.UpdateGroupResponse, - query=_query(extra_query), - body=_body( - m.UpdateGroupBody, - extra_body, - False, - ("description", description), - ("group_roles", group_roles), - ("name", name), - ), - idempotent=False, - timeout=timeout, - ) - - -class AsyncHookScriptService(_ServiceAsync): - """The NodeRings HookScriptService API.""" - - async def delete_hook_script( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/hook-scripts/{id}``.""" - return await self._client._call( - "DELETE", - f"/v1/hook-scripts/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_hook_scripts( - self, - *, - page: int | None = None, - page_size: int | None = None, - subject: m.HookSubject | str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListHookScriptsResponse: - """ - Call ``GET /v1/hook-scripts``. - - Args: - subject: Unspecified lists VM scripts, which is the previous behavior. - """ - return await self._client._call( - "GET", - "/v1/hook-scripts", - m.ListHookScriptsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("subject", subject)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_hook_scripts_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - subject: m.HookSubject | str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.HookScript]: - """ - Every result of :meth:`list_hook_scripts`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_hook_scripts( - page=page, - page_size=size, - subject=subject, - extra_query=extra_query, - timeout=timeout, - ) - items = res.hook_scripts - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def upsert_hook_script( - self, - *, - enabled: bool | None = None, - hook: m.LifecycleHook | str | None = None, - script: str | None = None, - subject: m.HookSubject | str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.HookScript: - """ - Call ``PUT /v1/hook-scripts``. - - Args: - enabled: Omit to keep the stored value; create defaults to true - subject: LifecycleHook is the VM operation that triggers a provider hook script. - """ - return await self._client._call( - "PUT", - "/v1/hook-scripts", - m.HookScript, - query=_query(extra_query), - body=_body( - m.UpsertHookScriptRequest, - extra_body, - False, - ("enabled", enabled), - ("hook", hook), - ("script", script), - ("subject", subject), - ), - idempotent=False, - timeout=timeout, - ) - - -class AsyncIPAMService(_ServiceAsync): - """The NodeRings IPAMService API.""" - - async def add_reserved_ip( - self, - prefix_id: str, - *, - ip_address: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - IP Reservation (manage reserved_ips array in prefix) - - It calls ``POST /v1/ipam/prefixes/{prefixId}/reserved-ips``. - - Args: - ip_address: Must be within prefix CIDR - """ - return await self._client._call( - "POST", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.AddReservedIPBody, extra_body, False, ("ip_address", ip_address)), - idempotent=False, - timeout=timeout, - ) - - async def add_reserved_prefix( - self, - prefix_id: str, - *, - cidr: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-prefixes``. - - Args: - cidr: Must match prefix vm_assignment_prefix_length exactly - """ - return await self._client._call( - "POST", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-prefixes", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.AddReservedPrefixBody, extra_body, False, ("cidr", cidr)), - idempotent=False, - timeout=timeout, - ) - - async def assign_network_to_node( - self, - network_id: str, - *, - node_ids: list[str] | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Node-Network assignment - - It calls ``POST /v1/ipam/networks/{networkId}/assign-node``. - - Args: - node_ids: One or more node IDs to assign to this network - """ - return await self._client._call( - "POST", - f"/v1/ipam/networks/{_path(network_id)}/assign-node", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.AssignNetworkToNodeBody, extra_body, False, ("node_ids", node_ids)), - idempotent=False, - timeout=timeout, - ) - - async def clear_all_prefix_reserved_i_ps( - self, - prefix_id: str, - *, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-ips/clear-all``.""" - return await self._client._call( - "POST", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/clear-all", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.ClearAllPrefixReservedIPsBody, extra_body, False), - idempotent=False, - timeout=timeout, - ) - - async def create_network( - self, - *, - description: str | None = None, - dns_servers: list[str] | None = None, - mac_address_prefix: str | None = None, - name: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - IPAM Network management - - It calls ``POST /v1/ipam/networks``. - - Args: - dns_servers: e.g., ["8.8.8.8", "8.8.4.4"] (can be any IPs) - mac_address_prefix: First 3 octets for MAC allocation within this network (e.g. BC:24:11). Default: BC:24:11. - """ - return await self._client._call( - "POST", - "/v1/ipam/networks", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.CreateNetworkRequest, - extra_body, - False, - ("description", description), - ("dns_servers", dns_servers), - ("mac_address_prefix", mac_address_prefix), - ("name", name), - ), - idempotent=False, - timeout=timeout, - ) - - async def create_prefix( - self, - *, - allocation_strategy: m.AllocationStrategy | str | None = None, - cidr: str | None = None, - description: str | None = None, - gateway: str | None = None, - network_id: str | None = None, - reserved_ips: list[str] | None = None, - vm_assignment_prefix_length: int | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Prefix management - - It calls ``POST /v1/ipam/prefixes``. - - Args: - cidr: e.g., "10.0.0.0/24" - gateway: e.g., "10.0.0.1" (must be within CIDR) - network_id: Optional: network this prefix belongs to (for DNS servers) - reserved_ips: e.g., ["10.0.0.100", "10.0.0.200"] (must be within CIDR) - vm_assignment_prefix_length: Required when cidr is IPv6 - """ - return await self._client._call( - "POST", - "/v1/ipam/prefixes", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.CreatePrefixRequest, - extra_body, - False, - ("allocation_strategy", allocation_strategy), - ("cidr", cidr), - ("description", description), - ("gateway", gateway), - ("network_id", network_id), - ("reserved_ips", reserved_ips), - ("vm_assignment_prefix_length", vm_assignment_prefix_length), - ), - idempotent=False, - timeout=timeout, - ) - - async def delete_network( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/ipam/networks/{id}``.""" - return await self._client._call( - "DELETE", - f"/v1/ipam/networks/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def delete_prefix( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/ipam/prefixes/{id}``.""" - return await self._client._call( - "DELETE", - f"/v1/ipam/prefixes/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_network( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetNetworkResponse: - """Call ``GET /v1/ipam/networks/{id}``.""" - return await self._client._call( - "GET", - f"/v1/ipam/networks/{_path(id)}", - m.GetNetworkResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_node_network( - self, - node_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetNodeNetworkResponse: - """Call ``GET /v1/ipam/nodes/{nodeId}/network``.""" - return await self._client._call( - "GET", - f"/v1/ipam/nodes/{_path(node_id)}/network", - m.GetNodeNetworkResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_prefix( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetPrefixResponse: - """Call ``GET /v1/ipam/prefixes/{id}``.""" - return await self._client._call( - "GET", - f"/v1/ipam/prefixes/{_path(id)}", - m.GetPrefixResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_prefix_utilization( - self, - prefix_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetPrefixUtilizationResponse: - """ - Utility - - It calls ``GET /v1/ipam/prefixes/{prefixId}/utilization``. - """ - return await self._client._call( - "GET", - f"/v1/ipam/prefixes/{_path(prefix_id)}/utilization", - m.GetPrefixUtilizationResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_allocations( - self, - *, - page: int | None = None, - page_size: int | None = None, - prefix_id: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListAllocationsResponse: - """ - IP Allocation (read-only - allocations are managed automatically) - - It calls ``GET /v1/ipam/allocations``. - - Args: - prefix_id: Filter by prefix ID (required for filtering allocations) - """ - return await self._client._call( - "GET", - "/v1/ipam/allocations", - m.ListAllocationsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("prefixId", prefix_id)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_allocations_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - prefix_id: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.IPAllocation]: - """ - Every result of :meth:`list_allocations`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_allocations( - page=page, - page_size=size, - prefix_id=prefix_id, - extra_query=extra_query, - timeout=timeout, - ) - items = res.allocations - for item in items: - yield item - seen += len(items) - if len(items) < size: - return - page += 1 - - async def list_available_i_ps( - self, - prefix_id: str, - *, - limit: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListAvailableIPsResponse: - """ - Call ``GET /v1/ipam/prefixes/{prefixId}/available-ips``. - - Args: - limit: Limit number of IPs returned (default: 100) - """ - return await self._client._call( - "GET", - f"/v1/ipam/prefixes/{_path(prefix_id)}/available-ips", - m.ListAvailableIPsResponse, - query=_query(extra_query, ("limit", limit)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_network_nodes( - self, - network_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListNetworkNodesResponse: - """Call ``GET /v1/ipam/networks/{networkId}/nodes``.""" - return await self._client._call( - "GET", - f"/v1/ipam/networks/{_path(network_id)}/nodes", - m.ListNetworkNodesResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_networks( - self, - *, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListNetworksResponse: - """Call ``GET /v1/ipam/networks``.""" - return await self._client._call( - "GET", - "/v1/ipam/networks", - m.ListNetworksResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_networks_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Network]: - """ - Every result of :meth:`list_networks`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_networks( - page=page, - page_size=size, - extra_query=extra_query, - timeout=timeout, - ) - items = res.networks - for item in items: - yield item - seen += len(items) - if len(items) < size: - return - page += 1 - - async def list_prefixes( - self, - *, - page: int | None = None, - page_size: int | None = None, - filter_network_id: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListPrefixesResponse: - """Call ``GET /v1/ipam/prefixes``.""" - return await self._client._call( - "GET", - "/v1/ipam/prefixes", - m.ListPrefixesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterNetworkId", filter_network_id)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_prefixes_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - filter_network_id: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Prefix]: - """ - Every result of :meth:`list_prefixes`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_prefixes( - page=page, - page_size=size, - filter_network_id=filter_network_id, - extra_query=extra_query, - timeout=timeout, - ) - items = res.prefixes - for item in items: - yield item - seen += len(items) - if len(items) < size: - return - page += 1 - - async def remove_reserved_ip( - self, - prefix_id: str, - ip_address: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/ipam/prefixes/{prefixId}/reserved-ips/{ipAddress}``.""" - return await self._client._call( - "DELETE", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/{_path(ip_address)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def remove_reserved_prefix( - self, - prefix_id: str, - *, - cidr: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/ipam/prefixes/{prefixId}/reserved-prefixes``.""" - return await self._client._call( - "DELETE", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-prefixes", - m.SuccessResponse, - query=_query(extra_query, ("cidr", cidr)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def reserve_all_prefix_i_ps( - self, - prefix_id: str, - *, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-ips/reserve-all``.""" - return await self._client._call( - "POST", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/reserve-all", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.ReserveAllPrefixIPsBody, extra_body, False), - idempotent=False, - timeout=timeout, - ) - - async def unassign_network_from_node( - self, - node_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/ipam/nodes/{nodeId}/unassign-network``.""" - return await self._client._call( - "POST", - f"/v1/ipam/nodes/{_path(node_id)}/unassign-network", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def update_network( - self, - id: str, - *, - description: str | None = None, - dns_servers: list[str] | None = None, - mac_address_prefix: str | None = None, - name: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateNetworkResponse: - """ - Call ``PATCH /v1/ipam/networks/{id}``. - - Args: - mac_address_prefix: First 3 octets for MAC allocation within this network. Empty = leave unchanged on update. - """ - return await self._client._call( - "PATCH", - f"/v1/ipam/networks/{_path(id)}", - m.UpdateNetworkResponse, - query=_query(extra_query), - body=_body( - m.UpdateNetworkBody, - extra_body, - False, - ("description", description), - ("dns_servers", dns_servers), - ("mac_address_prefix", mac_address_prefix), - ("name", name), - ), - idempotent=False, - timeout=timeout, - ) - - async def update_prefix( - self, - id: str, - *, - allocation_strategy: m.AllocationStrategy | str | None = None, - description: str | None = None, - gateway: str | None = None, - network_id: str | None = None, - reserved_ips: list[str] | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.UpdatePrefixResponse: - """Call ``PATCH /v1/ipam/prefixes/{id}``.""" - return await self._client._call( - "PATCH", - f"/v1/ipam/prefixes/{_path(id)}", - m.UpdatePrefixResponse, - query=_query(extra_query), - body=_body( - m.UpdatePrefixBody, - extra_body, - False, - ("allocation_strategy", allocation_strategy), - ("description", description), - ("gateway", gateway), - ("network_id", network_id), - ("reserved_ips", reserved_ips), - ), - idempotent=False, - timeout=timeout, - ) - - -class AsyncInstantAppService(_ServiceAsync): - """The NodeRings InstantAppService API.""" - - async def get_instant_app( - self, - id: str, - *, - slug: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.InstantApp: - """Call ``GET /v1/instantapps/{id}``.""" - return await self._client._call( - "GET", - f"/v1/instantapps/{_path(id)}", - m.InstantApp, - query=_query(extra_query, ("slug", slug)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_instant_app_2( - self, - slug: str, - *, - id: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.InstantApp: - """ - Call ``GET /v1/instantapps/slug/{slug}``. - - Args: - id: Exactly one of id or slug must be set. - """ - return await self._client._call( - "GET", - f"/v1/instantapps/slug/{_path(slug)}", - m.InstantApp, - query=_query(extra_query, ("id", id)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_instant_apps( - self, - *, - page: int | None = None, - page_size: int | None = None, - query: str | None = None, - categories: list[str] | None = None, - distro: m.Distro | str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListInstantAppsResponse: - """ - Call ``GET /v1/instantapps``. - - Args: - page_size: -1 returns all apps (create/reinstall picker); otherwise 1..100. - query: Case-insensitive match on name or slug. - categories: Filter: app must include all listed categories when non-empty. - distro: - DISTRO_UBUNTU_22_04: Ubuntu distributions - DISTRO_FEDORA_43: Fedora distributions - DISTRO_DEBIAN_12: Debian distributions - DISTRO_CENTOS_9: CentOS distributions - DISTRO_ROCKY_9: Rocky Linux distributions - DISTRO_ALMALINUX_9: AlmaLinux distributions - """ - return await self._client._call( - "GET", - "/v1/instantapps", - m.ListInstantAppsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("query", query), - ("categories", categories), - ("distro", distro), - ), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_instant_apps_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - query: str | None = None, - categories: list[str] | None = None, - distro: m.Distro | str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.InstantApp]: - """ - Every result of :meth:`list_instant_apps`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_instant_apps( - page=page, - page_size=size, - query=query, - categories=categories, - distro=distro, - extra_query=extra_query, - timeout=timeout, - ) - items = res.instant_apps - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - -class AsyncInviteService(_ServiceAsync): - """The NodeRings InviteService API.""" - - async def accept_invite( - self, - *, - invite_id: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``GET /v1/invites/accept``.""" - return await self._client._call( - "GET", - "/v1/invites/accept", - m.SuccessResponse, - query=_query(extra_query, ("inviteId", invite_id)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def create_invite( - self, - *, - group_id: str | None = None, - invitee_emails: list[str] | None = None, - role_id: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/invites``.""" - return await self._client._call( - "POST", - "/v1/invites", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.CreateInviteRequest, - extra_body, - False, - ("group_id", group_id), - ("invitee_emails", invitee_emails), - ("role_id", role_id), - ), - idempotent=False, - timeout=timeout, - ) - - async def decline_invite( - self, - *, - invite_id: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``GET /v1/invites/decline``.""" - return await self._client._call( - "GET", - "/v1/invites/decline", - m.SuccessResponse, - query=_query(extra_query, ("inviteId", invite_id)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def delete_invite( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/invites/{id}``.""" - return await self._client._call( - "DELETE", - f"/v1/invites/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_invites( - self, - *, - page: int | None = None, - page_size: int | None = None, - filter_email: str | None = None, - search: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListInvitesResponse: - """Call ``GET /v1/invites``.""" - return await self._client._call( - "GET", - "/v1/invites", - m.ListInvitesResponse, - query=_query( - extra_query, ("page", page), ("pageSize", page_size), ("filterEmail", filter_email), ("search", search) - ), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_invites_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - filter_email: str | None = None, - search: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Invite]: - """ - Every result of :meth:`list_invites`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_invites( - page=page, - page_size=size, - filter_email=filter_email, - search=search, - extra_query=extra_query, - timeout=timeout, - ) - items = res.invites - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def list_my_invites( - self, - *, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListMyInvitesResponse: - """Call ``GET /v1/invites/me``.""" - return await self._client._call( - "GET", - "/v1/invites/me", - m.ListMyInvitesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_my_invites_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Invite]: - """ - Every result of :meth:`list_my_invites`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_my_invites( - page=page, - page_size=size, - extra_query=extra_query, - timeout=timeout, - ) - items = res.invites - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def resend_invite( - self, - invite_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/invites/resend/{inviteId}``.""" - return await self._client._call( - "POST", - f"/v1/invites/resend/{_path(invite_id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def update_invite( - self, - *, - group_id: str | None = None, - invite_id: str | None = None, - role_id: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``PATCH /v1/invites``.""" - return await self._client._call( - "PATCH", - "/v1/invites", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.UpdateInviteRequest, - extra_body, - False, - ("group_id", group_id), - ("invite_id", invite_id), - ("role_id", role_id), - ), - idempotent=False, - timeout=timeout, - ) - - -class AsyncInvoiceService(_ServiceAsync): - """The NodeRings InvoiceService API.""" - - async def get_invoice( - self, - invoice_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetInvoiceResponse: - """ - GetInvoice retrieves a single invoice with line items - - It calls ``GET /v1/invoices/{invoiceId}``. - """ - return await self._client._call( - "GET", - f"/v1/invoices/{_path(invoice_id)}", - m.GetInvoiceResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_invoices( - self, - *, - subscription_id: str | None = None, - status: m.InvoiceStatus | str | None = None, - page: int | None = None, - page_size: int | None = None, - order_by: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListInvoicesResponse: - """ - ListInvoices lists invoices for a subscription or organization - - It calls ``GET /v1/invoices``. - """ - return await self._client._call( - "GET", - "/v1/invoices", - m.ListInvoicesResponse, - query=_query( - extra_query, - ("subscriptionId", subscription_id), - ("status", status), - ("page", page), - ("pageSize", page_size), - ("orderBy", order_by), - ), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_invoices_all( - self, - *, - subscription_id: str | None = None, - status: m.InvoiceStatus | str | None = None, - page: int | None = None, - page_size: int | None = None, - order_by: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Invoice]: - """ - Every result of :meth:`list_invoices`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_invoices( - page=page, - page_size=size, - subscription_id=subscription_id, - status=status, - order_by=order_by, - extra_query=extra_query, - timeout=timeout, - ) - items = res.invoices - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def pay_invoice( - self, - invoice_id: str, - *, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.PayInvoiceResponse: - """ - PayInvoice charges the organization's default card for an open or past-due invoice and - returns the updated invoice. Idempotent when the invoice is already paid. - - It calls ``POST /v1/invoices/{invoiceId}:pay``. - """ - return await self._client._call( - "POST", - f"/v1/invoices/{_path(invoice_id)}:pay", - m.PayInvoiceResponse, - query=_query(extra_query), - body=_body(m.PayInvoiceBody, extra_body, False), - idempotent=False, - timeout=timeout, - ) - - -class AsyncLiveValidationService(_ServiceAsync): - """The NodeRings LiveValidationService API.""" - - async def delete_plan_live_validation( - self, - plan_id: str, - *, - node_id: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/provider/plans/{planId}/live-validation``.""" - return await self._client._call( - "DELETE", - f"/v1/provider/plans/{_path(plan_id)}/live-validation", - m.SuccessResponse, - query=_query(extra_query, ("nodeId", node_id)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_plan_live_validation( - self, - plan_id: str, - *, - node_id: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetPlanLiveValidationResponse: - """Call ``GET /v1/provider/plans/{planId}/live-validation``.""" - return await self._client._call( - "GET", - f"/v1/provider/plans/{_path(plan_id)}/live-validation", - m.GetPlanLiveValidationResponse, - query=_query(extra_query, ("nodeId", node_id)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_eligible_nodes_for_plan( - self, - plan_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListEligibleNodesForPlanResponse: - """Call ``GET /v1/provider/plans/{planId}/live-validation/nodes``.""" - return await self._client._call( - "GET", - f"/v1/provider/plans/{_path(plan_id)}/live-validation/nodes", - m.ListEligibleNodesForPlanResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_plan_live_validation_benchmarks( - self, - plan_id: str, - *, - node_id: str | None = None, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListPlanLiveValidationBenchmarksResponse: - """Call ``GET /v1/provider/plans/{planId}/live-validation/benchmarks``.""" - return await self._client._call( - "GET", - f"/v1/provider/plans/{_path(plan_id)}/live-validation/benchmarks", - m.ListPlanLiveValidationBenchmarksResponse, - query=_query(extra_query, ("nodeId", node_id), ("page", page), ("pageSize", page_size)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_plan_live_validation_benchmarks_all( - self, - plan_id: str, - *, - node_id: str | None = None, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.PlanLiveValidationBenchmarkView]: - """ - Every result of :meth:`list_plan_live_validation_benchmarks`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_plan_live_validation_benchmarks( - plan_id, - page=page, - page_size=size, - node_id=node_id, - extra_query=extra_query, - timeout=timeout, - ) - items = res.benchmarks - for item in items: - yield item - seen += len(items) - if len(items) < size: - return - page += 1 - - async def list_plan_live_validations( - self, - *, - plan_id: str | None = None, - search: str | None = None, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListPlanLiveValidationsResponse: - """Call ``GET /v1/provider/live-validations``.""" - return await self._client._call( - "GET", - "/v1/provider/live-validations", - m.ListPlanLiveValidationsResponse, - query=_query(extra_query, ("planId", plan_id), ("search", search), ("page", page), ("pageSize", page_size)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_plan_live_validations_all( - self, - *, - plan_id: str | None = None, - search: str | None = None, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.PlanLiveValidationView]: - """ - Every result of :meth:`list_plan_live_validations`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_plan_live_validations( - page=page, - page_size=size, - plan_id=plan_id, - search=search, - extra_query=extra_query, - timeout=timeout, - ) - items = res.validations - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def start_plan_live_validation( - self, - plan_id: str, - *, - include_benchmarking: bool | None = None, - node_id: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.StartPlanLiveValidationResponse: - """Call ``POST /v1/provider/plans/{planId}/live-validation``.""" - return await self._client._call( - "POST", - f"/v1/provider/plans/{_path(plan_id)}/live-validation", - m.StartPlanLiveValidationResponse, - query=_query(extra_query), - body=_body( - m.StartPlanLiveValidationBody, - extra_body, - False, - ("include_benchmarking", include_benchmarking), - ("node_id", node_id), - ), - idempotent=False, - timeout=timeout, - ) - - -class AsyncManualPayoutService(_ServiceAsync): - """The NodeRings ManualPayoutService API.""" - - async def create_manual_payout( - self, - *, - account_holder_name: str | None = None, - account_number: str | None = None, - bank_name: str | None = None, - bic: str | None = None, - country: str | None = None, - iban: str | None = None, - notes: str | None = None, - routing_number: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.CreateManualPayoutResponse: - """ - Call ``POST /v1/provider/manual-payout``. - - Args: - account_holder_name: Name of the account holder - account_number: Bank account number (for non-SEPA countries) - bank_name: Name of the bank - bic: Bank Identifier Code / SWIFT code (for SEPA countries) - country: ISO 3166-1 alpha-2 country code (e.g., "US", "GB", "DE") - iban: International Bank Account Number (for SEPA countries) - notes: User-provided notes about the payout account - routing_number: Routing number (for US accounts) or sort code (for UK accounts) - """ - return await self._client._call( - "POST", - "/v1/provider/manual-payout", - m.CreateManualPayoutResponse, - query=_query(extra_query), - body=_body( - m.CreateManualPayoutRequest, - extra_body, - False, - ("account_holder_name", account_holder_name), - ("account_number", account_number), - ("bank_name", bank_name), - ("bic", bic), - ("country", country), - ("iban", iban), - ("notes", notes), - ("routing_number", routing_number), - ), - idempotent=False, - timeout=timeout, - ) - - async def delete_manual_payout( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/provider/manual-payout``.""" - return await self._client._call( - "DELETE", - "/v1/provider/manual-payout", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_manual_payout( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetManualPayoutResponse: - """Call ``GET /v1/provider/manual-payout``.""" - return await self._client._call( - "GET", - "/v1/provider/manual-payout", - m.GetManualPayoutResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - -class AsyncMarketplaceService(_ServiceAsync): - """The NodeRings MarketplaceService API.""" - - async def get_marketplace_plan( - self, - plan_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetMarketplacePlanResponse: - """Call ``GET /v1/marketplace/plans/{planId}``.""" - return await self._client._call( - "GET", - f"/v1/marketplace/plans/{_path(plan_id)}", - m.GetMarketplacePlanResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_provider( - self, - provider_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderResponse: - """Call ``GET /v1/marketplace/providers/{providerId}``.""" - return await self._client._call( - "GET", - f"/v1/marketplace/providers/{_path(provider_id)}", - m.GetProviderResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_public_platform_stats( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetPublicPlatformStatsResponse: - """ - Platform-wide totals for the public homepage: Compute Instances and game servers - provisioned, DNS zones and records hosted, live storefronts. Anonymous and cached for a few - minutes; carries no tenant data. The frontend reads it once per build, not per page view. - - It calls ``GET /v1/public/stats``. - """ - return await self._client._call( - "GET", - "/v1/public/stats", - m.GetPublicPlatformStatsResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_public_storefront( - self, - slug: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetPublicStorefrontResponse: - """Call ``GET /v1/public/storefronts/{slug}``.""" - return await self._client._call( - "GET", - f"/v1/public/storefronts/{_path(slug)}", - m.GetPublicStorefrontResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_public_storefront_by_id( - self, - provider_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetPublicStorefrontResponse: - """Call ``GET /v1/public/storefronts/by-id/{providerId}``.""" - return await self._client._call( - "GET", - f"/v1/public/storefronts/by-id/{_path(provider_id)}", - m.GetPublicStorefrontResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_available_addons( - self, - *, - filter_provider_id: str | None = None, - vm_id: str | None = None, - filter_addon_type: m.AddonType | str | None = None, - filter_billing_type: m.BillingType | str | None = None, - search: str | None = None, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListAvailableAddonsResponse: - """ - Call ``GET /v1/marketplace/addons``. - - Args: - filter_billing_type: - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) - """ - return await self._client._call( - "GET", - "/v1/marketplace/addons", - m.ListAvailableAddonsResponse, - query=_query( - extra_query, - ("filterProviderId", filter_provider_id), - ("vmId", vm_id), - ("filterAddonType", filter_addon_type), - ("filterBillingType", filter_billing_type), - ("search", search), - ("page", page), - ("pageSize", page_size), - ), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_available_addons_all( - self, - *, - filter_provider_id: str | None = None, - vm_id: str | None = None, - filter_addon_type: m.AddonType | str | None = None, - filter_billing_type: m.BillingType | str | None = None, - search: str | None = None, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Addon]: - """ - Every result of :meth:`list_available_addons`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_available_addons( - page=page, - page_size=size, - filter_provider_id=filter_provider_id, - vm_id=vm_id, - filter_addon_type=filter_addon_type, - filter_billing_type=filter_billing_type, - search=search, - extra_query=extra_query, - timeout=timeout, - ) - items = res.addons - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def list_available_plans( - self, - *, - filter_country: str | None = None, - filter_city: str | None = None, - filter_billing_type: m.BillingType | str | None = None, - filter_compute_type: m.ComputeType | str | None = None, - filter_compute_category: m.ComputeCategory | str | None = None, - filter_asset_type: m.AssetType | str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListAvailablePlansResponse: - """ - Call ``GET /v1/marketplace/plans``. - - Args: - filter_country: Optional filters Filter by country name (case-insensitive) - filter_city: Filter by city name (case-insensitive) - filter_billing_type: Filter by billing type - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) - filter_compute_type: Filter by compute type - COMPUTE_TYPE_GENERAL_COMPUTE: GC - General Compute (balanced performance) - COMPUTE_TYPE_HIGH_FREQUENCY: HF - High Frequency (CPU-optimized, high clock speeds) - COMPUTE_TYPE_HIGH_PERFORMANCE: HP - High Performance (next-gen CPUs, NVMe storage) - COMPUTE_TYPE_GENERAL_PURPOSE: GP - General Purpose (balanced dedicated resources) - COMPUTE_TYPE_CPU_OPTIMIZED: CPU - CPU Optimized (high CPU-to-memory ratio) - COMPUTE_TYPE_MEMORY_OPTIMIZED: MEM - Memory Optimized (high memory-to-CPU ratio) - COMPUTE_TYPE_STORAGE_OPTIMIZED: STO - Storage Optimized (high storage capacity) - COMPUTE_TYPE_VERY_HIGH_FREQUENCY: VHF - Very High Frequency (highest clock dedicated CPUs) - COMPUTE_TYPE_GAME_SERVER: GS - Game Server (per-CPU SKU dedicated plans, e.g. DC-GS-9950X-*) - filter_compute_category: Filter by compute category - COMPUTE_CATEGORY_SHARED_COMPUTE: Shared compute (shared resources, cost-effective) - COMPUTE_CATEGORY_DEDICATED_COMPUTE: Dedicated compute (dedicated resources, higher performance) - """ - return await self._client._call( - "GET", - "/v1/marketplace/plans", - m.ListAvailablePlansResponse, - query=_query( - extra_query, - ("filterCountry", filter_country), - ("filterCity", filter_city), - ("filterBillingType", filter_billing_type), - ("filterComputeType", filter_compute_type), - ("filterComputeCategory", filter_compute_category), - ("filterAssetType", filter_asset_type), - ), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_available_regions( - self, - *, - filter_asset_type: m.AssetType | str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListAvailableRegionsResponse: - """ - Call ``GET /v1/marketplace/regions``. - - Args: - filter_asset_type: When set, only cities that sell a marketplace-listable plan of this asset type. Unspecified keeps every marketplace city (virtual machines and game servers). - """ - return await self._client._call( - "GET", - "/v1/marketplace/regions", - m.ListAvailableRegionsResponse, - query=_query(extra_query, ("filterAssetType", filter_asset_type)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_marketplace_provider_directory( - self, - *, - page: int | None = None, - page_size: int | None = None, - search: str | None = None, - filter_asset_type: m.AssetType | str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListMarketplaceProviderDirectoryResponse: - """Call ``GET /v1/marketplace/provider-directory``.""" - return await self._client._call( - "GET", - "/v1/marketplace/provider-directory", - m.ListMarketplaceProviderDirectoryResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("search", search), - ("filterAssetType", filter_asset_type), - ), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_marketplace_provider_directory_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - search: str | None = None, - filter_asset_type: m.AssetType | str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.ProviderInfo]: - """ - Every result of :meth:`list_marketplace_provider_directory`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_marketplace_provider_directory( - page=page, - page_size=size, - search=search, - filter_asset_type=filter_asset_type, - extra_query=extra_query, - timeout=timeout, - ) - items = res.providers - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def list_providers( - self, - *, - page: int | None = None, - page_size: int | None = None, - filter_plan_code: str | None = None, - filter_country: str | None = None, - filter_city: str | None = None, - filter_billing_type: m.BillingType | str | None = None, - search: str | None = None, - filter_ipv6_available_only: bool | None = None, - plan_price_sort: m.ProviderPlanPriceSort | str | None = None, - filter_unlimited_bandwidth_only: bool | None = None, - filter_ddos_providers: list[str] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListProvidersResponse: - """ - Call ``GET /v1/marketplace/providers``. - - Args: - filter_plan_code: Filter providers that offer this plan code (required) - filter_country: Filter by country name (required, case-insensitive) - filter_city: Filter by city name (required, case-insensitive) - filter_billing_type: Filter by billing type (subscription/fixed or usage-based) - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) - search: Search by organization name or description - plan_price_sort: How to order providers: default is newest first. When set, Recommendations (first three in newest-first order) stay pinned; the rest are ordered by the displayed list price for the selected plan and billing type. - PROVIDER_PLAN_PRICE_SORT_LEAST_EXPENSIVE_FIRST: Ascending among non-recommended providers: lowest list price first (usage: hourly, subscription: fixed monthly, free: 0) - PROVIDER_PLAN_PRICE_SORT_MOST_EXPENSIVE_FIRST: Descending among non-recommended providers: highest list price first - filter_unlimited_bandwidth_only: Only include providers where bandwidth egress is effectively unlimited for the selected plan (same basis as UI badge: overage_price if > 0 else unit_amount; unlimited when effective $/GB == 0). - filter_ddos_providers: When set, only organizations whose ddos_provider is one of these slugs are included. When empty, do not filter by DDoS. Mirrored by marketplace UI: all slugs "selected" = omit this. - """ - return await self._client._call( - "GET", - "/v1/marketplace/providers", - m.ListProvidersResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("filterPlanCode", filter_plan_code), - ("filterCountry", filter_country), - ("filterCity", filter_city), - ("filterBillingType", filter_billing_type), - ("search", search), - ("filterIpv6AvailableOnly", filter_ipv6_available_only), - ("planPriceSort", plan_price_sort), - ("filterUnlimitedBandwidthOnly", filter_unlimited_bandwidth_only), - ("filterDdosProviders", filter_ddos_providers), - ), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_providers_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - filter_plan_code: str | None = None, - filter_country: str | None = None, - filter_city: str | None = None, - filter_billing_type: m.BillingType | str | None = None, - search: str | None = None, - filter_ipv6_available_only: bool | None = None, - plan_price_sort: m.ProviderPlanPriceSort | str | None = None, - filter_unlimited_bandwidth_only: bool | None = None, - filter_ddos_providers: list[str] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.ProviderInfo]: - """ - Every result of :meth:`list_providers`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_providers( - page=page, - page_size=size, - filter_plan_code=filter_plan_code, - filter_country=filter_country, - filter_city=filter_city, - filter_billing_type=filter_billing_type, - search=search, - filter_ipv6_available_only=filter_ipv6_available_only, - plan_price_sort=plan_price_sort, - filter_unlimited_bandwidth_only=filter_unlimited_bandwidth_only, - filter_ddos_providers=filter_ddos_providers, - extra_query=extra_query, - timeout=timeout, - ) - items = res.providers - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def list_public_storefronts( - self, - *, - page: int | None = None, - page_size: int | None = None, - search: str | None = None, - filter_country: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListPublicStorefrontsResponse: - """Call ``GET /v1/public/storefronts``.""" - return await self._client._call( - "GET", - "/v1/public/storefronts", - m.ListPublicStorefrontsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("search", search), - ("filterCountry", filter_country), - ), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_public_storefronts_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - search: str | None = None, - filter_country: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.PublicStorefrontCard]: - """ - Every result of :meth:`list_public_storefronts`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_public_storefronts( - page=page, - page_size=size, - search=search, - filter_country=filter_country, - extra_query=extra_query, - timeout=timeout, - ) - items = res.storefronts - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def search_marketplace( - self, - *, - filter_billing_type: m.BillingType | str | None = None, - page: int | None = None, - page_size: int | None = None, - query: str | None = None, - turnstile_token: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SearchMarketplaceResponse: - """ - Call ``POST /v1/marketplace/search``. - - Args: - turnstile_token: Cloudflare Turnstile token (required for anonymous callers when auth.turnstile.requireOnAnonymousMarketplaceSearch). - """ - return await self._client._call( - "POST", - "/v1/marketplace/search", - m.SearchMarketplaceResponse, - query=_query(extra_query), - body=_body( - m.SearchMarketplaceRequest, - extra_body, - False, - ("filter_billing_type", filter_billing_type), - ("page", page), - ("page_size", page_size), - ("query", query), - ("turnstile_token", turnstile_token), - ), - idempotent=False, - timeout=timeout, - ) - - -class AsyncMetadataService(_ServiceAsync): - """The NodeRings MetadataService API.""" - - async def get_platform_versions( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.PlatformVersions: - """ - GetPlatformVersions returns pinned versions for k3s, k3d, calico, liqo, liqoctl, and helm. - - It calls ``GET /v1/platform-versions``. - """ - return await self._client._call( - "GET", - "/v1/platform-versions", - m.PlatformVersions, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_version( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.Metadata: - """Call ``GET /v1/version``.""" - return await self._client._call( - "GET", - "/v1/version", - m.Metadata, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def health_check( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.HealthCheckResponse: - """Call ``GET /v1/healthz``.""" - return await self._client._call( - "GET", - "/v1/healthz", - m.HealthCheckResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_distros( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListDistrosResponse: - """ - ListDistros returns the guest OS catalog used by the virtual machine image picker. - - It calls ``GET /v1/distros``. - """ - return await self._client._call( - "GET", - "/v1/distros", - m.ListDistrosResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - -class AsyncMetricService(_ServiceAsync): - """The NodeRings MetricService API.""" - - async def get_metric( - self, - id: str, - *, - code: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetMetricResponse: - """ - Get a specific metric by ID or code - - It calls ``GET /v1/metrics/{id}``. - - Args: - code: Alternative to id - """ - return await self._client._call( - "GET", - f"/v1/metrics/{_path(id)}", - m.GetMetricResponse, - query=_query(extra_query, ("code", code)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_metrics( - self, - *, - page: int | None = None, - page_size: int | None = None, - billable_only: bool | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListMetricsResponse: - """ - List all available metrics - - It calls ``GET /v1/metrics``. - """ - return await self._client._call( - "GET", - "/v1/metrics", - m.ListMetricsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("billableOnly", billable_only)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_metrics_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - billable_only: bool | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Metric]: - """ - Every result of :meth:`list_metrics`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_metrics( - page=page, - page_size=size, - billable_only=billable_only, - extra_query=extra_query, - timeout=timeout, - ) - items = res.metrics - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - -class AsyncMetricsCredentialService(_ServiceAsync): - """The NodeRings MetricsCredentialService API.""" - - async def create_metrics_write_credential( - self, - *, - agent_id: str | None = None, - expires_at: datetime | None = None, - name: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.CreateMetricsWriteCredentialResponse: - """ - Call ``POST /v1/metrics-write-credentials``. - - Args: - agent_id: Optional: omit or leave empty when the credential is not tied to an agent. - expires_at: Optional expiry; omit for non-expiring machine tokens. - """ - return await self._client._call( - "POST", - "/v1/metrics-write-credentials", - m.CreateMetricsWriteCredentialResponse, - query=_query(extra_query), - body=_body( - m.CreateMetricsWriteCredentialRequest, - extra_body, - False, - ("agent_id", agent_id), - ("expires_at", expires_at), - ("name", name), - ), - idempotent=False, - timeout=timeout, - ) - - async def list_metrics_write_credentials( - self, - *, - agent_id: str | None = None, - include_revoked: bool | None = None, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListMetricsWriteCredentialsResponse: - """ - Call ``GET /v1/metrics-write-credentials``. - - Args: - agent_id: Optional: omit or leave empty to list credentials for the whole organization. - page_size: -1 means fetch all; otherwise 1..100. - """ - return await self._client._call( - "GET", - "/v1/metrics-write-credentials", - m.ListMetricsWriteCredentialsResponse, - query=_query( - extra_query, - ("agentId", agent_id), - ("includeRevoked", include_revoked), - ("page", page), - ("pageSize", page_size), - ), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_metrics_write_credentials_all( - self, - *, - agent_id: str | None = None, - include_revoked: bool | None = None, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.MetricsWriteCredential]: - """ - Every result of :meth:`list_metrics_write_credentials`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_metrics_write_credentials( - page=page, - page_size=size, - agent_id=agent_id, - include_revoked=include_revoked, - extra_query=extra_query, - timeout=timeout, - ) - items = res.credentials - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def revoke_metrics_write_credential( - self, - id: str, - *, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/metrics-write-credentials/{id}:revoke``.""" - return await self._client._call( - "POST", - f"/v1/metrics-write-credentials/{_path(id)}:revoke", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.RevokeMetricsWriteCredentialBody, extra_body, False), - idempotent=False, - timeout=timeout, - ) - - async def rotate_metrics_write_credential( - self, - id: str, - *, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.CreateMetricsWriteCredentialResponse: - """Call ``POST /v1/metrics-write-credentials/{id}:rotate``.""" - return await self._client._call( - "POST", - f"/v1/metrics-write-credentials/{_path(id)}:rotate", - m.CreateMetricsWriteCredentialResponse, - query=_query(extra_query), - body=_body(m.RotateMetricsWriteCredentialBody, extra_body, False), - idempotent=False, - timeout=timeout, - ) - - -class AsyncMonitoringService(_ServiceAsync): - """The NodeRings MonitoringService API.""" - - async def create_monitoring_launch( - self, - *, - next: str | None = None, - resource_id: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.CreateMonitoringLaunchResponse: - """ - CreateMonitoringLaunch returns a one-time URL (valid for about a minute) that signs the - caller into the organization's Grafana. Grafana role: Editor when the caller may also rotate - the monitoring token, otherwise Viewer. - - It calls ``POST /v1/monitoring/launch``. - - Args: - next: Optional relative Grafana path to open, e.g. "/d/nr-vm/virtual-machine?var-resource=NR-..". Validated server side; only /d/, /dashboards and /explore paths are accepted. - resource_id: Optional VM or game server id (client orgs): open its dashboard. - """ - return await self._client._call( - "POST", - "/v1/monitoring/launch", - m.CreateMonitoringLaunchResponse, - query=_query(extra_query), - body=_body( - m.CreateMonitoringLaunchRequest, extra_body, False, ("next", next), ("resource_id", resource_id) - ), - idempotent=False, - timeout=timeout, - ) - - async def rotate_monitoring_datasource_token( - self, - *, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - RotateMonitoringDatasourceToken replaces the organization's Grafana datasource token. - - It calls ``POST /v1/monitoring/datasource-token:rotate``. - """ - return await self._client._call( - "POST", - "/v1/monitoring/datasource-token:rotate", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.RotateMonitoringDatasourceTokenRequest, extra_body, False), - idempotent=False, - timeout=timeout, - ) - - -class AsyncNodePlacementService(_ServiceAsync): - """The NodeRings NodePlacementService API.""" - - async def get_node_placement_policy( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetNodePlacementPolicyResponse: - """Call ``GET /v1/node-placement-policy``.""" - return await self._client._call( - "GET", - "/v1/node-placement-policy", - m.GetNodePlacementPolicyResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def update_node_placement_policy( - self, - *, - default_strategy: m.NodePlacementStrategy | str | None = None, - region_overrides: list[m.NodePlacementRegionOverride | dict[str, Any]] | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateNodePlacementPolicyResponse: - """Call ``PUT /v1/node-placement-policy``.""" - return await self._client._call( - "PUT", - "/v1/node-placement-policy", - m.UpdateNodePlacementPolicyResponse, - query=_query(extra_query), - body=_body( - m.UpdateNodePlacementPolicyRequest, - extra_body, - False, - ("default_strategy", default_strategy), - ("region_overrides", region_overrides), - ), - idempotent=False, - timeout=timeout, - ) - - -class AsyncNodeService(_ServiceAsync): - """The NodeRings NodeService API.""" - - async def create_node( - self, - *, - backup_storage_compression: m.BackupStorageCompression | str | None = None, - backup_storage_destination: str | None = None, - compute_type: m.NodeComputeType | str | None = None, - cpu_overallocate_percent: int | None = None, - maintenance_mode: bool | None = None, - memory_overallocate_percent: int | None = None, - metadata: dict[str, Any] | None = None, - name: str | None = None, - network_bridge: str | None = None, - network_model: str | None = None, - network_name: str | None = None, - network_vlan_id: int | None = None, - panel_node_id: int | None = None, - platform_id: str | None = None, - pterodactyl_location_id: int | None = None, - region_id: str | None = None, - storage_overallocate_percent: int | None = None, - topology_paste: str | None = None, - vm_storage_destination: str | None = None, - vmid_seed: int | None = None, - wings_node_name: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Call ``POST /v1/node``. - - Args: - backup_storage_compression: Proxmox vzdump --compress (must not be UNSPECIFIED on create/update node). - compute_type: Compute product hosted by a node. Exclusive: a node is shared XOR dedicated (docs/README-DEDICATED-CPU-CORES.md, design decision D1). - NODE_COMPUTE_TYPE_SHARED: Shared vCPU hosting (CPU oversubscription allowed). Default. - NODE_COMPUTE_TYPE_DEDICATED: Dedicated pinned CPU cores (no CPU overallocation). - metadata: Optional node metadata (VirtFusion hypervisor_id / group_id live under metadata.virtfusion). - network_bridge: Node provisioning settings (server-side defaults applied when omitted) Proxmox Linux bridge for VM primary NIC. Default: vmbr0. - network_model: Proxmox NIC model for primary NIC. Default: virtio. - network_name: Proxmox net device key for primary NIC (net0, net1, ...). Default: net0. - network_vlan_id: 802.1Q VLAN tag on primary NIC (Proxmox tag=); 0 = untagged. - topology_paste: Raw topology paste (output of the documented lscpu/sysfs command block). Required when compute_type is dedicated; ignored otherwise. - """ - return await self._client._call( - "POST", - "/v1/node", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.CreateNodeRequest, - extra_body, - False, - ("backup_storage_compression", backup_storage_compression), - ("backup_storage_destination", backup_storage_destination), - ("compute_type", compute_type), - ("cpu_overallocate_percent", cpu_overallocate_percent), - ("maintenance_mode", maintenance_mode), - ("memory_overallocate_percent", memory_overallocate_percent), - ("metadata", metadata), - ("name", name), - ("network_bridge", network_bridge), - ("network_model", network_model), - ("network_name", network_name), - ("network_vlan_id", network_vlan_id), - ("panel_node_id", panel_node_id), - ("platform_id", platform_id), - ("pterodactyl_location_id", pterodactyl_location_id), - ("region_id", region_id), - ("storage_overallocate_percent", storage_overallocate_percent), - ("topology_paste", topology_paste), - ("vm_storage_destination", vm_storage_destination), - ("vmid_seed", vmid_seed), - ("wings_node_name", wings_node_name), - ), - idempotent=False, - timeout=timeout, - ) - - async def delete_node( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/node/{id}``.""" - return await self._client._call( - "DELETE", - f"/v1/node/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_node( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetNodeResponse: - """Call ``GET /v1/node/{id}``.""" - return await self._client._call( - "GET", - f"/v1/node/{_path(id)}", - m.GetNodeResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def get_node_cpu_map( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetNodeCPUMapResponse: - """ - Dedicated CPU cores: full topology + per-CPU occupancy for the node topology board - (docs/README-DEDICATED-CPU-CORES.md §6.3/§8.3). - - It calls ``GET /v1/node/{id}/cpu-map``. - """ - return await self._client._call( - "GET", - f"/v1/node/{_path(id)}/cpu-map", - m.GetNodeCPUMapResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_nodes( - self, - *, - page: int | None = None, - page_size: int | None = None, - platform_id: str | None = None, - service_status: m.ServiceStatus | str | None = None, - expand: list[str] | None = None, - search: str | None = None, - region_id: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListNodesResponse: - """ - Call ``GET /v1/nodes``. - - Args: - platform_id: Optional filter; UUID format validated in ListNodes when set. - """ - return await self._client._call( - "GET", - "/v1/nodes", - m.ListNodesResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("platformId", platform_id), - ("serviceStatus", service_status), - ("expand", expand), - ("search", search), - ("regionId", region_id), - ), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_nodes_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - platform_id: str | None = None, - service_status: m.ServiceStatus | str | None = None, - expand: list[str] | None = None, - search: str | None = None, - region_id: str | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.NodeWithExpandedRegion]: - """ - Every result of :meth:`list_nodes`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_nodes( - page=page, - page_size=size, - platform_id=platform_id, - service_status=service_status, - expand=expand, - search=search, - region_id=region_id, - extra_query=extra_query, - timeout=timeout, - ) - items = res.nodes - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def update_node( - self, - id: str, - *, - backup_storage_compression: m.BackupStorageCompression | str | None = None, - backup_storage_destination: str | None = None, - compute_type: m.NodeComputeType | str | None = None, - cpu_overallocate_percent: int | None = None, - maintenance_mode: bool | None = None, - memory_overallocate_percent: int | None = None, - metadata: dict[str, Any] | None = None, - network_bridge: str | None = None, - network_model: str | None = None, - network_name: str | None = None, - network_vlan_id: int | None = None, - panel_node_id: int | None = None, - pterodactyl_location_id: int | None = None, - region_id: str | None = None, - storage_overallocate_percent: int | None = None, - topology_paste: str | None = None, - vm_storage_destination: str | None = None, - vmid_seed: int | None = None, - wings_node_name: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateNodeResponse: - """ - Call ``PATCH /v1/node/{id}``. - - Args: - backup_storage_compression: Proxmox vzdump --compress (must not be UNSPECIFIED on create/update node). - compute_type: Compute product hosted by a node. Exclusive: a node is shared XOR dedicated (docs/README-DEDICATED-CPU-CORES.md, design decision D1). - NODE_COMPUTE_TYPE_SHARED: Shared vCPU hosting (CPU oversubscription allowed). Default. - NODE_COMPUTE_TYPE_DEDICATED: Dedicated pinned CPU cores (no CPU overallocation). - network_bridge: Node provisioning settings (empty string / absent = leave unchanged) - network_vlan_id: Omit to leave unchanged; 0 = untagged. - topology_paste: Topology re-paste for dedicated nodes. Rejected if it would orphan a currently allocated CPU. Empty = leave stored topology unchanged. - vmid_seed: Proxmox VMID seed. Zero means unchanged. Pterodactyl, VirtFusion, and SolusVM node edits omit it; the range applies only when a seed is sent. - """ - return await self._client._call( - "PATCH", - f"/v1/node/{_path(id)}", - m.UpdateNodeResponse, - query=_query(extra_query), - body=_body( - m.UpdateNodeBody, - extra_body, - False, - ("backup_storage_compression", backup_storage_compression), - ("backup_storage_destination", backup_storage_destination), - ("compute_type", compute_type), - ("cpu_overallocate_percent", cpu_overallocate_percent), - ("maintenance_mode", maintenance_mode), - ("memory_overallocate_percent", memory_overallocate_percent), - ("metadata", metadata), - ("network_bridge", network_bridge), - ("network_model", network_model), - ("network_name", network_name), - ("network_vlan_id", network_vlan_id), - ("panel_node_id", panel_node_id), - ("pterodactyl_location_id", pterodactyl_location_id), - ("region_id", region_id), - ("storage_overallocate_percent", storage_overallocate_percent), - ("topology_paste", topology_paste), - ("vm_storage_destination", vm_storage_destination), - ("vmid_seed", vmid_seed), - ("wings_node_name", wings_node_name), + ) -> m.ListAvailablePlansResponse: + """ + Call ``GET /v1/marketplace/plans``. + + Args: + filter_country: Optional filters Filter by country name (case-insensitive) + filter_city: Filter by city name (case-insensitive) + filter_billing_type: Filter by billing type - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) + filter_compute_type: Filter by compute type - COMPUTE_TYPE_GENERAL_COMPUTE: GC - General Compute (balanced performance) - COMPUTE_TYPE_HIGH_FREQUENCY: HF - High Frequency (CPU-optimized, high clock speeds) - COMPUTE_TYPE_HIGH_PERFORMANCE: HP - High Performance (next-gen CPUs, NVMe storage) - COMPUTE_TYPE_GENERAL_PURPOSE: GP - General Purpose (balanced dedicated resources) - COMPUTE_TYPE_CPU_OPTIMIZED: CPU - CPU Optimized (high CPU-to-memory ratio) - COMPUTE_TYPE_MEMORY_OPTIMIZED: MEM - Memory Optimized (high memory-to-CPU ratio) - COMPUTE_TYPE_STORAGE_OPTIMIZED: STO - Storage Optimized (high storage capacity) - COMPUTE_TYPE_VERY_HIGH_FREQUENCY: VHF - Very High Frequency (highest clock dedicated CPUs) - COMPUTE_TYPE_GAME_SERVER: GS - Game Server (per-CPU SKU dedicated plans, e.g. DC-GS-9950X-*) + filter_compute_category: Filter by compute category - COMPUTE_CATEGORY_SHARED_COMPUTE: Shared compute (shared resources, cost-effective) - COMPUTE_CATEGORY_DEDICATED_COMPUTE: Dedicated compute (dedicated resources, higher performance) + """ + return await self._client._call( + "GET", + "/v1/marketplace/plans", + m.ListAvailablePlansResponse, + query=_query( + extra_query, + ("filterCountry", filter_country), + ("filterCity", filter_city), + ("filterBillingType", filter_billing_type), + ("filterComputeType", filter_compute_type), + ("filterComputeCategory", filter_compute_category), + ("filterAssetType", filter_asset_type), ), + body=None, idempotent=False, timeout=timeout, ) - async def validate_node_topology( + async def list_available_regions( self, *, - node_id: str | None = None, - topology_paste: str | None = None, - extra_body: dict[str, Any] | None = None, + filter_asset_type: m.AssetType | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ValidateNodeTopologyResponse: + ) -> m.ListAvailableRegionsResponse: """ - Dedicated CPU cores: parse-preview of a topology paste without persisting. - - It calls ``POST /v1/node/topology/validate``. + Call ``GET /v1/marketplace/regions``. Args: - node_id: Optional node to cross-check the paste against (edit flow). When set, the parsed totals are compared with the node's Proxmox-reported CPU inventory (metadata.proxmox_cpu) and mismatches are returned as warnings. - topology_paste: Raw topology paste to validate without persisting. + filter_asset_type: When set, only cities that sell a marketplace-listable plan of this asset type. Unspecified keeps every marketplace city (virtual machines and game servers). """ return await self._client._call( - "POST", - "/v1/node/topology/validate", - m.ValidateNodeTopologyResponse, - query=_query(extra_query), - body=_body( - m.ValidateNodeTopologyRequest, - extra_body, - False, - ("node_id", node_id), - ("topology_paste", topology_paste), - ), + "GET", + "/v1/marketplace/regions", + m.ListAvailableRegionsResponse, + query=_query(extra_query, ("filterAssetType", filter_asset_type)), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncOAuth2Service(_ServiceAsync): - """The NodeRings OAuth2Service API.""" - - async def authorize( + async def list_marketplace_provider_directory( self, *, - client_id: str | None = None, - response_type: str | None = None, - redirect_uri: str | None = None, - scope: str | None = None, - state: str | None = None, - code_challenge: str | None = None, - code_challenge_method: str | None = None, + page: int | None = None, + page_size: int | None = None, + search: str | None = None, + filter_asset_type: m.AssetType | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.AuthorizeResponse: - """ - Authorize initiates the OAuth2 authorization flow - - It calls ``GET /v1/oauth2/authorize``. - - Args: - state: CSRF protection - code_challenge: PKCE challenge - code_challenge_method: Only S256, not plain - """ + ) -> m.ListMarketplaceProviderDirectoryResponse: + """Call ``GET /v1/marketplace/provider-directory``.""" return await self._client._call( "GET", - "/v1/oauth2/authorize", - m.AuthorizeResponse, + "/v1/marketplace/provider-directory", + m.ListMarketplaceProviderDirectoryResponse, query=_query( extra_query, - ("clientId", client_id), - ("responseType", response_type), - ("redirectUri", redirect_uri), - ("scope", scope), - ("state", state), - ("codeChallenge", code_challenge), - ("codeChallengeMethod", code_challenge_method), + ("page", page), + ("pageSize", page_size), + ("search", search), + ("filterAssetType", filter_asset_type), ), body=None, idempotent=False, timeout=timeout, ) - async def create_client( + async def list_marketplace_provider_directory_all( self, *, - client_type: str | None = None, - description: str | None = None, - name: str | None = None, - redirect_uris: list[str] | None = None, - requires_pkce: bool | None = None, - scopes: list[str] | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + search: str | None = None, + filter_asset_type: m.AssetType | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateOAuth2ClientResponse: + ) -> AsyncIterator[m.ProviderInfo]: """ - CreateClient creates a new OAuth2 client + Every result of :meth:`list_marketplace_provider_directory`, reading page after page. - It calls ``POST /v1/oauth2/clients``. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - return await self._client._call( - "POST", - "/v1/oauth2/clients", - m.CreateOAuth2ClientResponse, - query=_query(extra_query), - body=_body( - m.CreateOAuth2ClientRequest, - extra_body, - False, - ("client_type", client_type), - ("description", description), - ("name", name), - ("redirect_uris", redirect_uris), - ("requires_pkce", requires_pkce), - ("scopes", scopes), - ), - idempotent=False, - timeout=timeout, - ) + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_marketplace_provider_directory( + page=page, + page_size=size, + search=search, + filter_asset_type=filter_asset_type, + extra_query=extra_query, + timeout=timeout, + ) + items = res.providers + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 - async def delete_client( + async def list_providers( self, - client_id: str, *, + page: int | None = None, + page_size: int | None = None, + filter_plan_code: str | None = None, + filter_country: str | None = None, + filter_city: str | None = None, + filter_billing_type: m.BillingType | str | None = None, + search: str | None = None, + filter_ipv6_available_only: bool | None = None, + plan_price_sort: m.ProviderPlanPriceSort | str | None = None, + filter_unlimited_bandwidth_only: bool | None = None, + filter_ddos_providers: list[str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> m.ListProvidersResponse: """ - DeleteClient deletes an OAuth2 client + Call ``GET /v1/marketplace/providers``. - It calls ``DELETE /v1/oauth2/clients/{clientId}``. + Args: + filter_plan_code: Filter providers that offer this plan code (required) + filter_country: Filter by country name (required, case-insensitive) + filter_city: Filter by city name (required, case-insensitive) + filter_billing_type: Filter by billing type (subscription/fixed or usage-based) - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) + search: Search by organization name or description + plan_price_sort: How to order providers: default is newest first. When set, Recommendations (first three in newest-first order) stay pinned; the rest are ordered by the displayed list price for the selected plan and billing type. - PROVIDER_PLAN_PRICE_SORT_LEAST_EXPENSIVE_FIRST: Ascending among non-recommended providers: lowest list price first (usage: hourly, subscription: fixed monthly, free: 0) - PROVIDER_PLAN_PRICE_SORT_MOST_EXPENSIVE_FIRST: Descending among non-recommended providers: highest list price first + filter_unlimited_bandwidth_only: Only include providers where bandwidth egress is effectively unlimited for the selected plan (same basis as UI badge: overage_price if > 0 else unit_amount; unlimited when effective $/GB == 0). + filter_ddos_providers: When set, only organizations whose ddos_provider is one of these slugs are included. When empty, do not filter by DDoS. Mirrored by marketplace UI: all slugs "selected" = omit this. """ return await self._client._call( - "DELETE", - f"/v1/oauth2/clients/{_path(client_id)}", - m.SuccessResponse, - query=_query(extra_query), + "GET", + "/v1/marketplace/providers", + m.ListProvidersResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("filterPlanCode", filter_plan_code), + ("filterCountry", filter_country), + ("filterCity", filter_city), + ("filterBillingType", filter_billing_type), + ("search", search), + ("filterIpv6AvailableOnly", filter_ipv6_available_only), + ("planPriceSort", plan_price_sort), + ("filterUnlimitedBandwidthOnly", filter_unlimited_bandwidth_only), + ("filterDdosProviders", filter_ddos_providers), + ), body=None, idempotent=False, timeout=timeout, ) - async def list_clients( + async def list_providers_all( + self, + *, + page: int | None = None, + page_size: int | None = None, + filter_plan_code: str | None = None, + filter_country: str | None = None, + filter_city: str | None = None, + filter_billing_type: m.BillingType | str | None = None, + search: str | None = None, + filter_ipv6_available_only: bool | None = None, + plan_price_sort: m.ProviderPlanPriceSort | str | None = None, + filter_unlimited_bandwidth_only: bool | None = None, + filter_ddos_providers: list[str] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> AsyncIterator[m.ProviderInfo]: + """ + Every result of :meth:`list_providers`, reading page after page. + + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_providers( + page=page, + page_size=size, + filter_plan_code=filter_plan_code, + filter_country=filter_country, + filter_city=filter_city, + filter_billing_type=filter_billing_type, + search=search, + filter_ipv6_available_only=filter_ipv6_available_only, + plan_price_sort=plan_price_sort, + filter_unlimited_bandwidth_only=filter_unlimited_bandwidth_only, + filter_ddos_providers=filter_ddos_providers, + extra_query=extra_query, + timeout=timeout, + ) + items = res.providers + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + async def list_public_storefronts( self, *, page: int | None = None, page_size: int | None = None, + search: str | None = None, + filter_country: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListOAuth2ClientsResponse: - """ - ListClients lists OAuth2 clients for the organization - - It calls ``GET /v1/oauth2/clients``. - """ + ) -> m.ListPublicStorefrontsResponse: + """Call ``GET /v1/public/storefronts``.""" return await self._client._call( "GET", - "/v1/oauth2/clients", - m.ListOAuth2ClientsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "/v1/public/storefronts", + m.ListPublicStorefrontsResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("search", search), + ("filterCountry", filter_country), + ), body=None, idempotent=False, timeout=timeout, ) - async def list_clients_all( + async def list_public_storefronts_all( self, *, page: int | None = None, page_size: int | None = None, + search: str | None = None, + filter_country: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.OAuth2Client]: + ) -> AsyncIterator[m.PublicStorefrontCard]: """ - Every result of :meth:`list_clients`, reading page after page. + Every result of :meth:`list_public_storefronts`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -25569,8 +21796,15 @@ async def list_clients_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_clients(page=page, page_size=size, extra_query=extra_query, timeout=timeout) - items = res.clients + res = await self.list_public_storefronts( + page=page, + page_size=size, + search=search, + filter_country=filter_country, + extra_query=extra_query, + timeout=timeout, + ) + items = res.storefronts for item in items: yield item seen += len(items) @@ -25578,235 +21812,188 @@ async def list_clients_all( return page += 1 - async def refresh_token( + async def search_marketplace( self, *, - client_id: str | None = None, - client_secret: str | None = None, - refresh_token: str | None = None, + filter_billing_type: m.BillingType | str | None = None, + page: int | None = None, + page_size: int | None = None, + query: str | None = None, + turnstile_token: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.TokenResponse: + ) -> m.SearchMarketplaceResponse: """ - RefreshToken exchanges refresh token for new access token - - It calls ``POST /v1/oauth2/refresh``. + Call ``POST /v1/marketplace/search``. Args: - client_secret: Optional for public clients + turnstile_token: Cloudflare Turnstile token (required for anonymous callers when auth.turnstile.requireOnAnonymousMarketplaceSearch). """ return await self._client._call( "POST", - "/v1/oauth2/refresh", - m.TokenResponse, + "/v1/marketplace/search", + m.SearchMarketplaceResponse, query=_query(extra_query), body=_body( - m.RefreshTokenRequest, + m.SearchMarketplaceRequest, extra_body, False, - ("client_id", client_id), - ("client_secret", client_secret), - ("refresh_token", refresh_token), + ("filter_billing_type", filter_billing_type), + ("page", page), + ("page_size", page_size), + ("query", query), + ("turnstile_token", turnstile_token), ), idempotent=False, timeout=timeout, ) - async def revoke_token( + +class AsyncMetadataService(_ServiceAsync): + """The NodeRings MetadataService API.""" + + async def get_platform_versions( self, *, - client_id: str | None = None, - token: str | None = None, - token_type_hint: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> m.PlatformVersions: """ - RevokeToken revokes an access or refresh token - - It calls ``POST /v1/oauth2/revoke``. + GetPlatformVersions returns pinned versions for k3s, k3d, calico, liqo, liqoctl, and helm. - Args: - token_type_hint: "access_token" or "refresh_token" + It calls ``GET /v1/platform-versions``. """ return await self._client._call( - "POST", - "/v1/oauth2/revoke", - m.SuccessResponse, + "GET", + "/v1/platform-versions", + m.PlatformVersions, query=_query(extra_query), - body=_body( - m.RevokeTokenRequest, - extra_body, - False, - ("client_id", client_id), - ("token", token), - ("token_type_hint", token_type_hint), - ), + body=None, idempotent=False, timeout=timeout, ) - async def token( + async def get_version( self, *, - client_id: str | None = None, - client_secret: str | None = None, - code: str | None = None, - code_verifier: str | None = None, - grant_type: str | None = None, - redirect_uri: str | None = None, - refresh_token: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.TokenResponse: - """ - Token exchanges authorization code for access token - - It calls ``POST /v1/oauth2/token``. - - Args: - client_secret: Optional for public clients - code: Required for authorization_code grant - code_verifier: Required for PKCE - redirect_uri: Required for authorization_code grant - refresh_token: Required for refresh_token grant - """ + ) -> m.Metadata: + """Call ``GET /v1/version``.""" return await self._client._call( - "POST", - "/v1/oauth2/token", - m.TokenResponse, + "GET", + "/v1/version", + m.Metadata, query=_query(extra_query), - body=_body( - m.TokenRequest, - extra_body, - False, - ("client_id", client_id), - ("client_secret", client_secret), - ("code", code), - ("code_verifier", code_verifier), - ("grant_type", grant_type), - ("redirect_uri", redirect_uri), - ("refresh_token", refresh_token), - ), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncOrganizationService(_ServiceAsync): - """The NodeRings OrganizationService API.""" - - async def create_organization( + async def health_check( self, *, - asn: int | None = None, - ddos_provider: str | None = None, - description: str | None = None, - hypervisor_driver: m.PlatformDriver | str | None = None, - name: str | None = None, - provider_logo_url: str | None = None, - provider_website_url: str | None = None, - type: m.OrganizationType | str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Call ``POST /v1/organizations``. - - Args: - ddos_provider: DDoS partner slug (e.g. none, in-house, gcore, akamai, voxility). Provider orgs only. - hypervisor_driver: - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver. - provider_website_url: Required for provider organizations (http/https; scheme optional in input: server normalizes). - """ + ) -> m.HealthCheckResponse: + """Call ``GET /v1/healthz``.""" return await self._client._call( - "POST", - "/v1/organizations", - m.SuccessResponse, + "GET", + "/v1/healthz", + m.HealthCheckResponse, query=_query(extra_query), - body=_body( - m.CreateOrganizationRequest, - extra_body, - False, - ("asn", asn), - ("ddos_provider", ddos_provider), - ("description", description), - ("hypervisor_driver", hypervisor_driver), - ("name", name), - ("provider_logo_url", provider_logo_url), - ("provider_website_url", provider_website_url), - ("type", type), - ), + body=None, idempotent=False, timeout=timeout, ) - async def delete_organization( + async def list_distros( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/organizations``.""" + ) -> m.ListDistrosResponse: + """ + ListDistros returns the guest OS catalog used by the virtual machine image picker. + + It calls ``GET /v1/distros``. + """ return await self._client._call( - "DELETE", - "/v1/organizations", - m.SuccessResponse, + "GET", + "/v1/distros", + m.ListDistrosResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_organization( + +class AsyncMetricService(_ServiceAsync): + """The NodeRings MetricService API.""" + + async def get_metric( self, + id: str, *, + code: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetOrganizationResponse: - """Call ``GET /v1/organization``.""" + ) -> m.GetMetricResponse: + """ + Get a specific metric by ID or code + + It calls ``GET /v1/metrics/{id}``. + + Args: + code: Alternative to id + """ return await self._client._call( "GET", - "/v1/organization", - m.GetOrganizationResponse, - query=_query(extra_query), + f"/v1/metrics/{_path(id)}", + m.GetMetricResponse, + query=_query(extra_query, ("code", code)), body=None, idempotent=False, timeout=timeout, ) - async def list_organizations( + async def list_metrics( self, *, page: int | None = None, page_size: int | None = None, + billable_only: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListOrganizationsResponse: - """Call ``GET /v1/organizations``.""" + ) -> m.ListMetricsResponse: + """ + List all available metrics + + It calls ``GET /v1/metrics``. + """ return await self._client._call( "GET", - "/v1/organizations", - m.ListOrganizationsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "/v1/metrics", + m.ListMetricsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("billableOnly", billable_only)), body=None, idempotent=False, timeout=timeout, ) - async def list_organizations_all( + async def list_metrics_all( self, *, page: int | None = None, page_size: int | None = None, + billable_only: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Organization]: + ) -> AsyncIterator[m.Metric]: """ - Every result of :meth:`list_organizations`, reading page after page. + Every result of :meth:`list_metrics`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -25814,13 +22001,14 @@ async def list_organizations_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_organizations( + res = await self.list_metrics( page=page, page_size=size, + billable_only=billable_only, extra_query=extra_query, timeout=timeout, ) - items = res.organizations + items = res.metrics for item in items: yield item seen += len(items) @@ -25828,164 +22016,69 @@ async def list_organizations_all( return page += 1 - async def update_organization( - self, - *, - account_holder_name: str | None = None, - address: str | None = None, - address_city: str | None = None, - address_country: str | None = None, - address_line_1: str | None = None, - address_line_2: str | None = None, - address_postcode: str | None = None, - address_region: str | None = None, - asn: int | None = None, - billing_email: str | None = None, - ddos_provider: str | None = None, - description: str | None = None, - enforce_mfa: bool | None = None, - enforce_sso: bool | None = None, - enforce_verified_domain: bool | None = None, - name: str | None = None, - provider_logo_url: str | None = None, - provider_website_url: str | None = None, - social_accounts_json: str | None = None, - support_email: str | None = None, - support_phone: str | None = None, - tax_id: str | None = None, - vat_id: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateOrganizationResponse: - """ - Call ``PATCH /v1/organizations``. - - Args: - address_country: ISO 3166-1 alpha-2 (e.g. US, DE). - social_accounts_json: JSON array of up to 4 objects: [{"platform":"x","url":"https://..."}, ...]. platform must be one of: x, linkedin, instagram, facebook (Facebook/Meta). - """ - return await self._client._call( - "PATCH", - "/v1/organizations", - m.UpdateOrganizationResponse, - query=_query(extra_query), - body=_body( - m.UpdateOrganizationRequest, - extra_body, - False, - ("account_holder_name", account_holder_name), - ("address", address), - ("address_city", address_city), - ("address_country", address_country), - ("address_line_1", address_line_1), - ("address_line_2", address_line_2), - ("address_postcode", address_postcode), - ("address_region", address_region), - ("asn", asn), - ("billing_email", billing_email), - ("ddos_provider", ddos_provider), - ("description", description), - ("enforce_mfa", enforce_mfa), - ("enforce_sso", enforce_sso), - ("enforce_verified_domain", enforce_verified_domain), - ("name", name), - ("provider_logo_url", provider_logo_url), - ("provider_website_url", provider_website_url), - ("social_accounts_json", social_accounts_json), - ("support_email", support_email), - ("support_phone", support_phone), - ("tax_id", tax_id), - ("vat_id", vat_id), - ), - idempotent=False, - timeout=timeout, - ) - -class AsyncPaymentMethodService(_ServiceAsync): - """The NodeRings PaymentMethodService API.""" +class AsyncMetricsCredentialService(_ServiceAsync): + """The NodeRings MetricsCredentialService API.""" - async def attach_payment_method( + async def create_metrics_write_credential( self, *, - create_setup_intent: bool | None = None, - metadata: dict[str, Any] | None = None, - payment_method_id: str | None = None, - payment_method_token: str | None = None, - set_as_default: bool | None = None, - setup_intent_id: str | None = None, - subscription_id: str | None = None, + agent_id: str | None = None, + expires_at: datetime | None = None, + name: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.AttachPaymentMethodResponse: + ) -> m.CreateMetricsWriteCredentialResponse: """ - Attach a payment method to a subscription/organization Works for both providers (platform - subscriptions) and clients (provider plan subscriptions) Authorization: Check organization - type and rule engine (subscription.payment_method.manage.enabled) - - It calls ``POST /v1/payment-methods``. + Call ``POST /v1/metrics-write-credentials``. Args: - create_setup_intent: Create an off-session SetupIntent and return its client secret. The browser confirms the card, then calls again with setup_intent_id. - metadata: Optional: custom metadata - payment_method_id: Payment method details. Provide one of: payment_method_id, payment_method_token, setup_intent_id, or create_setup_intent. Optional: Payment method ID (if using existing) - payment_method_token: Optional: Payment method token from frontend (Stripe.js, PayPal SDK) - set_as_default: Whether to set as default payment method - setup_intent_id: Confirmed SetupIntent (seti_...) after the browser finishes 3D Secure. - subscription_id: Subscription reference (required for client subscriptions to provider plans) For provider platform subscriptions, subscription_id is required + agent_id: Optional: omit or leave empty when the credential is not tied to an agent. + expires_at: Optional expiry; omit for non-expiring machine tokens. """ return await self._client._call( "POST", - "/v1/payment-methods", - m.AttachPaymentMethodResponse, + "/v1/metrics-write-credentials", + m.CreateMetricsWriteCredentialResponse, query=_query(extra_query), body=_body( - m.AttachPaymentMethodRequest, + m.CreateMetricsWriteCredentialRequest, extra_body, False, - ("create_setup_intent", create_setup_intent), - ("metadata", metadata), - ("payment_method_id", payment_method_id), - ("payment_method_token", payment_method_token), - ("set_as_default", set_as_default), - ("setup_intent_id", setup_intent_id), - ("subscription_id", subscription_id), + ("agent_id", agent_id), + ("expires_at", expires_at), + ("name", name), ), idempotent=False, timeout=timeout, ) - async def list_payment_methods( + async def list_metrics_write_credentials( self, *, - subscription_id: str | None = None, - only_default: bool | None = None, + agent_id: str | None = None, + include_revoked: bool | None = None, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPaymentMethodsResponse: + ) -> m.ListMetricsWriteCredentialsResponse: """ - List payment methods for an organization/subscription Returns payment method details (type, - last4, brand, expiry, is_default) - - It calls ``GET /v1/payment-methods``. + Call ``GET /v1/metrics-write-credentials``. Args: - subscription_id: Filters Filter by subscription - only_default: Only return default payment method - page: Pagination + agent_id: Optional: omit or leave empty to list credentials for the whole organization. + page_size: -1 means fetch all; otherwise 1..100. """ return await self._client._call( "GET", - "/v1/payment-methods", - m.ListPaymentMethodsResponse, + "/v1/metrics-write-credentials", + m.ListMetricsWriteCredentialsResponse, query=_query( extra_query, - ("subscriptionId", subscription_id), - ("onlyDefault", only_default), + ("agentId", agent_id), + ("includeRevoked", include_revoked), ("page", page), ("pageSize", page_size), ), @@ -25994,18 +22087,18 @@ async def list_payment_methods( timeout=timeout, ) - async def list_payment_methods_all( + async def list_metrics_write_credentials_all( self, *, - subscription_id: str | None = None, - only_default: bool | None = None, + agent_id: str | None = None, + include_revoked: bool | None = None, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.PaymentMethod]: + ) -> AsyncIterator[m.MetricsWriteCredential]: """ - Every result of :meth:`list_payment_methods`, reading page after page. + Every result of :meth:`list_metrics_write_credentials`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -26013,15 +22106,15 @@ async def list_payment_methods_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_payment_methods( + res = await self.list_metrics_write_credentials( page=page, page_size=size, - subscription_id=subscription_id, - only_default=only_default, + agent_id=agent_id, + include_revoked=include_revoked, extra_query=extra_query, timeout=timeout, ) - items = res.payment_methods + items = res.credentials for item in items: yield item seen += len(items) @@ -26029,354 +22122,341 @@ async def list_payment_methods_all( return page += 1 - async def remove_payment_method( - self, - payment_method_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.RemovePaymentMethodResponse: - """ - Remove a payment method - Validation: - - Providers: Cannot remove if only one method exists (except on free plan) - - Clients: Cannot remove if only one method exists - - Cannot remove if payment method is currently in use for active - subscriptions - - It calls ``DELETE /v1/payment-methods/{paymentMethodId}``. - """ - return await self._client._call( - "DELETE", - f"/v1/payment-methods/{_path(payment_method_id)}", - m.RemovePaymentMethodResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def set_default_payment_method( + async def revoke_metrics_write_credential( self, - payment_method_id: str, + id: str, *, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SetDefaultPaymentMethodResponse: - """ - Set a payment method as the default payment method Validates payment method belongs to - organization/subscription - - It calls ``POST /v1/payment-methods/{paymentMethodId}:set-default``. - """ + ) -> m.SuccessResponse: + """Call ``POST /v1/metrics-write-credentials/{id}:revoke``.""" return await self._client._call( "POST", - f"/v1/payment-methods/{_path(payment_method_id)}:set-default", - m.SetDefaultPaymentMethodResponse, + f"/v1/metrics-write-credentials/{_path(id)}:revoke", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.SetDefaultPaymentMethodBody, extra_body, False), + body=_body(m.RevokeMetricsWriteCredentialBody, extra_body, False), idempotent=False, timeout=timeout, ) - -class AsyncPaymentService(_ServiceAsync): - """The NodeRings PaymentService API.""" - - async def get_payment( + async def rotate_metrics_write_credential( self, - payment_id: str, + id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPaymentResponse: - """ - GetPayment retrieves a single payment with refunds - - It calls ``GET /v1/payments/{paymentId}``. - """ + ) -> m.CreateMetricsWriteCredentialResponse: + """Call ``POST /v1/metrics-write-credentials/{id}:rotate``.""" return await self._client._call( - "GET", - f"/v1/payments/{_path(payment_id)}", - m.GetPaymentResponse, + "POST", + f"/v1/metrics-write-credentials/{_path(id)}:rotate", + m.CreateMetricsWriteCredentialResponse, query=_query(extra_query), - body=None, + body=_body(m.RotateMetricsWriteCredentialBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def list_payments( + +class AsyncMonitoringService(_ServiceAsync): + """The NodeRings MonitoringService API.""" + + async def create_monitoring_launch( self, *, - invoice_id: str | None = None, - status: m.PaymentStatus | str | None = None, - page: int | None = None, - page_size: int | None = None, + next: str | None = None, + resource_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPaymentsResponse: + ) -> m.CreateMonitoringLaunchResponse: """ - ListPayments lists payments for an invoice or organization + CreateMonitoringLaunch returns a one-time URL (valid for about a minute) that signs the + caller into the organization's Grafana. Grafana role: Editor when the caller may also rotate + the monitoring token, otherwise Viewer. - It calls ``GET /v1/payments``. + It calls ``POST /v1/monitoring/launch``. + + Args: + next: Optional relative Grafana path to open, e.g. "/d/nr-vm/virtual-machine?var-resource=NR-..". Validated server side; only /d/, /dashboards and /explore paths are accepted. + resource_id: Optional VM or game server id (client orgs): open its dashboard. """ return await self._client._call( - "GET", - "/v1/payments", - m.ListPaymentsResponse, - query=_query( - extra_query, ("invoiceId", invoice_id), ("status", status), ("page", page), ("pageSize", page_size) + "POST", + "/v1/monitoring/launch", + m.CreateMonitoringLaunchResponse, + query=_query(extra_query), + body=_body( + m.CreateMonitoringLaunchRequest, extra_body, False, ("next", next), ("resource_id", resource_id) ), - body=None, idempotent=False, timeout=timeout, ) - async def list_payments_all( + async def rotate_monitoring_datasource_token( self, *, - invoice_id: str | None = None, - status: m.PaymentStatus | str | None = None, - page: int | None = None, - page_size: int | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Payment]: + ) -> m.SuccessResponse: """ - Every result of :meth:`list_payments`, reading page after page. + RotateMonitoringDatasourceToken replaces the organization's Grafana datasource token. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + It calls ``POST /v1/monitoring/datasource-token:rotate``. """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_payments( - page=page, - page_size=size, - invoice_id=invoice_id, - status=status, - extra_query=extra_query, - timeout=timeout, - ) - items = res.payments - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + return await self._client._call( + "POST", + "/v1/monitoring/datasource-token:rotate", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.RotateMonitoringDatasourceTokenRequest, extra_body, False), + idempotent=False, + timeout=timeout, + ) -class AsyncPayoutConfigurationService(_ServiceAsync): - """The NodeRings PayoutConfigurationService API.""" +class AsyncNodePlacementService(_ServiceAsync): + """The NodeRings NodePlacementService API.""" - async def get_payout_configuration( + async def get_node_placement_policy( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPayoutConfigurationResponse: - """Call ``GET /v1/provider/payout-configuration``.""" + ) -> m.GetNodePlacementPolicyResponse: + """Call ``GET /v1/node-placement-policy``.""" return await self._client._call( "GET", - "/v1/provider/payout-configuration", - m.GetPayoutConfigurationResponse, + "/v1/node-placement-policy", + m.GetNodePlacementPolicyResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def update_payout_configuration( + async def update_node_placement_policy( self, *, - enabled: bool | None = None, - schedule_time: str | None = None, - schedule_timezone: str | None = None, - schedule_type: m.PayoutScheduleType | str | None = None, + default_strategy: m.NodePlacementStrategy | str | None = None, + region_overrides: list[m.NodePlacementRegionOverride | dict[str, Any]] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPayoutConfigurationResponse: - """ - Call ``PUT /v1/provider/payout-configuration``. - - Args: - enabled: Whether to enable/disable payout configuration - schedule_time: Required for daily/weekly/monthly, ignored for immediate. Format: HH:MM (24-hour) - schedule_timezone: IANA timezone - defaults to "UTC" - schedule_type: - PAYOUT_SCHEDULE_TYPE_IMMEDIATE: Transfer immediately when payment succeeds - PAYOUT_SCHEDULE_TYPE_DAILY: Transfer once per day at specified time - PAYOUT_SCHEDULE_TYPE_WEEKLY: Transfer once per week at specified time - PAYOUT_SCHEDULE_TYPE_MONTHLY: Transfer once per month at specified time - """ + ) -> m.UpdateNodePlacementPolicyResponse: + """Call ``PUT /v1/node-placement-policy``.""" return await self._client._call( "PUT", - "/v1/provider/payout-configuration", - m.GetPayoutConfigurationResponse, + "/v1/node-placement-policy", + m.UpdateNodePlacementPolicyResponse, query=_query(extra_query), body=_body( - m.UpdatePayoutConfigurationRequest, + m.UpdateNodePlacementPolicyRequest, extra_body, False, - ("enabled", enabled), - ("schedule_time", schedule_time), - ("schedule_timezone", schedule_timezone), - ("schedule_type", schedule_type), + ("default_strategy", default_strategy), + ("region_overrides", region_overrides), ), idempotent=False, timeout=timeout, ) -class AsyncPayoutInvoiceService(_ServiceAsync): - """The NodeRings PayoutInvoiceService API.""" +class AsyncNodeService(_ServiceAsync): + """The NodeRings NodeService API.""" - async def get_payout_invoice( + async def create_node( self, - id: str, *, + backup_storage_compression: m.BackupStorageCompression | str | None = None, + backup_storage_destination: str | None = None, + compute_type: m.NodeComputeType | str | None = None, + cpu_overallocate_percent: int | None = None, + maintenance_mode: bool | None = None, + memory_overallocate_percent: int | None = None, + metadata: dict[str, Any] | None = None, + name: str | None = None, + network_bridge: str | None = None, + network_model: str | None = None, + network_name: str | None = None, + network_vlan_id: int | None = None, + panel_node_id: int | None = None, + platform_id: str | None = None, + pterodactyl_location_id: int | None = None, + region_id: str | None = None, + storage_overallocate_percent: int | None = None, + topology_paste: str | None = None, + vm_storage_destination: str | None = None, + vmid_seed: int | None = None, + wings_node_name: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPayoutInvoiceResponse: - """Call ``GET /v1/provider/payout-invoices/{id}``.""" + ) -> m.SuccessResponse: + """ + Call ``POST /v1/node``. + + Args: + backup_storage_compression: Proxmox vzdump --compress (must not be UNSPECIFIED on create/update node). + compute_type: Compute product hosted by a node. Exclusive: a node is shared XOR dedicated (docs/README-DEDICATED-CPU-CORES.md, design decision D1). - NODE_COMPUTE_TYPE_SHARED: Shared vCPU hosting (CPU oversubscription allowed). Default. - NODE_COMPUTE_TYPE_DEDICATED: Dedicated pinned CPU cores (no CPU overallocation). + metadata: Optional node metadata (VirtFusion hypervisor_id / group_id live under metadata.virtfusion). + network_bridge: Node provisioning settings (server-side defaults applied when omitted) Proxmox Linux bridge for VM primary NIC. Default: vmbr0. + network_model: Proxmox NIC model for primary NIC. Default: virtio. + network_name: Proxmox net device key for primary NIC (net0, net1, ...). Default: net0. + network_vlan_id: 802.1Q VLAN tag on primary NIC (Proxmox tag=); 0 = untagged. + topology_paste: Raw topology paste (output of the documented lscpu/sysfs command block). Required when compute_type is dedicated; ignored otherwise. + """ return await self._client._call( - "GET", - f"/v1/provider/payout-invoices/{_path(id)}", - m.GetPayoutInvoiceResponse, + "POST", + "/v1/node", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body( + m.CreateNodeRequest, + extra_body, + False, + ("backup_storage_compression", backup_storage_compression), + ("backup_storage_destination", backup_storage_destination), + ("compute_type", compute_type), + ("cpu_overallocate_percent", cpu_overallocate_percent), + ("maintenance_mode", maintenance_mode), + ("memory_overallocate_percent", memory_overallocate_percent), + ("metadata", metadata), + ("name", name), + ("network_bridge", network_bridge), + ("network_model", network_model), + ("network_name", network_name), + ("network_vlan_id", network_vlan_id), + ("panel_node_id", panel_node_id), + ("platform_id", platform_id), + ("pterodactyl_location_id", pterodactyl_location_id), + ("region_id", region_id), + ("storage_overallocate_percent", storage_overallocate_percent), + ("topology_paste", topology_paste), + ("vm_storage_destination", vm_storage_destination), + ("vmid_seed", vmid_seed), + ("wings_node_name", wings_node_name), + ), idempotent=False, timeout=timeout, ) - async def get_provider_revenue( + async def delete_node( self, + id: str, *, - start_date: datetime | None = None, - end_date: datetime | None = None, - plan_id: str | None = None, - client_organization_id: str | None = None, - include_pending: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderRevenueResponse: - """ - Call ``GET /v1/provider/revenue``. - - Args: - start_date: Start date for revenue calculation (inclusive) - end_date: End date for revenue calculation (inclusive) - plan_id: Filter by plan ID (optional) - client_organization_id: Filter by client organization ID (optional) - include_pending: Include pending/processing payouts in calculations (default: true) - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/node/{id}``.""" return await self._client._call( - "GET", - "/v1/provider/revenue", - m.GetProviderRevenueResponse, - query=_query( - extra_query, - ("startDate", start_date), - ("endDate", end_date), - ("planId", plan_id), - ("clientOrganizationId", client_organization_id), - ("includePending", include_pending), - ), + "DELETE", + f"/v1/node/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_held_payouts( + async def get_node( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListHeldPayoutsResponse: - """ - Paid client invoices whose payout to this provider is on hold, soonest release first. - - It calls ``GET /v1/provider/held-payouts``. - """ + ) -> m.GetNodeResponse: + """Call ``GET /v1/node/{id}``.""" return await self._client._call( "GET", - "/v1/provider/held-payouts", - m.ListHeldPayoutsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + f"/v1/node/{_path(id)}", + m.GetNodeResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_held_payouts_all( + async def get_node_cpu_map( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.HeldPayout]: + ) -> m.GetNodeCPUMapResponse: """ - Every result of :meth:`list_held_payouts`, reading page after page. + Dedicated CPU cores: full topology + per-CPU occupancy for the node topology board + (docs/README-DEDICATED-CPU-CORES.md §6.3/§8.3). - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + It calls ``GET /v1/node/{id}/cpu-map``. """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_held_payouts( - page=page, - page_size=size, - extra_query=extra_query, - timeout=timeout, - ) - items = res.held_payouts - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + return await self._client._call( + "GET", + f"/v1/node/{_path(id)}/cpu-map", + m.GetNodeCPUMapResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - async def list_payout_invoices( + async def list_nodes( self, *, page: int | None = None, page_size: int | None = None, - status: m.PayoutStatus | str | None = None, + platform_id: str | None = None, + service_status: m.ServiceStatus | str | None = None, + expand: list[str] | None = None, + search: str | None = None, + region_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPayoutInvoicesResponse: + ) -> m.ListNodesResponse: """ - Call ``GET /v1/provider/payout-invoices``. + Call ``GET /v1/nodes``. Args: - status: Filter by payout status + platform_id: Optional filter; UUID format validated in ListNodes when set. """ return await self._client._call( "GET", - "/v1/provider/payout-invoices", - m.ListPayoutInvoicesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("status", status)), + "/v1/nodes", + m.ListNodesResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("platformId", platform_id), + ("serviceStatus", service_status), + ("expand", expand), + ("search", search), + ("regionId", region_id), + ), body=None, idempotent=False, timeout=timeout, ) - async def list_payout_invoices_all( + async def list_nodes_all( self, *, page: int | None = None, page_size: int | None = None, - status: m.PayoutStatus | str | None = None, + platform_id: str | None = None, + service_status: m.ServiceStatus | str | None = None, + expand: list[str] | None = None, + search: str | None = None, + region_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.PayoutInvoice]: + ) -> AsyncIterator[m.NodeWithExpandedRegion]: """ - Every result of :meth:`list_payout_invoices`, reading page after page. + Every result of :meth:`list_nodes`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -26384,14 +22464,18 @@ async def list_payout_invoices_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_payout_invoices( + res = await self.list_nodes( page=page, page_size=size, - status=status, + platform_id=platform_id, + service_status=service_status, + expand=expand, + search=search, + region_id=region_id, extra_query=extra_query, timeout=timeout, ) - items = res.payout_invoices + items = res.nodes for item in items: yield item seen += len(items) @@ -26399,195 +22483,250 @@ async def list_payout_invoices_all( return page += 1 - -class AsyncPermissionService(_ServiceAsync): - """The NodeRings PermissionService API.""" - - async def assign_permission_to_role( + async def update_node( self, + id: str, *, - permission_ids: list[str] | None = None, - role_id: str | None = None, + backup_storage_compression: m.BackupStorageCompression | str | None = None, + backup_storage_destination: str | None = None, + compute_type: m.NodeComputeType | str | None = None, + cpu_overallocate_percent: int | None = None, + maintenance_mode: bool | None = None, + memory_overallocate_percent: int | None = None, + metadata: dict[str, Any] | None = None, + network_bridge: str | None = None, + network_model: str | None = None, + network_name: str | None = None, + network_vlan_id: int | None = None, + panel_node_id: int | None = None, + pterodactyl_location_id: int | None = None, + region_id: str | None = None, + storage_overallocate_percent: int | None = None, + topology_paste: str | None = None, + vm_storage_destination: str | None = None, + vmid_seed: int | None = None, + wings_node_name: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/permissions/assign-to-role``.""" + ) -> m.UpdateNodeResponse: + """ + Call ``PATCH /v1/node/{id}``. + + Args: + backup_storage_compression: Proxmox vzdump --compress (must not be UNSPECIFIED on create/update node). + compute_type: Compute product hosted by a node. Exclusive: a node is shared XOR dedicated (docs/README-DEDICATED-CPU-CORES.md, design decision D1). - NODE_COMPUTE_TYPE_SHARED: Shared vCPU hosting (CPU oversubscription allowed). Default. - NODE_COMPUTE_TYPE_DEDICATED: Dedicated pinned CPU cores (no CPU overallocation). + network_bridge: Node provisioning settings (empty string / absent = leave unchanged) + network_vlan_id: Omit to leave unchanged; 0 = untagged. + topology_paste: Topology re-paste for dedicated nodes. Rejected if it would orphan a currently allocated CPU. Empty = leave stored topology unchanged. + vmid_seed: Proxmox VMID seed. Zero means unchanged. Pterodactyl, VirtFusion, and SolusVM node edits omit it; the range applies only when a seed is sent. + """ return await self._client._call( - "POST", - "/v1/permissions/assign-to-role", - m.SuccessResponse, + "PATCH", + f"/v1/node/{_path(id)}", + m.UpdateNodeResponse, query=_query(extra_query), body=_body( - m.AssignPermissionToRoleRequest, + m.UpdateNodeBody, extra_body, False, - ("permission_ids", permission_ids), - ("role_id", role_id), + ("backup_storage_compression", backup_storage_compression), + ("backup_storage_destination", backup_storage_destination), + ("compute_type", compute_type), + ("cpu_overallocate_percent", cpu_overallocate_percent), + ("maintenance_mode", maintenance_mode), + ("memory_overallocate_percent", memory_overallocate_percent), + ("metadata", metadata), + ("network_bridge", network_bridge), + ("network_model", network_model), + ("network_name", network_name), + ("network_vlan_id", network_vlan_id), + ("panel_node_id", panel_node_id), + ("pterodactyl_location_id", pterodactyl_location_id), + ("region_id", region_id), + ("storage_overallocate_percent", storage_overallocate_percent), + ("topology_paste", topology_paste), + ("vm_storage_destination", vm_storage_destination), + ("vmid_seed", vmid_seed), + ("wings_node_name", wings_node_name), ), idempotent=False, timeout=timeout, ) - async def list_effective_permissions( + async def validate_node_topology( self, *, - user_ids: list[str] | None = None, + node_id: str | None = None, + topology_paste: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListEffectivePermissionsResponse: - """Call ``GET /v1/permissions/effective``.""" + ) -> m.ValidateNodeTopologyResponse: + """ + Dedicated CPU cores: parse-preview of a topology paste without persisting. + + It calls ``POST /v1/node/topology/validate``. + + Args: + node_id: Optional node to cross-check the paste against (edit flow). When set, the parsed totals are compared with the node's Proxmox-reported CPU inventory (metadata.proxmox_cpu) and mismatches are returned as warnings. + topology_paste: Raw topology paste to validate without persisting. + """ return await self._client._call( - "GET", - "/v1/permissions/effective", - m.ListEffectivePermissionsResponse, - query=_query(extra_query, ("userIds", user_ids)), - body=None, + "POST", + "/v1/node/topology/validate", + m.ValidateNodeTopologyResponse, + query=_query(extra_query), + body=_body( + m.ValidateNodeTopologyRequest, + extra_body, + False, + ("node_id", node_id), + ("topology_paste", topology_paste), + ), idempotent=False, timeout=timeout, ) - async def list_permissions( + +class AsyncOAuth2Service(_ServiceAsync): + """The NodeRings OAuth2Service API.""" + + async def authorize( self, *, - page: int | None = None, - page_size: int | None = None, - filter_name: str | None = None, + client_id: str | None = None, + response_type: str | None = None, + redirect_uri: str | None = None, + scope: str | None = None, + state: str | None = None, + code_challenge: str | None = None, + code_challenge_method: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPermissionsResponse: - """Call ``GET /v1/permissions``.""" + ) -> m.AuthorizeResponse: + """ + Authorize initiates the OAuth2 authorization flow + + It calls ``GET /v1/oauth2/authorize``. + + Args: + state: CSRF protection + code_challenge: PKCE challenge + code_challenge_method: Only S256, not plain + """ return await self._client._call( "GET", - "/v1/permissions", - m.ListPermissionsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterName", filter_name)), + "/v1/oauth2/authorize", + m.AuthorizeResponse, + query=_query( + extra_query, + ("clientId", client_id), + ("responseType", response_type), + ("redirectUri", redirect_uri), + ("scope", scope), + ("state", state), + ("codeChallenge", code_challenge), + ("codeChallengeMethod", code_challenge_method), + ), body=None, idempotent=False, timeout=timeout, ) - async def list_permissions_all( + async def create_client( self, *, - page: int | None = None, - page_size: int | None = None, - filter_name: str | None = None, + client_type: str | None = None, + description: str | None = None, + name: str | None = None, + redirect_uris: list[str] | None = None, + requires_pkce: bool | None = None, + scopes: list[str] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Permission]: + ) -> m.CreateOAuth2ClientResponse: """ - Every result of :meth:`list_permissions`, reading page after page. + CreateClient creates a new OAuth2 client - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + It calls ``POST /v1/oauth2/clients``. """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_permissions( - page=page, - page_size=size, - filter_name=filter_name, - extra_query=extra_query, - timeout=timeout, - ) - items = res.permissions - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + return await self._client._call( + "POST", + "/v1/oauth2/clients", + m.CreateOAuth2ClientResponse, + query=_query(extra_query), + body=_body( + m.CreateOAuth2ClientRequest, + extra_body, + False, + ("client_type", client_type), + ("description", description), + ("name", name), + ("redirect_uris", redirect_uris), + ("requires_pkce", requires_pkce), + ("scopes", scopes), + ), + idempotent=False, + timeout=timeout, + ) - async def remove_permission_from_role( + async def delete_client( self, + client_id: str, *, - permission_ids: list[str] | None = None, - role_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/permissions/remove-from-role``.""" + """ + DeleteClient deletes an OAuth2 client + + It calls ``DELETE /v1/oauth2/clients/{clientId}``. + """ return await self._client._call( "DELETE", - "/v1/permissions/remove-from-role", + f"/v1/oauth2/clients/{_path(client_id)}", m.SuccessResponse, - query=_query(extra_query, ("permissionIds", permission_ids), ("roleId", role_id)), + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - -class AsyncPlanService(_ServiceAsync): - """The NodeRings PlanService API.""" - - async def list_plans( + async def list_clients( self, *, page: int | None = None, page_size: int | None = None, - is_template: bool | None = None, - end_user: m.EndUser | str | None = None, - search: str | None = None, - asset_type: m.AssetType | str | None = None, - billing_type: m.BillingType | str | None = None, - filter_compute_type: str | None = None, - filter_code: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPlansResponse: + ) -> m.ListOAuth2ClientsResponse: """ - Call ``GET /v1/plans``. + ListClients lists OAuth2 clients for the organization - Args: - is_template: Filter to show only template plans (true) or only non-template plans (false) If not specified, shows both template and non-template plans - end_user: Filter by end user type (client, provider, or all) If not specified, shows plans for all end user types based on organization permissions - search: Search filter for plan name, code, or description - asset_type: Filter by asset type (vm, gameserver, etc.) - billing_type: Filter by billing type (subscription, usage, etc.) If not specified, shows plans for all billing types - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) - filter_compute_type: Filter by compute type (optional). If provided, only plans with matching compute type in their name are returned. Examples: "high performance", "high frequency", "general compute", "general purpose", "cpu optimized", "memory optimized", "storage optimized" Filtering is case-insensitive. - filter_code: Filter by plan code (optional). If provided, only plans with matching code are returned. Filtering is case-insensitive. Examples: "SC-GC-1C-1G-20", "DC-HF-4C-8G-160" Filtering is case-insensitive. + It calls ``GET /v1/oauth2/clients``. """ return await self._client._call( "GET", - "/v1/plans", - m.ListPlansResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("isTemplate", is_template), - ("endUser", end_user), - ("search", search), - ("assetType", asset_type), - ("billingType", billing_type), - ("filterComputeType", filter_compute_type), - ("filterCode", filter_code), - ), + "/v1/oauth2/clients", + m.ListOAuth2ClientsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - async def list_plans_all( + async def list_clients_all( self, *, page: int | None = None, page_size: int | None = None, - is_template: bool | None = None, - end_user: m.EndUser | str | None = None, - search: str | None = None, - asset_type: m.AssetType | str | None = None, - billing_type: m.BillingType | str | None = None, - filter_compute_type: str | None = None, - filter_code: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Plan]: + ) -> AsyncIterator[m.OAuth2Client]: """ - Every result of :meth:`list_plans`, reading page after page. + Every result of :meth:`list_clients`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -26595,20 +22734,8 @@ async def list_plans_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_plans( - page=page, - page_size=size, - is_template=is_template, - end_user=end_user, - search=search, - asset_type=asset_type, - billing_type=billing_type, - filter_compute_type=filter_compute_type, - filter_code=filter_code, - extra_query=extra_query, - timeout=timeout, - ) - items = res.plans + res = await self.list_clients(page=page, page_size=size, extra_query=extra_query, timeout=timeout) + items = res.clients for item in items: yield item seen += len(items) @@ -26616,109 +22743,182 @@ async def list_plans_all( return page += 1 - async def subscribe( + async def refresh_token( self, - plan_id: str, *, - billing_period: m.BillingPeriod | str | None = None, + client_id: str | None = None, + client_secret: str | None = None, + refresh_token: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SubscribeResponse: + ) -> m.TokenResponse: """ - Call ``POST /v1/plans/{planId}:subscribe``. + RefreshToken exchanges refresh token for new access token + + It calls ``POST /v1/oauth2/refresh``. Args: - billing_period: Optional billing period. If not provided, uses the plan's default billing period. If provided, validates that a PlanPrice exists for this billing period. If not available, returns a FailedPrecondition error. + client_secret: Optional for public clients """ return await self._client._call( "POST", - f"/v1/plans/{_path(plan_id)}:subscribe", - m.SubscribeResponse, - query=_query(extra_query, ("billingPeriod", billing_period)), - body=None, + "/v1/oauth2/refresh", + m.TokenResponse, + query=_query(extra_query), + body=_body( + m.RefreshTokenRequest, + extra_body, + False, + ("client_id", client_id), + ("client_secret", client_secret), + ("refresh_token", refresh_token), + ), idempotent=False, timeout=timeout, ) - -class AsyncPlatformService(_ServiceAsync): - """The NodeRings PlatformService API.""" - - async def assign_agent( + async def revoke_token( self, - platform_id: str, *, - agent_id: str | None = None, + client_id: str | None = None, + token: str | None = None, + token_type_hint: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/platforms/{platformId}:AssignAgent``.""" + """ + RevokeToken revokes an access or refresh token + + It calls ``POST /v1/oauth2/revoke``. + + Args: + token_type_hint: "access_token" or "refresh_token" + """ return await self._client._call( "POST", - f"/v1/platforms/{_path(platform_id)}:AssignAgent", + "/v1/oauth2/revoke", m.SuccessResponse, query=_query(extra_query), - body=_body(m.AssignAgentBody, extra_body, False, ("agent_id", agent_id)), + body=_body( + m.RevokeTokenRequest, + extra_body, + False, + ("client_id", client_id), + ("token", token), + ("token_type_hint", token_type_hint), + ), idempotent=False, timeout=timeout, ) - async def create_platform( + async def token( self, *, - agent_id: str | None = None, - assign_customer_ipv6: bool | None = None, - driver: m.PlatformDriver | str | None = None, - endpoint_url: str | None = None, - name: str | None = None, - panel_url: str | None = None, - pterodactyl: bool | None = None, + client_id: str | None = None, + client_secret: str | None = None, + code: str | None = None, + code_verifier: str | None = None, + grant_type: str | None = None, + redirect_uri: str | None = None, + refresh_token: str | None = None, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.TokenResponse: + """ + Token exchanges authorization code for access token + + It calls ``POST /v1/oauth2/token``. + + Args: + client_secret: Optional for public clients + code: Required for authorization_code grant + code_verifier: Required for PKCE + redirect_uri: Required for authorization_code grant + refresh_token: Required for refresh_token grant + """ + return await self._client._call( + "POST", + "/v1/oauth2/token", + m.TokenResponse, + query=_query(extra_query), + body=_body( + m.TokenRequest, + extra_body, + False, + ("client_id", client_id), + ("client_secret", client_secret), + ("code", code), + ("code_verifier", code_verifier), + ("grant_type", grant_type), + ("redirect_uri", redirect_uri), + ("refresh_token", refresh_token), + ), + idempotent=False, + timeout=timeout, + ) + + +class AsyncOrganizationService(_ServiceAsync): + """The NodeRings OrganizationService API.""" + + async def create_organization( + self, + *, + asn: int | None = None, + ddos_provider: str | None = None, + description: str | None = None, + hypervisor_driver: m.PlatformDriver | str | None = None, + name: str | None = None, + provider_logo_url: str | None = None, + provider_website_url: str | None = None, + type: m.OrganizationType | str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: """ - Call ``POST /v1/platform``. + Call ``POST /v1/organizations``. Args: - assign_customer_ipv6: VirtFusion/SolusVM only. Rejected when the org driver is Proxmox. - driver: - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver. - panel_url: Panel base URL. Required when pterodactyl is true. A bare IP is stored as http://ip. - pterodactyl: When true, this platform is Pterodactyl. A hypervisor driver is not required. + ddos_provider: DDoS partner slug (e.g. none, in-house, gcore, akamai, voxility). Provider orgs only. + hypervisor_driver: - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver. + provider_website_url: Required for provider organizations (http/https; scheme optional in input: server normalizes). """ return await self._client._call( "POST", - "/v1/platform", + "/v1/organizations", m.SuccessResponse, query=_query(extra_query), body=_body( - m.CreatePlatformRequest, + m.CreateOrganizationRequest, extra_body, False, - ("agent_id", agent_id), - ("assign_customer_ipv6", assign_customer_ipv6), - ("driver", driver), - ("endpoint_url", endpoint_url), + ("asn", asn), + ("ddos_provider", ddos_provider), + ("description", description), + ("hypervisor_driver", hypervisor_driver), ("name", name), - ("panel_url", panel_url), - ("pterodactyl", pterodactyl), + ("provider_logo_url", provider_logo_url), + ("provider_website_url", provider_website_url), + ("type", type), ), idempotent=False, timeout=timeout, ) - async def delete_platform( + async def delete_organization( self, - id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/platform/{id}``.""" + """Call ``DELETE /v1/organizations``.""" return await self._client._call( "DELETE", - f"/v1/platform/{_path(id)}", + "/v1/organizations", m.SuccessResponse, query=_query(extra_query), body=None, @@ -26726,63 +22926,52 @@ async def delete_platform( timeout=timeout, ) - async def get_platform( + async def get_organization( self, - id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPlatformResponse: - """Call ``GET /v1/platform/{id}``.""" + ) -> m.GetOrganizationResponse: + """Call ``GET /v1/organization``.""" return await self._client._call( "GET", - f"/v1/platform/{_path(id)}", - m.GetPlatformResponse, + "/v1/organization", + m.GetOrganizationResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_platforms( + async def list_organizations( self, *, page: int | None = None, page_size: int | None = None, - service_status: m.ServiceStatus | str | None = None, - search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPlatformsResponse: - """Call ``GET /v1/platforms``.""" + ) -> m.ListOrganizationsResponse: + """Call ``GET /v1/organizations``.""" return await self._client._call( "GET", - "/v1/platforms", - m.ListPlatformsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("serviceStatus", service_status), - ("search", search), - ), + "/v1/organizations", + m.ListOrganizationsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - async def list_platforms_all( + async def list_organizations_all( self, *, page: int | None = None, page_size: int | None = None, - service_status: m.ServiceStatus | str | None = None, - search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Platform]: + ) -> AsyncIterator[m.Organization]: """ - Every result of :meth:`list_platforms`, reading page after page. + Every result of :meth:`list_organizations`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -26790,15 +22979,13 @@ async def list_platforms_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_platforms( + res = await self.list_organizations( page=page, page_size=size, - service_status=service_status, - search=search, extra_query=extra_query, timeout=timeout, ) - items = res.platforms + items = res.organizations for item in items: yield item seen += len(items) @@ -26806,86 +22993,164 @@ async def list_platforms_all( return page += 1 - async def unassign_agent( + async def update_organization( self, - platform_id: str, *, - agent_id: str | None = None, + account_holder_name: str | None = None, + address: str | None = None, + address_city: str | None = None, + address_country: str | None = None, + address_line_1: str | None = None, + address_line_2: str | None = None, + address_postcode: str | None = None, + address_region: str | None = None, + asn: int | None = None, + billing_email: str | None = None, + ddos_provider: str | None = None, + description: str | None = None, + enforce_mfa: bool | None = None, + enforce_sso: bool | None = None, + enforce_verified_domain: bool | None = None, + name: str | None = None, + provider_logo_url: str | None = None, + provider_website_url: str | None = None, + social_accounts_json: str | None = None, + support_email: str | None = None, + support_phone: str | None = None, + tax_id: str | None = None, + vat_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/platforms/{platformId}:UnassignAgent``.""" + ) -> m.UpdateOrganizationResponse: + """ + Call ``PATCH /v1/organizations``. + + Args: + address_country: ISO 3166-1 alpha-2 (e.g. US, DE). + social_accounts_json: JSON array of up to 4 objects: [{"platform":"x","url":"https://..."}, ...]. platform must be one of: x, linkedin, instagram, facebook (Facebook/Meta). + """ return await self._client._call( - "POST", - f"/v1/platforms/{_path(platform_id)}:UnassignAgent", - m.SuccessResponse, + "PATCH", + "/v1/organizations", + m.UpdateOrganizationResponse, query=_query(extra_query), - body=_body(m.UnassignAgentBody, extra_body, False, ("agent_id", agent_id)), + body=_body( + m.UpdateOrganizationRequest, + extra_body, + False, + ("account_holder_name", account_holder_name), + ("address", address), + ("address_city", address_city), + ("address_country", address_country), + ("address_line_1", address_line_1), + ("address_line_2", address_line_2), + ("address_postcode", address_postcode), + ("address_region", address_region), + ("asn", asn), + ("billing_email", billing_email), + ("ddos_provider", ddos_provider), + ("description", description), + ("enforce_mfa", enforce_mfa), + ("enforce_sso", enforce_sso), + ("enforce_verified_domain", enforce_verified_domain), + ("name", name), + ("provider_logo_url", provider_logo_url), + ("provider_website_url", provider_website_url), + ("social_accounts_json", social_accounts_json), + ("support_email", support_email), + ("support_phone", support_phone), + ("tax_id", tax_id), + ("vat_id", vat_id), + ), idempotent=False, timeout=timeout, ) - async def update_platform( + +class AsyncPaymentMethodService(_ServiceAsync): + """The NodeRings PaymentMethodService API.""" + + async def attach_payment_method( self, - id: str, *, - assign_customer_ipv6: bool | None = None, - endpoint_url: str | None = None, - name: str | None = None, + create_setup_intent: bool | None = None, + metadata: dict[str, Any] | None = None, + payment_method_id: str | None = None, + payment_method_token: str | None = None, + set_as_default: bool | None = None, + setup_intent_id: str | None = None, + subscription_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdatePlatformResponse: + ) -> m.AttachPaymentMethodResponse: """ - Call ``PATCH /v1/platform/{id}``. + Attach a payment method to a subscription/organization Works for both providers (platform + subscriptions) and clients (provider plan subscriptions) Authorization: Check organization + type and rule engine (subscription.payment_method.manage.enabled) + + It calls ``POST /v1/payment-methods``. Args: - assign_customer_ipv6: VirtFusion/SolusVM only. Unset means leave unchanged. True is rejected for Proxmox. - endpoint_url: Immutable after create. Empty or equal to the stored URL is ignored; any other value is rejected. + create_setup_intent: Create an off-session SetupIntent and return its client secret. The browser confirms the card, then calls again with setup_intent_id. + metadata: Optional: custom metadata + payment_method_id: Payment method details. Provide one of: payment_method_id, payment_method_token, setup_intent_id, or create_setup_intent. Optional: Payment method ID (if using existing) + payment_method_token: Optional: Payment method token from frontend (Stripe.js, PayPal SDK) + set_as_default: Whether to set as default payment method + setup_intent_id: Confirmed SetupIntent (seti_...) after the browser finishes 3D Secure. + subscription_id: Subscription reference (required for client subscriptions to provider plans) For provider platform subscriptions, subscription_id is required """ return await self._client._call( - "PATCH", - f"/v1/platform/{_path(id)}", - m.UpdatePlatformResponse, + "POST", + "/v1/payment-methods", + m.AttachPaymentMethodResponse, query=_query(extra_query), body=_body( - m.UpdatePlatformBody, + m.AttachPaymentMethodRequest, extra_body, False, - ("assign_customer_ipv6", assign_customer_ipv6), - ("endpoint_url", endpoint_url), - ("name", name), + ("create_setup_intent", create_setup_intent), + ("metadata", metadata), + ("payment_method_id", payment_method_id), + ("payment_method_token", payment_method_token), + ("set_as_default", set_as_default), + ("setup_intent_id", setup_intent_id), + ("subscription_id", subscription_id), ), idempotent=False, timeout=timeout, ) - -class AsyncPreflightService(_ServiceAsync): - """The NodeRings PreflightService API.""" - - async def list_preflight_checks( + async def list_payment_methods( self, *, - plan_code: str | None = None, - plan_id: str | None = None, - issues_only: bool | None = None, + subscription_id: str | None = None, + only_default: bool | None = None, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPreflightChecksResponse: - """Call ``GET /v1/provider/preflight-checks``.""" + ) -> m.ListPaymentMethodsResponse: + """ + List payment methods for an organization/subscription Returns payment method details (type, + last4, brand, expiry, is_default) + + It calls ``GET /v1/payment-methods``. + + Args: + subscription_id: Filters Filter by subscription + only_default: Only return default payment method + page: Pagination + """ return await self._client._call( "GET", - "/v1/provider/preflight-checks", - m.ListPreflightChecksResponse, + "/v1/payment-methods", + m.ListPaymentMethodsResponse, query=_query( extra_query, - ("planCode", plan_code), - ("planId", plan_id), - ("issuesOnly", issues_only), + ("subscriptionId", subscription_id), + ("onlyDefault", only_default), ("page", page), ("pageSize", page_size), ), @@ -26894,19 +23159,18 @@ async def list_preflight_checks( timeout=timeout, ) - async def list_preflight_checks_all( + async def list_payment_methods_all( self, *, - plan_code: str | None = None, - plan_id: str | None = None, - issues_only: bool | None = None, + subscription_id: str | None = None, + only_default: bool | None = None, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.PlanPreflightView]: + ) -> AsyncIterator[m.PaymentMethod]: """ - Every result of :meth:`list_preflight_checks`, reading page after page. + Every result of :meth:`list_payment_methods`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -26914,16 +23178,15 @@ async def list_preflight_checks_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_preflight_checks( + res = await self.list_payment_methods( page=page, page_size=size, - plan_code=plan_code, - plan_id=plan_id, - issues_only=issues_only, + subscription_id=subscription_id, + only_default=only_default, extra_query=extra_query, timeout=timeout, ) - items = res.plans + items = res.payment_methods for item in items: yield item seen += len(items) @@ -26931,415 +23194,455 @@ async def list_preflight_checks_all( return page += 1 - -class AsyncProviderConnectService(_ServiceAsync): - """The NodeRings ProviderConnectService API.""" - - async def complete_connect_oauth( + async def remove_payment_method( self, + payment_method_id: str, *, - code: str | None = None, - state: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CompleteConnectOAuthResponse: + ) -> m.RemovePaymentMethodResponse: """ - Completes Stripe Connect OAuth after Stripe redirects back with a code. + Remove a payment method + Validation: + - Providers: Cannot remove if only one method exists (except on free plan) + - Clients: Cannot remove if only one method exists + - Cannot remove if payment method is currently in use for active + subscriptions - It calls ``POST /v1/provider/connect/oauth:complete``. + It calls ``DELETE /v1/payment-methods/{paymentMethodId}``. """ return await self._client._call( - "POST", - "/v1/provider/connect/oauth:complete", - m.CompleteConnectOAuthResponse, + "DELETE", + f"/v1/payment-methods/{_path(payment_method_id)}", + m.RemovePaymentMethodResponse, query=_query(extra_query), - body=_body(m.CompleteConnectOAuthRequest, extra_body, False, ("code", code), ("state", state)), + body=None, idempotent=False, timeout=timeout, ) - async def create_connect_account( + async def set_default_payment_method( self, + payment_method_id: str, *, - country: str | None = None, - email: str | None = None, - metadata: dict[str, Any] | None = None, - type: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateConnectAccountResponse: + ) -> m.SetDefaultPaymentMethodResponse: """ - Call ``POST /v1/provider/connect/account``. + Set a payment method as the default payment method Validates payment method belongs to + organization/subscription - Args: - country: ISO country code (e.g., "US") - metadata: Optional: custom metadata - type: Account type: "standard", "express", "custom" (Stripe) or "merchant" (PayPal). Always "standard" for dispute resolution + It calls ``POST /v1/payment-methods/{paymentMethodId}:set-default``. """ return await self._client._call( "POST", - "/v1/provider/connect/account", - m.CreateConnectAccountResponse, + f"/v1/payment-methods/{_path(payment_method_id)}:set-default", + m.SetDefaultPaymentMethodResponse, query=_query(extra_query), - body=_body( - m.CreateConnectAccountRequest, - extra_body, - False, - ("country", country), - ("email", email), - ("metadata", metadata), - ("type", type), - ), + body=_body(m.SetDefaultPaymentMethodBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def create_connect_tax_registration( + +class AsyncPaymentService(_ServiceAsync): + """The NodeRings PaymentService API.""" + + async def get_payment( self, + payment_id: str, *, - country: str | None = None, - registration_type: str | None = None, - state: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateConnectTaxRegistrationResponse: + ) -> m.GetPaymentResponse: """ - Call ``POST /v1/provider/connect/tax-registrations``. + GetPayment retrieves a single payment with refunds - Args: - registration_type: optional; defaults per country - state: required for US + It calls ``GET /v1/payments/{paymentId}``. """ return await self._client._call( - "POST", - "/v1/provider/connect/tax-registrations", - m.CreateConnectTaxRegistrationResponse, + "GET", + f"/v1/payments/{_path(payment_id)}", + m.GetPaymentResponse, query=_query(extra_query), - body=_body( - m.CreateConnectTaxRegistrationRequest, - extra_body, - False, - ("country", country), - ("registration_type", registration_type), - ("state", state), - ), + body=None, idempotent=False, timeout=timeout, ) - async def create_connect_tax_session( + async def list_payments( self, *, - extra_body: dict[str, Any] | None = None, + invoice_id: str | None = None, + status: m.PaymentStatus | str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateConnectTaxSessionResponse: + ) -> m.ListPaymentsResponse: """ - Creates a Stripe AccountSession client secret for Connect tax_settings / tax_registrations - embedded components (legacy; prefer native tax RPCs). + ListPayments lists payments for an invoice or organization - It calls ``POST /v1/provider/connect/tax-session``. + It calls ``GET /v1/payments``. """ return await self._client._call( - "POST", - "/v1/provider/connect/tax-session", - m.CreateConnectTaxSessionResponse, - query=_query(extra_query), - body=dict(extra_body or {}), + "GET", + "/v1/payments", + m.ListPaymentsResponse, + query=_query( + extra_query, ("invoiceId", invoice_id), ("status", status), ("page", page), ("pageSize", page_size) + ), + body=None, idempotent=False, timeout=timeout, ) - async def disconnect_connect_account( + async def list_payments_all( + self, + *, + invoice_id: str | None = None, + status: m.PaymentStatus | str | None = None, + page: int | None = None, + page_size: int | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> AsyncIterator[m.Payment]: + """ + Every result of :meth:`list_payments`, reading page after page. + + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_payments( + page=page, + page_size=size, + invoice_id=invoice_id, + status=status, + extra_query=extra_query, + timeout=timeout, + ) + items = res.payments + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + +class AsyncPayoutConfigurationService(_ServiceAsync): + """The NodeRings PayoutConfigurationService API.""" + + async def get_payout_configuration( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/provider/connect/account``.""" + ) -> m.GetPayoutConfigurationResponse: + """Call ``GET /v1/provider/payout-configuration``.""" return await self._client._call( - "DELETE", - "/v1/provider/connect/account", - m.SuccessResponse, + "GET", + "/v1/provider/payout-configuration", + m.GetPayoutConfigurationResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def expire_connect_tax_registration( + async def update_payout_configuration( self, - id: str, *, + enabled: bool | None = None, + schedule_time: str | None = None, + schedule_timezone: str | None = None, + schedule_type: m.PayoutScheduleType | str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ExpireConnectTaxRegistrationResponse: - """Call ``POST /v1/provider/connect/tax-registrations/{id}/expire``.""" + ) -> m.GetPayoutConfigurationResponse: + """ + Call ``PUT /v1/provider/payout-configuration``. + + Args: + enabled: Whether to enable/disable payout configuration + schedule_time: Required for daily/weekly/monthly, ignored for immediate. Format: HH:MM (24-hour) + schedule_timezone: IANA timezone - defaults to "UTC" + schedule_type: - PAYOUT_SCHEDULE_TYPE_IMMEDIATE: Transfer immediately when payment succeeds - PAYOUT_SCHEDULE_TYPE_DAILY: Transfer once per day at specified time - PAYOUT_SCHEDULE_TYPE_WEEKLY: Transfer once per week at specified time - PAYOUT_SCHEDULE_TYPE_MONTHLY: Transfer once per month at specified time + """ return await self._client._call( - "POST", - f"/v1/provider/connect/tax-registrations/{_path(id)}/expire", - m.ExpireConnectTaxRegistrationResponse, + "PUT", + "/v1/provider/payout-configuration", + m.GetPayoutConfigurationResponse, query=_query(extra_query), - body=_body(m.ExpireConnectTaxRegistrationBody, extra_body, False), + body=_body( + m.UpdatePayoutConfigurationRequest, + extra_body, + False, + ("enabled", enabled), + ("schedule_time", schedule_time), + ("schedule_timezone", schedule_timezone), + ("schedule_type", schedule_type), + ), idempotent=False, timeout=timeout, ) - async def get_connect_account( + +class AsyncPayoutInvoiceService(_ServiceAsync): + """The NodeRings PayoutInvoiceService API.""" + + async def get_payout_invoice( self, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetConnectAccountResponse: - """Call ``GET /v1/provider/connect/account``.""" + ) -> m.GetPayoutInvoiceResponse: + """Call ``GET /v1/provider/payout-invoices/{id}``.""" return await self._client._call( "GET", - "/v1/provider/connect/account", - m.GetConnectAccountResponse, + f"/v1/provider/payout-invoices/{_path(id)}", + m.GetPayoutInvoiceResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_connect_tax_settings( + async def get_provider_revenue( self, *, + start_date: datetime | None = None, + end_date: datetime | None = None, + plan_id: str | None = None, + client_organization_id: str | None = None, + include_pending: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetConnectTaxSettingsResponse: - """Call ``GET /v1/provider/connect/tax-settings``.""" + ) -> m.GetProviderRevenueResponse: + """ + Call ``GET /v1/provider/revenue``. + + Args: + start_date: Start date for revenue calculation (inclusive) + end_date: End date for revenue calculation (inclusive) + plan_id: Filter by plan ID (optional) + client_organization_id: Filter by client organization ID (optional) + include_pending: Include pending/processing payouts in calculations (default: true) + """ return await self._client._call( "GET", - "/v1/provider/connect/tax-settings", - m.GetConnectTaxSettingsResponse, - query=_query(extra_query), + "/v1/provider/revenue", + m.GetProviderRevenueResponse, + query=_query( + extra_query, + ("startDate", start_date), + ("endDate", end_date), + ("planId", plan_id), + ("clientOrganizationId", client_organization_id), + ("includePending", include_pending), + ), body=None, idempotent=False, timeout=timeout, ) - async def list_connect_tax_registrations( + async def list_held_payouts( self, *, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListConnectTaxRegistrationsResponse: - """Call ``GET /v1/provider/connect/tax-registrations``.""" + ) -> m.ListHeldPayoutsResponse: + """ + Paid client invoices whose payout to this provider is on hold, soonest release first. + + It calls ``GET /v1/provider/held-payouts``. + """ return await self._client._call( "GET", - "/v1/provider/connect/tax-registrations", - m.ListConnectTaxRegistrationsResponse, - query=_query(extra_query), + "/v1/provider/held-payouts", + m.ListHeldPayoutsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - async def start_connect_oauth( + async def list_held_payouts_all( self, *, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.StartConnectOAuthResponse: + ) -> AsyncIterator[m.HeldPayout]: """ - Starts Stripe Connect OAuth so a provider can attach an existing Standard account. + Every result of :meth:`list_held_payouts`, reading page after page. - It calls ``POST /v1/provider/connect/oauth:start``. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - return await self._client._call( - "POST", - "/v1/provider/connect/oauth:start", - m.StartConnectOAuthResponse, - query=_query(extra_query), - body=_body(m.StartConnectOAuthRequest, extra_body, False), - idempotent=False, - timeout=timeout, - ) + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_held_payouts( + page=page, + page_size=size, + extra_query=extra_query, + timeout=timeout, + ) + items = res.held_payouts + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 - async def update_connect_tax_settings( + async def list_payout_invoices( self, *, - default_tax_behavior: str | None = None, - default_tax_code: str | None = None, - head_office: m.ConnectTaxAddress | dict[str, Any] | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + status: m.PayoutStatus | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateConnectTaxSettingsResponse: + ) -> m.ListPayoutInvoicesResponse: """ - Call ``PUT /v1/provider/connect/tax-settings``. + Call ``GET /v1/provider/payout-invoices``. Args: - head_office: Structured address for Connect tax head office. + status: Filter by payout status """ return await self._client._call( - "PUT", - "/v1/provider/connect/tax-settings", - m.UpdateConnectTaxSettingsResponse, - query=_query(extra_query), - body=_body( - m.UpdateConnectTaxSettingsRequest, - extra_body, - False, - ("default_tax_behavior", default_tax_behavior), - ("default_tax_code", default_tax_code), - ("head_office", head_office), - ), + "GET", + "/v1/provider/payout-invoices", + m.ListPayoutInvoicesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("status", status)), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncProviderCustomerService(_ServiceAsync): - """The NodeRings ProviderCustomerService API.""" - - async def block_provider_customer_purchases( + async def list_payout_invoices_all( self, - client_organization_id: str, *, - message: str | None = None, - reason: m.ComplianceReason | str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + status: m.PayoutStatus | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> AsyncIterator[m.PayoutInvoice]: """ - Call ``POST /v1/provider/customers/{clientOrganizationId}:block-purchases``. + Every result of :meth:`list_payout_invoices`, reading page after page. - Args: - reason: Why a VM or purchase was seized/blocked. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - return await self._client._call( - "POST", - f"/v1/provider/customers/{_path(client_organization_id)}:block-purchases", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.BlockProviderCustomerPurchasesBody, extra_body, False, ("message", message), ("reason", reason) - ), - idempotent=False, - timeout=timeout, - ) + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_payout_invoices( + page=page, + page_size=size, + status=status, + extra_query=extra_query, + timeout=timeout, + ) + items = res.payout_invoices + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 - async def get_provider_customer( - self, - client_organization_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderCustomerResponse: - """Call ``GET /v1/provider/customers/{clientOrganizationId}``.""" - return await self._client._call( - "GET", - f"/v1/provider/customers/{_path(client_organization_id)}", - m.GetProviderCustomerResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - async def get_provider_customer_billing( +class AsyncPermissionService(_ServiceAsync): + """The NodeRings PermissionService API.""" + + async def assign_permission_to_role( self, - client_organization_id: str, *, + permission_ids: list[str] | None = None, + role_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderCustomerBillingResponse: - """Call ``GET /v1/provider/customers/{clientOrganizationId}/billing``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/permissions/assign-to-role``.""" return await self._client._call( - "GET", - f"/v1/provider/customers/{_path(client_organization_id)}/billing", - m.GetProviderCustomerBillingResponse, + "POST", + "/v1/permissions/assign-to-role", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body( + m.AssignPermissionToRoleRequest, + extra_body, + False, + ("permission_ids", permission_ids), + ("role_id", role_id), + ), idempotent=False, timeout=timeout, ) - async def get_provider_customer_stats( + async def list_effective_permissions( self, *, + user_ids: list[str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderCustomerStatsResponse: - """ - Path must not be `/customers/stats`: some gateways match - `/customers/{client_organization_id}` first and treat "stats" as a UUID field (validation - error). - - It calls ``GET /v1/provider/customer-stats``. - """ + ) -> m.ListEffectivePermissionsResponse: + """Call ``GET /v1/permissions/effective``.""" return await self._client._call( "GET", - "/v1/provider/customer-stats", - m.GetProviderCustomerStatsResponse, - query=_query(extra_query), + "/v1/permissions/effective", + m.ListEffectivePermissionsResponse, + query=_query(extra_query, ("userIds", user_ids)), body=None, idempotent=False, timeout=timeout, ) - async def list_provider_customer_assets( + async def list_permissions( self, - client_organization_id: str, *, page: int | None = None, page_size: int | None = None, - search: str | None = None, - asset_type: m.ProviderCustomerAssetType | str | None = None, - activity_status: m.ProviderCustomerVMActivityStatus | str | None = None, - region_id: str | None = None, + filter_name: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListProviderCustomerAssetsResponse: - """ - Call ``GET /v1/provider/customers/{clientOrganizationId}/assets``. - - Args: - page_size: Same rules as ListProviderCustomers.page_size. - activity_status: When set (not UNSPECIFIED), only assets matching this activity status are returned. - region_id: When set to a non-empty UUID, only assets whose VM node is in this region are returned. - """ + ) -> m.ListPermissionsResponse: + """Call ``GET /v1/permissions``.""" return await self._client._call( "GET", - f"/v1/provider/customers/{_path(client_organization_id)}/assets", - m.ListProviderCustomerAssetsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("search", search), - ("assetType", asset_type), - ("activityStatus", activity_status), - ("regionId", region_id), - ), + "/v1/permissions", + m.ListPermissionsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterName", filter_name)), body=None, idempotent=False, timeout=timeout, ) - async def list_provider_customer_assets_all( + async def list_permissions_all( self, - client_organization_id: str, *, page: int | None = None, page_size: int | None = None, - search: str | None = None, - asset_type: m.ProviderCustomerAssetType | str | None = None, - activity_status: m.ProviderCustomerVMActivityStatus | str | None = None, - region_id: str | None = None, + filter_name: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.ProviderCustomerAssetRow]: + ) -> AsyncIterator[m.Permission]: """ - Every result of :meth:`list_provider_customer_assets`, reading page after page. + Every result of :meth:`list_permissions`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -27347,18 +23650,14 @@ async def list_provider_customer_assets_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_provider_customer_assets( - client_organization_id, + res = await self.list_permissions( page=page, page_size=size, - search=search, - asset_type=asset_type, - activity_status=activity_status, - region_id=region_id, + filter_name=filter_name, extra_query=extra_query, timeout=timeout, ) - items = res.assets + items = res.permissions for item in items: yield item seen += len(items) @@ -27366,53 +23665,94 @@ async def list_provider_customer_assets_all( return page += 1 - async def list_provider_customers( + async def remove_permission_from_role( + self, + *, + permission_ids: list[str] | None = None, + role_id: str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``DELETE /v1/permissions/remove-from-role``.""" + return await self._client._call( + "DELETE", + "/v1/permissions/remove-from-role", + m.SuccessResponse, + query=_query(extra_query, ("permissionIds", permission_ids), ("roleId", role_id)), + body=None, + idempotent=False, + timeout=timeout, + ) + + +class AsyncPlanService(_ServiceAsync): + """The NodeRings PlanService API.""" + + async def list_plans( self, *, page: int | None = None, page_size: int | None = None, + is_template: bool | None = None, + end_user: m.EndUser | str | None = None, search: str | None = None, - activity_filter: m.ProviderCustomerActivityFilter | str | None = None, + asset_type: m.AssetType | str | None = None, + billing_type: m.BillingType | str | None = None, + filter_compute_type: str | None = None, + filter_code: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListProviderCustomersResponse: + ) -> m.ListPlansResponse: """ - Call ``GET /v1/provider/customers``. + Call ``GET /v1/plans``. Args: - page: 0-based page (default 0). - page_size: -1 = all matches (no server row cap; prefer paginated 1..100 for large data sets). Otherwise 1..100 per page (see ListVirtualMachinesRequest). - search: Case-insensitive match on client organization name or any member email (owners/members via roles & groups). - activity_filter: Default / UNSPECIFIED means ALL (same as PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL). - PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL: All customers (any VM history with this provider, including when every VM is soft-deleted). + is_template: Filter to show only template plans (true) or only non-template plans (false) If not specified, shows both template and non-template plans + end_user: Filter by end user type (client, provider, or all) If not specified, shows plans for all end user types based on organization permissions + search: Search filter for plan name, code, or description + asset_type: Filter by asset type (vm, gameserver, etc.) + billing_type: Filter by billing type (subscription, usage, etc.) If not specified, shows plans for all billing types - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) + filter_compute_type: Filter by compute type (optional). If provided, only plans with matching compute type in their name are returned. Examples: "high performance", "high frequency", "general compute", "general purpose", "cpu optimized", "memory optimized", "storage optimized" Filtering is case-insensitive. + filter_code: Filter by plan code (optional). If provided, only plans with matching code are returned. Filtering is case-insensitive. Examples: "SC-GC-1C-1G-20", "DC-HF-4C-8G-160" Filtering is case-insensitive. """ return await self._client._call( "GET", - "/v1/provider/customers", - m.ListProviderCustomersResponse, + "/v1/plans", + m.ListPlansResponse, query=_query( extra_query, ("page", page), ("pageSize", page_size), + ("isTemplate", is_template), + ("endUser", end_user), ("search", search), - ("activityFilter", activity_filter), + ("assetType", asset_type), + ("billingType", billing_type), + ("filterComputeType", filter_compute_type), + ("filterCode", filter_code), ), body=None, idempotent=False, timeout=timeout, ) - async def list_provider_customers_all( + async def list_plans_all( self, *, page: int | None = None, page_size: int | None = None, + is_template: bool | None = None, + end_user: m.EndUser | str | None = None, search: str | None = None, - activity_filter: m.ProviderCustomerActivityFilter | str | None = None, + asset_type: m.AssetType | str | None = None, + billing_type: m.BillingType | str | None = None, + filter_compute_type: str | None = None, + filter_code: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.ProviderCustomerRow]: + ) -> AsyncIterator[m.Plan]: """ - Every result of :meth:`list_provider_customers`, reading page after page. + Every result of :meth:`list_plans`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -27420,15 +23760,20 @@ async def list_provider_customers_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_provider_customers( + res = await self.list_plans( page=page, page_size=size, + is_template=is_template, + end_user=end_user, search=search, - activity_filter=activity_filter, + asset_type=asset_type, + billing_type=billing_type, + filter_compute_type=filter_compute_type, + filter_code=filter_code, extra_query=extra_query, timeout=timeout, ) - items = res.customers + items = res.plans for item in items: yield item seen += len(items) @@ -27436,302 +23781,173 @@ async def list_provider_customers_all( return page += 1 - async def restart_provider_customer_virtual_machine( - self, - client_organization_id: str, - virtual_machine_id: str, - *, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: - """ - Call ``POST - /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:restart``. - """ - return await self._client._call( - "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:restart", - m.VirtualMachine, - query=_query(extra_query), - body=_body(m.RestartProviderCustomerVirtualMachineBody, extra_body, False), - idempotent=False, - timeout=timeout, - ) - - async def start_provider_customer_virtual_machine( + async def subscribe( self, - client_organization_id: str, - virtual_machine_id: str, + plan_id: str, *, - extra_body: dict[str, Any] | None = None, + billing_period: m.BillingPeriod | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: - """ - Call ``POST - /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:start``. + ) -> m.SubscribeResponse: """ - return await self._client._call( - "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:start", - m.VirtualMachine, - query=_query(extra_query), - body=_body(m.StartProviderCustomerVirtualMachineBody, extra_body, False), - idempotent=False, - timeout=timeout, - ) + Call ``POST /v1/plans/{planId}:subscribe``. - async def stop_provider_customer_virtual_machine( - self, - client_organization_id: str, - virtual_machine_id: str, - *, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: - """ - Call ``POST - /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:stop``. + Args: + billing_period: Optional billing period. If not provided, uses the plan's default billing period. If provided, validates that a PlanPrice exists for this billing period. If not available, returns a FailedPrecondition error. """ return await self._client._call( "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:stop", - m.VirtualMachine, - query=_query(extra_query), - body=_body(m.StopProviderCustomerVirtualMachineBody, extra_body, False), + f"/v1/plans/{_path(plan_id)}:subscribe", + m.SubscribeResponse, + query=_query(extra_query, ("billingPeriod", billing_period)), + body=None, idempotent=False, timeout=timeout, ) - async def suspend_provider_customer_virtual_machine( - self, - client_organization_id: str, - virtual_machine_id: str, - *, - message: str | None = None, - reason: m.ComplianceReason | str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: - """ - Call ``POST - /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:suspend``. - Args: - reason: Why a VM or purchase was seized/blocked. - """ - return await self._client._call( - "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:suspend", - m.VirtualMachine, - query=_query(extra_query), - body=_body( - m.SuspendProviderCustomerVirtualMachineBody, extra_body, False, ("message", message), ("reason", reason) - ), - idempotent=False, - timeout=timeout, - ) +class AsyncPlatformService(_ServiceAsync): + """The NodeRings PlatformService API.""" - async def unblock_provider_customer_purchases( + async def assign_agent( self, - client_organization_id: str, + platform_id: str, *, + agent_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/provider/customers/{clientOrganizationId}:unblock-purchases``.""" - return await self._client._call( - "POST", - f"/v1/provider/customers/{_path(client_organization_id)}:unblock-purchases", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.UnblockProviderCustomerPurchasesBody, extra_body, False), - idempotent=False, - timeout=timeout, - ) - - async def unblock_provider_customer_virtual_machine( - self, - client_organization_id: str, - virtual_machine_id: str, - *, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: - """ - Call ``POST - /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:unblock``. - """ + """Call ``POST /v1/platforms/{platformId}:AssignAgent``.""" return await self._client._call( "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:unblock", - m.VirtualMachine, - query=_query(extra_query), - body=_body(m.UnblockProviderCustomerVirtualMachineBody, extra_body, False), - idempotent=False, - timeout=timeout, - ) - - -class AsyncProviderDashboardPlansTabService(_ServiceAsync): - """The NodeRings ProviderDashboardPlansTabService API.""" - - async def get_dashboard_plans_tab_stats( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ProviderDashboardPlansTabStats: - """Call ``GET /v1/provider/dashboard/plans-tab-stats``.""" - return await self._client._call( - "GET", - "/v1/provider/dashboard/plans-tab-stats", - m.ProviderDashboardPlansTabStats, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - -class AsyncProviderDashboardService(_ServiceAsync): - """The NodeRings ProviderDashboardService API.""" - - async def get_dashboard_asset_sales_timeseries( - self, - *, - range_days: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetDashboardAssetSalesTimeseriesResponse: - """Call ``GET /v1/provider/dashboard/asset-sales-timeseries``.""" - return await self._client._call( - "GET", - "/v1/provider/dashboard/asset-sales-timeseries", - m.GetDashboardAssetSalesTimeseriesResponse, - query=_query(extra_query, ("rangeDays", range_days)), - body=None, + f"/v1/platforms/{_path(platform_id)}:AssignAgent", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.AssignAgentBody, extra_body, False, ("agent_id", agent_id)), idempotent=False, timeout=timeout, ) - async def get_dashboard_billing_sales( + async def create_platform( self, *, - range_days: int | None = None, - include_prior_period: bool | None = None, - revenue_by_customer_page: int | None = None, - revenue_by_customer_page_size: int | None = None, - revenue_by_customer_email_filter: str | None = None, + agent_id: str | None = None, + assign_customer_ipv6: bool | None = None, + driver: m.PlatformDriver | str | None = None, + endpoint_url: str | None = None, + name: str | None = None, + panel_url: str | None = None, + pterodactyl: bool | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetDashboardBillingSalesResponse: + ) -> m.SuccessResponse: """ - Call ``GET /v1/provider/dashboard/billing-sales``. + Call ``POST /v1/platform``. Args: - revenue_by_customer_page: Revenue-by-customer table (1-based page). Omit for defaults (page 1, page size 25). - revenue_by_customer_email_filter: Case-insensitive substring match on contact email, organization id, or organization name. + assign_customer_ipv6: VirtFusion/SolusVM only. Rejected when the org driver is Proxmox. + driver: - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver. + panel_url: Panel base URL. Required when pterodactyl is true. A bare IP is stored as http://ip. + pterodactyl: When true, this platform is Pterodactyl. A hypervisor driver is not required. """ return await self._client._call( - "GET", - "/v1/provider/dashboard/billing-sales", - m.GetDashboardBillingSalesResponse, - query=_query( - extra_query, - ("rangeDays", range_days), - ("includePriorPeriod", include_prior_period), - ("revenueByCustomerPage", revenue_by_customer_page), - ("revenueByCustomerPageSize", revenue_by_customer_page_size), - ("revenueByCustomerEmailFilter", revenue_by_customer_email_filter), + "POST", + "/v1/platform", + m.SuccessResponse, + query=_query(extra_query), + body=_body( + m.CreatePlatformRequest, + extra_body, + False, + ("agent_id", agent_id), + ("assign_customer_ipv6", assign_customer_ipv6), + ("driver", driver), + ("endpoint_url", endpoint_url), + ("name", name), + ("panel_url", panel_url), + ("pterodactyl", pterodactyl), ), - body=None, idempotent=False, timeout=timeout, ) - async def get_dashboard_customer_acquisition_timeseries( + async def delete_platform( self, + id: str, *, - range_days: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetDashboardCustomerAcquisitionTimeseriesResponse: - """Call ``GET /v1/provider/dashboard/customer-acquisition-timeseries``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/platform/{id}``.""" return await self._client._call( - "GET", - "/v1/provider/dashboard/customer-acquisition-timeseries", - m.GetDashboardCustomerAcquisitionTimeseriesResponse, - query=_query(extra_query, ("rangeDays", range_days)), + "DELETE", + f"/v1/platform/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_dashboard_summary( + async def get_platform( self, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetDashboardSummaryResponse: - """Call ``GET /v1/provider/dashboard/summary``.""" + ) -> m.GetPlatformResponse: + """Call ``GET /v1/platform/{id}``.""" return await self._client._call( "GET", - "/v1/provider/dashboard/summary", - m.GetDashboardSummaryResponse, + f"/v1/platform/{_path(id)}", + m.GetPlatformResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_dashboard_addon_catalog_stats( + async def list_platforms( self, *, - addon_search: str | None = None, - addon_type_filter: str | None = None, - addon_billing_type_filter: str | None = None, page: int | None = None, page_size: int | None = None, + service_status: m.ServiceStatus | str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDashboardAddonCatalogStatsResponse: - """Call ``GET /v1/provider/dashboard/addon-catalog-stats``.""" + ) -> m.ListPlatformsResponse: + """Call ``GET /v1/platforms``.""" return await self._client._call( "GET", - "/v1/provider/dashboard/addon-catalog-stats", - m.ListDashboardAddonCatalogStatsResponse, + "/v1/platforms", + m.ListPlatformsResponse, query=_query( extra_query, - ("addonSearch", addon_search), - ("addonTypeFilter", addon_type_filter), - ("addonBillingTypeFilter", addon_billing_type_filter), ("page", page), ("pageSize", page_size), + ("serviceStatus", service_status), + ("search", search), ), body=None, idempotent=False, timeout=timeout, ) - async def list_dashboard_addon_catalog_stats_all( + async def list_platforms_all( self, *, - addon_search: str | None = None, - addon_type_filter: str | None = None, - addon_billing_type_filter: str | None = None, page: int | None = None, page_size: int | None = None, + service_status: m.ServiceStatus | str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.ProviderDashboardAddonCatalogRow]: + ) -> AsyncIterator[m.Platform]: """ - Every result of :meth:`list_dashboard_addon_catalog_stats`, reading page after page. + Every result of :meth:`list_platforms`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -27739,155 +23955,123 @@ async def list_dashboard_addon_catalog_stats_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_dashboard_addon_catalog_stats( + res = await self.list_platforms( page=page, page_size=size, - addon_search=addon_search, - addon_type_filter=addon_type_filter, - addon_billing_type_filter=addon_billing_type_filter, + service_status=service_status, + search=search, extra_query=extra_query, timeout=timeout, ) - items = res.addon_catalog + items = res.platforms for item in items: yield item seen += len(items) - if len(items) < size: + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): return page += 1 - async def list_dashboard_infrastructure( + async def unassign_agent( self, + platform_id: str, *, - platform_id: str | None = None, - region_id: str | None = None, - page: int | None = None, - page_size: int | None = None, + agent_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDashboardInfrastructureResponse: - """Call ``GET /v1/provider/dashboard/infrastructure``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/platforms/{platformId}:UnassignAgent``.""" return await self._client._call( - "GET", - "/v1/provider/dashboard/infrastructure", - m.ListDashboardInfrastructureResponse, - query=_query( - extra_query, - ("platformId", platform_id), - ("regionId", region_id), - ("page", page), - ("pageSize", page_size), - ), - body=None, + "POST", + f"/v1/platforms/{_path(platform_id)}:UnassignAgent", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.UnassignAgentBody, extra_body, False, ("agent_id", agent_id)), idempotent=False, timeout=timeout, ) - async def list_dashboard_infrastructure_all( + async def update_platform( self, + id: str, *, - platform_id: str | None = None, - region_id: str | None = None, - page: int | None = None, - page_size: int | None = None, + assign_customer_ipv6: bool | None = None, + endpoint_url: str | None = None, + name: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.ProviderDashboardNodeRollup]: + ) -> m.UpdatePlatformResponse: """ - Every result of :meth:`list_dashboard_infrastructure`, reading page after page. + Call ``PATCH /v1/platform/{id}``. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + Args: + assign_customer_ipv6: VirtFusion/SolusVM only. Unset means leave unchanged. True is rejected for Proxmox. + endpoint_url: Immutable after create. Empty or equal to the stored URL is ignored; any other value is rejected. """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_dashboard_infrastructure( - page=page, - page_size=size, - platform_id=platform_id, - region_id=region_id, - extra_query=extra_query, - timeout=timeout, - ) - items = res.by_node - for item in items: - yield item - seen += len(items) - if len(items) < size: - return - page += 1 - - async def list_dashboard_ipam( - self, - *, - network_id: str | None = None, - allocated_sample_ips_page: int | None = None, - allocated_sample_ips_page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListDashboardIPAMResponse: - """Call ``GET /v1/provider/dashboard/ipam``.""" return await self._client._call( - "GET", - "/v1/provider/dashboard/ipam", - m.ListDashboardIPAMResponse, - query=_query( - extra_query, - ("networkId", network_id), - ("allocatedSampleIpsPage", allocated_sample_ips_page), - ("allocatedSampleIpsPageSize", allocated_sample_ips_page_size), + "PATCH", + f"/v1/platform/{_path(id)}", + m.UpdatePlatformResponse, + query=_query(extra_query), + body=_body( + m.UpdatePlatformBody, + extra_body, + False, + ("assign_customer_ipv6", assign_customer_ipv6), + ("endpoint_url", endpoint_url), + ("name", name), ), - body=None, idempotent=False, timeout=timeout, ) - async def list_dashboard_ipam_assignments( + +class AsyncPreflightService(_ServiceAsync): + """The NodeRings PreflightService API.""" + + async def list_preflight_checks( self, *, - network_id: str | None = None, - search: str | None = None, - platform_id: str | None = None, + plan_code: str | None = None, + plan_id: str | None = None, + issues_only: bool | None = None, page: int | None = None, page_size: int | None = None, - ip_family: m.DashboardIPAMAssignmentIPFamily | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDashboardIPAMAssignmentsResponse: - """Call ``GET /v1/provider/dashboard/ipam/assignments``.""" + ) -> m.ListPreflightChecksResponse: + """Call ``GET /v1/provider/preflight-checks``.""" return await self._client._call( "GET", - "/v1/provider/dashboard/ipam/assignments", - m.ListDashboardIPAMAssignmentsResponse, + "/v1/provider/preflight-checks", + m.ListPreflightChecksResponse, query=_query( extra_query, - ("networkId", network_id), - ("search", search), - ("platformId", platform_id), + ("planCode", plan_code), + ("planId", plan_id), + ("issuesOnly", issues_only), ("page", page), ("pageSize", page_size), - ("ipFamily", ip_family), ), body=None, idempotent=False, timeout=timeout, ) - async def list_dashboard_ipam_assignments_all( + async def list_preflight_checks_all( self, - *, - network_id: str | None = None, - search: str | None = None, - platform_id: str | None = None, + *, + plan_code: str | None = None, + plan_id: str | None = None, + issues_only: bool | None = None, page: int | None = None, page_size: int | None = None, - ip_family: m.DashboardIPAMAssignmentIPFamily | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.DashboardIPAMAssignmentRow]: + ) -> AsyncIterator[m.PlanPreflightView]: """ - Every result of :meth:`list_dashboard_ipam_assignments`, reading page after page. + Every result of :meth:`list_preflight_checks`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -27895,17 +24079,16 @@ async def list_dashboard_ipam_assignments_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_dashboard_ipam_assignments( + res = await self.list_preflight_checks( page=page, page_size=size, - network_id=network_id, - search=search, - platform_id=platform_id, - ip_family=ip_family, + plan_code=plan_code, + plan_id=plan_id, + issues_only=issues_only, extra_query=extra_query, timeout=timeout, ) - items = res.assignments + items = res.plans for item in items: yield item seen += len(items) @@ -27913,771 +24096,786 @@ async def list_dashboard_ipam_assignments_all( return page += 1 - async def list_dashboard_plan_subscription_stats( + +class AsyncProviderConnectService(_ServiceAsync): + """The NodeRings ProviderConnectService API.""" + + async def complete_connect_oauth( self, *, - plan_search: str | None = None, - plan_billing_type_filter: str | None = None, - plan_asset_filter: str | None = None, - plans_page: int | None = None, - plans_page_size: int | None = None, + code: str | None = None, + state: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDashboardPlanSubscriptionStatsResponse: - """Call ``GET /v1/provider/dashboard/plan-subscription-stats``.""" + ) -> m.CompleteConnectOAuthResponse: + """ + Completes Stripe Connect OAuth after Stripe redirects back with a code. + + It calls ``POST /v1/provider/connect/oauth:complete``. + """ return await self._client._call( - "GET", - "/v1/provider/dashboard/plan-subscription-stats", - m.ListDashboardPlanSubscriptionStatsResponse, - query=_query( - extra_query, - ("planSearch", plan_search), - ("planBillingTypeFilter", plan_billing_type_filter), - ("planAssetFilter", plan_asset_filter), - ("plansPage", plans_page), - ("plansPageSize", plans_page_size), - ), - body=None, + "POST", + "/v1/provider/connect/oauth:complete", + m.CompleteConnectOAuthResponse, + query=_query(extra_query), + body=_body(m.CompleteConnectOAuthRequest, extra_body, False, ("code", code), ("state", state)), idempotent=False, timeout=timeout, ) - async def list_dashboard_ticket_statistics( + async def create_connect_account( self, *, - from_time: datetime | None = None, - to_time: datetime | None = None, + country: str | None = None, + email: str | None = None, + metadata: dict[str, Any] | None = None, + type: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDashboardTicketStatisticsResponse: - """Call ``GET /v1/provider/dashboard/tickets/statistics``.""" + ) -> m.CreateConnectAccountResponse: + """ + Call ``POST /v1/provider/connect/account``. + + Args: + country: ISO country code (e.g., "US") + metadata: Optional: custom metadata + type: Account type: "standard", "express", "custom" (Stripe) or "merchant" (PayPal). Always "standard" for dispute resolution + """ return await self._client._call( - "GET", - "/v1/provider/dashboard/tickets/statistics", - m.ListDashboardTicketStatisticsResponse, - query=_query(extra_query, ("fromTime", from_time), ("toTime", to_time)), - body=None, + "POST", + "/v1/provider/connect/account", + m.CreateConnectAccountResponse, + query=_query(extra_query), + body=_body( + m.CreateConnectAccountRequest, + extra_body, + False, + ("country", country), + ("email", email), + ("metadata", metadata), + ("type", type), + ), idempotent=False, timeout=timeout, ) - async def list_dashboard_virtual_machines( + async def create_connect_tax_registration( self, *, - platform_id: str | None = None, - region_id: str | None = None, - node_id: str | None = None, - customer_email_contains: str | None = None, - vm_page: int | None = None, - vm_page_size: int | None = None, - vmtemplate_id: str | None = None, + country: str | None = None, + registration_type: str | None = None, + state: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDashboardVirtualMachinesResponse: - """Call ``GET /v1/provider/dashboard/virtual-machines``.""" + ) -> m.CreateConnectTaxRegistrationResponse: + """ + Call ``POST /v1/provider/connect/tax-registrations``. + + Args: + registration_type: optional; defaults per country + state: required for US + """ return await self._client._call( - "GET", - "/v1/provider/dashboard/virtual-machines", - m.ListDashboardVirtualMachinesResponse, - query=_query( - extra_query, - ("platformId", platform_id), - ("regionId", region_id), - ("nodeId", node_id), - ("customerEmailContains", customer_email_contains), - ("vmPage", vm_page), - ("vmPageSize", vm_page_size), - ("vmtemplateId", vmtemplate_id), + "POST", + "/v1/provider/connect/tax-registrations", + m.CreateConnectTaxRegistrationResponse, + query=_query(extra_query), + body=_body( + m.CreateConnectTaxRegistrationRequest, + extra_body, + False, + ("country", country), + ("registration_type", registration_type), + ("state", state), ), - body=None, idempotent=False, timeout=timeout, ) - -class AsyncProviderNetworkService(_ServiceAsync): - """The NodeRings ProviderNetworkService API.""" - - async def get_smtp_outbound_provider_policy( + async def create_connect_tax_session( self, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetSMTPOutboundProviderPolicyResponse: - """Call ``GET /v1/provider/network/smtp-outbound-policy``.""" + ) -> m.CreateConnectTaxSessionResponse: + """ + Creates a Stripe AccountSession client secret for Connect tax_settings / tax_registrations + embedded components (legacy; prefer native tax RPCs). + + It calls ``POST /v1/provider/connect/tax-session``. + """ return await self._client._call( - "GET", - "/v1/provider/network/smtp-outbound-policy", - m.GetSMTPOutboundProviderPolicyResponse, + "POST", + "/v1/provider/connect/tax-session", + m.CreateConnectTaxSessionResponse, query=_query(extra_query), - body=None, + body=dict(extra_body or {}), idempotent=False, timeout=timeout, ) - async def list_virtual_machine_smtp_outbound_policies( + async def disconnect_connect_account( self, *, - page: int | None = None, - page_size: int | None = None, - search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListVirtualMachineSMTPOutboundPoliciesResponse: - """ - Call ``GET /v1/provider/network/smtp-outbound-policies``. - - Args: - search: Case-insensitive substring match on hostname, customer contact email, or exact virtual machine UUID. - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/provider/connect/account``.""" return await self._client._call( - "GET", - "/v1/provider/network/smtp-outbound-policies", - m.ListVirtualMachineSMTPOutboundPoliciesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("search", search)), + "DELETE", + "/v1/provider/connect/account", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_virtual_machine_smtp_outbound_policies_all( + async def expire_connect_tax_registration( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - search: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.VirtualMachineSMTPOutboundPolicyView]: - """ - Every result of :meth:`list_virtual_machine_smtp_outbound_policies`, reading page after - page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_virtual_machine_smtp_outbound_policies( - page=page, - page_size=size, - search=search, - extra_query=extra_query, - timeout=timeout, - ) - items = res.policies - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + ) -> m.ExpireConnectTaxRegistrationResponse: + """Call ``POST /v1/provider/connect/tax-registrations/{id}/expire``.""" + return await self._client._call( + "POST", + f"/v1/provider/connect/tax-registrations/{_path(id)}/expire", + m.ExpireConnectTaxRegistrationResponse, + query=_query(extra_query), + body=_body(m.ExpireConnectTaxRegistrationBody, extra_body, False), + idempotent=False, + timeout=timeout, + ) - async def update_smtp_outbound_provider_policy( + async def get_connect_account( self, *, - block_by_default: bool | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetSMTPOutboundProviderPolicyResponse: - """ - Call ``PUT /v1/provider/network/smtp-outbound-policy``. - - Args: - block_by_default: Must accept false (allow-by-default). Proto3 required on bool rejects the zero value because there is no field presence without `optional`. - """ + ) -> m.GetConnectAccountResponse: + """Call ``GET /v1/provider/connect/account``.""" return await self._client._call( - "PUT", - "/v1/provider/network/smtp-outbound-policy", - m.GetSMTPOutboundProviderPolicyResponse, - query=_query(extra_query), - body=_body( - m.UpdateSMTPOutboundProviderPolicyRequest, extra_body, False, ("block_by_default", block_by_default) - ), + "GET", + "/v1/provider/connect/account", + m.GetConnectAccountResponse, + query=_query(extra_query), + body=None, idempotent=False, timeout=timeout, ) - async def update_virtual_machine_smtp_outbound_policy( + async def get_connect_tax_settings( self, - virtual_machine_id: str, *, - action: m.SMTPOutboundVMAction | str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachineSMTPOutboundPolicyView: - """Call ``PUT /v1/provider/network/smtp-outbound-policies/{virtualMachineId}``.""" + ) -> m.GetConnectTaxSettingsResponse: + """Call ``GET /v1/provider/connect/tax-settings``.""" return await self._client._call( - "PUT", - f"/v1/provider/network/smtp-outbound-policies/{_path(virtual_machine_id)}", - m.VirtualMachineSMTPOutboundPolicyView, + "GET", + "/v1/provider/connect/tax-settings", + m.GetConnectTaxSettingsResponse, query=_query(extra_query), - body=_body(m.UpdateVirtualMachineSMTPOutboundPolicyBody, extra_body, False, ("action", action)), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncProviderOnboardingService(_ServiceAsync): - """The NodeRings ProviderOnboardingService API.""" - - async def get_provider_onboarding_checklist( + async def list_connect_tax_registrations( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderOnboardingChecklistResponse: - """Call ``GET /v1/provider/onboarding/checklist``.""" + ) -> m.ListConnectTaxRegistrationsResponse: + """Call ``GET /v1/provider/connect/tax-registrations``.""" return await self._client._call( "GET", - "/v1/provider/onboarding/checklist", - m.GetProviderOnboardingChecklistResponse, + "/v1/provider/connect/tax-registrations", + m.ListConnectTaxRegistrationsResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) + async def start_connect_oauth( + self, + *, + extra_body: dict[str, Any] | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.StartConnectOAuthResponse: + """ + Starts Stripe Connect OAuth so a provider can attach an existing Standard account. -class AsyncProviderPlanService(_ServiceAsync): - """The NodeRings ProviderPlanService API.""" + It calls ``POST /v1/provider/connect/oauth:start``. + """ + return await self._client._call( + "POST", + "/v1/provider/connect/oauth:start", + m.StartConnectOAuthResponse, + query=_query(extra_query), + body=_body(m.StartConnectOAuthRequest, extra_body, False), + idempotent=False, + timeout=timeout, + ) - async def calculate_plan_pricing( + async def update_connect_tax_settings( self, *, - calc_config: m.PricingCalculationConfig | dict[str, Any] | None = None, - instances: list[m.ResourceInstanceInput | dict[str, Any]] | None = None, - plan_config: m.PlanPricingConfig | dict[str, Any] | None = None, + default_tax_behavior: str | None = None, + default_tax_code: str | None = None, + head_office: m.ConnectTaxAddress | dict[str, Any] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CalculatePlanPricingResponse: + ) -> m.UpdateConnectTaxSettingsResponse: """ - Call ``POST /v1/plans:calculate``. + Call ``PUT /v1/provider/connect/tax-settings``. Args: - instances: Resource instances to calculate pricing for + head_office: Structured address for Connect tax head office. """ return await self._client._call( - "POST", - "/v1/plans:calculate", - m.CalculatePlanPricingResponse, + "PUT", + "/v1/provider/connect/tax-settings", + m.UpdateConnectTaxSettingsResponse, query=_query(extra_query), body=_body( - m.CalculatePlanPricingRequest, + m.UpdateConnectTaxSettingsRequest, extra_body, False, - ("calc_config", calc_config), - ("instances", instances), - ("plan_config", plan_config), + ("default_tax_behavior", default_tax_behavior), + ("default_tax_code", default_tax_code), + ("head_office", head_office), ), idempotent=False, timeout=timeout, ) - async def create_plan( + +class AsyncProviderCustomerService(_ServiceAsync): + """The NodeRings ProviderCustomerService API.""" + + async def block_provider_customer_purchases( self, + client_organization_id: str, *, - cpu_limit: int | None = None, - cpu_units: int | None = None, - currency: str | None = None, - metadata: dict[str, Any] | None = None, - network_rate_limit_mbs: float | None = None, - node_ids: list[str] | None = None, - on_credit_exhaustion: str | None = None, - plan_id: str | None = None, - plan_prices: list[m.PlanPriceOverride | dict[str, Any]] | None = None, - region_id: str | None = None, + message: str | None = None, + reason: m.ComplianceReason | str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: """ - Call ``POST /v1/plans``. + Call ``POST /v1/provider/customers/{clientOrganizationId}:block-purchases``. Args: - cpu_limit: Plan CPU/network scheduling overrides written into metadata.specifications. Proxmox cpulimit= (max CPU time); 0 = unlimited. Omitted = template value / 0. - cpu_units: Proxmox cpuunits= fair-share weight. Omitted = template value / 1024. - currency: Plan fields to override from template (name, description, and trial_days come from template) - metadata: Plan metadata. VirtFusion package_id lives under metadata.virtfusion.package_id. - network_rate_limit_mbs: Primary NIC rate limit in MB/s (Proxmox rate=); 0 = unlimited. - node_ids: Nodes this plan may sell on (must be catalog-eligible for the template). Required: at least one node_id (validated in Go). - on_credit_exhaustion: Provider choice when client prepaid credits are exhausted. Values: "suspend" (default), "continue_with_dunning". - plan_id: Template plan ID to clone from (required) - plan_prices: Plan prices with overrides (unit_amount_minor, currency, free_units per metric) - region_id: Region where this plan is offered (exactly one per plan). + reason: Why a VM or purchase was seized/blocked. """ return await self._client._call( "POST", - "/v1/plans", + f"/v1/provider/customers/{_path(client_organization_id)}:block-purchases", m.SuccessResponse, query=_query(extra_query), body=_body( - m.CreatePlanRequest, - extra_body, - False, - ("cpu_limit", cpu_limit), - ("cpu_units", cpu_units), - ("currency", currency), - ("metadata", metadata), - ("network_rate_limit_mbs", network_rate_limit_mbs), - ("node_ids", node_ids), - ("on_credit_exhaustion", on_credit_exhaustion), - ("plan_id", plan_id), - ("plan_prices", plan_prices), - ("region_id", region_id), + m.BlockProviderCustomerPurchasesBody, extra_body, False, ("message", message), ("reason", reason) ), idempotent=False, timeout=timeout, ) - async def delete_plan( + async def get_provider_customer( self, - id: str, + client_organization_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/plans/{id}``.""" + ) -> m.GetProviderCustomerResponse: + """Call ``GET /v1/provider/customers/{clientOrganizationId}``.""" return await self._client._call( - "DELETE", - f"/v1/plans/{_path(id)}", - m.SuccessResponse, + "GET", + f"/v1/provider/customers/{_path(client_organization_id)}", + m.GetProviderCustomerResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_assignable_nodes_for_plan( + async def get_provider_customer_billing( self, + client_organization_id: str, *, - template_plan_id: str | None = None, - plan_id: str | None = None, - region_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListAssignableNodesForPlanResponse: - """ - Nodes the provider may assign to a plan (catalog-eligible for tier/category). - - It calls ``GET /v1/provider/plans/assignable-nodes``. - - Args: - template_plan_id: Optional: set for create-from-template. Empty when plan_id is used. - plan_id: Optional: set for edit existing plan. Empty when template_plan_id is used. - """ + ) -> m.GetProviderCustomerBillingResponse: + """Call ``GET /v1/provider/customers/{clientOrganizationId}/billing``.""" return await self._client._call( "GET", - "/v1/provider/plans/assignable-nodes", - m.ListAssignableNodesForPlanResponse, - query=_query( - extra_query, ("templatePlanId", template_plan_id), ("planId", plan_id), ("regionId", region_id) - ), + f"/v1/provider/customers/{_path(client_organization_id)}/billing", + m.GetProviderCustomerBillingResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def update_plan( + async def get_provider_customer_stats( self, - id: str, *, - addon_price_overrides: list[m.AddonPriceOverride | dict[str, Any]] | None = None, - cpu_limit: int | None = None, - cpu_units: int | None = None, - currency: str | None = None, - metadata: dict[str, Any] | None = None, - network_rate_limit_mbs: float | None = None, - node_ids: list[str] | None = None, - on_credit_exhaustion: str | None = None, - plan_prices: list[m.PlanPriceOverride | dict[str, Any]] | None = None, - region_id: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> m.GetProviderCustomerStatsResponse: """ - Call ``PATCH /v1/plans/{id}``. + Path must not be `/customers/stats`: some gateways match + `/customers/{client_organization_id}` first and treat "stats" as a UUID field (validation + error). - Args: - addon_price_overrides: Optional: Override prices for addons when updating plan - cpu_limit: Plan CPU/network scheduling overrides written into metadata.specifications. Only affects VMs created after the update (VMs snapshot plan values at create). - currency: Plan fields to update (name, description, and trial_days come from template, not updatable) - metadata: Plan metadata. VirtFusion package_id lives under metadata.virtfusion.package_id. - node_ids: When non-empty, replaces the plan's assigned nodes (same rules as create). Omitted / empty leaves existing assignments unchanged. - on_credit_exhaustion: Provider choice when client prepaid credits are exhausted. Values: "suspend" (default), "continue_with_dunning". - plan_prices: Plan prices with overrides (unit_amount_minor, currency, free_units per metric) - region_id: Region for this plan offer (optional on update). + It calls ``GET /v1/provider/customer-stats``. """ return await self._client._call( - "PATCH", - f"/v1/plans/{_path(id)}", - m.SuccessResponse, + "GET", + "/v1/provider/customer-stats", + m.GetProviderCustomerStatsResponse, query=_query(extra_query), - body=_body( - m.UpdatePlanBody, - extra_body, - False, - ("addon_price_overrides", addon_price_overrides), - ("cpu_limit", cpu_limit), - ("cpu_units", cpu_units), - ("currency", currency), - ("metadata", metadata), - ("network_rate_limit_mbs", network_rate_limit_mbs), - ("node_ids", node_ids), - ("on_credit_exhaustion", on_credit_exhaustion), - ("plan_prices", plan_prices), - ("region_id", region_id), - ), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncProviderReviewService(_ServiceAsync): - """The NodeRings ProviderReviewService API.""" - - async def create_provider_review_reply( + async def list_provider_customer_assets( self, - review_id: str, + client_organization_id: str, *, - reply_message: str | None = None, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + page_size: int | None = None, + search: str | None = None, + asset_type: m.ProviderCustomerAssetType | str | None = None, + activity_status: m.ProviderCustomerVMActivityStatus | str | None = None, + region_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateProviderReviewReplyResponse: - """Call ``POST /v1/provider-reviews/{reviewId}/reply``.""" + ) -> m.ListProviderCustomerAssetsResponse: + """ + Call ``GET /v1/provider/customers/{clientOrganizationId}/assets``. + + Args: + page_size: Same rules as ListProviderCustomers.page_size. + activity_status: When set (not UNSPECIFIED), only assets matching this activity status are returned. + region_id: When set to a non-empty UUID, only assets whose VM node is in this region are returned. + """ return await self._client._call( - "POST", - f"/v1/provider-reviews/{_path(review_id)}/reply", - m.CreateProviderReviewReplyResponse, - query=_query(extra_query), - body=_body(m.CreateProviderReviewReplyBody, extra_body, False, ("reply_message", reply_message)), + "GET", + f"/v1/provider/customers/{_path(client_organization_id)}/assets", + m.ListProviderCustomerAssetsResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("search", search), + ("assetType", asset_type), + ("activityStatus", activity_status), + ("regionId", region_id), + ), + body=None, idempotent=False, timeout=timeout, ) - async def delete_provider_review_reply( + async def list_provider_customer_assets_all( self, - review_id: str, + client_organization_id: str, *, + page: int | None = None, + page_size: int | None = None, + search: str | None = None, + asset_type: m.ProviderCustomerAssetType | str | None = None, + activity_status: m.ProviderCustomerVMActivityStatus | str | None = None, + region_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DeleteProviderReviewReplyResponse: - """Call ``DELETE /v1/provider-reviews/{reviewId}/reply``.""" - return await self._client._call( - "DELETE", - f"/v1/provider-reviews/{_path(review_id)}/reply", - m.DeleteProviderReviewReplyResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> AsyncIterator[m.ProviderCustomerAssetRow]: + """ + Every result of :meth:`list_provider_customer_assets`, reading page after page. - async def list_provider_reviews( + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_provider_customer_assets( + client_organization_id, + page=page, + page_size=size, + search=search, + asset_type=asset_type, + activity_status=activity_status, + region_id=region_id, + extra_query=extra_query, + timeout=timeout, + ) + items = res.assets + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + async def list_provider_customers( self, *, page: int | None = None, page_size: int | None = None, - star_ratings: list[int] | None = None, search: str | None = None, - reply_filter: int | None = None, + activity_filter: m.ProviderCustomerActivityFilter | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListProviderReviewsResponse: + ) -> m.ListProviderCustomersResponse: """ - Call ``GET /v1/provider-reviews``. + Call ``GET /v1/provider/customers``. Args: - star_ratings: Multi-select star filter (e.g. [5,4]); empty means any stars. - search: Case-insensitive substring match on review comment or provider reply; empty means no text filter. - reply_filter: Inbox: 0 = awaiting provider reply / empty reply (default), 1 = replied only, 2 = all reviews. + page: 0-based page (default 0). + page_size: -1 = all matches (no server row cap; prefer paginated 1..100 for large data sets). Otherwise 1..100 per page (see ListVirtualMachinesRequest). + search: Case-insensitive match on client organization name or any member email (owners/members via roles & groups). + activity_filter: Default / UNSPECIFIED means ALL (same as PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL). - PROVIDER_CUSTOMER_ACTIVITY_FILTER_ALL: All customers (any VM history with this provider, including when every VM is soft-deleted). """ return await self._client._call( "GET", - "/v1/provider-reviews", - m.ListProviderReviewsResponse, + "/v1/provider/customers", + m.ListProviderCustomersResponse, query=_query( extra_query, ("page", page), ("pageSize", page_size), - ("starRatings", star_ratings), ("search", search), - ("replyFilter", reply_filter), + ("activityFilter", activity_filter), ), body=None, idempotent=False, timeout=timeout, ) - async def update_provider_review_reply( + async def list_provider_customers_all( self, - review_id: str, *, - reply_message: str | None = None, + page: int | None = None, + page_size: int | None = None, + search: str | None = None, + activity_filter: m.ProviderCustomerActivityFilter | str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> AsyncIterator[m.ProviderCustomerRow]: + """ + Every result of :meth:`list_provider_customers`, reading page after page. + + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_provider_customers( + page=page, + page_size=size, + search=search, + activity_filter=activity_filter, + extra_query=extra_query, + timeout=timeout, + ) + items = res.customers + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + async def restart_provider_customer_virtual_machine( + self, + client_organization_id: str, + virtual_machine_id: str, + *, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateProviderReviewReplyResponse: - """Call ``PATCH /v1/provider-reviews/{reviewId}/reply``.""" + ) -> m.VirtualMachine: + """ + Call ``POST + /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:restart``. + """ return await self._client._call( - "PATCH", - f"/v1/provider-reviews/{_path(review_id)}/reply", - m.UpdateProviderReviewReplyResponse, + "POST", + f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:restart", + m.VirtualMachine, query=_query(extra_query), - body=_body(m.UpdateProviderReviewReplyBody, extra_body, False, ("reply_message", reply_message)), + body=_body(m.RestartProviderCustomerVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) - -class AsyncProviderStorefrontService(_ServiceAsync): - """The NodeRings ProviderStorefrontService API.""" - - async def get_my_storefront( + async def start_provider_customer_virtual_machine( self, + client_organization_id: str, + virtual_machine_id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetMyStorefrontResponse: - """Call ``GET /v1/provider/storefront``.""" + ) -> m.VirtualMachine: + """ + Call ``POST + /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:start``. + """ return await self._client._call( - "GET", - "/v1/provider/storefront", - m.GetMyStorefrontResponse, + "POST", + f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:start", + m.VirtualMachine, query=_query(extra_query), - body=None, + body=_body(m.StartProviderCustomerVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def opt_in_storefront( + async def stop_provider_customer_virtual_machine( self, + client_organization_id: str, + virtual_machine_id: str, *, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetMyStorefrontResponse: - """Call ``POST /v1/provider/storefront/opt-in``.""" + ) -> m.VirtualMachine: + """ + Call ``POST + /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:stop``. + """ return await self._client._call( "POST", - "/v1/provider/storefront/opt-in", - m.GetMyStorefrontResponse, + f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:stop", + m.VirtualMachine, query=_query(extra_query), - body=dict(extra_body or {}), + body=_body(m.StopProviderCustomerVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def opt_out_storefront( + async def suspend_provider_customer_virtual_machine( self, + client_organization_id: str, + virtual_machine_id: str, *, + message: str | None = None, + reason: m.ComplianceReason | str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetMyStorefrontResponse: - """Call ``POST /v1/provider/storefront/opt-out``.""" + ) -> m.VirtualMachine: + """ + Call ``POST + /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:suspend``. + + Args: + reason: Why a VM or purchase was seized/blocked. + """ return await self._client._call( "POST", - "/v1/provider/storefront/opt-out", - m.GetMyStorefrontResponse, + f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:suspend", + m.VirtualMachine, query=_query(extra_query), - body=dict(extra_body or {}), + body=_body( + m.SuspendProviderCustomerVirtualMachineBody, extra_body, False, ("message", message), ("reason", reason) + ), idempotent=False, timeout=timeout, ) - async def preview_my_storefront( + async def unblock_provider_customer_purchases( self, + client_organization_id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.PreviewMyStorefrontResponse: - """Call ``GET /v1/provider/storefront/preview``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/provider/customers/{clientOrganizationId}:unblock-purchases``.""" return await self._client._call( - "GET", - "/v1/provider/storefront/preview", - m.PreviewMyStorefrontResponse, + "POST", + f"/v1/provider/customers/{_path(client_organization_id)}:unblock-purchases", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.UnblockProviderCustomerPurchasesBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def submit_my_storefront( + async def unblock_provider_customer_virtual_machine( self, + client_organization_id: str, + virtual_machine_id: str, *, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetMyStorefrontResponse: - """Call ``POST /v1/provider/storefront/submit``.""" + ) -> m.VirtualMachine: + """ + Call ``POST + /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:unblock``. + """ return await self._client._call( "POST", - "/v1/provider/storefront/submit", - m.GetMyStorefrontResponse, + f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:unblock", + m.VirtualMachine, query=_query(extra_query), - body=dict(extra_body or {}), + body=_body(m.UnblockProviderCustomerVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def update_my_storefront( + +class AsyncProviderDashboardPlansTabService(_ServiceAsync): + """The NodeRings ProviderDashboardPlansTabService API.""" + + async def get_dashboard_plans_tab_stats( self, - *, - about_markdown: str | None = None, - cover_image_url: str | None = None, - faqs: list[m.StorefrontFaq | dict[str, Any]] | None = None, - featured_plan_ids: list[str] | None = None, - highlight_custom: str | None = None, - highlight_custom_lines: list[str] | None = None, - highlight_keys: list[str] | None = None, - logo_image_url: str | None = None, - proposed_slug: str | None = None, - tagline: str | None = None, - extra_body: dict[str, Any] | None = None, + *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetMyStorefrontResponse: - """Call ``PATCH /v1/provider/storefront``.""" + ) -> m.ProviderDashboardPlansTabStats: + """Call ``GET /v1/provider/dashboard/plans-tab-stats``.""" return await self._client._call( - "PATCH", - "/v1/provider/storefront", - m.GetMyStorefrontResponse, + "GET", + "/v1/provider/dashboard/plans-tab-stats", + m.ProviderDashboardPlansTabStats, query=_query(extra_query), - body=_body( - m.UpdateMyStorefrontRequest, - extra_body, - False, - ("about_markdown", about_markdown), - ("cover_image_url", cover_image_url), - ("faqs", faqs), - ("featured_plan_ids", featured_plan_ids), - ("highlight_custom", highlight_custom), - ("highlight_custom_lines", highlight_custom_lines), - ("highlight_keys", highlight_keys), - ("logo_image_url", logo_image_url), - ("proposed_slug", proposed_slug), - ("tagline", tagline), - ), + body=None, idempotent=False, timeout=timeout, ) -class AsyncProviderTicketNotificationService(_ServiceAsync): - """The NodeRings ProviderTicketNotificationService API.""" +class AsyncProviderDashboardService(_ServiceAsync): + """The NodeRings ProviderDashboardService API.""" - async def get_provider_ticket_notification_policy( + async def get_dashboard_asset_sales_timeseries( self, *, + range_days: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderTicketNotificationPolicyResponse: - """Call ``GET /v1/provider/ticket-notification-policy``.""" + ) -> m.GetDashboardAssetSalesTimeseriesResponse: + """Call ``GET /v1/provider/dashboard/asset-sales-timeseries``.""" return await self._client._call( "GET", - "/v1/provider/ticket-notification-policy", - m.GetProviderTicketNotificationPolicyResponse, - query=_query(extra_query), + "/v1/provider/dashboard/asset-sales-timeseries", + m.GetDashboardAssetSalesTimeseriesResponse, + query=_query(extra_query, ("rangeDays", range_days)), body=None, idempotent=False, timeout=timeout, ) - async def send_provider_ticket_notification_test( + async def get_dashboard_billing_sales( self, *, - extra_body: dict[str, Any] | None = None, + range_days: int | None = None, + include_prior_period: bool | None = None, + revenue_by_customer_page: int | None = None, + revenue_by_customer_page_size: int | None = None, + revenue_by_customer_email_filter: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``POST /v1/provider/ticket-notification-policy:send-test``.""" + ) -> m.GetDashboardBillingSalesResponse: + """ + Call ``GET /v1/provider/dashboard/billing-sales``. + + Args: + revenue_by_customer_page: Revenue-by-customer table (1-based page). Omit for defaults (page 1, page size 25). + revenue_by_customer_email_filter: Case-insensitive substring match on contact email, organization id, or organization name. + """ return await self._client._call( - "POST", - "/v1/provider/ticket-notification-policy:send-test", - m.SuccessResponse, - query=_query(extra_query), - body=dict(extra_body or {}), + "GET", + "/v1/provider/dashboard/billing-sales", + m.GetDashboardBillingSalesResponse, + query=_query( + extra_query, + ("rangeDays", range_days), + ("includePriorPeriod", include_prior_period), + ("revenueByCustomerPage", revenue_by_customer_page), + ("revenueByCustomerPageSize", revenue_by_customer_page_size), + ("revenueByCustomerEmailFilter", revenue_by_customer_email_filter), + ), + body=None, idempotent=False, timeout=timeout, ) - async def update_provider_ticket_notification_policy( + async def get_dashboard_customer_acquisition_timeseries( self, *, - policy: m.ProviderTicketNotificationPolicy | dict[str, Any] | None = None, - extra_body: dict[str, Any] | None = None, + range_days: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderTicketNotificationPolicyResponse: - """Call ``PUT /v1/provider/ticket-notification-policy``.""" + ) -> m.GetDashboardCustomerAcquisitionTimeseriesResponse: + """Call ``GET /v1/provider/dashboard/customer-acquisition-timeseries``.""" return await self._client._call( - "PUT", - "/v1/provider/ticket-notification-policy", - m.GetProviderTicketNotificationPolicyResponse, - query=_query(extra_query), - body=_body(m.UpdateProviderTicketNotificationPolicyRequest, extra_body, False, ("policy", policy)), + "GET", + "/v1/provider/dashboard/customer-acquisition-timeseries", + m.GetDashboardCustomerAcquisitionTimeseriesResponse, + query=_query(extra_query, ("rangeDays", range_days)), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncRefundService(_ServiceAsync): - """The NodeRings RefundService API.""" - - async def get_refund( + async def get_dashboard_summary( self, - refund_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetRefundResponse: - """ - GetRefund retrieves a single refund with payment and invoice details - - It calls ``GET /v1/refunds/{refundId}``. - """ + ) -> m.GetDashboardSummaryResponse: + """Call ``GET /v1/provider/dashboard/summary``.""" return await self._client._call( "GET", - f"/v1/refunds/{_path(refund_id)}", - m.GetRefundResponse, + "/v1/provider/dashboard/summary", + m.GetDashboardSummaryResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_refunds( + async def list_dashboard_addon_catalog_stats( self, *, - payment_id: str | None = None, - invoice_id: str | None = None, - status: m.RefundStatus | str | None = None, + addon_search: str | None = None, + addon_type_filter: str | None = None, + addon_billing_type_filter: str | None = None, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListRefundsResponse: - """ - ListRefunds lists refunds for a payment, invoice, or organization - - It calls ``GET /v1/refunds``. - """ + ) -> m.ListDashboardAddonCatalogStatsResponse: + """Call ``GET /v1/provider/dashboard/addon-catalog-stats``.""" return await self._client._call( "GET", - "/v1/refunds", - m.ListRefundsResponse, + "/v1/provider/dashboard/addon-catalog-stats", + m.ListDashboardAddonCatalogStatsResponse, query=_query( extra_query, - ("paymentId", payment_id), - ("invoiceId", invoice_id), - ("status", status), + ("addonSearch", addon_search), + ("addonTypeFilter", addon_type_filter), + ("addonBillingTypeFilter", addon_billing_type_filter), ("page", page), ("pageSize", page_size), ), @@ -28686,19 +24884,19 @@ async def list_refunds( timeout=timeout, ) - async def list_refunds_all( + async def list_dashboard_addon_catalog_stats_all( self, *, - payment_id: str | None = None, - invoice_id: str | None = None, - status: m.RefundStatus | str | None = None, + addon_search: str | None = None, + addon_type_filter: str | None = None, + addon_billing_type_filter: str | None = None, page: int | None = None, page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Refund]: + ) -> AsyncIterator[m.ProviderDashboardAddonCatalogRow]: """ - Every result of :meth:`list_refunds`, reading page after page. + Every result of :meth:`list_dashboard_addon_catalog_stats`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -28706,120 +24904,155 @@ async def list_refunds_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_refunds( + res = await self.list_dashboard_addon_catalog_stats( page=page, page_size=size, - payment_id=payment_id, - invoice_id=invoice_id, - status=status, + addon_search=addon_search, + addon_type_filter=addon_type_filter, + addon_billing_type_filter=addon_billing_type_filter, extra_query=extra_query, timeout=timeout, ) - items = res.refunds + items = res.addon_catalog for item in items: yield item seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + if len(items) < size: return page += 1 - -class AsyncRegionService(_ServiceAsync): - """The NodeRings RegionService API.""" - - async def create_region( + async def list_dashboard_infrastructure( self, *, - city_country_id: str | None = None, - datacenter_id: str | None = None, - extra_body: dict[str, Any] | None = None, + platform_id: str | None = None, + region_id: str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.Region: - """Call ``POST /v1/regions``.""" + ) -> m.ListDashboardInfrastructureResponse: + """Call ``GET /v1/provider/dashboard/infrastructure``.""" return await self._client._call( - "POST", - "/v1/regions", - m.Region, - query=_query(extra_query), - body=_body( - m.CreateRegionRequest, - extra_body, - False, - ("city_country_id", city_country_id), - ("datacenter_id", datacenter_id), + "GET", + "/v1/provider/dashboard/infrastructure", + m.ListDashboardInfrastructureResponse, + query=_query( + extra_query, + ("platformId", platform_id), + ("regionId", region_id), + ("page", page), + ("pageSize", page_size), ), + body=None, idempotent=False, timeout=timeout, ) - async def delete_region( + async def list_dashboard_infrastructure_all( self, - id: str, *, + platform_id: str | None = None, + region_id: str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/regions/{id}``.""" - return await self._client._call( - "DELETE", - f"/v1/regions/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> AsyncIterator[m.ProviderDashboardNodeRollup]: + """ + Every result of :meth:`list_dashboard_infrastructure`, reading page after page. - async def get_region( + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_dashboard_infrastructure( + page=page, + page_size=size, + platform_id=platform_id, + region_id=region_id, + extra_query=extra_query, + timeout=timeout, + ) + items = res.by_node + for item in items: + yield item + seen += len(items) + if len(items) < size: + return + page += 1 + + async def list_dashboard_ipam( self, - id: str, *, + network_id: str | None = None, + allocated_sample_ips_page: int | None = None, + allocated_sample_ips_page_size: int | None = None, extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.Region: - """Call ``GET /v1/regions/{id}``.""" + timeout: Timeout = NOT_GIVEN, + ) -> m.ListDashboardIPAMResponse: + """Call ``GET /v1/provider/dashboard/ipam``.""" return await self._client._call( "GET", - f"/v1/regions/{_path(id)}", - m.Region, - query=_query(extra_query), + "/v1/provider/dashboard/ipam", + m.ListDashboardIPAMResponse, + query=_query( + extra_query, + ("networkId", network_id), + ("allocatedSampleIpsPage", allocated_sample_ips_page), + ("allocatedSampleIpsPageSize", allocated_sample_ips_page_size), + ), body=None, idempotent=False, timeout=timeout, ) - async def list_countries_cities( + async def list_dashboard_ipam_assignments( self, *, - query: str | None = None, + network_id: str | None = None, + search: str | None = None, + platform_id: str | None = None, page: int | None = None, page_size: int | None = None, + ip_family: m.DashboardIPAMAssignmentIPFamily | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListCountriesCitiesResponse: - """Call ``GET /v1/countries-cities``.""" + ) -> m.ListDashboardIPAMAssignmentsResponse: + """Call ``GET /v1/provider/dashboard/ipam/assignments``.""" return await self._client._call( "GET", - "/v1/countries-cities", - m.ListCountriesCitiesResponse, - query=_query(extra_query, ("query", query), ("page", page), ("pageSize", page_size)), + "/v1/provider/dashboard/ipam/assignments", + m.ListDashboardIPAMAssignmentsResponse, + query=_query( + extra_query, + ("networkId", network_id), + ("search", search), + ("platformId", platform_id), + ("page", page), + ("pageSize", page_size), + ("ipFamily", ip_family), + ), body=None, idempotent=False, timeout=timeout, ) - async def list_countries_cities_all( + async def list_dashboard_ipam_assignments_all( self, *, - query: str | None = None, + network_id: str | None = None, + search: str | None = None, + platform_id: str | None = None, page: int | None = None, page_size: int | None = None, + ip_family: m.DashboardIPAMAssignmentIPFamily | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Country]: + ) -> AsyncIterator[m.DashboardIPAMAssignmentRow]: """ - Every result of :meth:`list_countries_cities`, reading page after page. + Every result of :meth:`list_dashboard_ipam_assignments`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -28827,14 +25060,17 @@ async def list_countries_cities_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_countries_cities( + res = await self.list_dashboard_ipam_assignments( page=page, page_size=size, - query=query, + network_id=network_id, + search=search, + platform_id=platform_id, + ip_family=ip_family, extra_query=extra_query, timeout=timeout, ) - items = res.countries + items = res.assignments for item in items: yield item seen += len(items) @@ -28842,94 +25078,145 @@ async def list_countries_cities_all( return page += 1 - async def list_datacenters( + async def list_dashboard_plan_subscription_stats( self, *, - query: str | None = None, - page: int | None = None, - page_size: int | None = None, + plan_search: str | None = None, + plan_billing_type_filter: str | None = None, + plan_asset_filter: str | None = None, + plans_page: int | None = None, + plans_page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDatacentersResponse: - """Call ``GET /v1/datacenters``.""" + ) -> m.ListDashboardPlanSubscriptionStatsResponse: + """Call ``GET /v1/provider/dashboard/plan-subscription-stats``.""" return await self._client._call( "GET", - "/v1/datacenters", - m.ListDatacentersResponse, - query=_query(extra_query, ("query", query), ("page", page), ("pageSize", page_size)), + "/v1/provider/dashboard/plan-subscription-stats", + m.ListDashboardPlanSubscriptionStatsResponse, + query=_query( + extra_query, + ("planSearch", plan_search), + ("planBillingTypeFilter", plan_billing_type_filter), + ("planAssetFilter", plan_asset_filter), + ("plansPage", plans_page), + ("plansPageSize", plans_page_size), + ), body=None, idempotent=False, timeout=timeout, ) - async def list_datacenters_all( + async def list_dashboard_ticket_statistics( self, *, - query: str | None = None, - page: int | None = None, - page_size: int | None = None, + from_time: datetime | None = None, + to_time: datetime | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.DatacenterInfo]: - """ - Every result of :meth:`list_datacenters`, reading page after page. + ) -> m.ListDashboardTicketStatisticsResponse: + """Call ``GET /v1/provider/dashboard/tickets/statistics``.""" + return await self._client._call( + "GET", + "/v1/provider/dashboard/tickets/statistics", + m.ListDashboardTicketStatisticsResponse, + query=_query(extra_query, ("fromTime", from_time), ("toTime", to_time)), + body=None, + idempotent=False, + timeout=timeout, + ) - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_datacenters( - page=page, - page_size=size, - query=query, - extra_query=extra_query, - timeout=timeout, - ) - items = res.datacenters - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + async def list_dashboard_virtual_machines( + self, + *, + platform_id: str | None = None, + region_id: str | None = None, + node_id: str | None = None, + customer_email_contains: str | None = None, + vm_page: int | None = None, + vm_page_size: int | None = None, + vmtemplate_id: str | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.ListDashboardVirtualMachinesResponse: + """Call ``GET /v1/provider/dashboard/virtual-machines``.""" + return await self._client._call( + "GET", + "/v1/provider/dashboard/virtual-machines", + m.ListDashboardVirtualMachinesResponse, + query=_query( + extra_query, + ("platformId", platform_id), + ("regionId", region_id), + ("nodeId", node_id), + ("customerEmailContains", customer_email_contains), + ("vmPage", vm_page), + ("vmPageSize", vm_page_size), + ("vmtemplateId", vmtemplate_id), + ), + body=None, + idempotent=False, + timeout=timeout, + ) - async def list_regions( + +class AsyncProviderNetworkService(_ServiceAsync): + """The NodeRings ProviderNetworkService API.""" + + async def get_smtp_outbound_provider_policy( + self, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetSMTPOutboundProviderPolicyResponse: + """Call ``GET /v1/provider/network/smtp-outbound-policy``.""" + return await self._client._call( + "GET", + "/v1/provider/network/smtp-outbound-policy", + m.GetSMTPOutboundProviderPolicyResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def list_virtual_machine_smtp_outbound_policies( self, *, page: int | None = None, page_size: int | None = None, search: str | None = None, - platform_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListRegionsResponse: - """Call ``GET /v1/regions``.""" + ) -> m.ListVirtualMachineSMTPOutboundPoliciesResponse: + """ + Call ``GET /v1/provider/network/smtp-outbound-policies``. + + Args: + search: Case-insensitive substring match on hostname, customer contact email, or exact virtual machine UUID. + """ return await self._client._call( "GET", - "/v1/regions", - m.ListRegionsResponse, - query=_query( - extra_query, ("page", page), ("pageSize", page_size), ("search", search), ("platformId", platform_id) - ), + "/v1/provider/network/smtp-outbound-policies", + m.ListVirtualMachineSMTPOutboundPoliciesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("search", search)), body=None, idempotent=False, timeout=timeout, ) - async def list_regions_all( + async def list_virtual_machine_smtp_outbound_policies_all( self, *, page: int | None = None, page_size: int | None = None, search: str | None = None, - platform_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Region]: + ) -> AsyncIterator[m.VirtualMachineSMTPOutboundPolicyView]: """ - Every result of :meth:`list_regions`, reading page after page. + Every result of :meth:`list_virtual_machine_smtp_outbound_policies`, reading page after + page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -28937,15 +25224,14 @@ async def list_regions_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_regions( + res = await self.list_virtual_machine_smtp_outbound_policies( page=page, page_size=size, search=search, - platform_id=platform_id, extra_query=extra_query, timeout=timeout, ) - items = res.regions + items = res.policies for item in items: yield item seen += len(items) @@ -28953,805 +25239,752 @@ async def list_regions_all( return page += 1 - -class AsyncRegisteredDomainService(_ServiceAsync): - """The NodeRings RegisteredDomainService API.""" - - async def approve_outgoing_transfer( + async def update_smtp_outbound_provider_policy( self, - name: str, *, + block_by_default: bool | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RegisteredDomain: - """Call ``POST /v1/registrar/domains/{name}/transfer-out/approve``.""" + ) -> m.GetSMTPOutboundProviderPolicyResponse: + """ + Call ``PUT /v1/provider/network/smtp-outbound-policy``. + + Args: + block_by_default: Must accept false (allow-by-default). Proto3 required on bool rejects the zero value because there is no field presence without `optional`. + """ return await self._client._call( - "POST", - f"/v1/registrar/domains/{_path(name)}/transfer-out/approve", - m.RegisteredDomain, + "PUT", + "/v1/provider/network/smtp-outbound-policy", + m.GetSMTPOutboundProviderPolicyResponse, query=_query(extra_query), - body=_body(m.ApproveOutgoingTransferBody, extra_body, False), + body=_body( + m.UpdateSMTPOutboundProviderPolicyRequest, extra_body, False, ("block_by_default", block_by_default) + ), idempotent=False, timeout=timeout, ) - async def confirm_registrant_change( + async def update_virtual_machine_smtp_outbound_policy( self, - token: str, + virtual_machine_id: str, *, - approve: bool | None = None, + action: m.SMTPOutboundVMAction | str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ConfirmRegistrantChangeResponse: - """ - Anonymous via the signed token from the approval email. - - It calls ``POST /v1/registrar/registrant-changes/{token}``. - """ + ) -> m.VirtualMachineSMTPOutboundPolicyView: + """Call ``PUT /v1/provider/network/smtp-outbound-policies/{virtualMachineId}``.""" return await self._client._call( - "POST", - f"/v1/registrar/registrant-changes/{_path(token)}", - m.ConfirmRegistrantChangeResponse, + "PUT", + f"/v1/provider/network/smtp-outbound-policies/{_path(virtual_machine_id)}", + m.VirtualMachineSMTPOutboundPolicyView, query=_query(extra_query), - body=_body(m.ConfirmRegistrantChangeBody, extra_body, False, ("approve", approve)), + body=_body(m.UpdateVirtualMachineSMTPOutboundPolicyBody, extra_body, False, ("action", action)), idempotent=False, timeout=timeout, ) - async def delete_domain_glue_record( + +class AsyncProviderOnboardingService(_ServiceAsync): + """The NodeRings ProviderOnboardingService API.""" + + async def get_provider_onboarding_checklist( self, - name: str, - host: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/registrar/domains/{name}/glue/{host}``.""" + ) -> m.GetProviderOnboardingChecklistResponse: + """Call ``GET /v1/provider/onboarding/checklist``.""" return await self._client._call( - "DELETE", - f"/v1/registrar/domains/{_path(name)}/glue/{_path(host)}", - m.SuccessResponse, + "GET", + "/v1/provider/onboarding/checklist", + m.GetProviderOnboardingChecklistResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def delete_registered_domain( + +class AsyncProviderPlanService(_ServiceAsync): + """The NodeRings ProviderPlanService API.""" + + async def calculate_plan_pricing( self, - name: str, *, - confirm_name: str | None = None, - confirmation_code: str | None = None, - reauth_token: str | None = None, + calc_config: m.PricingCalculationConfig | dict[str, Any] | None = None, + instances: list[m.ResourceInstanceInput | dict[str, Any]] | None = None, + plan_config: m.PlanPricingConfig | dict[str, Any] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DeleteRegisteredDomainResponse: + ) -> m.CalculatePlanPricingResponse: """ - Two steps: without confirmation_code a code is emailed to the org owners. POST (not DELETE) - so the confirmation code and reauth token travel in the body, not in the URL. - - It calls ``POST /v1/registrar/domains/{name}/delete``. + Call ``POST /v1/plans:calculate``. Args: - confirm_name: Typed confirmation: must equal name. - confirmation_code: Code emailed to the org owners (30 min). Empty = send a code. + instances: Resource instances to calculate pricing for """ return await self._client._call( "POST", - f"/v1/registrar/domains/{_path(name)}/delete", - m.DeleteRegisteredDomainResponse, + "/v1/plans:calculate", + m.CalculatePlanPricingResponse, query=_query(extra_query), body=_body( - m.DeleteRegisteredDomainBody, + m.CalculatePlanPricingRequest, extra_body, False, - ("confirm_name", confirm_name), - ("confirmation_code", confirmation_code), - ("reauth_token", reauth_token), + ("calc_config", calc_config), + ("instances", instances), + ("plan_config", plan_config), ), idempotent=False, timeout=timeout, ) - async def get_domain_auth_code( + async def create_plan( self, - name: str, *, - reauth_token: str | None = None, + cpu_limit: int | None = None, + cpu_units: int | None = None, + currency: str | None = None, + metadata: dict[str, Any] | None = None, + network_rate_limit_mbs: float | None = None, + node_ids: list[str] | None = None, + on_credit_exhaustion: str | None = None, + plan_id: str | None = None, + plan_prices: list[m.PlanPriceOverride | dict[str, Any]] | None = None, + region_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetDomainAuthCodeResponse: + ) -> m.SuccessResponse: """ - POST so the reauth token travels in the body. Sensitive response. - - It calls ``POST /v1/registrar/domains/{name}/auth-code``. + Call ``POST /v1/plans``. Args: - reauth_token: Step-up token from ReauthenticateUser (10 minutes). + cpu_limit: Plan CPU/network scheduling overrides written into metadata.specifications. Proxmox cpulimit= (max CPU time); 0 = unlimited. Omitted = template value / 0. + cpu_units: Proxmox cpuunits= fair-share weight. Omitted = template value / 1024. + currency: Plan fields to override from template (name, description, and trial_days come from template) + metadata: Plan metadata. VirtFusion package_id lives under metadata.virtfusion.package_id. + network_rate_limit_mbs: Primary NIC rate limit in MB/s (Proxmox rate=); 0 = unlimited. + node_ids: Nodes this plan may sell on (must be catalog-eligible for the template). Required: at least one node_id (validated in Go). + on_credit_exhaustion: Provider choice when client prepaid credits are exhausted. Values: "suspend" (default), "continue_with_dunning". + plan_id: Template plan ID to clone from (required) + plan_prices: Plan prices with overrides (unit_amount_minor, currency, free_units per metric) + region_id: Region where this plan is offered (exactly one per plan). """ return await self._client._call( "POST", - f"/v1/registrar/domains/{_path(name)}/auth-code", - m.GetDomainAuthCodeResponse, + "/v1/plans", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.GetDomainAuthCodeBody, extra_body, False, ("reauth_token", reauth_token)), + body=_body( + m.CreatePlanRequest, + extra_body, + False, + ("cpu_limit", cpu_limit), + ("cpu_units", cpu_units), + ("currency", currency), + ("metadata", metadata), + ("network_rate_limit_mbs", network_rate_limit_mbs), + ("node_ids", node_ids), + ("on_credit_exhaustion", on_credit_exhaustion), + ("plan_id", plan_id), + ("plan_prices", plan_prices), + ("region_id", region_id), + ), idempotent=False, timeout=timeout, ) - async def get_registered_domain( + async def delete_plan( self, - name: str, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RegisteredDomain: - """Call ``GET /v1/registrar/domains/{name}``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/plans/{id}``.""" return await self._client._call( - "GET", - f"/v1/registrar/domains/{_path(name)}", - m.RegisteredDomain, + "DELETE", + f"/v1/plans/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_domain_events( + async def list_assignable_nodes_for_plan( self, - name: str, *, - page: int | None = None, - page_size: int | None = None, - kinds: list[m.DomainEventKind | str] | None = None, + template_plan_id: str | None = None, + plan_id: str | None = None, + region_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDomainEventsResponse: - """Call ``GET /v1/registrar/domains/{name}/events``.""" + ) -> m.ListAssignableNodesForPlanResponse: + """ + Nodes the provider may assign to a plan (catalog-eligible for tier/category). + + It calls ``GET /v1/provider/plans/assignable-nodes``. + + Args: + template_plan_id: Optional: set for create-from-template. Empty when plan_id is used. + plan_id: Optional: set for edit existing plan. Empty when template_plan_id is used. + """ return await self._client._call( "GET", - f"/v1/registrar/domains/{_path(name)}/events", - m.ListDomainEventsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("kinds", kinds)), + "/v1/provider/plans/assignable-nodes", + m.ListAssignableNodesForPlanResponse, + query=_query( + extra_query, ("templatePlanId", template_plan_id), ("planId", plan_id), ("regionId", region_id) + ), body=None, idempotent=False, timeout=timeout, ) - async def list_domain_events_all( + async def update_plan( self, - name: str, + id: str, *, - page: int | None = None, - page_size: int | None = None, - kinds: list[m.DomainEventKind | str] | None = None, + addon_price_overrides: list[m.AddonPriceOverride | dict[str, Any]] | None = None, + cpu_limit: int | None = None, + cpu_units: int | None = None, + currency: str | None = None, + metadata: dict[str, Any] | None = None, + network_rate_limit_mbs: float | None = None, + node_ids: list[str] | None = None, + on_credit_exhaustion: str | None = None, + plan_prices: list[m.PlanPriceOverride | dict[str, Any]] | None = None, + region_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.DomainEvent]: + ) -> m.SuccessResponse: """ - Every result of :meth:`list_domain_events`, reading page after page. + Call ``PATCH /v1/plans/{id}``. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + Args: + addon_price_overrides: Optional: Override prices for addons when updating plan + cpu_limit: Plan CPU/network scheduling overrides written into metadata.specifications. Only affects VMs created after the update (VMs snapshot plan values at create). + currency: Plan fields to update (name, description, and trial_days come from template, not updatable) + metadata: Plan metadata. VirtFusion package_id lives under metadata.virtfusion.package_id. + node_ids: When non-empty, replaces the plan's assigned nodes (same rules as create). Omitted / empty leaves existing assignments unchanged. + on_credit_exhaustion: Provider choice when client prepaid credits are exhausted. Values: "suspend" (default), "continue_with_dunning". + plan_prices: Plan prices with overrides (unit_amount_minor, currency, free_units per metric) + region_id: Region for this plan offer (optional on update). """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_domain_events( - name, - page=page, - page_size=size, - kinds=kinds, - extra_query=extra_query, - timeout=timeout, - ) - items = res.events - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 + return await self._client._call( + "PATCH", + f"/v1/plans/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), + body=_body( + m.UpdatePlanBody, + extra_body, + False, + ("addon_price_overrides", addon_price_overrides), + ("cpu_limit", cpu_limit), + ("cpu_units", cpu_units), + ("currency", currency), + ("metadata", metadata), + ("network_rate_limit_mbs", network_rate_limit_mbs), + ("node_ids", node_ids), + ("on_credit_exhaustion", on_credit_exhaustion), + ("plan_prices", plan_prices), + ("region_id", region_id), + ), + idempotent=False, + timeout=timeout, + ) + + +class AsyncProviderReviewService(_ServiceAsync): + """The NodeRings ProviderReviewService API.""" - async def list_domain_glue_records( + async def create_provider_review_reply( self, - name: str, + review_id: str, *, + reply_message: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDomainGlueRecordsResponse: - """Call ``GET /v1/registrar/domains/{name}/glue``.""" + ) -> m.CreateProviderReviewReplyResponse: + """Call ``POST /v1/provider-reviews/{reviewId}/reply``.""" return await self._client._call( - "GET", - f"/v1/registrar/domains/{_path(name)}/glue", - m.ListDomainGlueRecordsResponse, + "POST", + f"/v1/provider-reviews/{_path(review_id)}/reply", + m.CreateProviderReviewReplyResponse, query=_query(extra_query), - body=None, + body=_body(m.CreateProviderReviewReplyBody, extra_body, False, ("reply_message", reply_message)), idempotent=False, timeout=timeout, ) - async def list_domain_invoices( + async def delete_provider_review_reply( self, - name: str, + review_id: str, *, - page: int | None = None, - page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDomainInvoicesResponse: - """ - Billing tab: paid invoices covering the domain (checkout orders and automatic renewals, - which have no order). Newest first. - - It calls ``GET /v1/registrar/domains/{name}/invoices``. - """ + ) -> m.DeleteProviderReviewReplyResponse: + """Call ``DELETE /v1/provider-reviews/{reviewId}/reply``.""" return await self._client._call( - "GET", - f"/v1/registrar/domains/{_path(name)}/invoices", - m.ListDomainInvoicesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "DELETE", + f"/v1/provider-reviews/{_path(review_id)}/reply", + m.DeleteProviderReviewReplyResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_domain_invoices_all( - self, - name: str, - *, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.DomainInvoice]: - """ - Every result of :meth:`list_domain_invoices`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_domain_invoices( - name, - page=page, - page_size=size, - extra_query=extra_query, - timeout=timeout, - ) - items = res.invoices - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def list_registered_domains( + async def list_provider_reviews( self, *, page: int | None = None, page_size: int | None = None, - states: list[m.RegisteredDomainState | str] | None = None, + star_ratings: list[int] | None = None, search: str | None = None, - expiring_soon: bool | None = None, - needs_attention: bool | None = None, + reply_filter: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListRegisteredDomainsResponse: + ) -> m.ListProviderReviewsResponse: """ - Call ``GET /v1/registrar/domains``. + Call ``GET /v1/provider-reviews``. Args: - search: Substring match on the name. - expiring_soon: Renew-by within 30 days. - needs_attention: Has a hold, verification pending, failed renewal or pending transfer out. + star_ratings: Multi-select star filter (e.g. [5,4]); empty means any stars. + search: Case-insensitive substring match on review comment or provider reply; empty means no text filter. + reply_filter: Inbox: 0 = awaiting provider reply / empty reply (default), 1 = replied only, 2 = all reviews. """ return await self._client._call( "GET", - "/v1/registrar/domains", - m.ListRegisteredDomainsResponse, + "/v1/provider-reviews", + m.ListProviderReviewsResponse, query=_query( extra_query, ("page", page), ("pageSize", page_size), - ("states", states), + ("starRatings", star_ratings), ("search", search), - ("expiringSoon", expiring_soon), - ("needsAttention", needs_attention), + ("replyFilter", reply_filter), ), body=None, idempotent=False, timeout=timeout, ) - async def list_registered_domains_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - states: list[m.RegisteredDomainState | str] | None = None, - search: str | None = None, - expiring_soon: bool | None = None, - needs_attention: bool | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.RegisteredDomain]: - """ - Every result of :meth:`list_registered_domains`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). - """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = await self.list_registered_domains( - page=page, - page_size=size, - states=states, - search=search, - expiring_soon=expiring_soon, - needs_attention=needs_attention, - extra_query=extra_query, - timeout=timeout, - ) - items = res.domains - for item in items: - yield item - seen += len(items) - if len(items) < size or (res.total_count > 0 and seen >= res.total_count): - return - page += 1 - - async def renew_domain( + async def update_provider_review_reply( self, - name: str, + review_id: str, *, - idempotency_key: str | None = None, - years: int | None = None, + reply_message: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrder: - """ - Creates a renew order (checkout path, 3-D Secure possible). + ) -> m.UpdateProviderReviewReplyResponse: + """Call ``PATCH /v1/provider-reviews/{reviewId}/reply``.""" + return await self._client._call( + "PATCH", + f"/v1/provider-reviews/{_path(review_id)}/reply", + m.UpdateProviderReviewReplyResponse, + query=_query(extra_query), + body=_body(m.UpdateProviderReviewReplyBody, extra_body, False, ("reply_message", reply_message)), + idempotent=False, + timeout=timeout, + ) - It calls ``POST /v1/registrar/domains/{name}/renew``. A retry of the same call cannot create - a second resource: the SDK sends an idempotency key. - Args: - idempotency_key: A UUID that makes the create safe to retry. If you leave it out, the SDK sets a new one. - """ +class AsyncProviderStorefrontService(_ServiceAsync): + """The NodeRings ProviderStorefrontService API.""" + + async def get_my_storefront( + self, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetMyStorefrontResponse: + """Call ``GET /v1/provider/storefront``.""" return await self._client._call( - "POST", - f"/v1/registrar/domains/{_path(name)}/renew", - m.DomainOrder, + "GET", + "/v1/provider/storefront", + m.GetMyStorefrontResponse, query=_query(extra_query), - body=_body(m.RenewDomainBody, extra_body, True, ("idempotency_key", idempotency_key), ("years", years)), - idempotent=True, + body=None, + idempotent=False, timeout=timeout, ) - async def resend_registrant_verification( + async def opt_in_storefront( self, - name: str, *, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ResendRegistrantVerificationResponse: - """Call ``POST /v1/registrar/domains/{name}/verification/resend``.""" + ) -> m.GetMyStorefrontResponse: + """Call ``POST /v1/provider/storefront/opt-in``.""" return await self._client._call( "POST", - f"/v1/registrar/domains/{_path(name)}/verification/resend", - m.ResendRegistrantVerificationResponse, + "/v1/provider/storefront/opt-in", + m.GetMyStorefrontResponse, query=_query(extra_query), - body=_body(m.ResendRegistrantVerificationBody, extra_body, False), + body=dict(extra_body or {}), idempotent=False, timeout=timeout, ) - async def reset_domain_auth_code( + async def opt_out_storefront( self, - name: str, *, - reauth_token: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetDomainAuthCodeResponse: - """Call ``POST /v1/registrar/domains/{name}/auth-code/reset``.""" + ) -> m.GetMyStorefrontResponse: + """Call ``POST /v1/provider/storefront/opt-out``.""" return await self._client._call( "POST", - f"/v1/registrar/domains/{_path(name)}/auth-code/reset", - m.GetDomainAuthCodeResponse, + "/v1/provider/storefront/opt-out", + m.GetMyStorefrontResponse, query=_query(extra_query), - body=_body(m.ResetDomainAuthCodeBody, extra_body, False, ("reauth_token", reauth_token)), + body=dict(extra_body or {}), idempotent=False, timeout=timeout, ) - async def restore_domain( + async def preview_my_storefront( self, - name: str, *, - idempotency_key: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrder: - """ - Creates a restore order. - - It calls ``POST /v1/registrar/domains/{name}/restore``. A retry of the same call cannot - create a second resource: the SDK sends an idempotency key. - - Args: - idempotency_key: A UUID that makes the create safe to retry. If you leave it out, the SDK sets a new one. - """ + ) -> m.PreviewMyStorefrontResponse: + """Call ``GET /v1/provider/storefront/preview``.""" return await self._client._call( - "POST", - f"/v1/registrar/domains/{_path(name)}/restore", - m.DomainOrder, + "GET", + "/v1/provider/storefront/preview", + m.PreviewMyStorefrontResponse, query=_query(extra_query), - body=_body(m.RestoreDomainBody, extra_body, True, ("idempotency_key", idempotency_key)), - idempotent=True, + body=None, + idempotent=False, timeout=timeout, ) - async def retry_domain_transfer( + async def submit_my_storefront( self, - order_item_id: str, *, - auth_code: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainOrder: - """ - Resubmits a failed incoming transfer with a corrected auth code (restarts the registry - operation). Only while the order still holds the payment for the item; otherwise - TRANSFER_NEW_ORDER_REQUIRED. - - It calls ``POST /v1/registrar/order-items/{orderItemId}/retry-transfer``. - """ + ) -> m.GetMyStorefrontResponse: + """Call ``POST /v1/provider/storefront/submit``.""" return await self._client._call( "POST", - f"/v1/registrar/order-items/{_path(order_item_id)}/retry-transfer", - m.DomainOrder, + "/v1/provider/storefront/submit", + m.GetMyStorefrontResponse, query=_query(extra_query), - body=_body(m.RetryDomainTransferBody, extra_body, False, ("auth_code", auth_code)), + body=dict(extra_body or {}), idempotent=False, timeout=timeout, ) - async def set_domain_auto_renew( + async def update_my_storefront( self, - name: str, *, - auto_renew: bool | None = None, - mit_consent: bool | None = None, - payment_method_id: str | None = None, - whois_privacy_auto_renew: bool | None = None, + about_markdown: str | None = None, + cover_image_url: str | None = None, + faqs: list[m.StorefrontFaq | dict[str, Any]] | None = None, + featured_plan_ids: list[str] | None = None, + highlight_custom: str | None = None, + highlight_custom_lines: list[str] | None = None, + highlight_keys: list[str] | None = None, + logo_image_url: str | None = None, + proposed_slug: str | None = None, + tagline: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RegisteredDomain: - """ - Call ``PUT /v1/registrar/domains/{name}/auto-renew``. - - Args: - mit_consent: Required when turning auto-renew on. - payment_method_id: Card for this domain's renewals (empty = org default card). - """ + ) -> m.GetMyStorefrontResponse: + """Call ``PATCH /v1/provider/storefront``.""" return await self._client._call( - "PUT", - f"/v1/registrar/domains/{_path(name)}/auto-renew", - m.RegisteredDomain, + "PATCH", + "/v1/provider/storefront", + m.GetMyStorefrontResponse, query=_query(extra_query), body=_body( - m.SetDomainAutoRenewBody, + m.UpdateMyStorefrontRequest, extra_body, False, - ("auto_renew", auto_renew), - ("mit_consent", mit_consent), - ("payment_method_id", payment_method_id), - ("whois_privacy_auto_renew", whois_privacy_auto_renew), + ("about_markdown", about_markdown), + ("cover_image_url", cover_image_url), + ("faqs", faqs), + ("featured_plan_ids", featured_plan_ids), + ("highlight_custom", highlight_custom), + ("highlight_custom_lines", highlight_custom_lines), + ("highlight_keys", highlight_keys), + ("logo_image_url", logo_image_url), + ("proposed_slug", proposed_slug), + ("tagline", tagline), ), idempotent=False, timeout=timeout, ) - async def set_domain_dnssec( + +class AsyncProviderTicketNotificationService(_ServiceAsync): + """The NodeRings ProviderTicketNotificationService API.""" + + async def get_provider_ticket_notification_policy( self, - name: str, *, - dnskeys: list[m.DomainDnskeyRecord | dict[str, Any]] | None = None, - ds_records: list[m.DomainDSRecord | dict[str, Any]] | None = None, - mode: m.DomainDNSSECMode | str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RegisteredDomain: - """ - Mode + custom keys. - - It calls ``PUT /v1/registrar/domains/{name}/dnssec``. - - Args: - dnskeys: CUSTOM mode: DNSKEY records (or ds_records where supported). - mode: - DOMAIN_DNSSEC_MODE_MANAGED: NodeRings keys, pushed to the registry automatically. - DOMAIN_DNSSEC_MODE_CUSTOM: Customer-supplied DNSKEY/DS records (custom nameservers). - """ + ) -> m.GetProviderTicketNotificationPolicyResponse: + """Call ``GET /v1/provider/ticket-notification-policy``.""" return await self._client._call( - "PUT", - f"/v1/registrar/domains/{_path(name)}/dnssec", - m.RegisteredDomain, + "GET", + "/v1/provider/ticket-notification-policy", + m.GetProviderTicketNotificationPolicyResponse, query=_query(extra_query), - body=_body( - m.SetDomainDNSSECBody, - extra_body, - False, - ("dnskeys", dnskeys), - ("ds_records", ds_records), - ("mode", mode), - ), + body=None, idempotent=False, timeout=timeout, ) - async def set_domain_nameservers( + async def send_provider_ticket_notification_test( self, - name: str, *, - nameservers: list[str] | None = None, - ns_mode: m.DomainNsMode | str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RegisteredDomain: - """ - Call ``PUT /v1/registrar/domains/{name}/nameservers``. - - Args: - nameservers: Custom nameservers (2-13) when ns_mode is CUSTOM. - ns_mode: - DOMAIN_NS_MODE_NODERINGS: NodeRings DNS (cfg.PowerDNS.AssignedNameservers). - DOMAIN_NS_MODE_CUSTOM: Customer nameservers. - """ + ) -> m.SuccessResponse: + """Call ``POST /v1/provider/ticket-notification-policy:send-test``.""" return await self._client._call( - "PUT", - f"/v1/registrar/domains/{_path(name)}/nameservers", - m.RegisteredDomain, + "POST", + "/v1/provider/ticket-notification-policy:send-test", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.SetDomainNameserversBody, extra_body, False, ("nameservers", nameservers), ("ns_mode", ns_mode) - ), + body=dict(extra_body or {}), idempotent=False, timeout=timeout, ) - async def set_domain_privacy( + async def update_provider_ticket_notification_policy( self, - name: str, *, - enabled: bool | None = None, - idempotency_key: str | None = None, + policy: m.ProviderTicketNotificationPolicy | dict[str, Any] | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SetDomainPrivacyResponse: - """ - Enabling may create a privacy order to pay (order_id in the response). - - It calls ``PUT /v1/registrar/domains/{name}/privacy``. A retry of the same call cannot - create a second resource: the SDK sends an idempotency key. - - Args: - idempotency_key: A UUID that makes the create safe to retry. If you leave it out, the SDK sets a new one. - """ + ) -> m.GetProviderTicketNotificationPolicyResponse: + """Call ``PUT /v1/provider/ticket-notification-policy``.""" return await self._client._call( "PUT", - f"/v1/registrar/domains/{_path(name)}/privacy", - m.SetDomainPrivacyResponse, + "/v1/provider/ticket-notification-policy", + m.GetProviderTicketNotificationPolicyResponse, query=_query(extra_query), - body=_body( - m.SetDomainPrivacyBody, extra_body, True, ("enabled", enabled), ("idempotency_key", idempotency_key) - ), - idempotent=True, + body=_body(m.UpdateProviderTicketNotificationPolicyRequest, extra_body, False, ("policy", policy)), + idempotent=False, timeout=timeout, ) - async def set_domain_transfer_lock( + +class AsyncRefundService(_ServiceAsync): + """The NodeRings RefundService API.""" + + async def get_refund( self, - name: str, + refund_id: str, *, - locked: bool | None = None, - reauth_token: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.RegisteredDomain: + ) -> m.GetRefundResponse: """ - Unlocking requires a step-up reauth_token. - - It calls ``PUT /v1/registrar/domains/{name}/lock``. + GetRefund retrieves a single refund with payment and invoice details - Args: - reauth_token: Step-up token from ReauthenticateUser; required to unlock. + It calls ``GET /v1/refunds/{refundId}``. """ return await self._client._call( - "PUT", - f"/v1/registrar/domains/{_path(name)}/lock", - m.RegisteredDomain, + "GET", + f"/v1/refunds/{_path(refund_id)}", + m.GetRefundResponse, query=_query(extra_query), - body=_body( - m.SetDomainTransferLockBody, extra_body, False, ("locked", locked), ("reauth_token", reauth_token) - ), + body=None, idempotent=False, timeout=timeout, ) - async def update_domain_contacts( + async def list_refunds( self, - name: str, *, - admin_contact_id: str | None = None, - reauth_token: str | None = None, - registrant_contact_id: str | None = None, - skip_transfer_lock: bool | None = None, - tech_contact_id: str | None = None, - extra_body: dict[str, Any] | None = None, + payment_id: str | None = None, + invoice_id: str | None = None, + status: m.RefundStatus | str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateDomainContactsResponse: + ) -> m.ListRefundsResponse: """ - May start the change-of-registrant flow. - - It calls ``PUT /v1/registrar/domains/{name}/contacts``. + ListRefunds lists refunds for a payment, invoice, or organization - Args: - reauth_token: Required for a registrant change. - skip_transfer_lock: ICANN Transfer Policy opt-out of the 60-day lock after a registrant change. + It calls ``GET /v1/refunds``. """ return await self._client._call( - "PUT", - f"/v1/registrar/domains/{_path(name)}/contacts", - m.UpdateDomainContactsResponse, - query=_query(extra_query), - body=_body( - m.UpdateDomainContactsBody, - extra_body, - False, - ("admin_contact_id", admin_contact_id), - ("reauth_token", reauth_token), - ("registrant_contact_id", registrant_contact_id), - ("skip_transfer_lock", skip_transfer_lock), - ("tech_contact_id", tech_contact_id), + "GET", + "/v1/refunds", + m.ListRefundsResponse, + query=_query( + extra_query, + ("paymentId", payment_id), + ("invoiceId", invoice_id), + ("status", status), + ("page", page), + ("pageSize", page_size), ), + body=None, idempotent=False, timeout=timeout, ) - async def upsert_domain_glue_record( + async def list_refunds_all( + self, + *, + payment_id: str | None = None, + invoice_id: str | None = None, + status: m.RefundStatus | str | None = None, + page: int | None = None, + page_size: int | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> AsyncIterator[m.Refund]: + """ + Every result of :meth:`list_refunds`, reading page after page. + + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await self.list_refunds( + page=page, + page_size=size, + payment_id=payment_id, + invoice_id=invoice_id, + status=status, + extra_query=extra_query, + timeout=timeout, + ) + items = res.refunds + for item in items: + yield item + seen += len(items) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + +class AsyncRegionService(_ServiceAsync): + """The NodeRings RegionService API.""" + + async def create_region( self, - name: str, - host: str, *, - ipv4: list[str] | None = None, - ipv6: list[str] | None = None, + city_country_id: str | None = None, + datacenter_id: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DomainGlueRecord: - """Call ``PUT /v1/registrar/domains/{name}/glue/{host}``.""" + ) -> m.Region: + """Call ``POST /v1/regions``.""" return await self._client._call( - "PUT", - f"/v1/registrar/domains/{_path(name)}/glue/{_path(host)}", - m.DomainGlueRecord, + "POST", + "/v1/regions", + m.Region, query=_query(extra_query), - body=_body(m.UpsertDomainGlueRecordBody, extra_body, False, ("ipv4", ipv4), ("ipv6", ipv6)), + body=_body( + m.CreateRegionRequest, + extra_body, + False, + ("city_country_id", city_country_id), + ("datacenter_id", datacenter_id), + ), idempotent=False, timeout=timeout, ) - -class AsyncRegistrarAdminService(_ServiceAsync): - """The NodeRings RegistrarAdminService API.""" - - async def add_domain_hold( + async def delete_region( self, - name: str, + id: str, *, - hold: m.DomainHold | str | None = None, - reason: str | None = None, - extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.AdminRegisteredDomain: - """ - Call ``POST /v1/registrar/admin/domains/{name}/holds``. - - Args: - hold: Holds sit beside the state; any hold blocks risky mutations. - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/regions/{id}``.""" return await self._client._call( - "POST", - f"/v1/registrar/admin/domains/{_path(name)}/holds", - m.AdminRegisteredDomain, + "DELETE", + f"/v1/regions/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.AddDomainHoldBody, extra_body, False, ("hold", hold), ("reason", reason)), + body=None, idempotent=False, timeout=timeout, ) - async def get_registrar_balance( + async def get_region( self, + id: str, *, - provider: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetRegistrarBalanceResponse: - """ - Call ``GET /v1/registrar/admin/balance``. - - Args: - provider: Empty = configured default provider. - """ + ) -> m.Region: + """Call ``GET /v1/regions/{id}``.""" return await self._client._call( "GET", - "/v1/registrar/admin/balance", - m.GetRegistrarBalanceResponse, - query=_query(extra_query, ("provider", provider)), + f"/v1/regions/{_path(id)}", + m.Region, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_all_domain_orders( + async def list_countries_cities( self, *, + query: str | None = None, page: int | None = None, page_size: int | None = None, - states: list[m.DomainOrderState | str] | None = None, - organization_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListAllDomainOrdersResponse: - """Call ``GET /v1/registrar/admin/orders``.""" + ) -> m.ListCountriesCitiesResponse: + """Call ``GET /v1/countries-cities``.""" return await self._client._call( "GET", - "/v1/registrar/admin/orders", - m.ListAllDomainOrdersResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("states", states), - ("organizationId", organization_id), - ), + "/v1/countries-cities", + m.ListCountriesCitiesResponse, + query=_query(extra_query, ("query", query), ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - async def list_all_domain_orders_all( + async def list_countries_cities_all( self, *, + query: str | None = None, page: int | None = None, page_size: int | None = None, - states: list[m.DomainOrderState | str] | None = None, - organization_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.AdminDomainOrder]: + ) -> AsyncIterator[m.Country]: """ - Every result of :meth:`list_all_domain_orders`, reading page after page. + Every result of :meth:`list_countries_cities`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -29759,15 +25992,14 @@ async def list_all_domain_orders_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_all_domain_orders( + res = await self.list_countries_cities( page=page, page_size=size, - states=states, - organization_id=organization_id, + query=query, extra_query=extra_query, timeout=timeout, ) - items = res.orders + items = res.countries for item in items: yield item seen += len(items) @@ -29775,51 +26007,37 @@ async def list_all_domain_orders_all( return page += 1 - async def list_all_domains( + async def list_datacenters( self, *, + query: str | None = None, page: int | None = None, page_size: int | None = None, - states: list[m.RegisteredDomainState | str] | None = None, - search: str | None = None, - organization_id: str | None = None, - holds: list[m.DomainHold | str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListAllDomainsResponse: - """Call ``GET /v1/registrar/admin/domains``.""" + ) -> m.ListDatacentersResponse: + """Call ``GET /v1/datacenters``.""" return await self._client._call( "GET", - "/v1/registrar/admin/domains", - m.ListAllDomainsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("states", states), - ("search", search), - ("organizationId", organization_id), - ("holds", holds), - ), + "/v1/datacenters", + m.ListDatacentersResponse, + query=_query(extra_query, ("query", query), ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - async def list_all_domains_all( + async def list_datacenters_all( self, *, + query: str | None = None, page: int | None = None, page_size: int | None = None, - states: list[m.RegisteredDomainState | str] | None = None, - search: str | None = None, - organization_id: str | None = None, - holds: list[m.DomainHold | str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.AdminRegisteredDomain]: + ) -> AsyncIterator[m.DatacenterInfo]: """ - Every result of :meth:`list_all_domains`, reading page after page. + Every result of :meth:`list_datacenters`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -29827,17 +26045,14 @@ async def list_all_domains_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_all_domains( + res = await self.list_datacenters( page=page, page_size=size, - states=states, - search=search, - organization_id=organization_id, - holds=holds, + query=query, extra_query=extra_query, timeout=timeout, ) - items = res.domains + items = res.datacenters for item in items: yield item seen += len(items) @@ -29845,41 +26060,41 @@ async def list_all_domains_all( return page += 1 - async def list_tld_offerings( + async def list_regions( self, *, page: int | None = None, page_size: int | None = None, - provider: str | None = None, search: str | None = None, + platform_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListTldOfferingsResponse: - """Call ``GET /v1/registrar/admin/tlds``.""" + ) -> m.ListRegionsResponse: + """Call ``GET /v1/regions``.""" return await self._client._call( "GET", - "/v1/registrar/admin/tlds", - m.ListTldOfferingsResponse, + "/v1/regions", + m.ListRegionsResponse, query=_query( - extra_query, ("page", page), ("pageSize", page_size), ("provider", provider), ("search", search) + extra_query, ("page", page), ("pageSize", page_size), ("search", search), ("platformId", platform_id) ), body=None, idempotent=False, timeout=timeout, ) - async def list_tld_offerings_all( + async def list_regions_all( self, *, page: int | None = None, page_size: int | None = None, - provider: str | None = None, search: str | None = None, + platform_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.TldOffering]: + ) -> AsyncIterator[m.Region]: """ - Every result of :meth:`list_tld_offerings`, reading page after page. + Every result of :meth:`list_regions`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -29887,15 +26102,15 @@ async def list_tld_offerings_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_tld_offerings( + res = await self.list_regions( page=page, page_size=size, - provider=provider, search=search, + platform_id=platform_id, extra_query=extra_query, timeout=timeout, ) - items = res.offerings + items = res.regions for item in items: yield item seen += len(items) @@ -29903,255 +26118,6 @@ async def list_tld_offerings_all( return page += 1 - async def move_domain_to_organization( - self, - name: str, - *, - reason: str | None = None, - target_organization_id: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.AdminRegisteredDomain: - """ - Call ``POST /v1/registrar/admin/domains/{name}/move``. - - Args: - reason: Reference to both owners' written consent. - """ - return await self._client._call( - "POST", - f"/v1/registrar/admin/domains/{_path(name)}/move", - m.AdminRegisteredDomain, - query=_query(extra_query), - body=_body( - m.MoveDomainToOrganizationBody, - extra_body, - False, - ("reason", reason), - ("target_organization_id", target_organization_id), - ), - idempotent=False, - timeout=timeout, - ) - - async def remove_domain_hold( - self, - name: str, - *, - hold: m.DomainHold | str | None = None, - reason: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.AdminRegisteredDomain: - """ - Call ``POST /v1/registrar/admin/domains/{name}/holds/remove``. - - Args: - hold: Holds sit beside the state; any hold blocks risky mutations. - """ - return await self._client._call( - "POST", - f"/v1/registrar/admin/domains/{_path(name)}/holds/remove", - m.AdminRegisteredDomain, - query=_query(extra_query), - body=_body(m.RemoveDomainHoldBody, extra_body, False, ("hold", hold), ("reason", reason)), - idempotent=False, - timeout=timeout, - ) - - async def retry_registrar_operation( - self, - *, - order_item_id: str | None = None, - reason: str | None = None, - renewal_id: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Call ``POST /v1/registrar/admin/operations/retry``. - - Args: - order_item_id: Exactly one of order_item_id / renewal_id. - """ - return await self._client._call( - "POST", - "/v1/registrar/admin/operations/retry", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.RetryRegistrarOperationRequest, - extra_body, - False, - ("order_item_id", order_item_id), - ("reason", reason), - ("renewal_id", renewal_id), - ), - idempotent=False, - timeout=timeout, - ) - - async def review_domain_order( - self, - id: str, - *, - approve: bool | None = None, - reason: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.AdminDomainOrder: - """ - Approve or decline an order in in_review. - - It calls ``POST /v1/registrar/admin/orders/{id}/review``. - """ - return await self._client._call( - "POST", - f"/v1/registrar/admin/orders/{_path(id)}/review", - m.AdminDomainOrder, - query=_query(extra_query), - body=_body(m.ReviewDomainOrderBody, extra_body, False, ("approve", approve), ("reason", reason)), - idempotent=False, - timeout=timeout, - ) - - async def set_client_hold( - self, - name: str, - *, - enabled: bool | None = None, - reason: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.AdminRegisteredDomain: - """ - Registry clientHold (suspends resolution). - - It calls ``PUT /v1/registrar/admin/domains/{name}/client-hold``. - """ - return await self._client._call( - "PUT", - f"/v1/registrar/admin/domains/{_path(name)}/client-hold", - m.AdminRegisteredDomain, - query=_query(extra_query), - body=_body(m.SetClientHoldBody, extra_body, False, ("enabled", enabled), ("reason", reason)), - idempotent=False, - timeout=timeout, - ) - - async def set_tld_offering( - self, - tld: str, - *, - blocked: bool | None = None, - blocked_reason: str | None = None, - category: m.TldCategory | str | None = None, - display_order: int | None = None, - eligibility: m.TldEligibility | str | None = None, - eligibility_note: str | None = None, - eligible_countries: list[str] | None = None, - enabled: bool | None = None, - featured: bool | None = None, - price_override: dict[str, Any] | None = None, - provider: str | None = None, - reason: str | None = None, - risk_note: str | None = None, - risk_tier: m.TldRiskTier | str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.TldOffering: - """ - Enable/disable, feature, block, override price. - - It calls ``PUT /v1/registrar/admin/tlds/{tld}``. - - Args: - category: Grouping for "Show more extensions" in search and the pricing page (§8.2). - eligibility: Who may register under a TLD (§8.2). - TLD_ELIGIBILITY_RESIDENTS_ONLY: Registrant must be in one of eligible_countries (or meet the nexus rule in eligibility_note). - eligible_countries: Replaces the list when eligibility is RESIDENTS_ONLY. - price_override: Manual sell price / markup override; null clears it. - risk_tier: - TLD_RISK_TIER_HIGH: Cheap, frequently abused TLD: stricter checks at checkout. - """ - return await self._client._call( - "PUT", - f"/v1/registrar/admin/tlds/{_path(tld)}", - m.TldOffering, - query=_query(extra_query), - body=_body( - m.SetTldOfferingBody, - extra_body, - False, - ("blocked", blocked), - ("blocked_reason", blocked_reason), - ("category", category), - ("display_order", display_order), - ("eligibility", eligibility), - ("eligibility_note", eligibility_note), - ("eligible_countries", eligible_countries), - ("enabled", enabled), - ("featured", featured), - ("price_override", price_override), - ("provider", provider), - ("reason", reason), - ("risk_note", risk_note), - ("risk_tier", risk_tier), - ), - idempotent=False, - timeout=timeout, - ) - - async def sync_domain( - self, - name: str, - *, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.AdminRegisteredDomain: - """Call ``POST /v1/registrar/admin/domains/{name}/sync``.""" - return await self._client._call( - "POST", - f"/v1/registrar/admin/domains/{_path(name)}/sync", - m.AdminRegisteredDomain, - query=_query(extra_query), - body=_body(m.SyncDomainBody, extra_body, False), - idempotent=False, - timeout=timeout, - ) - - async def sync_tld_catalog( - self, - *, - provider: str | None = None, - reason: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SyncTldCatalogResponse: - """ - Queue registrar_catalog_sync now (it also runs daily at 03:30 UTC). - - It calls ``POST /v1/registrar/admin/tlds/sync``. - - Args: - provider: Empty = every configured provider. - """ - return await self._client._call( - "POST", - "/v1/registrar/admin/tlds/sync", - m.SyncTldCatalogResponse, - query=_query(extra_query), - body=_body(m.SyncTldCatalogRequest, extra_body, False, ("provider", provider), ("reason", reason)), - idempotent=False, - timeout=timeout, - ) - class AsyncRoadmapService(_ServiceAsync): """The NodeRings RoadmapService API.""" @@ -32467,36 +28433,6 @@ async def logout( timeout=timeout, ) - async def reauthenticate_user( - self, - *, - code: str | None = None, - password: str | None = None, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ReauthenticateUserResponse: - """ - Step-up re-authentication: re-checks the password and/or the 2FA code and returns a - 10-minute token bound to the session. Required by sensitive actions (domain auth code, - transfer unlock, registrant change, domain delete). Service accounts cannot obtain it. - - It calls ``POST /v1/auth/reauthenticate``. - - Args: - code: Current TOTP or an unused recovery code; required when 2FA is enabled. - password: Required when the account has a local password. - """ - return await self._client._call( - "POST", - "/v1/auth/reauthenticate", - m.ReauthenticateUserResponse, - query=_query(extra_query), - body=_body(m.ReauthenticateUserRequest, extra_body, False, ("code", code), ("password", password)), - idempotent=False, - timeout=timeout, - ) - async def regenerate_mfa_backup_codes( self, *, @@ -33410,8 +29346,6 @@ class _Services: """The AgentService API.""" backup: BackupService """The BackupService API.""" - blog_subscription: BlogSubscriptionService - """The BlogSubscriptionService API.""" business_monitoring: BusinessMonitoringService """The BusinessMonitoringService API.""" chat: ChatService @@ -33434,12 +29368,6 @@ class _Services: """The DnsZoneService API.""" dnssec: DNSSECService """The DnssecService API.""" - domain_contact: DomainContactService - """The DomainContactService API.""" - domain_order: DomainOrderService - """The DomainOrderService API.""" - domain_search: DomainSearchService - """The DomainSearchService API.""" domain: DomainService """The DomainService API.""" environment_variable: EnvironmentVariableService @@ -33526,10 +29454,6 @@ class _Services: """The RefundService API.""" region: RegionService """The RegionService API.""" - registered_domain: RegisteredDomainService - """The RegisteredDomainService API.""" - registrar_admin: RegistrarAdminService - """The RegistrarAdminService API.""" roadmap: RoadmapService """The RoadmapService API.""" role: RoleService @@ -33559,7 +29483,6 @@ def _init_services(self) -> None: self.addon = AddonService(self) # type: ignore[arg-type] self.agent = AgentService(self) # type: ignore[arg-type] self.backup = BackupService(self) # type: ignore[arg-type] - self.blog_subscription = BlogSubscriptionService(self) # type: ignore[arg-type] self.business_monitoring = BusinessMonitoringService(self) # type: ignore[arg-type] self.chat = ChatService(self) # type: ignore[arg-type] self.client_dashboard = ClientDashboardService(self) # type: ignore[arg-type] @@ -33571,9 +29494,6 @@ def _init_services(self) -> None: self.dns_record = DNSRecordService(self) # type: ignore[arg-type] self.dns_zone = DNSZoneService(self) # type: ignore[arg-type] self.dnssec = DNSSECService(self) # type: ignore[arg-type] - self.domain_contact = DomainContactService(self) # type: ignore[arg-type] - self.domain_order = DomainOrderService(self) # type: ignore[arg-type] - self.domain_search = DomainSearchService(self) # type: ignore[arg-type] self.domain = DomainService(self) # type: ignore[arg-type] self.environment_variable = EnvironmentVariableService(self) # type: ignore[arg-type] self.exchange_rate = ExchangeRateService(self) # type: ignore[arg-type] @@ -33617,8 +29537,6 @@ def _init_services(self) -> None: self.provider_ticket_notification = ProviderTicketNotificationService(self) # type: ignore[arg-type] self.refund = RefundService(self) # type: ignore[arg-type] self.region = RegionService(self) # type: ignore[arg-type] - self.registered_domain = RegisteredDomainService(self) # type: ignore[arg-type] - self.registrar_admin = RegistrarAdminService(self) # type: ignore[arg-type] self.roadmap = RoadmapService(self) # type: ignore[arg-type] self.role = RoleService(self) # type: ignore[arg-type] self.ssh_key = SSHKeyService(self) # type: ignore[arg-type] @@ -33642,8 +29560,6 @@ class _AsyncServices: """The AgentService API.""" backup: AsyncBackupService """The BackupService API.""" - blog_subscription: AsyncBlogSubscriptionService - """The BlogSubscriptionService API.""" business_monitoring: AsyncBusinessMonitoringService """The BusinessMonitoringService API.""" chat: AsyncChatService @@ -33666,12 +29582,6 @@ class _AsyncServices: """The DnsZoneService API.""" dnssec: AsyncDNSSECService """The DnssecService API.""" - domain_contact: AsyncDomainContactService - """The DomainContactService API.""" - domain_order: AsyncDomainOrderService - """The DomainOrderService API.""" - domain_search: AsyncDomainSearchService - """The DomainSearchService API.""" domain: AsyncDomainService """The DomainService API.""" environment_variable: AsyncEnvironmentVariableService @@ -33758,10 +29668,6 @@ class _AsyncServices: """The RefundService API.""" region: AsyncRegionService """The RegionService API.""" - registered_domain: AsyncRegisteredDomainService - """The RegisteredDomainService API.""" - registrar_admin: AsyncRegistrarAdminService - """The RegistrarAdminService API.""" roadmap: AsyncRoadmapService """The RoadmapService API.""" role: AsyncRoleService @@ -33791,7 +29697,6 @@ def _init_services(self) -> None: self.addon = AsyncAddonService(self) # type: ignore[arg-type] self.agent = AsyncAgentService(self) # type: ignore[arg-type] self.backup = AsyncBackupService(self) # type: ignore[arg-type] - self.blog_subscription = AsyncBlogSubscriptionService(self) # type: ignore[arg-type] self.business_monitoring = AsyncBusinessMonitoringService(self) # type: ignore[arg-type] self.chat = AsyncChatService(self) # type: ignore[arg-type] self.client_dashboard = AsyncClientDashboardService(self) # type: ignore[arg-type] @@ -33803,9 +29708,6 @@ def _init_services(self) -> None: self.dns_record = AsyncDNSRecordService(self) # type: ignore[arg-type] self.dns_zone = AsyncDNSZoneService(self) # type: ignore[arg-type] self.dnssec = AsyncDNSSECService(self) # type: ignore[arg-type] - self.domain_contact = AsyncDomainContactService(self) # type: ignore[arg-type] - self.domain_order = AsyncDomainOrderService(self) # type: ignore[arg-type] - self.domain_search = AsyncDomainSearchService(self) # type: ignore[arg-type] self.domain = AsyncDomainService(self) # type: ignore[arg-type] self.environment_variable = AsyncEnvironmentVariableService(self) # type: ignore[arg-type] self.exchange_rate = AsyncExchangeRateService(self) # type: ignore[arg-type] @@ -33849,8 +29751,6 @@ def _init_services(self) -> None: self.provider_ticket_notification = AsyncProviderTicketNotificationService(self) # type: ignore[arg-type] self.refund = AsyncRefundService(self) # type: ignore[arg-type] self.region = AsyncRegionService(self) # type: ignore[arg-type] - self.registered_domain = AsyncRegisteredDomainService(self) # type: ignore[arg-type] - self.registrar_admin = AsyncRegistrarAdminService(self) # type: ignore[arg-type] self.roadmap = AsyncRoadmapService(self) # type: ignore[arg-type] self.role = AsyncRoleService(self) # type: ignore[arg-type] self.ssh_key = AsyncSSHKeyService(self) # type: ignore[arg-type] diff --git a/src/noderings/models.py b/src/noderings/models.py index 271b6b7..389da77 100644 --- a/src/noderings/models.py +++ b/src/noderings/models.py @@ -20,7 +20,6 @@ __all__ = [ "AddAddonToSubscriptionBody", "AddAddonToSubscriptionResponse", - "AddDomainHoldBody", "AddInternalCommentBody", "AddInternalCommentResponse", "AddReplyToTicketBody", @@ -37,13 +36,10 @@ "AddonStatus", "AddonSubscription", "AddonType", - "AdminDomainOrder", - "AdminRegisteredDomain", "Agent", "AgentGatewayRegion", "AggregationType", "AllocationStrategy", - "ApproveOutgoingTransferBody", "ArchiveFilesBody", "ArchiveFilesResponse", "AssetCategory", @@ -70,11 +66,9 @@ "BillingType", "BlockOrganizationPurchasesBody", "BlockProviderCustomerPurchasesBody", - "BlogSubscriptionStatus", "CPUType", "CalculatePlanPricingRequest", "CalculatePlanPricingResponse", - "CancelDomainOrderBody", "CancelRenewalRequest", "CancelResponse", "CaseType", @@ -88,12 +82,6 @@ "CheckDNSGeoRecordResponse", "CheckDNSSECDSBody", "CheckDNSZoneDelegationBody", - "CheckDomainsRequest", - "CheckDomainsResponse", - "CheckTransferRequest", - "CheckTransferResponse", - "CheckoutDomainOrderBody", - "CheckoutDomainOrderResponse", "City", "CityCountry", "ClearAllPrefixReservedIPsBody", @@ -115,27 +103,16 @@ "ComponentVersion", "ComputeCategory", "ComputeType", - "ConfirmBlogSubscriptionRequest", - "ConfirmBlogSubscriptionResponse", - "ConfirmDomainOrderBody", - "ConfirmRegistrantChangeBody", - "ConfirmRegistrantChangeResponse", "ConfirmTicketAttachmentUploadRequest", "ConnectAccount", "ConnectTaxAddress", "ConnectTaxRegistration", "ConnectTaxSettingsDetails", - "ContactFieldError", - "ContactFieldOption", - "ContactFieldSpec", - "ContactFieldType", - "ContactRequirements", "ConversationInfo", "ConvertCurrencyRequest", "ConvertCurrencyResponse", "CopyFileBody", "Country", - "CountryContactRules", "Coupon", "CouponApplicationStatus", "CouponCode", @@ -168,8 +145,6 @@ "CreateDNSZoneRequest", "CreateDNSZoneResponse", "CreateDatabaseBody", - "CreateDomainContactRequest", - "CreateDomainOrderRequest", "CreateDomainRequest", "CreateEnvironmentVariableRequest", "CreateEnvironmentVariableResponse", @@ -232,7 +207,6 @@ "DNSSECInfo", "DNSSECMode", "DNSZone", - "DNSZoneDelegationIssue", "DNSZoneState", "DashboardAssetSalesDayBucket", "DashboardBillingCommercialHealth", @@ -260,8 +234,6 @@ "DeleteFilesBody", "DeletePlatformVirtualMachineBody", "DeleteProviderReviewReplyResponse", - "DeleteRegisteredDomainBody", - "DeleteRegisteredDomainResponse", "DeleteRoadmapFeatureRequestCommentResponse", "DetachVMFirewallBody", "DisableAdditionalIPBody", @@ -272,45 +244,6 @@ "DistroCatalogEntry", "DockerImageChoice", "Domain", - "DomainAvailability", - "DomainContact", - "DomainContactInput", - "DomainContactKind", - "DomainDNSSEC", - "DomainDNSSECMode", - "DomainDNSSECStatus", - "DomainDSRecord", - "DomainDnskeyRecord", - "DomainEvent", - "DomainEventActorType", - "DomainEventKind", - "DomainGlueHostState", - "DomainGlueRecord", - "DomainHold", - "DomainInvoice", - "DomainInvoiceSource", - "DomainNsMode", - "DomainOperation", - "DomainOrder", - "DomainOrderItem", - "DomainOrderItemInput", - "DomainOrderItemKind", - "DomainOrderItemStage", - "DomainOrderItemState", - "DomainOrderItemUpdate", - "DomainOrderQuote", - "DomainOrderQuoteLine", - "DomainOrderState", - "DomainRenewalInfo", - "DomainSearchResult", - "DomainStarterRecord", - "DomainTaxLine", - "DomainTransferIn", - "DomainTransferInState", - "DomainTransferOut", - "DomainTransferOutState", - "DomainVerification", - "DomainVerificationStatus", "DownloadFileResponse", "DownloadTicketAttachmentResponse", "DuplicateGameServerTemplateBody", @@ -381,7 +314,6 @@ "GetCloudInitTemplateResponse", "GetConnectAccountResponse", "GetConnectTaxSettingsResponse", - "GetContactSchemaResponse", "GetConversationHistoryResponse", "GetCouponReportResponse", "GetCreditBalanceResponse", @@ -390,8 +322,6 @@ "GetDashboardBillingSalesResponse", "GetDashboardCustomerAcquisitionTimeseriesResponse", "GetDashboardSummaryResponse", - "GetDomainAuthCodeBody", - "GetDomainAuthCodeResponse", "GetDomainResponse", "GetEnvironmentVariableResponse", "GetExchangeRateResponse", @@ -424,10 +354,8 @@ "GetProviderResponse", "GetProviderRevenueResponse", "GetProviderTicketNotificationPolicyResponse", - "GetPublicPlatformStatsResponse", "GetPublicStorefrontResponse", "GetRefundResponse", - "GetRegistrarBalanceResponse", "GetRoadmapFeatureRequestResponse", "GetRoadmapStatsResponse", "GetSMTPOutboundProviderPolicyResponse", @@ -438,7 +366,6 @@ "GetSubscriptionCouponResponse", "GetSubscriptionStatusResponse", "GetTicketResponse", - "GetTldRequirementsResponse", "GetUsageRecordResponse", "GetUsageReportResponse", "GetUserResponse", @@ -471,8 +398,6 @@ "ListAddonSubscriptionsResponse", "ListAddonsResponse", "ListAgentsResponse", - "ListAllDomainOrdersResponse", - "ListAllDomainsResponse", "ListAllocationsResponse", "ListAssignableNodesForPlanResponse", "ListAvailableAddonsResponse", @@ -505,11 +430,6 @@ "ListDatabasesResponse", "ListDatacentersResponse", "ListDistrosResponse", - "ListDomainContactsResponse", - "ListDomainEventsResponse", - "ListDomainGlueRecordsResponse", - "ListDomainInvoicesResponse", - "ListDomainOrdersResponse", "ListEffectivePermissionsResponse", "ListEligibleNodesForPlanResponse", "ListEnvironmentVariablesResponse", @@ -560,7 +480,6 @@ "ListPublicStorefrontsResponse", "ListRefundsResponse", "ListRegionsResponse", - "ListRegisteredDomainsResponse", "ListRoadmapFeatureRequestCommentsResponse", "ListRoadmapFeatureRequestsResponse", "ListRoadmapProductCategoriesResponse", @@ -576,8 +495,6 @@ "ListTicketAttachmentsResponse", "ListTicketTemplatesResponse", "ListTicketsResponse", - "ListTldOfferingsResponse", - "ListTldPricesResponse", "ListUsageRecordsResponse", "ListUsersResponse", "ListVMTagsResponse", @@ -600,7 +517,6 @@ "MetricType", "MetricsWriteCredential", "MoneyAmount", - "MoveDomainToOrganizationBody", "MoveFirewallRuleBody", "MyStorefront", "Network", @@ -663,7 +579,6 @@ "PreviewCouponResponse", "PreviewMyStorefrontResponse", "PreviewNotificationTemplateResponse", - "PriceDomainOrderBody", "PricingCalculationConfig", "PricingLineItem", "PricingModel", @@ -695,14 +610,11 @@ "ProviderStripePaymentMethodDetails", "ProviderStripeTransaction", "ProviderTicketNotificationPolicy", - "PublicProductCount", "PublicStorefront", "PublicStorefrontCard", "PurchaseCreditsRequest", "PurchaseCreditsResponse", "ReadFileResponse", - "ReauthenticateUserRequest", - "ReauthenticateUserResponse", "RecordUsageRequest", "RecordUsageResponse", "RedeemCouponBody", @@ -716,39 +628,26 @@ "Region", "RegionLocation", "RegisterUserRequest", - "RegisteredDomain", - "RegisteredDomainState", - "RegistrantChange", - "RegistrantChangeState", "ReinstallGameServerBody", "ReinstallStatus", "ReinstallVirtualMachineBody", "RemoveAddonResponse", - "RemoveDomainHoldBody", "RemovePaymentMethodResponse", "RenameFileBody", "RenameGameServerBody", - "RenewDomainBody", "ReplaceRoleForGroupRequest", "ReplaceRoleForServiceAccountRequest", "ReplaceRoleForUserRequest", - "ResendRegistrantVerificationBody", - "ResendRegistrantVerificationResponse", "ResendVerificationEmailRequest", "ReserveAllPrefixIPsBody", - "ResetDomainAuthCodeBody", "ResetPasswordRequest", "ResourceInstanceInput", "RestartProviderCustomerVirtualMachineBody", "RestartVirtualMachineBody", - "RestoreDomainBody", "RestoreSnapshotBody", "RestoreStatus", - "RetryDomainTransferBody", "RetryPaymentRequest", "RetryPaymentResponse", - "RetryRegistrarOperationRequest", - "ReviewDomainOrderBody", "RevokeCouponBody", "RevokeCouponResponse", "RevokeMetricsWriteCredentialBody", @@ -769,8 +668,6 @@ "SMTPOutboundVMAction", "SSHKey", "ScanDNSZoneRecordsResponse", - "SearchDomainsRequest", - "SearchDomainsResponse", "SearchMarketplaceRequest", "SearchMarketplaceResponse", "SearchTicketsRequest", @@ -781,21 +678,13 @@ "ServiceStatus", "ServingStatus", "SessionInfo", - "SetClientHoldBody", "SetDefaultPaymentMethodBody", "SetDefaultPaymentMethodResponse", - "SetDomainAutoRenewBody", - "SetDomainDNSSECBody", - "SetDomainNameserversBody", - "SetDomainPrivacyBody", - "SetDomainPrivacyResponse", - "SetDomainTransferLockBody", "SetGameNestOrderingRequest", "SetPasswordRequest", "SetPrimaryAllocationBody", "SetTicketPriorityBody", "SetTicketStatusBody", - "SetTldOfferingBody", "Snapshot", "SnapshotOperationStatus", "SnapshotStatus", @@ -817,17 +706,12 @@ "SubmitRoadmapFeatureRequestRequest", "SubmitRoadmapFeatureRequestResponse", "SubscribeResponse", - "SubscribeToBlogRequest", - "SubscribeToBlogResponse", "Subscription", "SubscriptionCoupon", "SubscriptionStatus", "SuccessResponse", "SuspendPlatformVirtualMachineBody", "SuspendProviderCustomerVirtualMachineBody", - "SyncDomainBody", - "SyncTldCatalogRequest", - "SyncTldCatalogResponse", "Ticket", "TicketAttachment", "TicketInternalComment", @@ -840,14 +724,8 @@ "TicketTemplateVariableDefinition", "TierMode", "Timestamps", - "TldCategory", - "TldEligibility", - "TldOffering", - "TldPrice", - "TldRiskTier", "TokenRequest", "TokenResponse", - "TransferCheckResult", "UnassignAgentBody", "UnbanOrganizationBody", "UnbanUserBody", @@ -857,8 +735,6 @@ "UnblockProviderCustomerVirtualMachineBody", "UndoCancelAddonBody", "UndoCancelRenewalRequest", - "UnsubscribeFromBlogRequest", - "UnsubscribeFromBlogResponse", "UpdateAddonBody", "UpdateAgentBody", "UpdateAgentResponse", @@ -873,11 +749,6 @@ "UpdateCouponBody", "UpdateCouponCodeBody", "UpdateDockerImageBody", - "UpdateDomainContactBody", - "UpdateDomainContactResponse", - "UpdateDomainContactsBody", - "UpdateDomainContactsResponse", - "UpdateDomainOrderBody", "UpdateEnvironmentVariableBody", "UpdateFirewallAddressGroupBody", "UpdateFirewallRuleBody", @@ -929,7 +800,6 @@ "UploadTicketAttachmentContentRequest", "UpsertDNSGeoRecordBody", "UpsertDNSRecordBody", - "UpsertDomainGlueRecordBody", "UpsertHookScriptRequest", "UsageAggregate", "UsageRecord", @@ -938,8 +808,6 @@ "UserDetails", "UserSummary", "VMTemplate", - "ValidateDomainContactRequest", - "ValidateDomainContactResponse", "ValidateNodeTopologyRequest", "ValidateNodeTopologyResponse", "ValidateNodeTopologyWarning", @@ -1166,93 +1034,6 @@ class EnableDNSSECBody(Model): pass -class UpdateDomainContactBody(Model): - """The API's DomainContactServiceUpdateDomainContactBody object.""" - - contact: DomainContactInput | None = Field(None) - """Writable contact fields. ASCII only in v1; the server normalizes and validates.""" - tlds: list[str] = Field(default_factory=list) - - -class CancelDomainOrderBody(Model): - """The API's DomainOrderServiceCancelDomainOrderBody object.""" - - reason: str = Field("") - - -class CheckoutDomainOrderBody(Model): - """ - CheckoutDomainOrder errors carry a google.rpc.ErrorInfo detail (Domain is - the API error domain) with a stable reason the frontend maps: - CARD_DECLINED (FailedPrecondition): the card was declined; try another card (new attempt). - QUOTE_EXPIRED (FailedPrecondition): re-price the order (PriceDomainOrder) and try again. - PRICE_CHANGED (FailedPrecondition): a live price changed; re-price and review. - NAME_UNAVAILABLE (FailedPrecondition): an item is no longer available; metadata "domain" names it. - BILLING_ADDRESS_REQUIRED (FailedPrecondition): save a billing address first. - EVIDENCE_CONFIRMATION_REQUIRED (FailedPrecondition): billing country matches neither card - nor IP; resend with confirm_billing_country and evidence_country. - IN_REVIEW: not an error; the response state is IN_REVIEW (manual review, card authorized). - REQUIRES_PORTAL_VERIFICATION (FailedPrecondition): 3-D Secure needed but the caller is - non-interactive (API token, CLI, Terraform, MCP); metadata "portal_url" is the link. - Other FailedPrecondition reasons: TERMS_NOT_ACCEPTED, MIT_CONSENT_REQUIRED, - CONTACT_REQUIRED, PURCHASE_BLOCKED, EMAIL_NOT_VERIFIED, REGISTRAR_UNAVAILABLE; - ResourceExhausted: ORDER_LIMIT. - """ - - accept_terms_version: str = Field("", alias="acceptTermsVersion") - """Must equal the current terms version (no implicit acceptance).""" - confirm_billing_country: bool = Field(False, alias="confirmBillingCountry") - """Customer confirmed a billing country that matches neither card nor IP.""" - evidence_country: str = Field("", alias="evidenceCountry") - """Second proof of country when confirm_billing_country is set (ISO 3166-1 alpha-2).""" - idempotency_key: str = Field("", alias="idempotencyKey") - mit_consent: bool = Field(False, alias="mitConsent") - """Consent to merchant-initiated renewal charges.""" - payment_method_id: str = Field("", alias="paymentMethodId") - """Card to charge. Domains are card-only: account credit and coupons never apply.""" - - -class ConfirmDomainOrderBody(Model): - """The API's DomainOrderServiceConfirmDomainOrderBody object.""" - - payment_intent_id: str = Field("", alias="paymentIntentId") - - -class PriceDomainOrderBody(Model): - """The API's DomainOrderServicePriceDomainOrderBody object.""" - - confirm_billing_country: bool = Field(False, alias="confirmBillingCountry") - """ - Customer confirmed a billing country that matches neither card nor IP (send when the quote had - billing_country_confirmation_required). - """ - evidence_country: str = Field("", alias="evidenceCountry") - """ - Second proof of country with confirm_billing_country (ISO 3166-1 alpha-2, e.g. the phone - number's country). Must equal the billing country. - """ - payment_method_id: str = Field("", alias="paymentMethodId") - """Card to quote with (its country is tax location evidence). Empty = default card.""" - - -class UpdateDomainOrderBody(Model): - """The API's DomainOrderServiceUpdateDomainOrderBody object.""" - - add_items: list[DomainOrderItemInput] = Field(default_factory=list, alias="addItems") - """Items to add.""" - contact_id: str = Field("", alias="contactId") - """Registrant contact for every item.""" - item_updates: list[DomainOrderItemUpdate] = Field(default_factory=list, alias="itemUpdates") - """Changes to existing items.""" - nameservers: list[str] = Field(default_factory=list) - ns_mode: DomainNsMode | None = Field(None, alias="nsMode") - """ - - DOMAIN_NS_MODE_NODERINGS: NodeRings DNS (cfg.PowerDNS.AssignedNameservers). - - DOMAIN_NS_MODE_CUSTOM: Customer nameservers. - """ - remove_item_ids: list[str] = Field(default_factory=list, alias="removeItemIds") - - class BanOrganizationBody(Model): """The API's EnforcementServiceBanOrganizationBody object.""" @@ -1852,210 +1633,6 @@ class UpdateProviderReviewReplyBody(Model): reply_message: str = Field("", alias="replyMessage") -class ApproveOutgoingTransferBody(Model): - """The API's RegisteredDomainServiceApproveOutgoingTransferBody object.""" - - pass - - -class ConfirmRegistrantChangeBody(Model): - """The API's RegisteredDomainServiceConfirmRegistrantChangeBody object.""" - - approve: bool = Field(False) - - -class DeleteRegisteredDomainBody(Model): - """The API's RegisteredDomainServiceDeleteRegisteredDomainBody object.""" - - confirm_name: str = Field("", alias="confirmName") - """Typed confirmation: must equal name.""" - confirmation_code: str = Field("", alias="confirmationCode") - """Code emailed to the org owners (30 min). Empty = send a code.""" - reauth_token: str = Field("", alias="reauthToken") - - -class GetDomainAuthCodeBody(Model): - """The API's RegisteredDomainServiceGetDomainAuthCodeBody object.""" - - reauth_token: str = Field("", alias="reauthToken") - """Step-up token from ReauthenticateUser (10 minutes).""" - - -class RenewDomainBody(Model): - """The API's RegisteredDomainServiceRenewDomainBody object.""" - - idempotency_key: str = Field("", alias="idempotencyKey") - years: int = Field(0) - - -class ResendRegistrantVerificationBody(Model): - """The API's RegisteredDomainServiceResendRegistrantVerificationBody object.""" - - pass - - -class ResetDomainAuthCodeBody(Model): - """The API's RegisteredDomainServiceResetDomainAuthCodeBody object.""" - - reauth_token: str = Field("", alias="reauthToken") - - -class RestoreDomainBody(Model): - """The API's RegisteredDomainServiceRestoreDomainBody object.""" - - idempotency_key: str = Field("", alias="idempotencyKey") - - -class RetryDomainTransferBody(Model): - """The API's RegisteredDomainServiceRetryDomainTransferBody object.""" - - auth_code: str = Field("", alias="authCode") - - -class SetDomainAutoRenewBody(Model): - """The API's RegisteredDomainServiceSetDomainAutoRenewBody object.""" - - auto_renew: bool = Field(False, alias="autoRenew") - mit_consent: bool = Field(False, alias="mitConsent") - """Required when turning auto-renew on.""" - payment_method_id: str = Field("", alias="paymentMethodId") - """Card for this domain's renewals (empty = org default card).""" - whois_privacy_auto_renew: bool = Field(False, alias="whoisPrivacyAutoRenew") - - -class SetDomainDNSSECBody(Model): - """The API's RegisteredDomainServiceSetDomainDnssecBody object.""" - - dnskeys: list[DomainDnskeyRecord] = Field(default_factory=list) - """CUSTOM mode: DNSKEY records (or ds_records where supported).""" - ds_records: list[DomainDSRecord] = Field(default_factory=list, alias="dsRecords") - mode: DomainDNSSECMode | None = Field(None) - """ - - DOMAIN_DNSSEC_MODE_MANAGED: NodeRings keys, pushed to the registry automatically. - - DOMAIN_DNSSEC_MODE_CUSTOM: Customer-supplied DNSKEY/DS records (custom nameservers). - """ - - -class SetDomainNameserversBody(Model): - """The API's RegisteredDomainServiceSetDomainNameserversBody object.""" - - nameservers: list[str] = Field(default_factory=list) - """Custom nameservers (2-13) when ns_mode is CUSTOM.""" - ns_mode: DomainNsMode | None = Field(None, alias="nsMode") - """ - - DOMAIN_NS_MODE_NODERINGS: NodeRings DNS (cfg.PowerDNS.AssignedNameservers). - - DOMAIN_NS_MODE_CUSTOM: Customer nameservers. - """ - - -class SetDomainPrivacyBody(Model): - """The API's RegisteredDomainServiceSetDomainPrivacyBody object.""" - - enabled: bool = Field(False) - idempotency_key: str = Field("", alias="idempotencyKey") - """Idempotency key for the privacy order created when enabling needs payment.""" - - -class SetDomainTransferLockBody(Model): - """The API's RegisteredDomainServiceSetDomainTransferLockBody object.""" - - locked: bool = Field(False) - reauth_token: str = Field("", alias="reauthToken") - """Step-up token from ReauthenticateUser; required to unlock.""" - - -class UpdateDomainContactsBody(Model): - """The API's RegisteredDomainServiceUpdateDomainContactsBody object.""" - - admin_contact_id: str = Field("", alias="adminContactId") - reauth_token: str = Field("", alias="reauthToken") - """Required for a registrant change.""" - registrant_contact_id: str = Field("", alias="registrantContactId") - skip_transfer_lock: bool = Field(False, alias="skipTransferLock") - """ICANN Transfer Policy opt-out of the 60-day lock after a registrant change.""" - tech_contact_id: str = Field("", alias="techContactId") - - -class UpsertDomainGlueRecordBody(Model): - """The API's RegisteredDomainServiceUpsertDomainGlueRecordBody object.""" - - ipv4: list[str] = Field(default_factory=list) - ipv6: list[str] = Field(default_factory=list) - - -class AddDomainHoldBody(Model): - """The API's RegistrarAdminServiceAddDomainHoldBody object.""" - - hold: DomainHold | None = Field(None) - """Holds sit beside the state; any hold blocks risky mutations.""" - reason: str = Field("") - - -class MoveDomainToOrganizationBody(Model): - """The API's RegistrarAdminServiceMoveDomainToOrganizationBody object.""" - - reason: str = Field("") - """Reference to both owners' written consent.""" - target_organization_id: str = Field("", alias="targetOrganizationId") - - -class RemoveDomainHoldBody(Model): - """The API's RegistrarAdminServiceRemoveDomainHoldBody object.""" - - hold: DomainHold | None = Field(None) - """Holds sit beside the state; any hold blocks risky mutations.""" - reason: str = Field("") - - -class ReviewDomainOrderBody(Model): - """The API's RegistrarAdminServiceReviewDomainOrderBody object.""" - - approve: bool = Field(False) - reason: str = Field("") - - -class SetClientHoldBody(Model): - """The API's RegistrarAdminServiceSetClientHoldBody object.""" - - enabled: bool = Field(False) - reason: str = Field("") - - -class SetTldOfferingBody(Model): - """The API's RegistrarAdminServiceSetTldOfferingBody object.""" - - blocked: bool = Field(False) - blocked_reason: str = Field("", alias="blockedReason") - category: TldCategory | None = Field(None) - """Grouping for "Show more extensions" in search and the pricing page (§8.2).""" - display_order: int = Field(0, alias="displayOrder") - eligibility: TldEligibility | None = Field(None) - """ - Who may register under a TLD (§8.2). - - - TLD_ELIGIBILITY_RESIDENTS_ONLY: Registrant must be in one of eligible_countries (or meet the - nexus rule in eligibility_note). - """ - eligibility_note: str = Field("", alias="eligibilityNote") - eligible_countries: list[str] = Field(default_factory=list, alias="eligibleCountries") - """Replaces the list when eligibility is RESIDENTS_ONLY.""" - enabled: bool = Field(False) - featured: bool = Field(False) - price_override: dict[str, Any] = Field(default_factory=dict, alias="priceOverride") - """Manual sell price / markup override; null clears it.""" - provider: str = Field("") - reason: str = Field("") - risk_note: str = Field("", alias="riskNote") - risk_tier: TldRiskTier | None = Field(None, alias="riskTier") - """- TLD_RISK_TIER_HIGH: Cheap, frequently abused TLD: stricter checks at checkout.""" - - -class SyncDomainBody(Model): - """The API's RegistrarAdminServiceSyncDomainBody object.""" - - pass - - class CreateRoadmapFeatureRequestCommentBody(Model): """The API's RoadmapServiceCreateRoadmapFeatureRequestCommentBody object.""" @@ -2531,27 +2108,6 @@ class AddonType(OpenEnum): ADDITIONAL_IP = "ADDON_TYPE_ADDITIONAL_IP" -class AdminDomainOrder(Model): - """The API's v1AdminDomainOrder object.""" - - cost_total: str = Field("", alias="costTotal") - """Registrar cost of the order (ops only).""" - order: DomainOrder | None = Field(None) - organization_name: str = Field("", alias="organizationName") - risk_reasons: list[str] = Field(default_factory=list, alias="riskReasons") - risk_score: int = Field(0, alias="riskScore") - tax_evidence: dict[str, Any] = Field(default_factory=dict, alias="taxEvidence") - - -class AdminRegisteredDomain(Model): - """The API's v1AdminRegisteredDomain object.""" - - domain: RegisteredDomain | None = Field(None) - organization_name: str = Field("", alias="organizationName") - provider: str = Field("") - provider_domain_id: str = Field("", alias="providerDomainId") - - class Agent(Model): """The API's v1Agent object.""" @@ -2884,23 +2440,6 @@ class BillingType(OpenEnum): PERCENTAGE = "BILLING_TYPE_PERCENTAGE" -class BlogSubscriptionStatus(OpenEnum): - """ - State of a blog email subscription. - - - BLOG_SUBSCRIPTION_STATUS_PENDING: Waiting for the reader to click the confirmation link. - - BLOG_SUBSCRIPTION_STATUS_VERIFIED: Confirmed. New posts are emailed to this address. - - BLOG_SUBSCRIPTION_STATUS_UNSUBSCRIBED: The reader unsubscribed. Nothing is sent. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "BLOG_SUBSCRIPTION_STATUS_UNSPECIFIED" - PENDING = "BLOG_SUBSCRIPTION_STATUS_PENDING" - VERIFIED = "BLOG_SUBSCRIPTION_STATUS_VERIFIED" - UNSUBSCRIBED = "BLOG_SUBSCRIPTION_STATUS_UNSUBSCRIBED" - - class CPUType(OpenEnum): """ The API's CPUType enum. @@ -3064,41 +2603,6 @@ class CheckDNSGeoRecordResponse(Model): rdata: str = Field("") -class CheckDomainsRequest(Model): - """The API's v1CheckDomainsRequest object.""" - - names: list[str] = Field(default_factory=list) - - -class CheckDomainsResponse(Model): - """The API's v1CheckDomainsResponse object.""" - - results: list[DomainSearchResult] = Field(default_factory=list) - - -class CheckTransferRequest(Model): - """The API's v1CheckTransferRequest object.""" - - names: list[str] = Field(default_factory=list) - - -class CheckTransferResponse(Model): - """The API's v1CheckTransferResponse object.""" - - results: list[TransferCheckResult] = Field(default_factory=list) - - -class CheckoutDomainOrderResponse(Model): - """The API's v1CheckoutDomainOrderResponse object.""" - - client_secret: str = Field("", alias="clientSecret") - order: DomainOrder | None = Field(None) - payment_intent_id: str = Field("", alias="paymentIntentId") - requires_action: bool = Field(False, alias="requiresAction") - """Card needs 3-D Secure: run stripe.confirmCardPayment(client_secret), then ConfirmDomainOrder.""" - state: DomainOrderState | None = Field(None) - - class City(Model): """The API's v1City object.""" @@ -3370,36 +2874,6 @@ class ComputeType(OpenEnum): GAME_SERVER = "COMPUTE_TYPE_GAME_SERVER" -class ConfirmBlogSubscriptionRequest(Model): - """The API's v1ConfirmBlogSubscriptionRequest object.""" - - token: str = Field("") - """Token from the confirmation email link.""" - - -class ConfirmBlogSubscriptionResponse(Model): - """The API's v1ConfirmBlogSubscriptionResponse object.""" - - masked_email: str = Field("", alias="maskedEmail") - """Address with the local part masked, for example "j***@example.com".""" - message: str = Field("") - status: BlogSubscriptionStatus | None = Field(None) - """ - State of a blog email subscription. - - - BLOG_SUBSCRIPTION_STATUS_PENDING: Waiting for the reader to click the confirmation link. - - BLOG_SUBSCRIPTION_STATUS_VERIFIED: Confirmed. New posts are emailed to this address. - - BLOG_SUBSCRIPTION_STATUS_UNSUBSCRIBED: The reader unsubscribed. Nothing is sent. - """ - - -class ConfirmRegistrantChangeResponse(Model): - """The API's v1ConfirmRegistrantChangeResponse object.""" - - domain_name: str = Field("", alias="domainName") - state: RegistrantChangeState | None = Field(None) - - class ConfirmTicketAttachmentUploadRequest(Model): """The API's v1ConfirmTicketAttachmentUploadRequest object.""" @@ -3475,81 +2949,6 @@ class ConnectTaxSettingsDetails(Model): """active | pending | unknown""" -class ContactFieldError(Model): - """The API's v1ContactFieldError object.""" - - code: str = Field("") - field: str = Field("") - """Field name (or ".").""" - message: str = Field("") - - -class ContactFieldOption(Model): - """The API's v1ContactFieldOption object.""" - - label: str = Field("") - value: str = Field("") - - -class ContactFieldSpec(Model): - """Spec of one contact form field, rendered dynamically by the frontend.""" - - description: str = Field("") - label: str = Field("") - max_length: int = Field(0, alias="maxLength") - name: str = Field("") - """Key: a DomainContact field name, or "." inside extension_data.""" - options: list[ContactFieldOption] = Field(default_factory=list) - pattern: str = Field("") - """RE2 pattern the value must match (optional).""" - placeholder: str = Field("") - required: bool = Field(False) - required_when: str = Field("", alias="requiredWhen") - """Only required when this condition holds, e.g. "kind=organization" or "country!=ES".""" - tld: str = Field("") - """TLD the field belongs to (empty for base contact fields).""" - type: ContactFieldType | None = Field(None) - """ - Input type of a dynamic contact field. - - - CONTACT_FIELD_TYPE_ACCEPTANCE: Checkbox that must be ticked (e.g. es_annex_acceptance). - """ - - -class ContactFieldType(OpenEnum): - """ - Input type of a dynamic contact field. - - - CONTACT_FIELD_TYPE_ACCEPTANCE: Checkbox that must be ticked (e.g. es_annex_acceptance). - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "CONTACT_FIELD_TYPE_UNSPECIFIED" - STRING = "CONTACT_FIELD_TYPE_STRING" - SELECT = "CONTACT_FIELD_TYPE_SELECT" - BOOLEAN = "CONTACT_FIELD_TYPE_BOOLEAN" - DATE = "CONTACT_FIELD_TYPE_DATE" - COUNTRY = "CONTACT_FIELD_TYPE_COUNTRY" - EMAIL = "CONTACT_FIELD_TYPE_EMAIL" - PHONE = "CONTACT_FIELD_TYPE_PHONE" - ACCEPTANCE = "CONTACT_FIELD_TYPE_ACCEPTANCE" - - -class ContactRequirements(Model): - """The API's v1ContactRequirements object.""" - - allowed_countries: list[str] = Field(default_factory=list, alias="allowedCountries") - """Registrant country must be one of these (empty = any).""" - fields_: list[ContactFieldSpec] = Field(default_factory=list, alias="fields") - note: str = Field("") - operation: DomainOperation | None = Field(None) - """Operation a TLD requirement lookup is for.""" - organization_required: bool = Field(False, alias="organizationRequired") - """Registrant must be an organization.""" - tld: str = Field("") - - class ConversationInfo(Model): """The API's v1ConversationInfo object.""" @@ -3588,20 +2987,6 @@ class Country(Model): name: str = Field("") -class CountryContactRules(Model): - """The API's v1CountryContactRules object.""" - - country: str = Field("") - name: str = Field("") - phone_country_code: str = Field("", alias="phoneCountryCode") - """Calling code, e.g. "+31".""" - postal_code_example: str = Field("", alias="postalCodeExample") - postal_code_pattern: str = Field("", alias="postalCodePattern") - postal_code_required: bool = Field(False, alias="postalCodeRequired") - state_required: bool = Field(False, alias="stateRequired") - states: list[ContactFieldOption] = Field(default_factory=list) - - class Coupon(Model): """ A discount. Codes customers type live in CouponCode. Provider coupons apply to that provider's @@ -4034,31 +3419,6 @@ class CreateDNSZoneResponse(Model): """DnsZone is a hosted authoritative zone. Vanilla records live in PowerDNS, not Ent.""" -class CreateDomainContactRequest(Model): - """The API's v1CreateDomainContactRequest object.""" - - contact: DomainContactInput | None = Field(None) - """Writable contact fields. ASCII only in v1; the server normalizes and validates.""" - tlds: list[str] = Field(default_factory=list) - """Validate against the requirements of these TLDs too.""" - - -class CreateDomainOrderRequest(Model): - """The API's v1CreateDomainOrderRequest object.""" - - contact_id: str = Field("", alias="contactId") - """Default registrant contact for all items.""" - idempotency_key: str = Field("", alias="idempotencyKey") - """Client-supplied key; repeating it returns the same order.""" - items: list[DomainOrderItemInput] = Field(default_factory=list) - nameservers: list[str] = Field(default_factory=list) - ns_mode: DomainNsMode | None = Field(None, alias="nsMode") - """ - - DOMAIN_NS_MODE_NODERINGS: NodeRings DNS (cfg.PowerDNS.AssignedNameservers). - - DOMAIN_NS_MODE_CUSTOM: Customer nameservers. - """ - - class CreateDomainRequest(Model): """The API's v1CreateDomainRequest object.""" @@ -4908,16 +4268,6 @@ class DeleteProviderReviewReplyResponse(Model): """Provider UI: list and respond to client reviews (no VM identifiers: anonymous to provider).""" -class DeleteRegisteredDomainResponse(Model): - """The API's v1DeleteRegisteredDomainResponse object.""" - - code_expires_at: datetime | None = Field(None, alias="codeExpiresAt") - code_sent: bool = Field(False, alias="codeSent") - """A confirmation code was emailed; call again with it.""" - deleted: bool = Field(False) - """Deletion was submitted to the registrar.""" - - class DeleteRoadmapFeatureRequestCommentResponse(Model): """The API's v1DeleteRoadmapFeatureRequestCommentResponse object.""" @@ -5024,14 +4374,6 @@ class DNSZone(Model): assigned_nameservers: list[str] = Field(default_factory=list, alias="assignedNameservers") """Read-only: set by the API.""" - delegation_issue: DNSZoneDelegationIssue | None = Field(None, alias="delegationIssue") - """ - Why a zone does not resolve although its parent delegation may be correct. - - - DNS_ZONE_DELEGATION_ISSUE_DNSSEC_MISMATCH: The parent publishes a DS that matches no key we - serve (often left over from the previous DNS host), so validating resolvers answer SERVFAIL. - Remove that DS at the registrar, or enable DNSSEC here and replace it. - """ delegation_ok: bool = Field(False, alias="delegationOk") """Read-only: set by the API.""" dnssec_mode: DNSSECMode | None = Field(None, alias="dnssecMode") @@ -5042,33 +4384,12 @@ class DNSZone(Model): name: str = Field("") organization_id: str = Field("", alias="organizationId") """Read-only: set by the API.""" - stale_ds_key_tags: list[int] = Field(default_factory=list, alias="staleDsKeyTags") - """ - Key tags of the parent DS records that match no key we serve (DNSSEC_MISMATCH). - - Read-only: set by the API. - """ state: DNSZoneState | None = Field(None) timestamps: Timestamps | None = Field(None) unicast_nameservers: list[str] = Field(default_factory=list, alias="unicastNameservers") """Read-only: set by the API.""" -class DNSZoneDelegationIssue(OpenEnum): - """ - Why a zone does not resolve although its parent delegation may be correct. - - - DNS_ZONE_DELEGATION_ISSUE_DNSSEC_MISMATCH: The parent publishes a DS that matches no key we - serve (often left over from the previous DNS host), so validating resolvers answer SERVFAIL. - Remove that DS at the registrar, or enable DNSSEC here and replace it. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DNS_ZONE_DELEGATION_ISSUE_UNSPECIFIED" - DNSSEC_MISMATCH = "DNS_ZONE_DELEGATION_ISSUE_DNSSEC_MISMATCH" - - class DNSZoneState(OpenEnum): """ The API's DNSZoneState enum. @@ -5113,835 +4434,30 @@ class DNSSECMode(OpenEnum): UNSPECIFIED = "DNSSEC_MODE_UNSPECIFIED" UNSIGNED = "DNSSEC_MODE_UNSIGNED" SIGNED_DS_PENDING = "DNSSEC_MODE_SIGNED_DS_PENDING" - SIGNED_ACTIVE = "DNSSEC_MODE_SIGNED_ACTIVE" - - -class DockerImageChoice(Model): - """The API's v1DockerImageChoice object.""" - - image: str = Field("") - name: str = Field("") - - -class Domain(Model): - """The API's v1Domain object.""" - - id: str = Field("") - """Fields""" - is_verified: bool = Field(False, alias="isVerified") - metadata: dict[str, Any] = Field(default_factory=dict) - """Metadata""" - name: str = Field("") - organization_id: str = Field("", alias="organizationId") - """Relations""" - status: Protov1Status | None = Field(None) - timestamps: Timestamps | None = Field(None) - verification_type: VerificationType | None = Field(None, alias="verificationType") - - -class DomainAvailability(OpenEnum): - """ - Availability of a name for registration. - - - DOMAIN_AVAILABILITY_AVAILABLE: Can be registered now. - DOMAIN_AVAILABILITY_TAKEN: Registered - by someone else (offer transfer if the caller owns it). - DOMAIN_AVAILABILITY_PREMIUM: Premium - or early-access name; not sold in v1. - DOMAIN_AVAILABILITY_UNSUPPORTED: TLD not sold by - NodeRings. - DOMAIN_AVAILABILITY_RESERVED: Reserved by the registry or by NodeRings. - - DOMAIN_AVAILABILITY_INVALID: Not a valid domain name. - DOMAIN_AVAILABILITY_BLOCKED: TLD is - blocked or the name failed an abuse check. - DOMAIN_AVAILABILITY_UNKNOWN: Upstream check failed; - try again. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_AVAILABILITY_UNSPECIFIED" - AVAILABLE = "DOMAIN_AVAILABILITY_AVAILABLE" - TAKEN = "DOMAIN_AVAILABILITY_TAKEN" - PREMIUM = "DOMAIN_AVAILABILITY_PREMIUM" - UNSUPPORTED = "DOMAIN_AVAILABILITY_UNSUPPORTED" - RESERVED = "DOMAIN_AVAILABILITY_RESERVED" - INVALID = "DOMAIN_AVAILABILITY_INVALID" - BLOCKED = "DOMAIN_AVAILABILITY_BLOCKED" - UNKNOWN = "DOMAIN_AVAILABILITY_UNKNOWN" - - -class DomainContact(Model): - """The API's v1DomainContact object.""" - - city: str = Field("") - consent_publish: bool = Field(False, alias="consentPublish") - country: str = Field("") - domain_count: int = Field(0, alias="domainCount") - """ - Number of live domains using this contact (cannot be deleted while > 0). - - Read-only: set by the API. - """ - email: str = Field("") - email_verified: bool = Field(False, alias="emailVerified") - email_verified_at: datetime | None = Field(None, alias="emailVerifiedAt") - extension_data: dict[str, Any] = Field(default_factory=dict, alias="extensionData") - fax: str = Field("") - first_name: str = Field("", alias="firstName") - id: str = Field("") - """Read-only: set by the API.""" - is_default: bool = Field(False, alias="isDefault") - kind: DomainContactKind | None = Field(None) - label: str = Field("") - last_name: str = Field("", alias="lastName") - organization: str = Field("") - organization_id: str = Field("", alias="organizationId") - """Read-only: set by the API.""" - phone: str = Field("") - phone_ext: str = Field("", alias="phoneExt") - postal_code: str = Field("", alias="postalCode") - state: str = Field("") - street: str = Field("") - street_2: str = Field("", alias="street2") - timestamps: Timestamps | None = Field(None) - vat_id: str = Field("", alias="vatId") - - -class DomainContactInput(Model): - """Writable contact fields. ASCII only in v1; the server normalizes and validates.""" - - city: str = Field("") - consent_publish: bool = Field(False, alias="consentPublish") - country: str = Field("") - """ISO 3166-1 alpha-2.""" - email: str = Field("") - extension_data: dict[str, Any] = Field(default_factory=dict, alias="extensionData") - """TLD extension fields keyed by TLD.""" - fax: str = Field("") - first_name: str = Field("", alias="firstName") - is_default: bool = Field(False, alias="isDefault") - kind: DomainContactKind | None = Field(None) - label: str = Field("") - last_name: str = Field("", alias="lastName") - organization: str = Field("") - phone: str = Field("") - """E.164 (+31201234567) or national format with country.""" - phone_ext: str = Field("", alias="phoneExt") - postal_code: str = Field("", alias="postalCode") - state: str = Field("") - street: str = Field("") - street_2: str = Field("", alias="street2") - vat_id: str = Field("", alias="vatId") - - -class DomainContactKind(OpenEnum): - """ - The API's DomainContactKind enum. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_CONTACT_KIND_UNSPECIFIED" - INDIVIDUAL = "DOMAIN_CONTACT_KIND_INDIVIDUAL" - ORGANIZATION = "DOMAIN_CONTACT_KIND_ORGANIZATION" - - -class DomainDnskeyRecord(Model): - """The API's v1DomainDnskeyRecord object.""" - - algorithm: int = Field(0) - flags: int = Field(0) - protocol: int = Field(0) - public_key: str = Field("", alias="publicKey") - - -class DomainDNSSEC(Model): - """The API's v1DomainDnssec object.""" - - allowed: bool = Field(False) - """TLD supports DNSSEC.""" - dnskeys: list[DomainDnskeyRecord] = Field(default_factory=list) - ds_at_parent: bool = Field(False, alias="dsAtParent") - ds_data_supported: bool = Field(False, alias="dsDataSupported") - """Registrar accepts DS data (not only DNSKEY) for this TLD.""" - ds_records: list[DomainDSRecord] = Field(default_factory=list, alias="dsRecords") - """DS records derived from the keys (shown for information on NodeRings DNS).""" - mode: DomainDNSSECMode | None = Field(None) - """ - - DOMAIN_DNSSEC_MODE_MANAGED: NodeRings keys, pushed to the registry automatically. - - DOMAIN_DNSSEC_MODE_CUSTOM: Customer-supplied DNSKEY/DS records (custom nameservers). - """ - safe_to_disable_at: datetime | None = Field(None, alias="safeToDisableAt") - """Earliest time signing can stop after keys were removed (parent DS TTL).""" - status: DomainDNSSECStatus | None = Field(None) - """ - - DOMAIN_DNSSEC_STATUS_PENDING: Keys sent to the registry; parent DS not seen yet. - - DOMAIN_DNSSEC_STATUS_MISMATCH: Parent DS does not match the served keys. - - DOMAIN_DNSSEC_STATUS_DISABLING: Keys are being removed at the registry (waiting for the DS TTL). - """ - - -class DomainDNSSECMode(OpenEnum): - """ - - DOMAIN_DNSSEC_MODE_MANAGED: NodeRings keys, pushed to the registry automatically. - - DOMAIN_DNSSEC_MODE_CUSTOM: Customer-supplied DNSKEY/DS records (custom nameservers). - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_DNSSEC_MODE_UNSPECIFIED" - OFF = "DOMAIN_DNSSEC_MODE_OFF" - MANAGED = "DOMAIN_DNSSEC_MODE_MANAGED" - CUSTOM = "DOMAIN_DNSSEC_MODE_CUSTOM" - - -class DomainDNSSECStatus(OpenEnum): - """ - - DOMAIN_DNSSEC_STATUS_PENDING: Keys sent to the registry; parent DS not seen yet. - - DOMAIN_DNSSEC_STATUS_MISMATCH: Parent DS does not match the served keys. - - DOMAIN_DNSSEC_STATUS_DISABLING: Keys are being removed at the registry (waiting for the DS TTL). - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_DNSSEC_STATUS_UNSPECIFIED" - UNSIGNED = "DOMAIN_DNSSEC_STATUS_UNSIGNED" - PENDING = "DOMAIN_DNSSEC_STATUS_PENDING" - ACTIVE = "DOMAIN_DNSSEC_STATUS_ACTIVE" - MISMATCH = "DOMAIN_DNSSEC_STATUS_MISMATCH" - DISABLING = "DOMAIN_DNSSEC_STATUS_DISABLING" - - -class DomainDSRecord(Model): - """The API's v1DomainDsRecord object.""" - - algorithm: int = Field(0) - digest: str = Field("") - digest_type: int = Field(0, alias="digestType") - key_tag: int = Field(0, alias="keyTag") - - -class DomainEvent(Model): - """The API's v1DomainEvent object.""" - - actor_id: str = Field("", alias="actorId") - actor_name: str = Field("", alias="actorName") - """User email / service account name / "NodeRings".""" - actor_type: DomainEventActorType | None = Field(None, alias="actorType") - create_time: datetime | None = Field(None, alias="createTime") - details: dict[str, Any] = Field(default_factory=dict) - """Structured details (never secrets).""" - id: str = Field("") - ip: str = Field("") - kind: DomainEventKind | None = Field(None) - summary: str = Field("") - """Human-readable one-line summary.""" - - -class DomainEventActorType(OpenEnum): - """ - The API's DomainEventActorType enum. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_EVENT_ACTOR_TYPE_UNSPECIFIED" - USER = "DOMAIN_EVENT_ACTOR_TYPE_USER" - SERVICE_ACCOUNT = "DOMAIN_EVENT_ACTOR_TYPE_SERVICE_ACCOUNT" - SYSTEM = "DOMAIN_EVENT_ACTOR_TYPE_SYSTEM" - OPS = "DOMAIN_EVENT_ACTOR_TYPE_OPS" - - -class DomainEventKind(OpenEnum): - """ - The API's DomainEventKind enum. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_EVENT_KIND_UNSPECIFIED" - REGISTERED = "DOMAIN_EVENT_KIND_REGISTERED" - REGISTRATION_FAILED = "DOMAIN_EVENT_KIND_REGISTRATION_FAILED" - RENEWED = "DOMAIN_EVENT_KIND_RENEWED" - RENEWAL_FAILED = "DOMAIN_EVENT_KIND_RENEWAL_FAILED" - RESTORED = "DOMAIN_EVENT_KIND_RESTORED" - EXPIRED = "DOMAIN_EVENT_KIND_EXPIRED" - DELETED = "DOMAIN_EVENT_KIND_DELETED" - STATE_CHANGED = "DOMAIN_EVENT_KIND_STATE_CHANGED" - TRANSFER_IN_STARTED = "DOMAIN_EVENT_KIND_TRANSFER_IN_STARTED" - TRANSFER_IN_COMPLETED = "DOMAIN_EVENT_KIND_TRANSFER_IN_COMPLETED" - TRANSFER_IN_FAILED = "DOMAIN_EVENT_KIND_TRANSFER_IN_FAILED" - NS_CHANGED = "DOMAIN_EVENT_KIND_NS_CHANGED" - DNSSEC_CHANGED = "DOMAIN_EVENT_KIND_DNSSEC_CHANGED" - GLUE_CHANGED = "DOMAIN_EVENT_KIND_GLUE_CHANGED" - CONTACT_CHANGE_REQUESTED = "DOMAIN_EVENT_KIND_CONTACT_CHANGE_REQUESTED" - CONTACT_CHANGED = "DOMAIN_EVENT_KIND_CONTACT_CHANGED" - LOCK_CHANGED = "DOMAIN_EVENT_KIND_LOCK_CHANGED" - PRIVACY_CHANGED = "DOMAIN_EVENT_KIND_PRIVACY_CHANGED" - AUTH_CODE_VIEWED = "DOMAIN_EVENT_KIND_AUTH_CODE_VIEWED" - AUTH_CODE_RESET = "DOMAIN_EVENT_KIND_AUTH_CODE_RESET" - TRANSFER_OUT_REQUESTED = "DOMAIN_EVENT_KIND_TRANSFER_OUT_REQUESTED" - TRANSFER_OUT_APPROVED = "DOMAIN_EVENT_KIND_TRANSFER_OUT_APPROVED" - TRANSFER_OUT_COMPLETED = "DOMAIN_EVENT_KIND_TRANSFER_OUT_COMPLETED" - AUTO_RENEW_CHANGED = "DOMAIN_EVENT_KIND_AUTO_RENEW_CHANGED" - HOLD_ADDED = "DOMAIN_EVENT_KIND_HOLD_ADDED" - HOLD_REMOVED = "DOMAIN_EVENT_KIND_HOLD_REMOVED" - VERIFICATION_SENT = "DOMAIN_EVENT_KIND_VERIFICATION_SENT" - VERIFICATION_COMPLETED = "DOMAIN_EVENT_KIND_VERIFICATION_COMPLETED" - MOVED = "DOMAIN_EVENT_KIND_MOVED" - SYNCED_DRIFT = "DOMAIN_EVENT_KIND_SYNCED_DRIFT" - - -class DomainGlueHostState(OpenEnum): - """ - The API's DomainGlueHostState enum. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_GLUE_HOST_STATE_UNSPECIFIED" - PENDING = "DOMAIN_GLUE_HOST_STATE_PENDING" - ACTIVE = "DOMAIN_GLUE_HOST_STATE_ACTIVE" - FAILED = "DOMAIN_GLUE_HOST_STATE_FAILED" - DELETING = "DOMAIN_GLUE_HOST_STATE_DELETING" - - -class DomainGlueRecord(Model): - """The API's v1DomainGlueRecord object.""" - - host: str = Field("") - """Host name under the domain, e.g. ns1.example.com.""" - ipv4: list[str] = Field(default_factory=list) - ipv6: list[str] = Field(default_factory=list) - last_error: str = Field("", alias="lastError") - state: DomainGlueHostState | None = Field(None) - timestamps: Timestamps | None = Field(None) - - -class DomainHold(OpenEnum): - """ - Holds sit beside the state; any hold blocks risky mutations. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_HOLD_UNSPECIFIED" - VERIFICATION = "DOMAIN_HOLD_VERIFICATION" - ABUSE = "DOMAIN_HOLD_ABUSE" - PAYMENT_DISPUTE = "DOMAIN_HOLD_PAYMENT_DISPUTE" - UNPAID = "DOMAIN_HOLD_UNPAID" - UDRP = "DOMAIN_HOLD_UDRP" - ADMIN = "DOMAIN_HOLD_ADMIN" - - -class DomainInvoice(Model): - """A paid invoice that covers the domain. Download/view it with InvoiceService using invoice_id.""" - - currency: str = Field("") - descriptions: list[str] = Field(default_factory=list) - """Lines of this invoice that belong to the domain.""" - domain_order_id: str = Field("", alias="domainOrderId") - domain_renewal_id: str = Field("", alias="domainRenewalId") - invoice_id: str = Field("", alias="invoiceId") - invoice_number: str = Field("", alias="invoiceNumber") - issued_at: datetime | None = Field(None, alias="issuedAt") - paid_at: datetime | None = Field(None, alias="paidAt") - source: DomainInvoiceSource | None = Field(None) - """ - Source of a domain invoice. - - - DOMAIN_INVOICE_SOURCE_ORDER: Checkout order (registration, transfer, renewal, restore, - privacy). - DOMAIN_INVOICE_SOURCE_AUTO_RENEWAL: Automatic renewal (no order). - """ - status: str = Field("") - subtotal: str = Field("") - """Invoice totals (decimal strings, tax exclusive subtotal).""" - tax_amount: str = Field("", alias="taxAmount") - total: str = Field("") - - -class DomainInvoiceSource(OpenEnum): - """ - Source of a domain invoice. - - - DOMAIN_INVOICE_SOURCE_ORDER: Checkout order (registration, transfer, renewal, restore, - privacy). - DOMAIN_INVOICE_SOURCE_AUTO_RENEWAL: Automatic renewal (no order). - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_INVOICE_SOURCE_UNSPECIFIED" - ORDER = "DOMAIN_INVOICE_SOURCE_ORDER" - AUTO_RENEWAL = "DOMAIN_INVOICE_SOURCE_AUTO_RENEWAL" - - -class DomainNsMode(OpenEnum): - """ - - DOMAIN_NS_MODE_NODERINGS: NodeRings DNS (cfg.PowerDNS.AssignedNameservers). - - DOMAIN_NS_MODE_CUSTOM: Customer nameservers. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_NS_MODE_UNSPECIFIED" - NODERINGS = "DOMAIN_NS_MODE_NODERINGS" - CUSTOM = "DOMAIN_NS_MODE_CUSTOM" - - -class DomainOperation(OpenEnum): - """ - Operation a TLD requirement lookup is for. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_OPERATION_UNSPECIFIED" - REGISTER = "DOMAIN_OPERATION_REGISTER" - TRANSFER = "DOMAIN_OPERATION_TRANSFER" - UPDATE = "DOMAIN_OPERATION_UPDATE" - - -class DomainOrder(Model): - """The API's v1DomainOrder object.""" - - completed_at: datetime | None = Field(None, alias="completedAt") - currency: str = Field("") - failure_code: str = Field("", alias="failureCode") - failure_message: str = Field("", alias="failureMessage") - id: str = Field("") - """Read-only: set by the API.""" - idempotency_key: str = Field("", alias="idempotencyKey") - invoice_id: str = Field("", alias="invoiceId") - items: list[DomainOrderItem] = Field(default_factory=list) - mit_consent: bool = Field(False, alias="mitConsent") - organization_id: str = Field("", alias="organizationId") - """Read-only: set by the API.""" - payment_method_id: str = Field("", alias="paymentMethodId") - quote_expires_at: datetime | None = Field(None, alias="quoteExpiresAt") - state: DomainOrderState | None = Field(None) - subtotal: str = Field("") - tax_amount: str = Field("", alias="taxAmount") - terms_accepted_at: datetime | None = Field(None, alias="termsAcceptedAt") - terms_version: str = Field("", alias="termsVersion") - """Current terms version the customer must accept at checkout.""" - timestamps: Timestamps | None = Field(None) - total: str = Field("") - - -class DomainOrderItem(Model): - """The API's v1DomainOrderItem object.""" - - auto_renew: bool = Field(False, alias="autoRenew") - availability: DomainAvailability | None = Field(None) - """ - Availability of a name for registration. - - - DOMAIN_AVAILABILITY_AVAILABLE: Can be registered now. - DOMAIN_AVAILABILITY_TAKEN: Registered - by someone else (offer transfer if the caller owns it). - DOMAIN_AVAILABILITY_PREMIUM: Premium - or early-access name; not sold in v1. - DOMAIN_AVAILABILITY_UNSUPPORTED: TLD not sold by - NodeRings. - DOMAIN_AVAILABILITY_RESERVED: Reserved by the registry or by NodeRings. - - DOMAIN_AVAILABILITY_INVALID: Not a valid domain name. - DOMAIN_AVAILABILITY_BLOCKED: TLD is - blocked or the name failed an abuse check. - DOMAIN_AVAILABILITY_UNKNOWN: Upstream check failed; - try again. - """ - contact_id: str = Field("", alias="contactId") - currency: str = Field("") - dnssec: bool = Field(False) - dnssec_allowed: bool = Field(False, alias="dnssecAllowed") - dnssec_published: bool = Field(False, alias="dnssecPublished") - """DNSSEC keys were sent to the registry with the registration.""" - domain_name: str = Field("", alias="domainName") - extension_data: dict[str, Any] = Field(default_factory=dict, alias="extensionData") - failure_code: str = Field("", alias="failureCode") - failure_message: str = Field("", alias="failureMessage") - """Product copy ("What failed. Next step.").""" - has_auth_code: bool = Field(False, alias="hasAuthCode") - """An auth code is stored (never returned).""" - id: str = Field("") - """Read-only: set by the API.""" - import_nameservers_from_registry: bool = Field(False, alias="importNameserversFromRegistry") - kind: DomainOrderItemKind | None = Field(None) - """- DOMAIN_ORDER_ITEM_KIND_PRIVACY: WHOIS privacy bought later for an existing domain.""" - line_total: str = Field("", alias="lineTotal") - """sell_price + privacy_price + tax_amount.""" - max_years: int = Field(0, alias="maxYears") - min_years: int = Field(0, alias="minYears") - nameservers: list[str] = Field(default_factory=list) - ns_mode: DomainNsMode | None = Field(None, alias="nsMode") - """ - - DOMAIN_NS_MODE_NODERINGS: NodeRings DNS (cfg.PowerDNS.AssignedNameservers). - - DOMAIN_NS_MODE_CUSTOM: Customer nameservers. - """ - privacy_allowed: bool = Field(False, alias="privacyAllowed") - privacy_price: str = Field("", alias="privacyPrice") - """WHOIS privacy add-on for the term (0 when not selected).""" - registered_domain_id: str = Field("", alias="registeredDomainId") - renewal_price: str = Field("", alias="renewalPrice") - """Price of one renewal year after this term.""" - requires_extension_data: bool = Field(False, alias="requiresExtensionData") - sell_price: str = Field("", alias="sellPrice") - """Price of the operation for the chosen years.""" - stage: DomainOrderItemStage | None = Field(None) - """ - Processing progress of one order item (checkout progress page). - - - DOMAIN_ORDER_ITEM_STAGE_PENDING: Waiting for payment or for processing to start. - - DOMAIN_ORDER_ITEM_STAGE_REGISTERING: Registry call in flight or the registry is still processing - (REQ). - DOMAIN_ORDER_ITEM_STAGE_DNS: Creating the NodeRings DNS zone. - - DOMAIN_ORDER_ITEM_STAGE_DNSSEC: Publishing DNSSEC keys at the registry. - """ - starter_records: list[DomainStarterRecord] = Field(default_factory=list, alias="starterRecords") - state: DomainOrderItemState | None = Field(None) - """- DOMAIN_ORDER_ITEM_STATE_SUBMITTED: Accepted by the registry, still processing (REQ).""" - tax_amount: str = Field("", alias="taxAmount") - tld: str = Field("") - unavailable_reason: str = Field("", alias="unavailableReason") - whois_privacy: bool = Field(False, alias="whoisPrivacy") - years: int = Field(0) - zone_created: bool = Field(False, alias="zoneCreated") - """A NodeRings zone was created for this item.""" - - -class DomainOrderItemInput(Model): - """The API's v1DomainOrderItemInput object.""" - - auth_code: str = Field("", alias="authCode") - """Transfer auth code (transfer_in only). Encrypted at rest, never returned.""" - auto_renew: bool = Field(False, alias="autoRenew") - contact_id: str = Field("", alias="contactId") - """Registrant contact; defaults to the order contact.""" - dnssec: bool = Field(False) - domain_name: str = Field("", alias="domainName") - extension_data: dict[str, Any] = Field(default_factory=dict, alias="extensionData") - """ - TLD extension fields, e.g. {"us":{"nexus_category":"C11"}}. Authority: contact-scope fields - (FieldScopeContact) live on the DomainContact (contact.extension_data); domain-scope fields live - here on the item. Both are accepted here: values set on the item win over the contact for this - registration only (the contact is not changed). - """ - import_nameservers_from_registry: bool = Field(False, alias="importNameserversFromRegistry") - """Transfer-in: keep the nameservers currently at the registry.""" - kind: DomainOrderItemKind | None = Field(None) - """- DOMAIN_ORDER_ITEM_KIND_PRIVACY: WHOIS privacy bought later for an existing domain.""" - nameservers: list[str] = Field(default_factory=list) - ns_mode: DomainNsMode | None = Field(None, alias="nsMode") - """ - - DOMAIN_NS_MODE_NODERINGS: NodeRings DNS (cfg.PowerDNS.AssignedNameservers). - - DOMAIN_NS_MODE_CUSTOM: Customer nameservers. - """ - starter_records: list[DomainStarterRecord] = Field(default_factory=list, alias="starterRecords") - whois_privacy: bool = Field(False, alias="whoisPrivacy") - years: int = Field(0) - - -class DomainOrderItemKind(OpenEnum): - """ - - DOMAIN_ORDER_ITEM_KIND_PRIVACY: WHOIS privacy bought later for an existing domain. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_ORDER_ITEM_KIND_UNSPECIFIED" - REGISTER = "DOMAIN_ORDER_ITEM_KIND_REGISTER" - TRANSFER_IN = "DOMAIN_ORDER_ITEM_KIND_TRANSFER_IN" - RENEW = "DOMAIN_ORDER_ITEM_KIND_RENEW" - RESTORE = "DOMAIN_ORDER_ITEM_KIND_RESTORE" - PRIVACY = "DOMAIN_ORDER_ITEM_KIND_PRIVACY" - - -class DomainOrderItemStage(OpenEnum): - """ - Processing progress of one order item (checkout progress page). - - - DOMAIN_ORDER_ITEM_STAGE_PENDING: Waiting for payment or for processing to start. - - DOMAIN_ORDER_ITEM_STAGE_REGISTERING: Registry call in flight or the registry is still processing - (REQ). - DOMAIN_ORDER_ITEM_STAGE_DNS: Creating the NodeRings DNS zone. - - DOMAIN_ORDER_ITEM_STAGE_DNSSEC: Publishing DNSSEC keys at the registry. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_ORDER_ITEM_STAGE_UNSPECIFIED" - PENDING = "DOMAIN_ORDER_ITEM_STAGE_PENDING" - REGISTERING = "DOMAIN_ORDER_ITEM_STAGE_REGISTERING" - DNS = "DOMAIN_ORDER_ITEM_STAGE_DNS" - DNSSEC = "DOMAIN_ORDER_ITEM_STAGE_DNSSEC" - DONE = "DOMAIN_ORDER_ITEM_STAGE_DONE" - FAILED = "DOMAIN_ORDER_ITEM_STAGE_FAILED" - - -class DomainOrderItemState(OpenEnum): - """ - - DOMAIN_ORDER_ITEM_STATE_SUBMITTED: Accepted by the registry, still processing (REQ). - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_ORDER_ITEM_STATE_UNSPECIFIED" - PENDING = "DOMAIN_ORDER_ITEM_STATE_PENDING" - SUBMITTED = "DOMAIN_ORDER_ITEM_STATE_SUBMITTED" - SUCCEEDED = "DOMAIN_ORDER_ITEM_STATE_SUCCEEDED" - FAILED = "DOMAIN_ORDER_ITEM_STATE_FAILED" - CANCELED = "DOMAIN_ORDER_ITEM_STATE_CANCELED" - - -class DomainOrderItemUpdate(Model): - """Partial update of one order item.""" - - auth_code: str = Field("", alias="authCode") - auto_renew: bool = Field(False, alias="autoRenew") - contact_id: str = Field("", alias="contactId") - dnssec: bool = Field(False) - extension_data: dict[str, Any] = Field(default_factory=dict, alias="extensionData") - item_id: str = Field("", alias="itemId") - nameservers: list[str] = Field(default_factory=list) - ns_mode: DomainNsMode | None = Field(None, alias="nsMode") - """ - - DOMAIN_NS_MODE_NODERINGS: NodeRings DNS (cfg.PowerDNS.AssignedNameservers). - - DOMAIN_NS_MODE_CUSTOM: Customer nameservers. - """ - starter_records: list[DomainStarterRecord] = Field(default_factory=list, alias="starterRecords") - whois_privacy: bool = Field(False, alias="whoisPrivacy") - years: int = Field(0) - - -class DomainOrderQuote(Model): - """The API's v1DomainOrderQuote object.""" - - billing_country_confirmation_required: bool = Field(False, alias="billingCountryConfirmationRequired") - """Billing country matches neither card nor IP country: ask for confirmation.""" - currency: str = Field("") - lines: list[DomainOrderQuoteLine] = Field(default_factory=list) - mit_consent_required: bool = Field(False, alias="mitConsentRequired") - """Some item has auto-renew on: MIT consent checkbox required.""" - mit_consent_text: str = Field("", alias="mitConsentText") - order_id: str = Field("", alias="orderId") - quote_expires_at: datetime | None = Field(None, alias="quoteExpiresAt") - state: DomainOrderState | None = Field(None) - subtotal: str = Field("") - tax_amount: str = Field("", alias="taxAmount") - tax_breakdown: list[DomainTaxLine] = Field(default_factory=list, alias="taxBreakdown") - tax_requires_address: bool = Field(False, alias="taxRequiresAddress") - """Billing address missing: show the address form (prefilled from the registrant).""" - terms_url: str = Field("", alias="termsUrl") - """Link to the terms of terms_version (relative to the site, e.g. "/legal/domain-terms").""" - terms_version: str = Field("", alias="termsVersion") - total: str = Field("") - - -class DomainOrderQuoteLine(Model): - """The API's v1DomainOrderQuoteLine object.""" - - available: bool = Field(False) - description: str = Field("") - domain_name: str = Field("", alias="domainName") - item_id: str = Field("", alias="itemId") - kind: DomainOrderItemKind | None = Field(None) - """- DOMAIN_ORDER_ITEM_KIND_PRIVACY: WHOIS privacy bought later for an existing domain.""" - price_changed: bool = Field(False, alias="priceChanged") - """The price changed since the cart or the last quote.""" - privacy_price: str = Field("", alias="privacyPrice") - renewal_price: str = Field("", alias="renewalPrice") - sell_price: str = Field("", alias="sellPrice") - subtotal: str = Field("") - tax_amount: str = Field("", alias="taxAmount") - total: str = Field("") - unavailable_reason: str = Field("", alias="unavailableReason") - years: int = Field(0) - - -class DomainOrderState(OpenEnum): - """ - The API's DomainOrderState enum. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_ORDER_STATE_UNSPECIFIED" - DRAFT = "DOMAIN_ORDER_STATE_DRAFT" - QUOTED = "DOMAIN_ORDER_STATE_QUOTED" - AWAITING_PAYMENT = "DOMAIN_ORDER_STATE_AWAITING_PAYMENT" - AUTHORIZED = "DOMAIN_ORDER_STATE_AUTHORIZED" - IN_REVIEW = "DOMAIN_ORDER_STATE_IN_REVIEW" - PROCESSING = "DOMAIN_ORDER_STATE_PROCESSING" - COMPLETED = "DOMAIN_ORDER_STATE_COMPLETED" - PARTIALLY_COMPLETED = "DOMAIN_ORDER_STATE_PARTIALLY_COMPLETED" - FAILED = "DOMAIN_ORDER_STATE_FAILED" - CANCELED = "DOMAIN_ORDER_STATE_CANCELED" - EXPIRED = "DOMAIN_ORDER_STATE_EXPIRED" - - -class DomainRenewalInfo(Model): - """The API's v1DomainRenewalInfo object.""" - - currency: str = Field("") - max_extend_years: int = Field(0, alias="maxExtendYears") - """Maximum extra years that can be added now (10-year cap).""" - next_attempt_at: datetime | None = Field(None, alias="nextAttemptAt") - """Next automatic renewal attempt (T-25 days before renew_by), if auto-renew is on.""" - privacy_price: str = Field("", alias="privacyPrice") - """Privacy add-on renewal per year (0 when off).""" - renewal_price: str = Field("", alias="renewalPrice") - """Price of one renewal year.""" - restore_price: str = Field("", alias="restorePrice") - """Restore price (shown in redemption).""" - - -class DomainSearchResult(Model): - """One row of a search or check result.""" - - availability: DomainAvailability | None = Field(None) - """ - Availability of a name for registration. - - - DOMAIN_AVAILABILITY_AVAILABLE: Can be registered now. - DOMAIN_AVAILABILITY_TAKEN: Registered - by someone else (offer transfer if the caller owns it). - DOMAIN_AVAILABILITY_PREMIUM: Premium - or early-access name; not sold in v1. - DOMAIN_AVAILABILITY_UNSUPPORTED: TLD not sold by - NodeRings. - DOMAIN_AVAILABILITY_RESERVED: Reserved by the registry or by NodeRings. - - DOMAIN_AVAILABILITY_INVALID: Not a valid domain name. - DOMAIN_AVAILABILITY_BLOCKED: TLD is - blocked or the name failed an abuse check. - DOMAIN_AVAILABILITY_UNKNOWN: Upstream check failed; - try again. - """ - category: TldCategory | None = Field(None) - """Grouping for "Show more extensions" in search and the pricing page (§8.2).""" - currency: str = Field("") - dnssec_allowed: bool = Field(False, alias="dnssecAllowed") - eligibility: TldEligibility | None = Field(None) - """ - Who may register under a TLD (§8.2). - - - TLD_ELIGIBILITY_RESIDENTS_ONLY: Registrant must be in one of eligible_countries (or meet the - nexus rule in eligibility_note). - """ - eligibility_note: str = Field("", alias="eligibilityNote") - eligible_countries: list[str] = Field(default_factory=list, alias="eligibleCountries") - """ISO 3166-1 alpha-2 countries allowed when eligibility is RESIDENTS_ONLY.""" - exact_match: bool = Field(False, alias="exactMatch") - """The exact name the customer typed.""" - featured: bool = Field(False) - """Same label on a featured TLD.""" - first_year_price: str = Field("", alias="firstYearPrice") - """First-year registration price.""" - is_promotion: bool = Field(False, alias="isPromotion") - """first_year_price is an upstream promotion.""" - max_years: int = Field(0, alias="maxYears") - min_years: int = Field(0, alias="minYears") - name: str = Field("") - owned_by_caller: bool = Field(False, alias="ownedByCaller") - """The caller's organization already holds this domain (signed-in callers only).""" - price_gap_warning: bool = Field(False, alias="priceGapWarning") - """Renewal is much more expensive than the first year: show a warning chip.""" - privacy_allowed: bool = Field(False, alias="privacyAllowed") - privacy_price: str = Field("", alias="privacyPrice") - """WHOIS privacy add-on per year; empty when privacy_allowed is false.""" - reason: str = Field("") - """Product copy for non-available rows (e.g. "Premium — not available yet").""" - renewal_price: str = Field("", alias="renewalPrice") - """Price of each renewal year.""" - requires_extension_data: bool = Field(False, alias="requiresExtensionData") - """Extra contact data is required for this TLD (GetTldRequirements).""" - risk_note: str = Field("", alias="riskNote") - risk_tier: TldRiskTier | None = Field(None, alias="riskTier") - """- TLD_RISK_TIER_HIGH: Cheap, frequently abused TLD: stricter checks at checkout.""" - suggestion: bool = Field(False) - """Registrar suggestion.""" - tld: str = Field("") - transfer_price: str = Field("", alias="transferPrice") - - -class DomainStarterRecord(Model): - """Optional starter record for a new NodeRings zone (@ or www to a server).""" - - name: str = Field("") - """"@" or "www".""" - type: str = Field("") - """A or AAAA.""" - value: str = Field("") - virtual_machine_id: str = Field("", alias="virtualMachineId") - """Resolve the address from this VM instead of value.""" - - -class DomainTaxLine(Model): - """The API's v1DomainTaxLine object.""" - - amount: str = Field("") - jurisdiction: str = Field("") - rate_percent: str = Field("", alias="ratePercent") - reverse_charge: bool = Field(False, alias="reverseCharge") - tax_type: str = Field("", alias="taxType") - """vat, gst, sales_tax, ...""" - taxability_reason: str = Field("", alias="taxabilityReason") - - -class DomainTransferIn(Model): - """The API's v1DomainTransferIn object.""" - - failure_reason: str = Field("", alias="failureReason") - order_id: str = Field("", alias="orderId") - order_item_id: str = Field("", alias="orderItemId") - started_at: datetime | None = Field(None, alias="startedAt") - state: DomainTransferInState | None = Field(None) - """ - - DOMAIN_TRANSFER_IN_STATE_AUTH_CODE_REJECTED: Registry rejected the auth code; enter it again - on the order item. - """ - - -class DomainTransferInState(OpenEnum): - """ - - DOMAIN_TRANSFER_IN_STATE_AUTH_CODE_REJECTED: Registry rejected the auth code; enter it again - on the order item. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_TRANSFER_IN_STATE_UNSPECIFIED" - NONE = "DOMAIN_TRANSFER_IN_STATE_NONE" - PENDING = "DOMAIN_TRANSFER_IN_STATE_PENDING" - AUTH_CODE_REJECTED = "DOMAIN_TRANSFER_IN_STATE_AUTH_CODE_REJECTED" - COMPLETED = "DOMAIN_TRANSFER_IN_STATE_COMPLETED" - FAILED = "DOMAIN_TRANSFER_IN_STATE_FAILED" - - -class DomainTransferOut(Model): - """The API's v1DomainTransferOut object.""" - - completes_at: datetime | None = Field(None, alias="completesAt") - gaining_registrar: str = Field("", alias="gainingRegistrar") - state: DomainTransferOutState | None = Field(None) - - -class DomainTransferOutState(OpenEnum): - """ - The API's DomainTransferOutState enum. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "DOMAIN_TRANSFER_OUT_STATE_UNSPECIFIED" - NONE = "DOMAIN_TRANSFER_OUT_STATE_NONE" - PENDING = "DOMAIN_TRANSFER_OUT_STATE_PENDING" - APPROVED = "DOMAIN_TRANSFER_OUT_STATE_APPROVED" - COMPLETED = "DOMAIN_TRANSFER_OUT_STATE_COMPLETED" - REJECTED = "DOMAIN_TRANSFER_OUT_STATE_REJECTED" - + SIGNED_ACTIVE = "DNSSEC_MODE_SIGNED_ACTIVE" -class DomainVerification(Model): - """The API's v1DomainVerification object.""" - deadline: datetime | None = Field(None) - """Domain is suspended if not verified by then.""" - email: str = Field("") - last_sent_at: datetime | None = Field(None, alias="lastSentAt") - status: DomainVerificationStatus | None = Field(None) +class DockerImageChoice(Model): + """The API's v1DockerImageChoice object.""" + image: str = Field("") + name: str = Field("") -class DomainVerificationStatus(OpenEnum): - """ - The API's DomainVerificationStatus enum. - Unknown values the API adds later are kept as strings. - """ +class Domain(Model): + """The API's v1Domain object.""" - UNSPECIFIED = "DOMAIN_VERIFICATION_STATUS_UNSPECIFIED" - VERIFIED = "DOMAIN_VERIFICATION_STATUS_VERIFIED" - PENDING = "DOMAIN_VERIFICATION_STATUS_PENDING" - FAILED = "DOMAIN_VERIFICATION_STATUS_FAILED" + id: str = Field("") + """Fields""" + is_verified: bool = Field(False, alias="isVerified") + metadata: dict[str, Any] = Field(default_factory=dict) + """Metadata""" + name: str = Field("") + organization_id: str = Field("", alias="organizationId") + """Relations""" + status: Protov1Status | None = Field(None) + timestamps: Timestamps | None = Field(None) + verification_type: VerificationType | None = Field(None, alias="verificationType") class DownloadFileResponse(Model): @@ -6703,17 +5219,6 @@ class GetConnectTaxSettingsResponse(Model): settings: ConnectTaxSettingsDetails | None = Field(None) -class GetContactSchemaResponse(Model): - """The API's v1GetContactSchemaResponse object.""" - - countries: list[CountryContactRules] = Field(default_factory=list) - fields_: list[ContactFieldSpec] = Field(default_factory=list, alias="fields") - """Base contact fields.""" - tld_requirements: list[ContactRequirements] = Field(default_factory=list, alias="tldRequirements") - version: int = Field(0) - """Rule-set version (DomainContact.validation_version).""" - - class GetConversationHistoryResponse(Model): """The API's v1GetConversationHistoryResponse object.""" @@ -6806,14 +5311,6 @@ class GetDNSZoneResponse(Model): """DnsZone is a hosted authoritative zone. Vanilla records live in PowerDNS, not Ent.""" -class GetDomainAuthCodeResponse(Model): - """The API's v1GetDomainAuthCodeResponse object.""" - - auth_code: str = Field("", alias="authCode") - """Sensitive: show once, never log.""" - expires_at: datetime | None = Field(None, alias="expiresAt") - - class GetDomainResponse(Model): """The API's v1GetDomainResponse object.""" @@ -7131,25 +5628,6 @@ class GetProviderTicketNotificationPolicyResponse(Model): policy: ProviderTicketNotificationPolicy | None = Field(None) -class GetPublicPlatformStatsResponse(Model): - """The API's v1GetPublicPlatformStatsResponse object.""" - - collected_at: datetime | None = Field(None, alias="collectedAt") - """When these counters were read from the database.""" - compute_instances: PublicProductCount | None = Field(None, alias="computeInstances") - """One product's provisioning counters.""" - dns_records: int = Field(0, alias="dnsRecords") - """Records in live zones, read from PowerDNS. SOA, apex NS and DNSSEC material are not counted.""" - dns_records_available: bool = Field(False, alias="dnsRecordsAvailable") - """False when PowerDNS could not be read; dns_records is then 0.""" - dns_zones: PublicProductCount | None = Field(None, alias="dnsZones") - """One product's provisioning counters.""" - game_servers: PublicProductCount | None = Field(None, alias="gameServers") - """One product's provisioning counters.""" - providers: int = Field(0) - """Storefronts published on the marketplace.""" - - class GetPublicStorefrontResponse(Model): """The API's v1GetPublicStorefrontResponse object.""" @@ -7164,20 +5642,6 @@ class GetRefundResponse(Model): refund: Refund | None = Field(None) -class GetRegistrarBalanceResponse(Model): - """The API's v1GetRegistrarBalanceResponse object.""" - - available: str = Field("") - balance: str = Field("") - currency: str = Field("") - provider: str = Field("") - reserved: str = Field("") - """Sum of active balance reservations.""" - runway_days: int = Field(0, alias="runwayDays") - """Days of scheduled renewals the available balance covers.""" - updated_at: datetime | None = Field(None, alias="updatedAt") - - class GetRoadmapFeatureRequestResponse(Model): """The API's v1GetRoadmapFeatureRequestResponse object.""" @@ -7251,12 +5715,6 @@ class GetTicketResponse(Model): """Map of user ID to user details (first_name, last_name)""" -class GetTldRequirementsResponse(Model): - """The API's v1GetTldRequirementsResponse object.""" - - requirements: ContactRequirements | None = Field(None) - - class GetUsageRecordResponse(Model): """The API's v1GetUsageRecordResponse object.""" @@ -7712,24 +6170,6 @@ class ListAgentsResponse(Model): total_count: int = Field(0, alias="totalCount") -class ListAllDomainOrdersResponse(Model): - """The API's v1ListAllDomainOrdersResponse object.""" - - orders: list[AdminDomainOrder] = Field(default_factory=list) - page: int = Field(0) - page_size: int = Field(0, alias="pageSize") - total_count: int = Field(0, alias="totalCount") - - -class ListAllDomainsResponse(Model): - """The API's v1ListAllDomainsResponse object.""" - - domains: list[AdminRegisteredDomain] = Field(default_factory=list) - page: int = Field(0) - page_size: int = Field(0, alias="pageSize") - total_count: int = Field(0, alias="totalCount") - - class ListAllocationsResponse(Model): """The API's v1ListAllocationsResponse object.""" @@ -8005,48 +6445,6 @@ class ListDNSZonesResponse(Model): zones: list[DNSZone] = Field(default_factory=list) -class ListDomainContactsResponse(Model): - """The API's v1ListDomainContactsResponse object.""" - - contacts: list[DomainContact] = Field(default_factory=list) - page: int = Field(0) - page_size: int = Field(0, alias="pageSize") - total_count: int = Field(0, alias="totalCount") - - -class ListDomainEventsResponse(Model): - """The API's v1ListDomainEventsResponse object.""" - - events: list[DomainEvent] = Field(default_factory=list) - page: int = Field(0) - page_size: int = Field(0, alias="pageSize") - total_count: int = Field(0, alias="totalCount") - - -class ListDomainGlueRecordsResponse(Model): - """The API's v1ListDomainGlueRecordsResponse object.""" - - records: list[DomainGlueRecord] = Field(default_factory=list) - - -class ListDomainInvoicesResponse(Model): - """The API's v1ListDomainInvoicesResponse object.""" - - invoices: list[DomainInvoice] = Field(default_factory=list) - page: int = Field(0) - page_size: int = Field(0, alias="pageSize") - total_count: int = Field(0, alias="totalCount") - - -class ListDomainOrdersResponse(Model): - """The API's v1ListDomainOrdersResponse object.""" - - orders: list[DomainOrder] = Field(default_factory=list) - page: int = Field(0) - page_size: int = Field(0, alias="pageSize") - total_count: int = Field(0, alias="totalCount") - - class ListEffectivePermissionsResponse(Model): """The API's v1ListEffectivePermissionsResponse object.""" @@ -8431,15 +6829,6 @@ class ListRegionsResponse(Model): total_count: int = Field(0, alias="totalCount") -class ListRegisteredDomainsResponse(Model): - """The API's v1ListRegisteredDomainsResponse object.""" - - domains: list[RegisteredDomain] = Field(default_factory=list) - page: int = Field(0) - page_size: int = Field(0, alias="pageSize") - total_count: int = Field(0, alias="totalCount") - - class ListRoadmapFeatureRequestCommentsResponse(Model): """The API's v1ListRoadmapFeatureRequestCommentsResponse object.""" @@ -8557,24 +6946,6 @@ class ListTicketsResponse(Model): """Map of user ID to user details (first_name, last_name)""" -class ListTldOfferingsResponse(Model): - """The API's v1ListTldOfferingsResponse object.""" - - offerings: list[TldOffering] = Field(default_factory=list) - page: int = Field(0) - page_size: int = Field(0, alias="pageSize") - total_count: int = Field(0, alias="totalCount") - - -class ListTldPricesResponse(Model): - """The API's v1ListTldPricesResponse object.""" - - page: int = Field(0) - page_size: int = Field(0, alias="pageSize") - tlds: list[TldPrice] = Field(default_factory=list) - total_count: int = Field(0, alias="totalCount") - - class ListUsageRecordsResponse(Model): """The API's v1ListUsageRecordsResponse object.""" @@ -10435,15 +8806,6 @@ class ProviderTicketNotificationPolicy(Model): notify_on_escalated: bool = Field(False, alias="notifyOnEscalated") -class PublicProductCount(Model): - """One product's provisioning counters.""" - - last_30_days: int = Field(0, alias="last30Days") - """Provisioned in the last 30 days.""" - total: int = Field(0) - """Provisioned since launch, including ones deleted since.""" - - class PublicStorefront(Model): """The API's v1PublicStorefront object.""" @@ -10513,25 +8875,6 @@ class ReadFileResponse(Model): content: Base64Bytes | None = Field(None) -class ReauthenticateUserRequest(Model): - """The API's v1ReauthenticateUserRequest object.""" - - code: str = Field("") - """Current TOTP or an unused recovery code; required when 2FA is enabled.""" - password: str = Field("") - """Required when the account has a local password.""" - - -class ReauthenticateUserResponse(Model): - """The API's v1ReauthenticateUserResponse object.""" - - expires_at: datetime | None = Field(None, alias="expiresAt") - method: str = Field("") - """What was re-checked: "password", "mfa" or "password+mfa".""" - reauth_token: str = Field("", alias="reauthToken") - """Step-up token; pass it as reauth_token to sensitive actions.""" - - class RecordUsageRequest(Model): """The API's v1RecordUsageRequest object.""" @@ -10670,107 +9013,6 @@ class RegisterUserRequest(Model): """Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).""" -class RegisteredDomain(Model): - """The API's v1RegisteredDomain object.""" - - admin_contact: DomainContact | None = Field(None, alias="adminContact") - auto_renew: bool = Field(False, alias="autoRenew") - dns_zone_id: str = Field("", alias="dnsZoneId") - """NodeRings DNS zone for this domain, if any.""" - dnssec: DomainDNSSEC | None = Field(None) - expires_at: datetime | None = Field(None, alias="expiresAt") - holds: list[DomainHold] = Field(default_factory=list) - id: str = Field("") - """Read-only: set by the API.""" - last_synced_at: datetime | None = Field(None, alias="lastSyncedAt") - name: str = Field("") - nameservers: list[str] = Field(default_factory=list) - ns_mode: DomainNsMode | None = Field(None, alias="nsMode") - """ - - DOMAIN_NS_MODE_NODERINGS: NodeRings DNS (cfg.PowerDNS.AssignedNameservers). - - DOMAIN_NS_MODE_CUSTOM: Customer nameservers. - """ - operation_pending: bool = Field(False, alias="operationPending") - """A registrar update is in progress ("Updating at the registry…").""" - organization_id: str = Field("", alias="organizationId") - """Read-only: set by the API.""" - privacy_allowed: bool = Field(False, alias="privacyAllowed") - registered_at: datetime | None = Field(None, alias="registeredAt") - registrant: DomainContact | None = Field(None) - registrant_change: RegistrantChange | None = Field(None, alias="registrantChange") - registrant_contact_id: str = Field("", alias="registrantContactId") - """ - Registrant contact id and display name (company, else "First Last"); also set in list responses, - where the full contacts are not loaded. - - Read-only: set by the API. - """ - registrant_display_name: str = Field("", alias="registrantDisplayName") - """Read-only: set by the API.""" - registrar_name: str = Field("", alias="registrarName") - """Sponsoring registrar shown on the domain page (RAA reseller duty).""" - renew_by: datetime | None = Field(None, alias="renewBy") - """Date the domain stops working if not renewed (registrar renewal date).""" - renewal: DomainRenewalInfo | None = Field(None) - renewal_payment_method_id: str = Field("", alias="renewalPaymentMethodId") - state: RegisteredDomainState | None = Field(None) - """Lifecycle state of a registered domain.""" - tech_contact: DomainContact | None = Field(None, alias="techContact") - timestamps: Timestamps | None = Field(None) - tld: str = Field("") - transfer_in: DomainTransferIn | None = Field(None, alias="transferIn") - transfer_lock: bool = Field(False, alias="transferLock") - transfer_lock_until: datetime | None = Field(None, alias="transferLockUntil") - transfer_out: DomainTransferOut | None = Field(None, alias="transferOut") - verification: DomainVerification | None = Field(None) - whois_privacy: bool = Field(False, alias="whoisPrivacy") - whois_privacy_auto_renew: bool = Field(False, alias="whoisPrivacyAutoRenew") - whois_privacy_paid_until: datetime | None = Field(None, alias="whoisPrivacyPaidUntil") - - -class RegisteredDomainState(OpenEnum): - """ - Lifecycle state of a registered domain. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "REGISTERED_DOMAIN_STATE_UNSPECIFIED" - REGISTERING = "REGISTERED_DOMAIN_STATE_REGISTERING" - ACTIVE = "REGISTERED_DOMAIN_STATE_ACTIVE" - TRANSFER_IN_PENDING = "REGISTERED_DOMAIN_STATE_TRANSFER_IN_PENDING" - TRANSFER_OUT_PENDING = "REGISTERED_DOMAIN_STATE_TRANSFER_OUT_PENDING" - EXPIRING = "REGISTERED_DOMAIN_STATE_EXPIRING" - EXPIRED = "REGISTERED_DOMAIN_STATE_EXPIRED" - REDEMPTION = "REGISTERED_DOMAIN_STATE_REDEMPTION" - PENDING_DELETE = "REGISTERED_DOMAIN_STATE_PENDING_DELETE" - TRANSFERRED_OUT = "REGISTERED_DOMAIN_STATE_TRANSFERRED_OUT" - DELETED = "REGISTERED_DOMAIN_STATE_DELETED" - FAILED = "REGISTERED_DOMAIN_STATE_FAILED" - - -class RegistrantChange(Model): - """The API's v1RegistrantChange object.""" - - expires_at: datetime | None = Field(None, alias="expiresAt") - new_contact_id: str = Field("", alias="newContactId") - state: RegistrantChangeState | None = Field(None) - - -class RegistrantChangeState(OpenEnum): - """ - The API's RegistrantChangeState enum. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "REGISTRANT_CHANGE_STATE_UNSPECIFIED" - PENDING = "REGISTRANT_CHANGE_STATE_PENDING" - APPROVED = "REGISTRANT_CHANGE_STATE_APPROVED" - REJECTED = "REGISTRANT_CHANGE_STATE_REJECTED" - EXPIRED = "REGISTRANT_CHANGE_STATE_EXPIRED" - - class ReinstallStatus(OpenEnum): """ The API's ReinstallStatus enum. @@ -10820,12 +9062,6 @@ class ReplaceRoleForUserRequest(Model): user_id: str = Field("", alias="userId") -class ResendRegistrantVerificationResponse(Model): - """The API's v1ResendRegistrantVerificationResponse object.""" - - verification: DomainVerification | None = Field(None) - - class ResendVerificationEmailRequest(Model): """The API's v1ResendVerificationEmailRequest object.""" @@ -10893,15 +9129,6 @@ class RetryPaymentResponse(Model): """Transaction ID from payment provider (available after task completes)""" -class RetryRegistrarOperationRequest(Model): - """The API's v1RetryRegistrarOperationRequest object.""" - - order_item_id: str = Field("", alias="orderItemId") - """Exactly one of order_item_id / renewal_id.""" - reason: str = Field("") - renewal_id: str = Field("", alias="renewalId") - - class RevokeCouponResponse(Model): """The API's v1RevokeCouponResponse object.""" @@ -11080,33 +9307,6 @@ class ScanDNSZoneRecordsResponse(Model): records: list[DNSRecord] = Field(default_factory=list) -class SearchDomainsRequest(Model): - """The API's v1SearchDomainsRequest object.""" - - category: TldCategory | None = Field(None) - """Grouping for "Show more extensions" in search and the pricing page (§8.2).""" - exact_only: bool = Field(False, alias="exactOnly") - """Check only the exact name, served from the availability cache (type-ahead).""" - include_suggestions: bool = Field(False, alias="includeSuggestions") - """Include registrar name suggestions (when the adapter supports them).""" - query: str = Field("") - """A name (evergreen-coffee.com), a label (evergreencoffee) or short keywords.""" - tlds: list[str] = Field(default_factory=list) - """Restrict results to these TLDs (without leading dot). Empty = featured TLDs.""" - turnstile_token: str = Field("", alias="turnstileToken") - """Turnstile token; required for anonymous callers.""" - - -class SearchDomainsResponse(Model): - """The API's v1SearchDomainsResponse object.""" - - normalized_label: str = Field("", alias="normalizedLabel") - """Label extracted from the query (LDH, lower case).""" - query: str = Field("") - results: list[DomainSearchResult] = Field(default_factory=list) - """Exact match first, then featured TLDs, then suggestions (max 25).""" - - class SearchMarketplaceRequest(Model): """Natural-language marketplace search (anonymous landing page).""" @@ -11249,14 +9449,6 @@ class SetDefaultPaymentMethodResponse(Model): payment_method: PaymentMethod | None = Field(None, alias="paymentMethod") -class SetDomainPrivacyResponse(Model): - """The API's v1SetDomainPrivacyResponse object.""" - - domain: RegisteredDomain | None = Field(None) - order_id: str = Field("", alias="orderId") - """Set when enabling privacy needs payment: continue at /domains/checkout/.""" - - class SetGameNestOrderingRequest(Model): """The API's v1SetGameNestOrderingRequest object.""" @@ -11476,33 +9668,6 @@ class SubscribeResponse(Model): subscription: Subscription | None = Field(None) -class SubscribeToBlogRequest(Model): - """The API's v1SubscribeToBlogRequest object.""" - - email: str = Field("") - """Address that should receive new posts.""" - source: str = Field("") - """Where the form was shown, for example "blog_index" or "post:what-noderings-is".""" - turnstile_token: str = Field("", alias="turnstileToken") - """ - Cloudflare Turnstile token from the widget. Required when the backend enables Turnstile for blog - sign-ups. - """ - website: str = Field("") - """Honeypot. Real readers never see or fill this field.""" - - -class SubscribeToBlogResponse(Model): - """The API's v1SubscribeToBlogResponse object.""" - - message: str = Field("") - success: bool = Field(False) - """ - Always true when the request was accepted. The same answer is returned for new, pending and - already confirmed addresses so the API does not reveal who is subscribed. - """ - - class Subscription(Model): """The API's v1Subscription object.""" @@ -11602,22 +9767,6 @@ class SuccessResponse(Model): success: bool = Field(False) -class SyncTldCatalogRequest(Model): - """The API's v1SyncTldCatalogRequest object.""" - - provider: str = Field("") - """Empty = every configured provider.""" - reason: str = Field("") - - -class SyncTldCatalogResponse(Model): - """The API's v1SyncTldCatalogResponse object.""" - - queued: bool = Field(False) - """The sync was queued on the registrar task queue.""" - task_id: str = Field("", alias="taskId") - - class Ticket(Model): """The API's v1Ticket object.""" @@ -11796,114 +9945,6 @@ class Timestamps(Model): update_time: datetime | None = Field(None, alias="updateTime") -class TldCategory(OpenEnum): - """ - Grouping for "Show more extensions" in search and the pricing page (§8.2). - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "TLD_CATEGORY_UNSPECIFIED" - GENERIC = "TLD_CATEGORY_GENERIC" - COUNTRY = "TLD_CATEGORY_COUNTRY" - TECH = "TLD_CATEGORY_TECH" - BUSINESS = "TLD_CATEGORY_BUSINESS" - CREATIVE = "TLD_CATEGORY_CREATIVE" - COMMUNITY = "TLD_CATEGORY_COMMUNITY" - GEOGRAPHIC = "TLD_CATEGORY_GEOGRAPHIC" - LIFESTYLE = "TLD_CATEGORY_LIFESTYLE" - SHOPPING = "TLD_CATEGORY_SHOPPING" - OTHER = "TLD_CATEGORY_OTHER" - - -class TldEligibility(OpenEnum): - """ - Who may register under a TLD (§8.2). - - - TLD_ELIGIBILITY_RESIDENTS_ONLY: Registrant must be in one of eligible_countries (or meet the - nexus rule in eligibility_note). - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "TLD_ELIGIBILITY_UNSPECIFIED" - ANYONE = "TLD_ELIGIBILITY_ANYONE" - RESIDENTS_ONLY = "TLD_ELIGIBILITY_RESIDENTS_ONLY" - - -class TldOffering(Model): - """Catalog row with costs (ops only).""" - - blocked: bool = Field(False) - blocked_reason: str = Field("", alias="blockedReason") - cost_currency: str = Field("", alias="costCurrency") - cost_privacy: str = Field("", alias="costPrivacy") - cost_register: str = Field("", alias="costRegister") - cost_renew: str = Field("", alias="costRenew") - cost_restore: str = Field("", alias="costRestore") - cost_transfer: str = Field("", alias="costTransfer") - disabled_reason: str = Field("", alias="disabledReason") - """ - Why the catalog sync left or switched the TLD off (no USD price, manual docs, unrenderable - fields, ...). - """ - enabled: bool = Field(False) - price: TldPrice | None = Field(None) - """Public price row (also the ICANN ERRP fee schedule).""" - price_override: dict[str, Any] = Field(default_factory=dict, alias="priceOverride") - provider: str = Field("") - synced_at: datetime | None = Field(None, alias="syncedAt") - tld: str = Field("") - - -class TldPrice(Model): - """Public price row (also the ICANN ERRP fee schedule).""" - - category: TldCategory | None = Field(None) - """Grouping for "Show more extensions" in search and the pricing page (§8.2).""" - currency: str = Field("") - display_order: int = Field(0, alias="displayOrder") - dnssec_allowed: bool = Field(False, alias="dnssecAllowed") - eligibility: TldEligibility | None = Field(None) - """ - Who may register under a TLD (§8.2). - - - TLD_ELIGIBILITY_RESIDENTS_ONLY: Registrant must be in one of eligible_countries (or meet the - nexus rule in eligibility_note). - """ - eligibility_note: str = Field("", alias="eligibilityNote") - eligible_countries: list[str] = Field(default_factory=list, alias="eligibleCountries") - """ISO 3166-1 alpha-2 countries allowed when eligibility is RESIDENTS_ONLY.""" - featured: bool = Field(False) - is_promotion: bool = Field(False, alias="isPromotion") - max_years: int = Field(0, alias="maxYears") - min_years: int = Field(0, alias="minYears") - privacy_allowed: bool = Field(False, alias="privacyAllowed") - privacy_price: str = Field("", alias="privacyPrice") - register_price: str = Field("", alias="registerPrice") - renew_price: str = Field("", alias="renewPrice") - requires_extension_data: bool = Field(False, alias="requiresExtensionData") - restore_price: str = Field("", alias="restorePrice") - risk_note: str = Field("", alias="riskNote") - risk_tier: TldRiskTier | None = Field(None, alias="riskTier") - """- TLD_RISK_TIER_HIGH: Cheap, frequently abused TLD: stricter checks at checkout.""" - tld: str = Field("") - transfer_price: str = Field("", alias="transferPrice") - transfer_supported: bool = Field(False, alias="transferSupported") - - -class TldRiskTier(OpenEnum): - """ - - TLD_RISK_TIER_HIGH: Cheap, frequently abused TLD: stricter checks at checkout. - - Unknown values the API adds later are kept as strings. - """ - - UNSPECIFIED = "TLD_RISK_TIER_UNSPECIFIED" - NORMAL = "TLD_RISK_TIER_NORMAL" - HIGH = "TLD_RISK_TIER_HIGH" - - class TokenRequest(Model): """The API's v1TokenRequest object.""" @@ -11933,60 +9974,12 @@ class TokenResponse(Model): """"Bearer" """ -class TransferCheckResult(Model): - """The API's v1TransferCheckResult object.""" - - auth_code_required: bool = Field(False, alias="authCodeRequired") - currency: str = Field("") - current_nameservers: list[str] = Field(default_factory=list, alias="currentNameservers") - eligibility: TldEligibility | None = Field(None) - """ - Who may register under a TLD (§8.2). - - - TLD_ELIGIBILITY_RESIDENTS_ONLY: Registrant must be in one of eligible_countries (or meet the - nexus rule in eligibility_note). - """ - eligibility_note: str = Field("", alias="eligibilityNote") - eligible_countries: list[str] = Field(default_factory=list, alias="eligibleCountries") - includes_renewal_year: bool = Field(False, alias="includesRenewalYear") - """The transfer adds one year to the registration.""" - name: str = Field("") - reason: str = Field("") - """Why it cannot be transferred (product copy).""" - transfer_price: str = Field("", alias="transferPrice") - transferable: bool = Field(False) - warnings: list[str] = Field(default_factory=list) - """Warnings to show (unlock at the old registrar, disable DNSSEC, 60-day rules).""" - - class UndoCancelRenewalRequest(Model): """The API's v1UndoCancelRenewalRequest object.""" subscription_id: str = Field("", alias="subscriptionId") -class UnsubscribeFromBlogRequest(Model): - """The API's v1UnsubscribeFromBlogRequest object.""" - - token: str = Field("") - """Token from the unsubscribe link in any blog email.""" - - -class UnsubscribeFromBlogResponse(Model): - """The API's v1UnsubscribeFromBlogResponse object.""" - - masked_email: str = Field("", alias="maskedEmail") - message: str = Field("") - status: BlogSubscriptionStatus | None = Field(None) - """ - State of a blog email subscription. - - - BLOG_SUBSCRIPTION_STATUS_PENDING: Waiting for the reader to click the confirmation link. - - BLOG_SUBSCRIPTION_STATUS_VERIFIED: Confirmed. New posts are emailed to this address. - - BLOG_SUBSCRIPTION_STATUS_UNSUBSCRIBED: The reader unsubscribed. Nothing is sent. - """ - - class UpdateAgentResponse(Model): """The API's v1UpdateAgentResponse object.""" @@ -12020,27 +10013,6 @@ class UpdateConnectTaxSettingsResponse(Model): settings: ConnectTaxSettingsDetails | None = Field(None) -class UpdateDomainContactResponse(Model): - """The API's v1UpdateDomainContactResponse object.""" - - affected_domains: list[str] = Field(default_factory=list, alias="affectedDomains") - contact: DomainContact | None = Field(None) - registrant_change_required: bool = Field(False, alias="registrantChangeRequired") - """ - Name, organization or email changed on a registrant of live domains: a change-of-registrant - confirmation was started for these domains. - """ - - -class UpdateDomainContactsResponse(Model): - """The API's v1UpdateDomainContactsResponse object.""" - - domain: RegisteredDomain | None = Field(None) - registrant_change_expires_at: datetime | None = Field(None, alias="registrantChangeExpiresAt") - registrant_change_pending: bool = Field(False, alias="registrantChangePending") - """A change of registrant was started; it waits for email approval.""" - - class UpdateGroupResponse(Model): """The API's v1UpdateGroupResponse object.""" @@ -12378,25 +10350,6 @@ class VMTemplate(Model): timestamps: Timestamps | None = Field(None) -class ValidateDomainContactRequest(Model): - """The API's v1ValidateDomainContactRequest object.""" - - contact: DomainContactInput | None = Field(None) - """Writable contact fields. ASCII only in v1; the server normalizes and validates.""" - tlds: list[str] = Field(default_factory=list) - - -class ValidateDomainContactResponse(Model): - """The API's v1ValidateDomainContactResponse object.""" - - errors: list[ContactFieldError] = Field(default_factory=list) - normalized: DomainContactInput | None = Field(None) - """Writable contact fields. ASCII only in v1; the server normalizes and validates.""" - valid: bool = Field(False) - warnings: list[ContactFieldError] = Field(default_factory=list) - """Non-blocking (e.g. role address for an individual).""" - - class ValidateNodeTopologyRequest(Model): """The API's v1ValidateNodeTopologyRequest object.""" diff --git a/tests/_operations.py b/tests/_operations.py index 8faa85d..176187c 100644 --- a/tests/_operations.py +++ b/tests/_operations.py @@ -24,9 +24,6 @@ ("backup", "get_backup", "BackupService_GetBackup"), ("backup", "list_backups", "BackupService_ListBackups"), ("backup", "restore_backup", "BackupService_RestoreBackup"), - ("blog_subscription", "confirm_blog_subscription", "BlogSubscriptionService_ConfirmBlogSubscription"), - ("blog_subscription", "subscribe_to_blog", "BlogSubscriptionService_SubscribeToBlog"), - ("blog_subscription", "unsubscribe_from_blog", "BlogSubscriptionService_UnsubscribeFromBlog"), ( "business_monitoring", "create_business_monitoring_launch", @@ -115,26 +112,6 @@ ("dnssec", "disable_dnssec", "DnssecService_DisableDnssec"), ("dnssec", "enable_dnssec", "DnssecService_EnableDnssec"), ("dnssec", "get_dnssec", "DnssecService_GetDnssec"), - ("domain_contact", "create_domain_contact", "DomainContactService_CreateDomainContact"), - ("domain_contact", "delete_domain_contact", "DomainContactService_DeleteDomainContact"), - ("domain_contact", "get_contact_schema", "DomainContactService_GetContactSchema"), - ("domain_contact", "get_domain_contact", "DomainContactService_GetDomainContact"), - ("domain_contact", "list_domain_contacts", "DomainContactService_ListDomainContacts"), - ("domain_contact", "update_domain_contact", "DomainContactService_UpdateDomainContact"), - ("domain_contact", "validate_domain_contact", "DomainContactService_ValidateDomainContact"), - ("domain_order", "cancel_domain_order", "DomainOrderService_CancelDomainOrder"), - ("domain_order", "checkout_domain_order", "DomainOrderService_CheckoutDomainOrder"), - ("domain_order", "confirm_domain_order", "DomainOrderService_ConfirmDomainOrder"), - ("domain_order", "create_domain_order", "DomainOrderService_CreateDomainOrder"), - ("domain_order", "get_domain_order", "DomainOrderService_GetDomainOrder"), - ("domain_order", "list_domain_orders", "DomainOrderService_ListDomainOrders"), - ("domain_order", "price_domain_order", "DomainOrderService_PriceDomainOrder"), - ("domain_order", "update_domain_order", "DomainOrderService_UpdateDomainOrder"), - ("domain_search", "check_domains", "DomainSearchService_CheckDomains"), - ("domain_search", "check_transfer", "DomainSearchService_CheckTransfer"), - ("domain_search", "get_tld_requirements", "DomainSearchService_GetTldRequirements"), - ("domain_search", "list_tld_prices", "DomainSearchService_ListTldPrices"), - ("domain_search", "search_domains", "DomainSearchService_SearchDomains"), ("domain", "create_domain", "DomainService_CreateDomain"), ("domain", "delete_domain", "DomainService_DeleteDomain"), ("domain", "get_domain", "DomainService_GetDomain"), @@ -279,7 +256,6 @@ ("manual_payout", "get_manual_payout", "ManualPayoutService_GetManualPayout"), ("marketplace", "get_marketplace_plan", "MarketplaceService_GetMarketplacePlan"), ("marketplace", "get_provider", "MarketplaceService_GetProvider"), - ("marketplace", "get_public_platform_stats", "MarketplaceService_GetPublicPlatformStats"), ("marketplace", "get_public_storefront", "MarketplaceService_GetPublicStorefront"), ("marketplace", "get_public_storefront_by_id", "MarketplaceService_GetPublicStorefrontByID"), ("marketplace", "list_available_addons", "MarketplaceService_ListAvailableAddons"), @@ -494,41 +470,6 @@ ("region", "list_countries_cities", "RegionService_ListCountriesCities"), ("region", "list_datacenters", "RegionService_ListDatacenters"), ("region", "list_regions", "RegionService_ListRegions"), - ("registered_domain", "approve_outgoing_transfer", "RegisteredDomainService_ApproveOutgoingTransfer"), - ("registered_domain", "confirm_registrant_change", "RegisteredDomainService_ConfirmRegistrantChange"), - ("registered_domain", "delete_domain_glue_record", "RegisteredDomainService_DeleteDomainGlueRecord"), - ("registered_domain", "delete_registered_domain", "RegisteredDomainService_DeleteRegisteredDomain"), - ("registered_domain", "get_domain_auth_code", "RegisteredDomainService_GetDomainAuthCode"), - ("registered_domain", "get_registered_domain", "RegisteredDomainService_GetRegisteredDomain"), - ("registered_domain", "list_domain_events", "RegisteredDomainService_ListDomainEvents"), - ("registered_domain", "list_domain_glue_records", "RegisteredDomainService_ListDomainGlueRecords"), - ("registered_domain", "list_domain_invoices", "RegisteredDomainService_ListDomainInvoices"), - ("registered_domain", "list_registered_domains", "RegisteredDomainService_ListRegisteredDomains"), - ("registered_domain", "renew_domain", "RegisteredDomainService_RenewDomain"), - ("registered_domain", "resend_registrant_verification", "RegisteredDomainService_ResendRegistrantVerification"), - ("registered_domain", "reset_domain_auth_code", "RegisteredDomainService_ResetDomainAuthCode"), - ("registered_domain", "restore_domain", "RegisteredDomainService_RestoreDomain"), - ("registered_domain", "retry_domain_transfer", "RegisteredDomainService_RetryDomainTransfer"), - ("registered_domain", "set_domain_auto_renew", "RegisteredDomainService_SetDomainAutoRenew"), - ("registered_domain", "set_domain_dnssec", "RegisteredDomainService_SetDomainDnssec"), - ("registered_domain", "set_domain_nameservers", "RegisteredDomainService_SetDomainNameservers"), - ("registered_domain", "set_domain_privacy", "RegisteredDomainService_SetDomainPrivacy"), - ("registered_domain", "set_domain_transfer_lock", "RegisteredDomainService_SetDomainTransferLock"), - ("registered_domain", "update_domain_contacts", "RegisteredDomainService_UpdateDomainContacts"), - ("registered_domain", "upsert_domain_glue_record", "RegisteredDomainService_UpsertDomainGlueRecord"), - ("registrar_admin", "add_domain_hold", "RegistrarAdminService_AddDomainHold"), - ("registrar_admin", "get_registrar_balance", "RegistrarAdminService_GetRegistrarBalance"), - ("registrar_admin", "list_all_domain_orders", "RegistrarAdminService_ListAllDomainOrders"), - ("registrar_admin", "list_all_domains", "RegistrarAdminService_ListAllDomains"), - ("registrar_admin", "list_tld_offerings", "RegistrarAdminService_ListTldOfferings"), - ("registrar_admin", "move_domain_to_organization", "RegistrarAdminService_MoveDomainToOrganization"), - ("registrar_admin", "remove_domain_hold", "RegistrarAdminService_RemoveDomainHold"), - ("registrar_admin", "retry_registrar_operation", "RegistrarAdminService_RetryRegistrarOperation"), - ("registrar_admin", "review_domain_order", "RegistrarAdminService_ReviewDomainOrder"), - ("registrar_admin", "set_client_hold", "RegistrarAdminService_SetClientHold"), - ("registrar_admin", "set_tld_offering", "RegistrarAdminService_SetTldOffering"), - ("registrar_admin", "sync_domain", "RegistrarAdminService_SyncDomain"), - ("registrar_admin", "sync_tld_catalog", "RegistrarAdminService_SyncTldCatalog"), ("roadmap", "create_roadmap_feature_request_comment", "RoadmapService_CreateRoadmapFeatureRequestComment"), ("roadmap", "delete_roadmap_feature_request_comment", "RoadmapService_DeleteRoadmapFeatureRequestComment"), ("roadmap", "get_roadmap_feature_request", "RoadmapService_GetRoadmapFeatureRequest"), @@ -616,7 +557,6 @@ ("user", "login", "UserService_Login"), ("user", "login_mfa_verify", "UserService_LoginMfaVerify"), ("user", "logout", "UserService_Logout"), - ("user", "reauthenticate_user", "UserService_ReauthenticateUser"), ("user", "regenerate_mfa_backup_codes", "UserService_RegenerateMfaBackupCodes"), ("user", "register_user", "UserService_RegisterUser"), ("user", "resend_verification_email", "UserService_ResendVerificationEmail"), diff --git a/tests/test_client.py b/tests/test_client.py index fc99f6c..5a17970 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -321,22 +321,6 @@ def test_wait_helpers(client: NodeRings, rec: Recorder) -> None: client.wait_for_virtual_machine_deleted("x", interval=0) -def test_wait_for_domain_order(client: NodeRings, rec: Recorder) -> None: - states = iter(["DOMAIN_ORDER_STATE_AUTHORIZED", "DOMAIN_ORDER_STATE_PROCESSING", "DOMAIN_ORDER_STATE_COMPLETED"]) - rec.default = lambda r: httpx.Response(200, json={"id": "o", "state": next(states)}) - order = client.wait_for_domain_order("o", interval=0) - assert order.state == m.DomainOrderState.COMPLETED and len(rec.requests) == 3 - assert rec.requests[0].url.path == "/v1/registrar/orders/o" - - rec.default = lambda r: httpx.Response(200, json={"id": "o", "state": "DOMAIN_ORDER_STATE_PROCESSING"}) - order = client.wait_for_domain_order("o", lambda o: o.state == m.DomainOrderState.PROCESSING, interval=0) - assert order.state == m.DomainOrderState.PROCESSING - with pytest.raises(WaitTimeoutError) as e: - client.wait_for_domain_order("o", interval=0.01, timeout=0.05) - assert e.value.last.state == m.DomainOrderState.PROCESSING - assert "DOMAIN_ORDER_STATE_FAILED" in noderings.DOMAIN_ORDER_FINAL_STATES - - def test_context_manager_closes_own_client() -> None: with NodeRings("t") as c: assert not c._http.is_closed @@ -381,17 +365,6 @@ async def test_async_wait(aclient: AsyncNodeRings, rec: Recorder) -> None: await aclient.wait_for_virtual_machine("x", lambda vm: False, interval=0.01, timeout=0.03) rec.default = lambda r: err(404, 5) await aclient.wait_for_virtual_machine_deleted("x", interval=0) - states = iter(["DOMAIN_ORDER_STATE_PROCESSING", "DOMAIN_ORDER_STATE_FAILED"]) - rec.default = lambda r: httpx.Response(200, json={"id": "o", "state": next(states)}) - order = await aclient.wait_for_domain_order("o", interval=0) - assert order.state == m.DomainOrderState.FAILED - - async def never(o: m.DomainOrder) -> bool: - return False - - rec.default = lambda r: httpx.Response(200, json={"state": "DOMAIN_ORDER_STATE_PROCESSING"}) - with pytest.raises(WaitTimeoutError): - await aclient.wait_for_domain_order("o", never, interval=0.01, timeout=0.03) async with AsyncNodeRings("t") as c: pass assert c._http.is_closed diff --git a/tests/test_operations.py b/tests/test_operations.py index 30670fb..93e8684 100644 --- a/tests/test_operations.py +++ b/tests/test_operations.py @@ -99,7 +99,7 @@ def test_covers_every_operation() -> None: excluded = {"WebhookService", "EnforcementService"} want = {oid for oid, (_, _, op) in BY_ID.items() if (op.get("tags") or [""])[0] not in excluded} assert {oid for _, _, oid in OPERATIONS} == want - assert len(OPERATIONS) == 545 + assert len(OPERATIONS) == 485 @pytest.mark.parametrize(("service", "method", "operation_id"), OPERATIONS, ids=[o[2] for o in OPERATIONS])