diff --git a/CHANGELOG.md b/CHANGELOG.md index 1471518..b1ab8ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ 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 8571761..e283164 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 485 operations in 69 services, all typed, with a sync and an +hosts who sell on NodeRings. That is 545 operations in 75 services, all typed, with a sync and an asyncio client. ```sh @@ -141,13 +141,15 @@ 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. They raise `WaitTimeoutError` with the last state read. +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. ## Testing | Suite | What it checks | |---|---| -| `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` | 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 -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 bde2890..b71607f 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -374,6 +374,120 @@ "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": { @@ -1181,6 +1295,311 @@ }, "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": { @@ -1922,6 +2341,51 @@ ], "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": { @@ -2342,6 +2806,17 @@ "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": [ @@ -2581,6 +3056,71 @@ }, "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": { @@ -3016,6 +3556,41 @@ "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": { @@ -3162,6 +3737,126 @@ }, "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": { @@ -3224,6 +3919,39 @@ "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": { @@ -3994,6 +4722,49 @@ }, "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": { @@ -5465,6 +6236,23 @@ }, "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": { @@ -5643,6 +6431,9 @@ "readOnly": true, "type": "array" }, + "delegationIssue": { + "$ref": "#/components/schemas/v1DnsZoneDelegationIssue" + }, "delegationOk": { "readOnly": true, "type": "boolean" @@ -5665,6 +6456,15 @@ "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" }, @@ -5681,6 +6481,15 @@ }, "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": [ @@ -5783,3090 +6592,3105 @@ }, "type": "object" }, - "v1DownloadFileResponse": { - "properties": { - "content": { - "format": "byte", - "type": "string" - } - }, - "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" }, - "v1DownloadTicketAttachmentResponse": { + "v1DomainContact": { "properties": { - "attachmentId": { - "type": "string" - }, - "fileContent": { - "format": "byte", - "type": "string" - }, - "fileName": { + "city": { "type": "string" }, - "fileSize": { - "format": "int64", - "type": "string" + "consentPublish": { + "type": "boolean" }, - "mimeType": { + "country": { "type": "string" - } - }, - "type": "object" - }, - "v1EffectivePermissions": { - "properties": { - "permissions": { - "items": { - "$ref": "#/components/schemas/v1Permission" - }, - "type": "array" }, - "totalCount": { + "domainCount": { + "description": "Number of live domains using this contact (cannot be deleted while > 0).", "format": "int32", + "readOnly": true, "type": "integer" - } - }, - "type": "object" - }, - "v1EggVariable": { - "description": "EggVariable is one panel variable the customer can see while ordering a game.", - "properties": { - "defaultValue": { + }, + "email": { "type": "string" }, - "description": { + "emailVerified": { + "type": "boolean" + }, + "emailVerifiedAt": { + "format": "date-time", "type": "string" }, - "envVariable": { + "extensionData": { + "type": "object" + }, + "fax": { "type": "string" }, - "helpText": { - "description": "help_text explains where the customer finds the value.", + "firstName": { "type": "string" }, - "helpUrl": { - "description": "help_url is a page that shows the value, when one is known.", + "id": { + "readOnly": true, "type": "string" }, - "isRequired": { - "description": "is_required is true when the panel rules contain required.", + "isDefault": { "type": "boolean" }, - "name": { + "kind": { + "$ref": "#/components/schemas/v1DomainContactKind" + }, + "label": { "type": "string" }, - "rules": { + "lastName": { "type": "string" }, - "userEditable": { - "type": "boolean" + "organization": { + "type": "string" }, - "userViewable": { - "type": "boolean" - } - }, - "type": "object" - }, - "v1EnableAdditionalIPResponse": { - "description": "EnableAdditionalIPResponse returns the newly allocated address.", - "properties": { - "allocation": { - "$ref": "#/components/schemas/v1AdditionalIPAddress" + "organizationId": { + "readOnly": true, + "type": "string" }, - "billingMessage": { - "description": "Human-readable billing summary for the UI.", + "phone": { "type": "string" }, - "currency": { + "phoneExt": { "type": "string" }, - "monthlyUnitPrice": { - "description": "Monthly list price per additional IP (fixed billing). Empty for usage-based VMs.", + "postalCode": { "type": "string" }, - "proratedChargeAmount": { - "description": "Prorated amount charged now for the remaining VM billing period (fixed billing).", + "state": { "type": "string" }, - "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": { + "street": { "type": "string" }, - "secret": { - "description": "Base32 TOTP secret for manual entry / backup. Shown once during enrollment.", + "street2": { + "type": "string" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "vatId": { "type": "string" } }, "type": "object" }, - "v1EnvironmentVariable": { + "v1DomainContactInput": { + "description": "Writable contact fields. ASCII only in v1; the server normalizes and validates.", "properties": { - "id": { - "title": "Fields", + "city": { "type": "string" }, - "key": { + "consentPublish": { + "type": "boolean" + }, + "country": { + "description": "ISO 3166-1 alpha-2.", "type": "string" }, - "metadata": { - "title": "Metadata", + "email": { + "type": "string" + }, + "extensionData": { + "description": "TLD extension fields keyed by TLD.", "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" }, - "status": { - "$ref": "#/components/schemas/protov1Status" + "phone": { + "description": "E.164 (+31201234567) or national format with country.", + "type": "string" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "phoneExt": { + "type": "string" }, - "user": { - "title": "Relations", + "postalCode": { "type": "string" }, - "value": { + "state": { "type": "string" - } - }, - "type": "object" - }, - "v1ExchangeSSOCodeRequest": { - "properties": { - "code": { + }, + "street": { + "type": "string" + }, + "street2": { + "type": "string" + }, + "vatId": { "type": "string" } }, "type": "object" }, - "v1ExpireConnectTaxRegistrationResponse": { - "properties": { - "registration": { - "$ref": "#/components/schemas/v1ConnectTaxRegistration" - } - }, - "type": "object" + "v1DomainContactKind": { + "default": "DOMAIN_CONTACT_KIND_UNSPECIFIED", + "enum": [ + "DOMAIN_CONTACT_KIND_UNSPECIFIED", + "DOMAIN_CONTACT_KIND_INDIVIDUAL", + "DOMAIN_CONTACT_KIND_ORGANIZATION" + ], + "type": "string" }, - "v1ExportCouponCodesResponse": { + "v1DomainDnskeyRecord": { "properties": { - "count": { - "format": "int32", + "algorithm": { + "format": "int64", "type": "integer" }, - "csv": { - "description": "CSV with a header row: code,status,times_redeemed,max_redemptions,valid_until,campaign,channel.", - "type": "string" + "flags": { + "format": "int64", + "type": "integer" }, - "filename": { + "protocol": { + "format": "int64", + "type": "integer" + }, + "publicKey": { "type": "string" } }, "type": "object" }, - "v1ExportDnsZoneResponse": { + "v1DomainDnssec": { "properties": { - "zoneText": { + "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", "type": "string" + }, + "status": { + "$ref": "#/components/schemas/v1DomainDnssecStatus" } }, "type": "object" }, - "v1FirewallAction": { - "default": "FIREWALL_ACTION_UNSPECIFIED", + "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": [ - "FIREWALL_ACTION_UNSPECIFIED", - "FIREWALL_ACTION_ACCEPT", - "FIREWALL_ACTION_DROP" + "DOMAIN_DNSSEC_MODE_UNSPECIFIED", + "DOMAIN_DNSSEC_MODE_OFF", + "DOMAIN_DNSSEC_MODE_MANAGED", + "DOMAIN_DNSSEC_MODE_CUSTOM" ], "type": "string" }, - "v1FirewallAddressGroup": { + "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).", + "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" + ], + "type": "string" + }, + "v1DomainDsRecord": { "properties": { - "id": { - "readOnly": true, - "type": "string" + "algorithm": { + "format": "int64", + "type": "integer" }, - "name": { + "digest": { "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" + "digestType": { + "format": "int64", + "type": "integer" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "keyTag": { + "format": "int64", + "type": "integer" } }, "type": "object" }, - "v1FirewallAddressGroupInput": { - "description": "FirewallAddressGroupInput is the client-provided payload for create/update.\nClients must not provide id/timestamps (those are server-controlled).", + "v1DomainEvent": { "properties": { - "name": { + "actorId": { "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" + "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": { + "type": "string" + }, + "kind": { + "$ref": "#/components/schemas/v1DomainEventKind" + }, + "summary": { + "description": "Human-readable one-line summary.", + "type": "string" } }, "type": "object" }, - "v1FirewallDirection": { - "default": "FIREWALL_DIRECTION_UNSPECIFIED", + "v1DomainEventActorType": { + "default": "DOMAIN_EVENT_ACTOR_TYPE_UNSPECIFIED", "enum": [ - "FIREWALL_DIRECTION_UNSPECIFIED", - "FIREWALL_DIRECTION_INGRESS", - "FIREWALL_DIRECTION_EGRESS" + "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" ], "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" + "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" }, - "v1FirewallProtocol": { - "default": "FIREWALL_PROTOCOL_UNSPECIFIED", + "v1DomainGlueHostState": { + "default": "DOMAIN_GLUE_HOST_STATE_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" + "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" ], - "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.", + "v1DomainGlueRecord": { "properties": { - "addressGroupIds": { + "host": { + "description": "Host name under the domain, e.g. ns1.example.com.", + "type": "string" + }, + "ipv4": { "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" }, - "ips": { - "$ref": "#/components/schemas/v1FirewallRuleIPs" + "ipv6": { + "items": { + "type": "string" + }, + "type": "array" }, - "vmTags": { - "$ref": "#/components/schemas/v1FirewallRuleVMTags" + "lastError": { + "type": "string" + }, + "state": { + "$ref": "#/components/schemas/v1DomainGlueHostState" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" } }, "type": "object" }, - "v1FirewallRuleIPs": { - "description": "FirewallRuleIPs contains IP addresses in CIDR format. Can be one or more.", + "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.", "properties": { - "ips": { + "currency": { + "type": "string" + }, + "descriptions": { + "description": "Lines of this invoice that belong to the domain.", "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" }, - "destination": { - "$ref": "#/components/schemas/v1FirewallRuleDestination" + "domainOrderId": { + "type": "string" }, - "destinationPorts": { - "title": "Optional: single port or range (e.g., \"443\" or \"5000-5010\")", + "domainRenewalId": { "type": "string" }, - "direction": { - "$ref": "#/components/schemas/v1FirewallDirection" + "invoiceId": { + "type": "string" }, - "protocol": { - "$ref": "#/components/schemas/v1FirewallProtocol" + "invoiceNumber": { + "type": "string" + }, + "issuedAt": { + "format": "date-time", + "type": "string" + }, + "paidAt": { + "format": "date-time", + "type": "string" }, "source": { - "$ref": "#/components/schemas/v1FirewallRuleSource" + "$ref": "#/components/schemas/v1DomainInvoiceSource" }, - "sourcePorts": { - "title": "Optional: single port or range (e.g., \"80\" or \"8000-9000\")", + "status": { + "type": "string" + }, + "subtotal": { + "description": "Invoice totals (decimal strings, tax exclusive subtotal).", + "type": "string" + }, + "taxAmount": { + "type": "string" + }, + "total": { "type": "string" } }, "type": "object" }, - "v1FirewallRulePosition": { - "default": "FIREWALL_RULE_POSITION_UNSPECIFIED", + "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": [ - "FIREWALL_RULE_POSITION_UNSPECIFIED", - "FIREWALL_RULE_POSITION_BEFORE", - "FIREWALL_RULE_POSITION_AFTER" + "DOMAIN_INVOICE_SOURCE_UNSPECIFIED", + "DOMAIN_INVOICE_SOURCE_ORDER", + "DOMAIN_INVOICE_SOURCE_AUTO_RENEWAL" ], - "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" }, - "v1FirewallRuleResource": { - "description": "FirewallRuleResource is a first-class rule resource that belongs to a FirewallRuleSet.", + "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.", + "enum": [ + "DOMAIN_OPERATION_UNSPECIFIED", + "DOMAIN_OPERATION_REGISTER", + "DOMAIN_OPERATION_TRANSFER", + "DOMAIN_OPERATION_UPDATE" + ], + "type": "string" + }, + "v1DomainOrder": { "properties": { - "id": { - "readOnly": true, + "completedAt": { + "format": "date-time", "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" + "currency": { + "type": "string" }, - "rule": { - "$ref": "#/components/schemas/v1FirewallRuleInput" + "failureCode": { + "type": "string" }, - "rulesetId": { + "failureMessage": { + "type": "string" + }, + "id": { "readOnly": true, "type": "string" }, - "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" + "idempotencyKey": { + "type": "string" }, - "attachedVmHostnames": { - "description": "Hostnames of virtual machines attached to this ruleset (sorted).", + "invoiceId": { + "type": "string" + }, + "items": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1DomainOrderItem" }, - "readOnly": true, "type": "array" }, - "id": { + "mitConsent": { + "type": "boolean" + }, + "organizationId": { "readOnly": true, "type": "string" }, - "name": { + "paymentMethodId": { "type": "string" }, - "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": { + "quoteExpiresAt": { + "format": "date-time", "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" }, - "ips": { - "$ref": "#/components/schemas/v1FirewallRuleIPs" + "state": { + "$ref": "#/components/schemas/v1DomainOrderState" }, - "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": { + "subtotal": { "type": "string" }, - "turnstileToken": { - "description": "Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).", + "taxAmount": { "type": "string" - } - }, - "type": "object" - }, - "v1FunctionCall": { - "properties": { - "arguments": { - "title": "Function arguments as JSON string", + }, + "termsAcceptedAt": { + "format": "date-time", "type": "string" }, - "id": { - "title": "Unique ID for this function call", + "termsVersion": { + "description": "Current terms version the customer must accept at checkout.", "type": "string" }, - "name": { - "title": "Function name (e.g., \"list_providers\", \"list_available_regions\")", + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "total": { "type": "string" } }, "type": "object" }, - "v1FunctionResult": { + "v1DomainOrderItem": { "properties": { - "content": { - "title": "Result content as JSON string", - "type": "string" + "autoRenew": { + "type": "boolean" }, - "functionCallId": { - "title": "ID of the function call this result corresponds to", - "type": "string" + "availability": { + "$ref": "#/components/schemas/v1DomainAvailability" }, - "isError": { - "title": "Whether this is an error result", - "type": "boolean" - } - }, - "type": "object" - }, - "v1GameServer": { - "properties": { - "allocationAlias": { + "contactId": { "type": "string" }, - "allocationIp": { + "currency": { "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.", - "format": "int32", - "type": "integer" + "dnssec": { + "type": "boolean" }, - "allocationPort": { - "format": "int32", - "type": "integer" + "dnssecAllowed": { + "type": "boolean" }, - "backupLimit": { - "description": "backup_limit is how many backups this plan allows. From 1 to 99.", - "format": "int32", - "type": "integer" + "dnssecPublished": { + "description": "DNSSEC keys were sent to the registry with the registration.", + "type": "boolean" }, - "databaseLimit": { - "description": "database_limit is how many databases this plan allows. From 1 to 99.", - "format": "int32", - "type": "integer" + "domainName": { + "type": "string" }, - "gameName": { + "extensionData": { + "type": "object" + }, + "failureCode": { "type": "string" }, - "icon": { + "failureMessage": { + "description": "Product copy (\"What failed. Next step.\").", "type": "string" }, + "hasAuthCode": { + "description": "An auth code is stored (never returned).", + "type": "boolean" + }, "id": { + "readOnly": true, "type": "string" }, - "lastError": { - "type": "string" + "importNameserversFromRegistry": { + "type": "boolean" }, - "name": { - "type": "string" + "kind": { + "$ref": "#/components/schemas/v1DomainOrderItemKind" }, - "nodeId": { + "lineTotal": { + "description": "sell_price + privacy_price + tax_amount.", "type": "string" }, - "organizationId": { - "type": "string" + "maxYears": { + "format": "int32", + "type": "integer" }, - "panelIdentifier": { - "type": "string" + "minYears": { + "format": "int32", + "type": "integer" }, - "phase": { - "$ref": "#/components/schemas/v1GameServerPhase" + "nameservers": { + "items": { + "type": "string" + }, + "type": "array" }, - "planBillingType": { - "description": "BILLING_TYPE_SUBSCRIPTION is fixed price. The delete dialog uses this for the no-refund warning.", - "type": "string" + "nsMode": { + "$ref": "#/components/schemas/v1DomainNsMode" }, - "planCode": { - "type": "string" + "privacyAllowed": { + "type": "boolean" }, - "planId": { + "privacyPrice": { + "description": "WHOIS privacy add-on for the term (0 when not selected).", "type": "string" }, - "powerState": { + "registeredDomainId": { "type": "string" }, - "providerName": { + "renewalPrice": { + "description": "Price of one renewal year after this term.", "type": "string" }, - "regionCity": { - "type": "string" + "requiresExtensionData": { + "type": "boolean" }, - "regionCountry": { + "sellPrice": { + "description": "Price of the operation for the chosen years.", "type": "string" }, - "regionId": { - "type": "string" + "stage": { + "$ref": "#/components/schemas/v1DomainOrderItemStage" }, - "templateId": { - "type": "string" + "starterRecords": { + "items": { + "$ref": "#/components/schemas/v1DomainStarterRecord" + }, + "type": "array" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "state": { + "$ref": "#/components/schemas/v1DomainOrderItemState" }, - "variant": { + "taxAmount": { "type": "string" }, - "versionValue": { - "type": "string" - } - }, - "type": "object" - }, - "v1GameServerAllocation": { - "properties": { - "alias": { + "tld": { "type": "string" }, - "id": { - "format": "int32", - "type": "integer" - }, - "ip": { + "unavailableReason": { "type": "string" }, - "isDefault": { + "whoisPrivacy": { "type": "boolean" }, - "notes": { - "type": "string" - }, - "port": { + "years": { "format": "int32", "type": "integer" + }, + "zoneCreated": { + "description": "A NodeRings zone was created for this item.", + "type": "boolean" } }, "type": "object" }, - "v1GameServerBackup": { + "v1DomainOrderItemInput": { "properties": { - "bytes": { - "format": "int64", + "authCode": { + "description": "Transfer auth code (transfer_in only). Encrypted at rest, never returned.", "type": "string" }, - "completedAt": { + "autoRenew": { + "type": "boolean" + }, + "contactId": { + "description": "Registrant contact; defaults to the order contact.", "type": "string" }, - "isLocked": { + "dnssec": { "type": "boolean" }, - "isSuccessful": { + "domainName": { + "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" }, - "name": { - "type": "string" + "kind": { + "$ref": "#/components/schemas/v1DomainOrderItemKind" }, - "uuid": { - "type": "string" + "nameservers": { + "items": { + "type": "string" + }, + "type": "array" + }, + "nsMode": { + "$ref": "#/components/schemas/v1DomainNsMode" + }, + "starterRecords": { + "items": { + "$ref": "#/components/schemas/v1DomainStarterRecord" + }, + "type": "array" + }, + "whoisPrivacy": { + "type": "boolean" + }, + "years": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GameServerDatabase": { + "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.", "properties": { - "connectionsFrom": { + "authCode": { "type": "string" }, - "host": { - "type": "string" + "autoRenew": { + "type": "boolean" }, - "id": { + "contactId": { "type": "string" }, - "jdbc": { - "type": "string" + "dnssec": { + "type": "boolean" }, - "name": { - "type": "string" + "extensionData": { + "type": "object" }, - "password": { + "itemId": { "type": "string" }, - "port": { + "nameservers": { + "items": { + "type": "string" + }, + "type": "array" + }, + "nsMode": { + "$ref": "#/components/schemas/v1DomainNsMode" + }, + "starterRecords": { + "items": { + "$ref": "#/components/schemas/v1DomainStarterRecord" + }, + "type": "array" + }, + "whoisPrivacy": { + "type": "boolean" + }, + "years": { "format": "int32", "type": "integer" - }, - "username": { - "type": "string" } }, "type": "object" }, - "v1GameServerFile": { + "v1DomainOrderQuote": { "properties": { - "isFile": { + "billingCountryConfirmationRequired": { + "description": "Billing country matches neither card nor IP country: ask for confirmation.", "type": "boolean" }, - "mime": { + "currency": { "type": "string" }, - "name": { + "lines": { + "items": { + "$ref": "#/components/schemas/v1DomainOrderQuoteLine" + }, + "type": "array" + }, + "mitConsentRequired": { + "description": "Some item has auto-renew on: MIT consent checkbox required.", + "type": "boolean" + }, + "mitConsentText": { "type": "string" }, - "size": { - "format": "int64", + "orderId": { "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" }, - "diskBytes": { - "format": "int64", + "quoteExpiresAt": { + "format": "date-time", "type": "string" }, - "memoryBytes": { - "format": "int64", + "state": { + "$ref": "#/components/schemas/v1DomainOrderState" + }, + "subtotal": { "type": "string" }, - "networkRxBytes": { - "format": "int64", + "taxAmount": { "type": "string" }, - "networkTxBytes": { - "format": "int64", + "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\").", "type": "string" }, - "state": { + "termsVersion": { "type": "string" }, - "uptimeMillis": { - "format": "int64", + "total": { "type": "string" } }, "type": "object" }, - "v1GameServerSchedule": { + "v1DomainOrderQuoteLine": { "properties": { - "dayOfMonth": { - "type": "string" + "available": { + "type": "boolean" }, - "dayOfWeek": { + "description": { "type": "string" }, - "hour": { + "domainName": { "type": "string" }, - "id": { + "itemId": { "type": "string" }, - "isActive": { - "type": "boolean" + "kind": { + "$ref": "#/components/schemas/v1DomainOrderItemKind" }, - "isProcessing": { + "priceChanged": { + "description": "The price changed since the cart or the last quote.", "type": "boolean" }, - "lastRunAt": { + "privacyPrice": { "type": "string" }, - "minute": { + "renewalPrice": { "type": "string" }, - "month": { + "sellPrice": { "type": "string" }, - "name": { + "subtotal": { "type": "string" }, - "nextRunAt": { + "taxAmount": { "type": "string" }, - "onlyWhenOnline": { - "type": "boolean" + "total": { + "type": "string" }, - "tasks": { - "items": { - "$ref": "#/components/schemas/v1GameServerScheduleTask" - }, - "type": "array" + "unavailableReason": { + "type": "string" + }, + "years": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GameServerScheduleTask": { + "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": { "properties": { - "action": { + "currency": { "type": "string" }, - "continueOnFailure": { - "type": "boolean" + "maxExtendYears": { + "description": "Maximum extra years that can be added now (10-year cap).", + "format": "int32", + "type": "integer" }, - "id": { + "nextAttemptAt": { + "description": "Next automatic renewal attempt (T-25 days before renew_by), if auto-renew is on.", + "format": "date-time", "type": "string" }, - "payload": { + "privacyPrice": { + "description": "Privacy add-on renewal per year (0 when off).", "type": "string" }, - "sequenceId": { - "format": "int32", - "type": "integer" + "renewalPrice": { + "description": "Price of one renewal year.", + "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" + "restorePrice": { + "description": "Restore price (shown in redemption).", + "type": "string" } }, "type": "object" }, - "v1GameServerTemplate": { + "v1DomainSearchResult": { + "description": "One row of a search or check result.", "properties": { - "catalogKey": { + "availability": { + "$ref": "#/components/schemas/v1DomainAvailability" + }, + "category": { + "$ref": "#/components/schemas/v1TldCategory" + }, + "currency": { "type": "string" }, - "confirmed": { + "dnssecAllowed": { "type": "boolean" }, - "dockerImage": { + "eligibility": { + "$ref": "#/components/schemas/v1TldEligibility" + }, + "eligibilityNote": { "type": "string" }, - "eggId": { - "format": "int32", - "type": "integer" + "eligibleCountries": { + "description": "ISO 3166-1 alpha-2 countries allowed when eligibility is RESIDENTS_ONLY.", + "items": { + "type": "string" + }, + "type": "array" }, - "hidden": { + "exactMatch": { + "description": "The exact name the customer typed.", "type": "boolean" }, - "icon": { - "type": "string" + "featured": { + "description": "Same label on a featured TLD.", + "type": "boolean" }, - "id": { + "firstYearPrice": { + "description": "First-year registration price.", "type": "string" }, - "matchStatus": { - "$ref": "#/components/schemas/v1GameServerMatchStatus" + "isPromotion": { + "description": "first_year_price is an upstream promotion.", + "type": "boolean" }, - "name": { - "type": "string" + "maxYears": { + "format": "int32", + "type": "integer" }, - "nestId": { + "minYears": { "format": "int32", "type": "integer" }, - "nestOrderingEnabled": { - "description": "Optional so a false value is still sent. Missing means the nest is offered.", + "name": { + "type": "string" + }, + "ownedByCaller": { + "description": "The caller's organization already holds this domain (signed-in callers only).", "type": "boolean" }, - "orderingEnabled": { - "description": "Optional so a false value is still sent. Missing means the egg is offered.", + "priceGapWarning": { + "description": "Renewal is much more expensive than the first year: show a warning chip.", "type": "boolean" }, - "platformId": { + "privacyAllowed": { + "type": "boolean" + }, + "privacyPrice": { + "description": "WHOIS privacy add-on per year; empty when privacy_allowed is false.", "type": "string" }, - "startup": { + "reason": { + "description": "Product copy for non-available rows (e.g. \"Premium \u2014 not available yet\").", "type": "string" }, - "suggestedEggId": { - "format": "int32", - "type": "integer" + "renewalPrice": { + "description": "Price of each renewal year.", + "type": "string" }, - "suggestedNestId": { - "format": "int32", - "type": "integer" + "requiresExtensionData": { + "description": "Extra contact data is required for this TLD (GetTldRequirements).", + "type": "boolean" }, - "versionVariable": { + "riskNote": { + "type": "string" + }, + "riskTier": { + "$ref": "#/components/schemas/v1TldRiskTier" + }, + "suggestion": { + "description": "Registrar suggestion.", + "type": "boolean" + }, + "tld": { + "type": "string" + }, + "transferPrice": { "type": "string" } }, "type": "object" }, - "v1GenerateCouponCodesResponse": { + "v1DomainStarterRecord": { + "description": "Optional starter record for a new NodeRings zone (@ or www to a server).", "properties": { - "batch": { - "$ref": "#/components/schemas/v1CouponCodeBatch" + "name": { + "description": "\"@\" or \"www\".", + "type": "string" }, - "batchId": { + "type": { + "description": "A or AAAA.", "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" + "value": { + "type": "string" + }, + "virtualMachineId": { + "description": "Resolve the address from this VM instead of value.", + "type": "string" } }, "type": "object" }, - "v1GenerateInstallCommandResponse": { + "v1DomainTaxLine": { "properties": { - "command": { - "title": "Full curl/bash command that can be executed", + "amount": { "type": "string" }, - "token": { - "title": "One-time token used in the command for authentication", + "jurisdiction": { + "type": "string" + }, + "ratePercent": { + "type": "string" + }, + "reverseCharge": { + "type": "boolean" + }, + "taxType": { + "description": "vat, gst, sales_tax, ...", + "type": "string" + }, + "taxabilityReason": { "type": "string" } }, "type": "object" }, - "v1GeneratePeeringConfigResponse": { + "v1DomainTransferIn": { "properties": { - "config": { - "type": "string" - } - }, - "type": "object" - }, - "v1GenerateServiceAccountTokenResponse": { - "properties": { - "createdAt": { - "format": "date-time", + "failureReason": { "type": "string" }, - "expiresAt": { - "format": "date-time", + "orderId": { "type": "string" }, - "token": { + "orderItemId": { "type": "string" }, - "tokenId": { + "startedAt": { + "format": "date-time", "type": "string" }, - "warning": { - "type": "string" + "state": { + "$ref": "#/components/schemas/v1DomainTransferInState" } }, "type": "object" }, - "v1GetActiveSessionsResponse": { - "properties": { - "sessions": { - "items": { - "$ref": "#/components/schemas/v1SessionInfo" - }, - "type": "array" - } - }, - "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" }, - "v1GetAddonResponse": { + "v1DomainTransferOut": { "properties": { - "addon": { - "$ref": "#/components/schemas/v1Addon" + "completesAt": { + "format": "date-time", + "type": "string" }, - "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", + "gainingRegistrar": { "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" + "state": { + "$ref": "#/components/schemas/v1DomainTransferOutState" } }, "type": "object" }, - "v1GetBackupResponse": { - "properties": { - "backup": { - "$ref": "#/components/schemas/v1Backup" - } - }, - "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" }, - "v1GetClientDashboardBillingResponse": { + "v1DomainVerification": { "properties": { - "currency": { + "deadline": { + "description": "Domain is suspended if not verified by then.", + "format": "date-time", "type": "string" }, - "spendDays": { - "description": "Daily categorized spend, oldest first (fixed window ending today, UTC).", - "items": { - "$ref": "#/components/schemas/v1ClientDashboardSpendBucket" - }, - "type": "array" + "email": { + "type": "string" }, - "spendHours": { - "description": "Hourly categorized spend for the last 24 hours, oldest first.", - "items": { - "$ref": "#/components/schemas/v1ClientDashboardSpendBucket" - }, - "type": "array" + "lastSentAt": { + "format": "date-time", + "type": "string" }, - "usageRollups": { - "items": { - "$ref": "#/components/schemas/v1ClientDashboardUsageRollup" - }, - "type": "array" + "status": { + "$ref": "#/components/schemas/v1DomainVerificationStatus" } }, "type": "object" }, - "v1GetClientDashboardSummaryResponse": { - "description": "Client dashboard (buyer org): single read for Summary tab widgets.", + "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": { "properties": { - "spendingWindows": { - "items": { - "$ref": "#/components/schemas/v1ClientDashboardSpendingWindow" - }, - "type": "array" - }, - "virtualMachines": { - "$ref": "#/components/schemas/v1ClientDashboardVirtualMachinesSummary" + "content": { + "format": "byte", + "type": "string" } }, "type": "object" }, - "v1GetClientReviewForVirtualMachineResponse": { + "v1DownloadTicketAttachmentResponse": { "properties": { - "canSubmitReview": { - "type": "boolean" - }, - "hasSubmitted": { - "type": "boolean" - }, - "review": { - "$ref": "#/components/schemas/v1ClientProviderReview" + "attachmentId": { + "type": "string" }, - "reviewAvailableAt": { - "format": "date-time", + "fileContent": { + "format": "byte", "type": "string" }, - "reviewBlockedReason": { - "description": "Set when can_submit_review is false and has_submitted is false (e.g. usage-based 24h window).", + "fileName": { "type": "string" - } - }, - "type": "object" - }, - "v1GetCloudInitTemplateResponse": { - "properties": { - "cloudInitTemplate": { - "$ref": "#/components/schemas/v1CloudInitTemplate" - } - }, - "type": "object" - }, - "v1GetConnectAccountResponse": { - "properties": { - "account": { - "$ref": "#/components/schemas/v1ConnectAccount" }, - "onboardingUrl": { - "title": "URL for provider to complete setup (if required)", + "fileSize": { + "format": "int64", "type": "string" }, - "requiresOnboarding": { - "title": "Whether provider needs to complete onboarding", - "type": "boolean" - } - }, - "type": "object" - }, - "v1GetConnectTaxSettingsResponse": { - "properties": { - "settings": { - "$ref": "#/components/schemas/v1ConnectTaxSettingsDetails" + "mimeType": { + "type": "string" } }, "type": "object" }, - "v1GetConversationHistoryResponse": { + "v1EffectivePermissions": { "properties": { - "conversationId": { - "title": "Conversation ID", - "type": "string" - }, - "messages": { + "permissions": { "items": { - "$ref": "#/components/schemas/v1ChatMessage" + "$ref": "#/components/schemas/v1Permission" }, - "title": "List of messages in the conversation", "type": "array" }, - "title": { - "title": "Conversation title", - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetCouponReportResponse": { + "v1EggVariable": { + "description": "EggVariable is one panel variable the customer can see while ordering a game.", "properties": { - "consumed": { + "defaultValue": { "type": "string" }, - "couponId": { + "description": { "type": "string" }, - "expired": { + "envVariable": { "type": "string" }, - "generatedAt": { - "format": "date-time", + "helpText": { + "description": "help_text explains where the customer finds the value.", "type": "string" }, - "granted": { - "description": "Set for credit coupons. Decimal USD strings.", + "helpUrl": { + "description": "help_url is a page that shows the value, when one is known.", "type": "string" }, - "outstanding": { + "isRequired": { + "description": "is_required is true when the panel rules contain required.", + "type": "boolean" + }, + "name": { "type": "string" }, - "rows": { - "description": "One row per group and currency. Currencies are never converted or summed.", - "items": { - "$ref": "#/components/schemas/v1CouponReportRow" - }, - "type": "array" + "rules": { + "type": "string" + }, + "userEditable": { + "type": "boolean" + }, + "userViewable": { + "type": "boolean" } }, "type": "object" }, - "v1GetCreditBalanceResponse": { + "v1EnableAdditionalIPResponse": { + "description": "EnableAdditionalIPResponse returns the newly allocated address.", "properties": { - "available": { - "title": "Decimal string: balance - reserved", - "type": "string" + "allocation": { + "$ref": "#/components/schemas/v1AdditionalIPAddress" }, - "balance": { - "title": "Decimal string: settled wallet balance in USD", + "billingMessage": { + "description": "Human-readable billing summary for the UI.", "type": "string" }, "currency": { - "title": "Always \"USD\" in v1", - "type": "string" - }, - "frozen": { - "type": "boolean" - }, - "frozenReason": { - "title": "Empty when not frozen", "type": "string" }, - "promotionalAvailable": { - "description": "Unreserved promotional credit that can be applied to the next invoice.", + "monthlyUnitPrice": { + "description": "Monthly list price per additional IP (fixed billing). Empty for usage-based VMs.", "type": "string" }, - "promotionalExpiringSoon": { - "description": "Promotional credit that expires within 7 days.", + "proratedChargeAmount": { + "description": "Prorated amount charged now for the remaining VM billing period (fixed billing).", "type": "string" }, - "reserved": { - "title": "Decimal string: sum of open holds", - "type": "string" + "totalAdditionalIps": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetDashboardAssetSalesTimeseriesResponse": { - "properties": { - "assetsSoldPerDay": { - "items": { - "$ref": "#/components/schemas/v1DashboardAssetSalesDayBucket" - }, - "type": "array" - } - }, + "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" }, - "v1GetDashboardBillingSalesResponse": { + "v1EnrollMfaTotpResponse": { "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" - }, - "revenueByCustomerTotalCount": { - "description": "Rows matching email filter (for pagination).", - "format": "int32", - "type": "integer" - }, - "revenueByCustomerWindowTotal": { - "description": "Distinct customer orgs with revenue in the window (before email filter).", - "format": "int32", - "type": "integer" - }, - "totalFixedBillingSalesAmount": { - "description": "Fixed = subscription + free plan lines + all add-ons; usage = usage-rated plan lines only.", + "otpauthUrl": { "type": "string" }, - "totalUsageBillingSalesAmount": { + "secret": { + "description": "Base32 TOTP secret for manual entry / backup. Shown once during enrollment.", "type": "string" } }, "type": "object" }, - "v1GetDashboardCustomerAcquisitionTimeseriesResponse": { - "properties": { - "buckets": { - "items": { - "$ref": "#/components/schemas/v1DashboardCustomerAcquisitionDayBucket" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1GetDashboardSummaryResponse": { + "v1EnvironmentVariable": { "properties": { - "activeCustomerTotal": { - "format": "int32", - "type": "integer" + "id": { + "title": "Fields", + "type": "string" }, - "activeVmTotal": { - "format": "int32", - "type": "integer" + "key": { + "type": "string" }, - "addonBreakdown": { - "items": { - "$ref": "#/components/schemas/v1DashboardSummaryAddonBreakdown" - }, - "type": "array" + "metadata": { + "title": "Metadata", + "type": "object" }, - "byRegion": { - "items": { - "$ref": "#/components/schemas/v1DashboardSummaryRegionBreakdown" - }, - "type": "array" + "organization": { + "type": "string" }, - "nodeTotal": { - "format": "int32", - "type": "integer" + "status": { + "$ref": "#/components/schemas/protov1Status" }, - "planBreakdown": { - "items": { - "$ref": "#/components/schemas/v1DashboardSummaryPlanBreakdown" - }, - "type": "array" + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" }, - "tickets": { - "$ref": "#/components/schemas/v1DashboardSummaryTickets" - } - }, - "type": "object" - }, - "v1GetDnsZoneResponse": { - "properties": { - "zone": { - "$ref": "#/components/schemas/v1DnsZone" + "user": { + "title": "Relations", + "type": "string" + }, + "value": { + "type": "string" } }, "type": "object" }, - "v1GetDomainResponse": { + "v1ExchangeSSOCodeRequest": { "properties": { - "domain": { - "$ref": "#/components/schemas/v1Domain" + "code": { + "type": "string" } }, "type": "object" }, - "v1GetEnvironmentVariableResponse": { + "v1ExpireConnectTaxRegistrationResponse": { "properties": { - "environmentVariable": { - "$ref": "#/components/schemas/v1EnvironmentVariable" + "registration": { + "$ref": "#/components/schemas/v1ConnectTaxRegistration" } }, "type": "object" }, - "v1GetExchangeRateResponse": { + "v1ExportCouponCodesResponse": { "properties": { - "currencyCode": { - "title": "Currency code", - "type": "string" + "count": { + "format": "int32", + "type": "integer" }, - "exchangeRate": { - "title": "Exchange rate from USD to the requested currency", + "csv": { + "description": "CSV with a header row: code,status,times_redeemed,max_redemptions,valid_until,campaign,channel.", "type": "string" }, - "lastUpdated": { - "format": "int64", - "title": "Timestamp when the rate was last updated", + "filename": { "type": "string" } }, "type": "object" }, - "v1GetGroupResponse": { + "v1ExportDnsZoneResponse": { "properties": { - "group": { - "$ref": "#/components/schemas/v1Group" + "zoneText": { + "type": "string" } }, "type": "object" }, - "v1GetInvoiceResponse": { + "v1FirewallAction": { + "default": "FIREWALL_ACTION_UNSPECIFIED", + "enum": [ + "FIREWALL_ACTION_UNSPECIFIED", + "FIREWALL_ACTION_ACCEPT", + "FIREWALL_ACTION_DROP" + ], + "type": "string" + }, + "v1FirewallAddressGroup": { "properties": { - "invoice": { - "$ref": "#/components/schemas/v1Invoice" + "id": { + "readOnly": true, + "type": "string" }, - "invoiceLines": { + "name": { + "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/v1InvoiceLine" + "$ref": "#/components/schemas/v1FirewallIPPrefix" }, "type": "array" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" } }, "type": "object" }, - "v1GetManualPayoutResponse": { - "properties": { - "payout": { - "$ref": "#/components/schemas/v1ManualPayout" - } - }, - "type": "object" - }, - "v1GetMarketplacePlanResponse": { - "description": "Resolved marketplace offer for VM create prefill (authenticated clients).", + "v1FirewallAddressGroupInput": { + "description": "FirewallAddressGroupInput is the client-provided payload for create/update.\nClients must not provide id/timestamps (those are server-controlled).", "properties": { - "billingType": { - "$ref": "#/components/schemas/v1BillingType" - }, - "diskGb": { - "format": "int32", - "type": "integer" - }, - "organizationId": { - "type": "string" - }, - "organizationName": { - "type": "string" - }, - "planCode": { - "type": "string" - }, - "planId": { + "name": { "type": "string" }, - "planPrices": { - "items": { - "$ref": "#/components/schemas/v1PlanPrice" - }, - "type": "array" - }, - "planRegions": { + "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/v1PlanRegion" + "$ref": "#/components/schemas/v1FirewallIPPrefix" }, "type": "array" - }, - "providerLogoUrl": { - "type": "string" - }, - "ramGb": { - "format": "int32", - "type": "integer" - }, - "rating": { - "format": "float", - "type": "number" - }, - "regionCity": { - "type": "string" - }, - "regionCountry": { - "type": "string" - }, - "regionId": { - "type": "string" - }, - "totalReviews": { - "format": "int32", - "type": "integer" - }, - "vcpus": { - "format": "int32", - "type": "integer" } }, "type": "object" }, - "v1GetMetricResponse": { - "properties": { - "metric": { - "$ref": "#/components/schemas/v1Metric" - } - }, - "type": "object" + "v1FirewallDirection": { + "default": "FIREWALL_DIRECTION_UNSPECIFIED", + "enum": [ + "FIREWALL_DIRECTION_UNSPECIFIED", + "FIREWALL_DIRECTION_INGRESS", + "FIREWALL_DIRECTION_EGRESS" + ], + "type": "string" }, - "v1GetMfaStatusResponse": { + "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": { - "backupCodesRemaining": { - "format": "int32", - "type": "integer" - }, - "enabled": { - "type": "boolean" - }, - "factorLabel": { + "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" }, - "v1GetMyStorefrontResponse": { + "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.", "properties": { - "storefront": { - "$ref": "#/components/schemas/v1MyStorefront" + "addressGroupIds": { + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "v1GetNetworkResponse": { + "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": { - "network": { - "$ref": "#/components/schemas/v1Network" + "addressGroupIds": { + "$ref": "#/components/schemas/v1FirewallRuleAddressGroups" + }, + "ips": { + "$ref": "#/components/schemas/v1FirewallRuleIPs" + }, + "vmTags": { + "$ref": "#/components/schemas/v1FirewallRuleVMTags" } }, "type": "object" }, - "v1GetNodeCPUMapResponse": { + "v1FirewallRuleIPs": { + "description": "FirewallRuleIPs contains IP addresses in CIDR format. Can be one or more.", "properties": { - "computeType": { - "$ref": "#/components/schemas/v1NodeComputeType" - }, - "cpus": { + "ips": { "items": { - "$ref": "#/components/schemas/v1NodeCPUMapCPU" + "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" }, - "logicalCpus": { - "format": "int32", - "type": "integer" + "destination": { + "$ref": "#/components/schemas/v1FirewallRuleDestination" }, - "modelName": { + "destinationPorts": { + "title": "Optional: single port or range (e.g., \"443\" or \"5000-5010\")", "type": "string" }, - "numaNodes": { - "items": { - "$ref": "#/components/schemas/v1NodeCPUMapNUMA" - }, - "type": "array" - }, - "physicalCores": { - "format": "int32", - "type": "integer" - }, - "smtEnabled": { - "type": "boolean" + "direction": { + "$ref": "#/components/schemas/v1FirewallDirection" }, - "sockets": { - "format": "int32", - "type": "integer" + "protocol": { + "$ref": "#/components/schemas/v1FirewallProtocol" }, - "threadsPerCore": { - "format": "int32", - "type": "integer" + "source": { + "$ref": "#/components/schemas/v1FirewallRuleSource" }, - "topologyCollectedAt": { - "description": "RFC3339 time the stored topology was collected/pasted.", + "sourcePorts": { + "title": "Optional: single port or range (e.g., \"80\" or \"8000-9000\")", "type": "string" } }, "type": "object" }, - "v1GetNodeNetworkResponse": { - "properties": { - "network": { - "$ref": "#/components/schemas/v1Network" - } - }, - "type": "object" - }, - "v1GetNodePlacementPolicyResponse": { - "properties": { - "policy": { - "$ref": "#/components/schemas/v1NodePlacementPolicy" - } - }, - "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" }, - "v1GetNodeResponse": { + "v1FirewallRuleResource": { + "description": "FirewallRuleResource is a first-class rule resource that belongs to a FirewallRuleSet.", "properties": { - "node": { - "$ref": "#/components/schemas/v1Node" + "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, + "type": "integer" + }, + "rule": { + "$ref": "#/components/schemas/v1FirewallRuleInput" + }, + "rulesetId": { + "readOnly": true, + "type": "string" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" } }, "type": "object" }, - "v1GetNotificationSettingResponse": { + "v1FirewallRuleSet": { "properties": { - "notificationSetting": { - "$ref": "#/components/schemas/v1NotificationSetting" + "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": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "id": { + "readOnly": true, + "type": "string" + }, + "name": { + "type": "string" + }, + "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" }, - "v1GetNotificationTemplateResponse": { - "properties": { - "notificationTemplate": { - "$ref": "#/components/schemas/v1NotificationTemplate" - } - }, - "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" }, - "v1GetOrganizationResponse": { + "v1FirewallRuleSetInput": { "properties": { - "organization": { - "$ref": "#/components/schemas/v1Organization" + "name": { + "type": "string" } }, "type": "object" }, - "v1GetPaymentResponse": { + "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": { - "payment": { - "$ref": "#/components/schemas/v1Payment" + "addressGroupIds": { + "$ref": "#/components/schemas/v1FirewallRuleAddressGroups" }, - "refunds": { - "items": { - "$ref": "#/components/schemas/v1Refund" - }, - "title": "Refunds for this payment", - "type": "array" - } - }, - "type": "object" - }, - "v1GetPayoutConfigurationResponse": { - "properties": { - "configuration": { - "$ref": "#/components/schemas/v1PayoutConfiguration" + "ips": { + "$ref": "#/components/schemas/v1FirewallRuleIPs" + }, + "vmTags": { + "$ref": "#/components/schemas/v1FirewallRuleVMTags" } }, "type": "object" }, - "v1GetPayoutInvoiceResponse": { + "v1FirewallRuleVMTags": { + "description": "FirewallRuleVMTags contains VM tags. Can be one or more.", "properties": { - "invoices": { + "tags": { "items": { - "$ref": "#/components/schemas/v1Invoice" + "type": "string" }, - "title": "Client invoices that contributed to this payout", "type": "array" - }, - "payoutInvoice": { - "$ref": "#/components/schemas/v1PayoutInvoice" } }, "type": "object" }, - "v1GetPlanLiveValidationResponse": { + "v1ForgotPasswordRequest": { "properties": { - "validation": { - "$ref": "#/components/schemas/v1PlanLiveValidationView" + "email": { + "type": "string" + }, + "turnstileToken": { + "description": "Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).", + "type": "string" } }, "type": "object" }, - "v1GetPlatformResponse": { + "v1FunctionCall": { "properties": { - "platform": { - "$ref": "#/components/schemas/v1Platform" + "arguments": { + "title": "Function arguments as JSON string", + "type": "string" + }, + "id": { + "title": "Unique ID for this function call", + "type": "string" + }, + "name": { + "title": "Function name (e.g., \"list_providers\", \"list_available_regions\")", + "type": "string" } }, "type": "object" }, - "v1GetPrefixResponse": { + "v1FunctionResult": { "properties": { - "prefix": { - "$ref": "#/components/schemas/v1Prefix" + "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" } }, "type": "object" }, - "v1GetPrefixUtilizationResponse": { + "v1GameServer": { "properties": { - "allocatedCount": { + "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.", "format": "int32", - "title": "Active VM IP allocations", "type": "integer" }, - "availableCount": { + "allocationPort": { "format": "int32", - "title": "total_ips minus allocated_count", "type": "integer" }, - "capacityIsOpenEnded": { - "title": "true when pool size does not fit int64", - "type": "boolean" - }, - "capacityUnitLabel": { - "title": "e.g. \"addresses\", \"/64 blocks\"", - "type": "string" - }, - "reservedCount": { + "backupLimit": { + "description": "backup_limit is how many backups this plan allows. From 1 to 99.", "format": "int32", - "title": "Len(reserved list) only; informational, not added to utilization", "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.", + "databaseLimit": { + "description": "database_limit is how many databases this plan allows. From 1 to 99.", "format": "int32", "type": "integer" }, - "utilizationPercent": { - "format": "double", - "title": "allocated_count / total_ips when total_ips > 0", - "type": "number" + "gameName": { + "type": "string" }, - "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.", + "icon": { "type": "string" }, - "collectionsAmount": { - "description": "Sum of invoice totals with status uncollectible.", + "id": { "type": "string" }, - "currency": { + "lastError": { "type": "string" }, - "grossRevenueAmount": { - "description": "Same as paid_amount (gross; not net of refunds).", + "name": { "type": "string" }, - "paidAmount": { - "description": "Succeeded Stripe Connect charges for this customer, or paid invoice totals without Connect.", + "nodeId": { "type": "string" }, - "refundedAmount": { - "description": "Stripe refunded amounts on this customer's charges, or succeeded invoice refunds without Connect.", + "organizationId": { "type": "string" }, - "unpaidDueAmount": { - "description": "Sum of amount_due for open and past_due invoices.", + "panelIdentifier": { "type": "string" - } - }, - "type": "object" - }, - "v1GetProviderCustomerResponse": { - "properties": { - "customer": { - "$ref": "#/components/schemas/v1ProviderCustomerRow" - } - }, - "type": "object" - }, - "v1GetProviderCustomerStatsResponse": { - "properties": { - "activeCustomers": { - "format": "int32", - "type": "integer" }, - "inactiveCustomers": { - "format": "int32", - "type": "integer" + "phase": { + "$ref": "#/components/schemas/v1GameServerPhase" }, - "totalActiveVms": { - "format": "int32", - "type": "integer" + "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" + }, + "providerName": { + "type": "string" + }, + "regionCity": { + "type": "string" + }, + "regionCountry": { + "type": "string" + }, + "regionId": { + "type": "string" + }, + "templateId": { + "type": "string" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "variant": { + "type": "string" + }, + "versionValue": { + "type": "string" } }, "type": "object" }, - "v1GetProviderOnboardingChecklistResponse": { + "v1GameServerAllocation": { "properties": { - "completedCount": { + "alias": { + "type": "string" + }, + "id": { "format": "int32", "type": "integer" }, - "nextStep": { - "$ref": "#/components/schemas/v1ProviderOnboardingStepCode" + "ip": { + "type": "string" }, - "onboarded": { - "description": "True when the org has completed every step at least once (persisted latch).", + "isDefault": { "type": "boolean" }, - "progressMessage": { - "description": "Short copy for the wizard banner (\"You created a region. Next: create a platform.\").", + "notes": { "type": "string" }, - "steps": { - "description": "Ordered checklist; empty when onboarded is true.", - "items": { - "$ref": "#/components/schemas/v1ProviderOnboardingStep" - }, - "type": "array" - }, - "totalCount": { + "port": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1GetProviderResponse": { + "v1GameServerBackup": { "properties": { - "provider": { - "$ref": "#/components/schemas/v1ProviderDetails" + "bytes": { + "format": "int64", + "type": "string" + }, + "completedAt": { + "type": "string" + }, + "isLocked": { + "type": "boolean" + }, + "isSuccessful": { + "type": "boolean" + }, + "name": { + "type": "string" + }, + "uuid": { + "type": "string" } }, "type": "object" }, - "v1GetProviderRevenueResponse": { + "v1GameServerDatabase": { "properties": { - "completedPayoutCount": { - "format": "int32", - "title": "Number of completed payouts", - "type": "integer" + "connectionsFrom": { + "type": "string" }, - "currency": { - "title": "Currency code (ISO 4217)", + "host": { "type": "string" }, - "dataSource": { - "title": "stripe_connect or payout_invoices", + "id": { "type": "string" }, - "endDate": { - "format": "date-time", - "title": "End date used for calculation", + "jdbc": { "type": "string" }, - "failedPayoutCount": { - "format": "int32", - "title": "Number of failed payouts", - "type": "integer" + "name": { + "type": "string" }, - "failedTransactionCount": { + "password": { + "type": "string" + }, + "port": { "format": "int32", "type": "integer" }, - "hasMoreTransactions": { + "username": { + "type": "string" + } + }, + "type": "object" + }, + "v1GameServerFile": { + "properties": { + "isFile": { "type": "boolean" }, - "pendingPayoutCount": { - "format": "int32", - "title": "Number of pending/processing payouts", - "type": "integer" - }, - "settlementCurrency": { + "mime": { "type": "string" }, - "startDate": { - "format": "date-time", - "title": "Start date used for calculation", + "name": { "type": "string" }, - "stripeWarning": { - "title": "Non-fatal Stripe listing error", + "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" }, - "succeededTransactionCount": { - "format": "int32", - "type": "integer" + "diskBytes": { + "format": "int64", + "type": "string" }, - "totalNetPayouts": { - "title": "Total net payouts (payout amounts) - decimal string", + "memoryBytes": { + "format": "int64", "type": "string" }, - "totalPlatformFees": { - "title": "Total platform fees deducted - decimal string", + "networkRxBytes": { + "format": "int64", "type": "string" }, - "totalRevenue": { - "title": "Total revenue (gross: payout amount + platform fees) - decimal string", + "networkTxBytes": { + "format": "int64", "type": "string" }, - "transactions": { - "items": { - "$ref": "#/components/schemas/v1ProviderStripeTransaction" - }, - "type": "array" + "state": { + "type": "string" }, - "waterfall": { - "$ref": "#/components/schemas/v1ProviderRevenueWaterfall" - } - }, - "type": "object" - }, - "v1GetProviderTicketNotificationPolicyResponse": { - "properties": { - "policy": { - "$ref": "#/components/schemas/v1ProviderTicketNotificationPolicy" + "uptimeMillis": { + "format": "int64", + "type": "string" } }, "type": "object" }, - "v1GetPublicStorefrontResponse": { + "v1GameServerSchedule": { "properties": { - "storefront": { - "$ref": "#/components/schemas/v1PublicStorefront" + "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" + }, + "tasks": { + "items": { + "$ref": "#/components/schemas/v1GameServerScheduleTask" + }, + "type": "array" } }, "type": "object" }, - "v1GetRefundResponse": { + "v1GameServerScheduleTask": { "properties": { - "invoice": { - "$ref": "#/components/schemas/v1Invoice" + "action": { + "type": "string" }, - "payment": { - "$ref": "#/components/schemas/v1Payment" + "continueOnFailure": { + "type": "boolean" }, - "refund": { - "$ref": "#/components/schemas/v1Refund" + "id": { + "type": "string" + }, + "payload": { + "type": "string" + }, + "sequenceId": { + "format": "int32", + "type": "integer" + }, + "timeOffset": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1GetRoadmapFeatureRequestResponse": { + "v1GameServerServiceRestoreBackupBody": { "properties": { - "request": { - "$ref": "#/components/schemas/v1RoadmapFeatureRequest" + "truncate": { + "description": "Restore only. When true, the panel deletes every file before extracting the backup.", + "type": "boolean" } }, "type": "object" }, - "v1GetRoadmapStatsResponse": { + "v1GameServerTemplate": { "properties": { - "byProduct": { - "items": { - "$ref": "#/components/schemas/v1RoadmapProductStats" - }, - "type": "array" + "catalogKey": { + "type": "string" }, - "totalRequests": { + "confirmed": { + "type": "boolean" + }, + "dockerImage": { + "type": "string" + }, + "eggId": { "format": "int32", "type": "integer" }, - "totalVotes": { + "hidden": { + "type": "boolean" + }, + "icon": { + "type": "string" + }, + "id": { + "type": "string" + }, + "matchStatus": { + "$ref": "#/components/schemas/v1GameServerMatchStatus" + }, + "name": { + "type": "string" + }, + "nestId": { "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": { + "type": "string" + }, + "startup": { + "type": "string" + }, + "suggestedEggId": { + "format": "int32", + "type": "integer" + }, + "suggestedNestId": { + "format": "int32", + "type": "integer" + }, + "versionVariable": { + "type": "string" } }, "type": "object" }, - "v1GetSSHKeyResponse": { - "properties": { - "sshKey": { - "$ref": "#/components/schemas/v1SSHKey" - } - }, - "type": "object" - }, - "v1GetSecretResponse": { + "v1GenerateCouponCodesResponse": { "properties": { - "secret": { - "$ref": "#/components/schemas/v1Secret" + "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" } }, "type": "object" }, - "v1GetSmtpOutboundProviderPolicyResponse": { + "v1GenerateInstallCommandResponse": { "properties": { - "policy": { - "$ref": "#/components/schemas/v1SmtpOutboundProviderPolicy" + "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" } }, "type": "object" }, - "v1GetSnapshotResponse": { + "v1GeneratePeeringConfigResponse": { "properties": { - "snapshot": { - "$ref": "#/components/schemas/v1Snapshot" + "config": { + "type": "string" } }, "type": "object" }, - "v1GetStartupResponse": { + "v1GenerateServiceAccountTokenResponse": { "properties": { - "dockerImage": { + "createdAt": { + "format": "date-time", "type": "string" }, - "dockerImages": { - "items": { - "$ref": "#/components/schemas/v1DockerImageChoice" - }, - "type": "array" + "expiresAt": { + "format": "date-time", + "type": "string" }, - "rawStartupCommand": { + "token": { "type": "string" }, - "startupCommand": { + "tokenId": { "type": "string" }, - "variables": { - "items": { - "$ref": "#/components/schemas/v1StartupVariable" - }, - "type": "array" + "warning": { + "type": "string" } }, "type": "object" }, - "v1GetSubscriptionCouponResponse": { + "v1GetActiveSessionsResponse": { "properties": { - "coupon": { - "$ref": "#/components/schemas/v1SubscriptionCoupon" + "sessions": { + "items": { + "$ref": "#/components/schemas/v1SessionInfo" + }, + "type": "array" } }, "type": "object" }, - "v1GetSubscriptionStatusResponse": { + "v1GetAddonResponse": { "properties": { - "rules": { + "addon": { + "$ref": "#/components/schemas/v1Addon" + }, + "addonPrices": { "items": { - "$ref": "#/components/schemas/v1Rules" + "$ref": "#/components/schemas/v1AddonPrice" }, "type": "array" } }, "type": "object" }, - "v1GetTicketResponse": { + "v1GetAgentResponse": { "properties": { - "organizationDetails": { + "agent": { + "$ref": "#/components/schemas/v1Agent" + } + }, + "type": "object" + }, + "v1GetAllExchangeRatesResponse": { + "properties": { + "lastUpdated": { + "format": "int64", + "title": "Timestamp when rates were last updated", + "type": "string" + }, + "rates": { "additionalProperties": { - "$ref": "#/components/schemas/v1OrganizationDetails" + "type": "string" }, - "title": "Map of organization ID to organization name", + "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" + }, + "v1GetBackupResponse": { + "properties": { + "backup": { + "$ref": "#/components/schemas/v1Backup" + } + }, + "type": "object" + }, + "v1GetClientDashboardBillingResponse": { + "properties": { + "currency": { + "type": "string" }, - "thread": { + "spendDays": { + "description": "Daily categorized spend, oldest first (fixed window ending today, UTC).", "items": { - "$ref": "#/components/schemas/v1TicketMessage" + "$ref": "#/components/schemas/v1ClientDashboardSpendBucket" }, - "title": "All messages in chronological order (original + replies)", "type": "array" }, - "ticket": { - "$ref": "#/components/schemas/v1Ticket" + "spendHours": { + "description": "Hourly categorized spend for the last 24 hours, oldest first.", + "items": { + "$ref": "#/components/schemas/v1ClientDashboardSpendBucket" + }, + "type": "array" }, - "userDetails": { - "additionalProperties": { - "$ref": "#/components/schemas/v1UserDetails" + "usageRollups": { + "items": { + "$ref": "#/components/schemas/v1ClientDashboardUsageRollup" }, - "title": "Map of user ID to user details (first_name, last_name)", - "type": "object" + "type": "array" } }, "type": "object" }, - "v1GetUsageRecordResponse": { + "v1GetClientDashboardSummaryResponse": { + "description": "Client dashboard (buyer org): single read for Summary tab widgets.", "properties": { - "usageRecord": { - "$ref": "#/components/schemas/v1UsageRecord" + "spendingWindows": { + "items": { + "$ref": "#/components/schemas/v1ClientDashboardSpendingWindow" + }, + "type": "array" + }, + "virtualMachines": { + "$ref": "#/components/schemas/v1ClientDashboardVirtualMachinesSummary" } }, "type": "object" }, - "v1GetUsageReportResponse": { + "v1GetClientReviewForVirtualMachineResponse": { "properties": { - "aggregates": { - "items": { - "$ref": "#/components/schemas/v1UsageAggregate" - }, - "type": "array" + "canSubmitReview": { + "type": "boolean" }, - "billingPeriodEnd": { - "format": "date-time", - "type": "string" + "hasSubmitted": { + "type": "boolean" }, - "billingPeriodStart": { + "review": { + "$ref": "#/components/schemas/v1ClientProviderReview" + }, + "reviewAvailableAt": { "format": "date-time", "type": "string" }, - "totalRecords": { - "format": "int32", - "type": "integer" + "reviewBlockedReason": { + "description": "Set when can_submit_review is false and has_submitted is false (e.g. usage-based 24h window).", + "type": "string" } }, "type": "object" }, - "v1GetUserResponse": { + "v1GetCloudInitTemplateResponse": { "properties": { - "user": { - "$ref": "#/components/schemas/v1User" + "cloudInitTemplate": { + "$ref": "#/components/schemas/v1CloudInitTemplate" } }, "type": "object" }, - "v1GetVMTemplateResponse": { + "v1GetConnectAccountResponse": { "properties": { - "vmTemplate": { - "$ref": "#/components/schemas/v1VMTemplate" + "account": { + "$ref": "#/components/schemas/v1ConnectAccount" + }, + "onboardingUrl": { + "title": "URL for provider to complete setup (if required)", + "type": "string" + }, + "requiresOnboarding": { + "title": "Whether provider needs to complete onboarding", + "type": "boolean" } }, "type": "object" }, - "v1GetVNCConsoleResponse": { + "v1GetConnectTaxSettingsResponse": { "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" + "settings": { + "$ref": "#/components/schemas/v1ConnectTaxSettingsDetails" } }, "type": "object" }, - "v1Group": { + "v1GetContactSchemaResponse": { "properties": { - "description": { - "type": "string" + "countries": { + "items": { + "$ref": "#/components/schemas/v1CountryContactRules" + }, + "type": "array" }, - "groupRoles": { + "fields": { + "description": "Base contact fields.", "items": { - "type": "string" + "$ref": "#/components/schemas/v1ContactFieldSpec" }, - "title": "Relations", "type": "array" }, - "id": { - "title": "Fields", - "type": "string" + "tldRequirements": { + "items": { + "$ref": "#/components/schemas/v1ContactRequirements" + }, + "type": "array" }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "name": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "userEmails": { - "items": { - "type": "string" - }, - "type": "array" + "version": { + "description": "Rule-set version (DomainContact.validation_version).", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1HandleWebhookResponse": { + "v1GetConversationHistoryResponse": { "properties": { - "eventId": { - "title": "Webhook event ID (for idempotency tracking)", + "conversationId": { + "title": "Conversation ID", "type": "string" }, - "message": { - "title": "Optional message", - "type": "string" + "messages": { + "items": { + "$ref": "#/components/schemas/v1ChatMessage" + }, + "title": "List of messages in the conversation", + "type": "array" }, - "success": { - "title": "Success indicator", - "type": "boolean" - } - }, - "type": "object" - }, - "v1HealthCheckResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/v1ServingStatus" + "title": { + "title": "Conversation title", + "type": "string" } }, "type": "object" }, - "v1HeldPayout": { - "description": "A paid client invoice whose provider payout is waiting on a hold.", + "v1GetCouponReportResponse": { "properties": { - "currency": { + "consumed": { "type": "string" }, - "heldUntil": { - "description": "Unset for dispute holds.", - "format": "date-time", + "couponId": { "type": "string" }, - "invoiceId": { + "expired": { "type": "string" }, - "invoiceNumber": { + "generatedAt": { + "format": "date-time", "type": "string" }, - "paidAt": { - "format": "date-time", + "granted": { + "description": "Set for credit coupons. Decimal USD strings.", "type": "string" }, - "providerRevenue": { - "description": "This provider's revenue on the invoice, as a decimal string.", + "outstanding": { "type": "string" }, - "reason": { - "$ref": "#/components/schemas/v1PayoutHoldReason" + "rows": { + "description": "One row per group and currency. Currencies are never converted or summed.", + "items": { + "$ref": "#/components/schemas/v1CouponReportRow" + }, + "type": "array" } }, "type": "object" }, - "v1HighRiskCoupon": { - "description": "A high-risk coupon as seen by platform admins.", + "v1GetCreditBalanceResponse": { "properties": { - "coupon": { - "$ref": "#/components/schemas/v1Coupon" - }, - "lastRedeemedAt": { - "format": "date-time", + "available": { + "title": "Decimal string: balance - reserved", "type": "string" }, - "providerOrganizationId": { + "balance": { + "title": "Decimal string: settled wallet balance in USD", "type": "string" }, - "providerOrganizationName": { + "currency": { + "title": "Always \"USD\" in v1", "type": "string" }, - "redemptionsLast7Days": { - "description": "Applications in the last 7 days, excluding reversed ones.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1HookScript": { - "description": "HookScript is a provider-owned Python script run after a VM lifecycle event.", - "properties": { - "enabled": { + "frozen": { "type": "boolean" }, - "hook": { - "$ref": "#/components/schemas/v1LifecycleHook" - }, - "id": { + "frozenReason": { + "title": "Empty when not frozen", "type": "string" }, - "organizationId": { + "promotionalAvailable": { + "description": "Unreserved promotional credit that can be applied to the next invoice.", "type": "string" }, - "script": { + "promotionalExpiringSoon": { + "description": "Promotional credit that expires within 7 days.", "type": "string" }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "subject": { - "$ref": "#/components/schemas/v1HookSubject" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "reserved": { + "title": "Decimal string: sum of open holds", + "type": "string" } }, "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" - }, - "v1IPAllocation": { + "v1GetDashboardAssetSalesTimeseriesResponse": { "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" - }, - "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" + "assetsSoldPerDay": { + "items": { + "$ref": "#/components/schemas/v1DashboardAssetSalesDayBucket" + }, + "type": "array" } }, "type": "object" }, - "v1IPAllocationStatus": { - "default": "IP_ALLOCATION_STATUS_UNSPECIFIED", - "enum": [ - "IP_ALLOCATION_STATUS_UNSPECIFIED", - "IP_ALLOCATION_STATUS_ACTIVE", - "IP_ALLOCATION_STATUS_RELEASED" - ], - "type": "string" - }, - "v1ImportGameServerTemplateRequest": { + "v1GetDashboardBillingSalesResponse": { "properties": { - "dockerImage": { + "commercialHealth": { + "$ref": "#/components/schemas/v1DashboardBillingCommercialHealth" + }, + "currency": { "type": "string" }, - "eggId": { - "format": "int32", - "type": "integer" + "days": { + "items": { + "$ref": "#/components/schemas/v1DashboardBillingSalesDayBucket" + }, + "type": "array" }, - "icon": { - "type": "string" + "revenueByCustomer": { + "items": { + "$ref": "#/components/schemas/v1DashboardBillingCustomerRevenue" + }, + "type": "array" }, - "name": { - "type": "string" + "revenueByCustomerTotalCount": { + "description": "Rows matching email filter (for pagination).", + "format": "int32", + "type": "integer" }, - "nestId": { + "revenueByCustomerWindowTotal": { + "description": "Distinct customer orgs with revenue in the window (before email filter).", "format": "int32", "type": "integer" }, - "platformId": { + "totalFixedBillingSalesAmount": { + "description": "Fixed = subscription + free plan lines + all add-ons; usage = usage-rated plan lines only.", "type": "string" }, - "startup": { + "totalUsageBillingSalesAmount": { "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.", + "v1GetDashboardCustomerAcquisitionTimeseriesResponse": { "properties": { - "categories": { + "buckets": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1DashboardCustomerAcquisitionDayBucket" }, - "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": { - "format": "int32", - "readOnly": true, - "type": "integer" - }, - "minRamGb": { + } + }, + "type": "object" + }, + "v1GetDashboardSummaryResponse": { + "properties": { + "activeCustomerTotal": { "format": "int32", - "readOnly": true, "type": "integer" }, - "minVcpus": { - "description": "Recommended minimums (plan specifications units); not enforced at create.", + "activeVmTotal": { "format": "int32", - "readOnly": true, "type": "integer" }, - "name": { - "readOnly": true, - "type": "string" + "addonBreakdown": { + "items": { + "$ref": "#/components/schemas/v1DashboardSummaryAddonBreakdown" + }, + "type": "array" }, - "slug": { - "readOnly": true, - "type": "string" + "byRegion": { + "items": { + "$ref": "#/components/schemas/v1DashboardSummaryRegionBreakdown" + }, + "type": "array" }, - "sortOrder": { + "nodeTotal": { "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" + "planBreakdown": { + "items": { + "$ref": "#/components/schemas/v1DashboardSummaryPlanBreakdown" + }, + "type": "array" }, - "version": { - "readOnly": true, - "type": "string" + "tickets": { + "$ref": "#/components/schemas/v1DashboardSummaryTickets" } }, "type": "object" }, - "v1Invite": { + "v1GetDnsZoneResponse": { "properties": { - "expiresAt": { - "format": "date-time", - "type": "string" - }, - "group": { - "type": "string" - }, - "id": { - "title": "Fields", - "type": "string" - }, - "inviteStatus": { - "$ref": "#/components/schemas/v1InviteStatus" - }, - "inviteeEmail": { - "type": "string" - }, - "inviter": { - "title": "Relations", - "type": "string" - }, - "inviterEmail": { - "title": "Display fields", + "zone": { + "$ref": "#/components/schemas/v1DnsZone" + } + }, + "type": "object" + }, + "v1GetDomainAuthCodeResponse": { + "properties": { + "authCode": { + "description": "Sensitive: show once, never log.", "type": "string" }, - "joinedTime": { + "expiresAt": { "format": "date-time", "type": "string" - }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "organization": { + } + }, + "type": "object" + }, + "v1GetDomainResponse": { + "properties": { + "domain": { + "$ref": "#/components/schemas/v1Domain" + } + }, + "type": "object" + }, + "v1GetEnvironmentVariableResponse": { + "properties": { + "environmentVariable": { + "$ref": "#/components/schemas/v1EnvironmentVariable" + } + }, + "type": "object" + }, + "v1GetExchangeRateResponse": { + "properties": { + "currencyCode": { + "title": "Currency code", "type": "string" }, - "organizationName": { + "exchangeRate": { + "title": "Exchange rate from USD to the requested currency", "type": "string" }, - "role": { + "lastUpdated": { + "format": "int64", + "title": "Timestamp when the rate was last updated", "type": "string" + } + }, + "type": "object" + }, + "v1GetGroupResponse": { + "properties": { + "group": { + "$ref": "#/components/schemas/v1Group" + } + }, + "type": "object" + }, + "v1GetInvoiceResponse": { + "properties": { + "invoice": { + "$ref": "#/components/schemas/v1Invoice" }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "invoiceLines": { + "items": { + "$ref": "#/components/schemas/v1InvoiceLine" + }, + "type": "array" } }, "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" + "v1GetManualPayoutResponse": { + "properties": { + "payout": { + "$ref": "#/components/schemas/v1ManualPayout" + } + }, + "type": "object" }, - "v1Invoice": { + "v1GetMarketplacePlanResponse": { + "description": "Resolved marketplace offer for VM create prefill (authenticated clients).", "properties": { - "amountDue": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" + "billingType": { + "$ref": "#/components/schemas/v1BillingType" }, - "createdAt": { - "format": "date-time", - "type": "string" + "diskGb": { + "format": "int32", + "type": "integer" }, - "currency": { + "organizationId": { "type": "string" }, - "customer": { - "$ref": "#/components/schemas/v1InvoiceParty" - }, - "dueDate": { - "format": "date-time", + "organizationName": { "type": "string" }, - "id": { + "planCode": { "type": "string" }, - "invoiceNumber": { + "planId": { "type": "string" }, - "issuer": { - "$ref": "#/components/schemas/v1InvoiceParty" + "planPrices": { + "items": { + "$ref": "#/components/schemas/v1PlanPrice" + }, + "type": "array" }, - "metadata": { - "title": "Optional: custom metadata (platform fee info for providers, etc.)", - "type": "object" + "planRegions": { + "items": { + "$ref": "#/components/schemas/v1PlanRegion" + }, + "type": "array" }, - "paidAt": { - "format": "date-time", + "providerLogoUrl": { "type": "string" }, - "periodEnd": { - "format": "date-time", - "type": "string" + "ramGb": { + "format": "int32", + "type": "integer" }, - "periodStart": { - "format": "date-time", + "rating": { + "format": "float", + "type": "number" + }, + "regionCity": { "type": "string" }, - "status": { - "$ref": "#/components/schemas/v1InvoiceStatus" + "regionCountry": { + "type": "string" }, - "subscriptionId": { - "title": "Deprecated: Use subscription_ids instead. Kept", + "regionId": { "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" + "totalReviews": { + "format": "int32", + "type": "integer" }, - "transactionId": { - "type": "string" + "vcpus": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1InvoiceLine": { + "v1GetMetricResponse": { "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" + "metric": { + "$ref": "#/components/schemas/v1Metric" } }, "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.", + "v1GetMfaStatusResponse": { "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" + "backupCodesRemaining": { + "format": "int32", + "type": "integer" }, - "isPlatform": { - "title": "True when the party is the platform itself", + "enabled": { "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": { + "factorLabel": { "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": { + "v1GetMyStorefrontResponse": { "properties": { - "restoredAt": { - "format": "date-time", - "readOnly": true, - "type": "string" - }, - "restoredBy": { - "readOnly": true, - "type": "string" - }, - "snapshotName": { - "readOnly": true, - "type": "string" + "storefront": { + "$ref": "#/components/schemas/v1MyStorefront" } }, - "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": { + "v1GetNetworkResponse": { "properties": { - "createTime": { - "format": "date-time", - "type": "string" - }, - "email": { - "type": "string" - }, - "provider": { - "type": "string" + "network": { + "$ref": "#/components/schemas/v1Network" } }, "type": "object" }, - "v1ListAddonSubscriptionsResponse": { + "v1GetNodeCPUMapResponse": { "properties": { - "addonSubscriptions": { + "computeType": { + "$ref": "#/components/schemas/v1NodeComputeType" + }, + "cpus": { "items": { - "$ref": "#/components/schemas/v1AddonSubscription" + "$ref": "#/components/schemas/v1NodeCPUMapCPU" }, "type": "array" }, - "totalCount": { + "logicalCpus": { "format": "int32", "type": "integer" - } - }, - "type": "object" - }, - "v1ListAddonsResponse": { - "properties": { - "addons": { + }, + "modelName": { + "type": "string" + }, + "numaNodes": { "items": { - "$ref": "#/components/schemas/v1Addon" + "$ref": "#/components/schemas/v1NodeCPUMapNUMA" }, "type": "array" }, - "totalCount": { + "physicalCores": { "format": "int32", "type": "integer" - } - }, - "type": "object" - }, - "v1ListAgentsResponse": { - "properties": { - "agents": { - "items": { - "$ref": "#/components/schemas/v1GetAgentResponse" - }, - "type": "array" }, - "totalCount": { + "smtEnabled": { + "type": "boolean" + }, + "sockets": { "format": "int32", "type": "integer" - } - }, - "type": "object" - }, - "v1ListAllocationsResponse": { - "properties": { - "allocations": { - "items": { - "$ref": "#/components/schemas/v1IPAllocation" - }, - "type": "array" }, - "total": { + "threadsPerCore": { "format": "int32", "type": "integer" + }, + "topologyCollectedAt": { + "description": "RFC3339 time the stored topology was collected/pasted.", + "type": "string" } }, "type": "object" }, - "v1ListAssignableNodesForPlanResponse": { + "v1GetNodeNetworkResponse": { "properties": { - "nodes": { - "items": { - "$ref": "#/components/schemas/v1AssignableNodeView" - }, - "type": "array" + "network": { + "$ref": "#/components/schemas/v1Network" } }, "type": "object" }, - "v1ListAvailableAddonsResponse": { + "v1GetNodePlacementPolicyResponse": { "properties": { - "addons": { - "items": { - "$ref": "#/components/schemas/v1Addon" - }, - "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" + "policy": { + "$ref": "#/components/schemas/v1NodePlacementPolicy" } }, "type": "object" }, - "v1ListAvailableIPsResponse": { + "v1GetNodeResponse": { "properties": { - "allocatedCount": { - "format": "int32", - "title": "Number of allocated IPs", - "type": "integer" - }, - "availableCount": { - "format": "int32", - "title": "Number of available IPs", - "type": "integer" - }, - "availableIps": { - "items": { - "type": "string" - }, - "title": "List of available IP addresses", - "type": "array" - }, - "reservedCount": { - "format": "int32", - "title": "Number of reserved IPs", - "type": "integer" - }, - "totalIps": { - "format": "int32", - "title": "Total IPs in prefix", - "type": "integer" + "node": { + "$ref": "#/components/schemas/v1Node" } }, "type": "object" }, - "v1ListAvailablePlansResponse": { + "v1GetNotificationSettingResponse": { "properties": { - "plans": { - "items": { - "$ref": "#/components/schemas/v1AvailablePlanCode" - }, - "title": "List of unique plan codes with their details", - "type": "array" - }, - "totalCount": { - "format": "int32", - "title": "Total number of unique plan codes", - "type": "integer" + "notificationSetting": { + "$ref": "#/components/schemas/v1NotificationSetting" } }, "type": "object" }, - "v1ListAvailableRegionsResponse": { + "v1GetNotificationTemplateResponse": { "properties": { - "regions": { - "items": { - "$ref": "#/components/schemas/v1RegionLocation" - }, - "title": "List of unique city+country combinations", - "type": "array" - }, - "totalCount": { - "format": "int32", - "title": "Total number of unique regions", - "type": "integer" + "notificationTemplate": { + "$ref": "#/components/schemas/v1NotificationTemplate" } }, "type": "object" }, - "v1ListBackupsResponse": { + "v1GetOrganizationResponse": { "properties": { - "backups": { - "items": { - "$ref": "#/components/schemas/v1Backup" - }, - "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" + "organization": { + "$ref": "#/components/schemas/v1Organization" } }, "type": "object" }, - "v1ListClientProviderReviewAssetsResponse": { + "v1GetPaymentResponse": { "properties": { - "assets": { + "payment": { + "$ref": "#/components/schemas/v1Payment" + }, + "refunds": { "items": { - "$ref": "#/components/schemas/v1ClientProviderReviewAssetItem" + "$ref": "#/components/schemas/v1Refund" }, + "title": "Refunds for this payment", "type": "array" - }, - "reviewedAssetCount": { - "description": "Submitted reviews across all assets (not just this page).", - "format": "int32", - "type": "integer" - }, - "totalCount": { - "format": "int32", - "type": "integer" } }, "type": "object" }, - "v1ListCloudInitTemplatesResponse": { + "v1GetPayoutConfigurationResponse": { "properties": { - "cloudInitTemplates": { - "items": { - "$ref": "#/components/schemas/v1CloudInitTemplate" - }, - "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" + "configuration": { + "$ref": "#/components/schemas/v1PayoutConfiguration" } }, "type": "object" }, - "v1ListCloudInitUserDataResponse": { + "v1GetPayoutInvoiceResponse": { "properties": { - "profiles": { + "invoices": { "items": { - "$ref": "#/components/schemas/v1CloudInitUserData" + "$ref": "#/components/schemas/v1Invoice" }, + "title": "Client invoices that contributed to this payout", "type": "array" }, - "totalCount": { - "format": "int32", - "type": "integer" + "payoutInvoice": { + "$ref": "#/components/schemas/v1PayoutInvoice" } }, "type": "object" }, - "v1ListConnectTaxRegistrationsResponse": { + "v1GetPlanLiveValidationResponse": { "properties": { - "registrations": { - "items": { - "$ref": "#/components/schemas/v1ConnectTaxRegistration" - }, - "type": "array" + "validation": { + "$ref": "#/components/schemas/v1PlanLiveValidationView" } }, "type": "object" }, - "v1ListConversationsResponse": { + "v1GetPlatformResponse": { "properties": { - "conversations": { - "items": { - "$ref": "#/components/schemas/v1ConversationInfo" - }, - "title": "List of conversations with IDs and titles", - "type": "array" - }, - "totalCount": { - "format": "int32", - "title": "Total number of conversations", - "type": "integer" + "platform": { + "$ref": "#/components/schemas/v1Platform" } }, "type": "object" }, - "v1ListCountriesCitiesResponse": { + "v1GetPrefixResponse": { "properties": { - "countries": { - "items": { - "$ref": "#/components/schemas/v1Country" - }, - "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" + "prefix": { + "$ref": "#/components/schemas/v1Prefix" } }, "type": "object" }, - "v1ListCouponCodeBatchesResponse": { + "v1GetPrefixUtilizationResponse": { "properties": { - "batches": { - "items": { - "$ref": "#/components/schemas/v1CouponCodeBatch" - }, - "type": "array" + "allocatedCount": { + "format": "int32", + "title": "Active VM IP allocations", + "type": "integer" }, - "page": { + "availableCount": { "format": "int32", + "title": "total_ips minus allocated_count", "type": "integer" }, - "pageSize": { + "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" + }, + "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" }, - "totalCount": { + "utilizationPercent": { + "format": "double", + "title": "allocated_count / total_ips when total_ips > 0", + "type": "number" + }, + "vmAssignmentPrefixLength": { "format": "int32", + "title": "IPv6 assignment length when applicable", "type": "integer" } }, "type": "object" }, - "v1ListCouponCodesResponse": { + "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": { - "codes": { - "items": { - "$ref": "#/components/schemas/v1CouponCode" - }, - "type": "array" + "cancelledAmount": { + "description": "Sum of invoice totals with status void.", + "type": "string" }, - "page": { + "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" + }, + "unpaidDueAmount": { + "description": "Sum of amount_due for open and past_due invoices.", + "type": "string" + } + }, + "type": "object" + }, + "v1GetProviderCustomerResponse": { + "properties": { + "customer": { + "$ref": "#/components/schemas/v1ProviderCustomerRow" + } + }, + "type": "object" + }, + "v1GetProviderCustomerStatsResponse": { + "properties": { + "activeCustomers": { "format": "int32", "type": "integer" }, - "pageSize": { + "inactiveCustomers": { "format": "int32", "type": "integer" }, - "totalCount": { + "totalActiveVms": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1ListCouponRedemptionsResponse": { + "v1GetProviderOnboardingChecklistResponse": { "properties": { - "page": { + "completedCount": { "format": "int32", "type": "integer" }, - "pageSize": { - "format": "int32", - "type": "integer" + "nextStep": { + "$ref": "#/components/schemas/v1ProviderOnboardingStepCode" }, - "redemptions": { + "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.", "items": { - "$ref": "#/components/schemas/v1CouponRedemption" + "$ref": "#/components/schemas/v1ProviderOnboardingStep" }, "type": "array" }, @@ -8877,950 +9701,1033 @@ }, "type": "object" }, - "v1ListCouponsResponse": { + "v1GetProviderResponse": { "properties": { - "coupons": { - "items": { - "$ref": "#/components/schemas/v1Coupon" - }, - "type": "array" - }, - "page": { - "format": "int32", - "type": "integer" - }, - "pageSize": { - "format": "int32", - "type": "integer" - }, - "totalCount": { - "format": "int32", - "type": "integer" + "provider": { + "$ref": "#/components/schemas/v1ProviderDetails" } }, "type": "object" }, - "v1ListCreditLedgerEntriesResponse": { + "v1GetProviderRevenueResponse": { "properties": { - "entries": { - "items": { - "$ref": "#/components/schemas/v1CreditLedgerEntryProto" - }, - "type": "array" - }, - "page": { + "completedPayoutCount": { "format": "int32", + "title": "Number of completed payouts", "type": "integer" }, - "pageSize": { + "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" + }, + "failedPayoutCount": { "format": "int32", + "title": "Number of failed payouts", "type": "integer" }, - "totalCount": { + "failedTransactionCount": { "format": "int32", "type": "integer" - } - }, - "type": "object" - }, - "v1ListDashboardAddonCatalogStatsResponse": { - "properties": { - "addonCatalog": { - "items": { - "$ref": "#/components/schemas/v1ProviderDashboardAddonCatalogRow" - }, - "type": "array" }, - "addonCatalogFilteredTotal": { + "hasMoreTransactions": { + "type": "boolean" + }, + "pendingPayoutCount": { "format": "int32", + "title": "Number of pending/processing payouts", "type": "integer" }, - "kpiActiveAddonSubscriptionsSum": { + "settlementCurrency": { + "type": "string" + }, + "startDate": { + "format": "date-time", + "title": "Start date used for calculation", + "type": "string" + }, + "stripeWarning": { + "title": "Non-fatal Stripe listing error", + "type": "string" + }, + "succeededTransactionCount": { "format": "int32", "type": "integer" + }, + "totalNetPayouts": { + "title": "Total net payouts (payout amounts) - decimal string", + "type": "string" + }, + "totalPlatformFees": { + "title": "Total platform fees deducted - decimal string", + "type": "string" + }, + "totalRevenue": { + "title": "Total revenue (gross: payout amount + platform fees) - decimal string", + "type": "string" + }, + "transactions": { + "items": { + "$ref": "#/components/schemas/v1ProviderStripeTransaction" + }, + "type": "array" + }, + "waterfall": { + "$ref": "#/components/schemas/v1ProviderRevenueWaterfall" } }, "type": "object" }, - "v1ListDashboardInfrastructureResponse": { + "v1GetProviderTicketNotificationPolicyResponse": { "properties": { - "byNode": { - "items": { - "$ref": "#/components/schemas/v1ProviderDashboardNodeRollup" - }, - "type": "array" - }, - "nodeTotalCount": { - "format": "int32", - "type": "integer" + "policy": { + "$ref": "#/components/schemas/v1ProviderTicketNotificationPolicy" } }, "type": "object" }, - "v1ListDashboardIpamAssignmentsResponse": { + "v1GetPublicPlatformStatsResponse": { "properties": { - "assignments": { - "items": { - "$ref": "#/components/schemas/v1DashboardIpamAssignmentRow" - }, - "type": "array" + "collectedAt": { + "description": "When these counters were read from the database.", + "format": "date-time", + "type": "string" }, - "totalCount": { + "computeInstances": { + "$ref": "#/components/schemas/v1PublicProductCount" + }, + "dnsRecords": { + "description": "Records in live zones, read from PowerDNS. SOA, apex NS and DNSSEC material are not counted.", + "format": "int32", + "type": "integer" + }, + "dnsRecordsAvailable": { + "description": "False when PowerDNS could not be read; dns_records is then 0.", + "type": "boolean" + }, + "dnsZones": { + "$ref": "#/components/schemas/v1PublicProductCount" + }, + "gameServers": { + "$ref": "#/components/schemas/v1PublicProductCount" + }, + "providers": { + "description": "Storefronts published on the marketplace.", "format": "int32", "type": "integer" } }, "type": "object" }, - "v1ListDashboardIpamResponse": { + "v1GetPublicStorefrontResponse": { "properties": { - "allocatedSampleIpsHasMore": { - "type": "boolean" - }, - "networks": { - "items": { - "$ref": "#/components/schemas/v1DashboardIpamNetworkRollup" - }, - "type": "array" + "storefront": { + "$ref": "#/components/schemas/v1PublicStorefront" } }, "type": "object" }, - "v1ListDashboardPlanSubscriptionStatsResponse": { + "v1GetRefundResponse": { "properties": { - "kpiActiveSubscriptionsSum": { - "format": "int32", - "type": "integer" - }, - "kpiPlanCount": { - "format": "int32", - "type": "integer" - }, - "kpiVmAssetsSum": { - "format": "int32", - "type": "integer" + "invoice": { + "$ref": "#/components/schemas/v1Invoice" }, - "plans": { - "items": { - "$ref": "#/components/schemas/v1ProviderDashboardPlanSubscriptionStat" - }, - "type": "array" + "payment": { + "$ref": "#/components/schemas/v1Payment" }, - "plansFilteredTotal": { - "format": "int32", - "type": "integer" + "refund": { + "$ref": "#/components/schemas/v1Refund" } }, "type": "object" }, - "v1ListDashboardTicketStatisticsResponse": { + "v1GetRegistrarBalanceResponse": { "properties": { - "averageFirstResponseTimeSeconds": { - "format": "int64", + "available": { "type": "string" }, - "averageResolutionTimeSeconds": { - "format": "int64", + "balance": { "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" + "currency": { + "type": "string" }, - "slaCompliantTickets": { - "format": "int32", - "type": "integer" + "provider": { + "type": "string" }, - "slaFirstResponseBreachedTickets": { - "format": "int32", - "type": "integer" + "reserved": { + "description": "Sum of active balance reservations.", + "type": "string" }, - "slaResolutionBreachedTickets": { - "description": "Deprecated: ticket SLA is first-response only. Always 0; kept for wire compatibility.", + "runwayDays": { + "description": "Days of scheduled renewals the available balance covers.", "format": "int32", "type": "integer" }, - "ticketsCreatedPerDay": { - "items": { - "$ref": "#/components/schemas/v1DashboardTicketStatisticsDayBucket" - }, - "type": "array" - }, - "totalTickets": { - "format": "int32", - "type": "integer" + "updatedAt": { + "format": "date-time", + "type": "string" } }, "type": "object" }, - "v1ListDashboardVirtualMachinesResponse": { + "v1GetRoadmapFeatureRequestResponse": { "properties": { - "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" + "request": { + "$ref": "#/components/schemas/v1RoadmapFeatureRequest" } }, "type": "object" }, - "v1ListDatabasesResponse": { + "v1GetRoadmapStatsResponse": { "properties": { - "databases": { + "byProduct": { "items": { - "$ref": "#/components/schemas/v1GameServerDatabase" + "$ref": "#/components/schemas/v1RoadmapProductStats" }, "type": "array" + }, + "totalRequests": { + "format": "int32", + "type": "integer" + }, + "totalVotes": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1ListDatacentersResponse": { + "v1GetSSHKeyResponse": { "properties": { - "datacenters": { - "items": { - "$ref": "#/components/schemas/v1DatacenterInfo" - }, - "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" + "sshKey": { + "$ref": "#/components/schemas/v1SSHKey" } }, "type": "object" }, - "v1ListDistrosResponse": { - "description": "ListDistrosResponse is the guest OS catalog.", + "v1GetSecretResponse": { "properties": { - "distros": { - "items": { - "$ref": "#/components/schemas/v1DistroCatalogEntry" - }, - "type": "array" + "secret": { + "$ref": "#/components/schemas/v1Secret" } }, "type": "object" }, - "v1ListDnsGeoLocationsResponse": { + "v1GetSmtpOutboundProviderPolicyResponse": { "properties": { - "locations": { - "items": { - "$ref": "#/components/schemas/v1DnsGeoLocation" - }, - "type": "array" + "policy": { + "$ref": "#/components/schemas/v1SmtpOutboundProviderPolicy" } }, "type": "object" }, - "v1ListDnsGeoRecordsResponse": { + "v1GetSnapshotResponse": { "properties": { - "records": { - "items": { - "$ref": "#/components/schemas/v1DnsGeoRecord" - }, - "type": "array" + "snapshot": { + "$ref": "#/components/schemas/v1Snapshot" } }, "type": "object" }, - "v1ListDnsRecordsResponse": { + "v1GetStartupResponse": { "properties": { - "page": { - "format": "int32", - "type": "integer" - }, - "pageSize": { - "format": "int32", - "type": "integer" - }, - "records": { - "items": { - "$ref": "#/components/schemas/v1DnsRecord" - }, - "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" + "dockerImage": { + "type": "string" }, - "types": { + "dockerImages": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1DockerImageChoice" }, "type": "array" - } - }, - "type": "object" - }, - "v1ListDnsZonesResponse": { - "properties": { - "page": { - "format": "int32", - "type": "integer" }, - "pageSize": { - "format": "int32", - "type": "integer" + "rawStartupCommand": { + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "startupCommand": { + "type": "string" }, - "zones": { + "variables": { "items": { - "$ref": "#/components/schemas/v1DnsZone" + "$ref": "#/components/schemas/v1StartupVariable" }, "type": "array" } }, "type": "object" }, - "v1ListEffectivePermissionsResponse": { + "v1GetSubscriptionCouponResponse": { "properties": { - "effectivePermissions": { - "additionalProperties": { - "$ref": "#/components/schemas/v1EffectivePermissions" - }, - "type": "object" - }, - "totalCount": { - "format": "int32", - "type": "integer" + "coupon": { + "$ref": "#/components/schemas/v1SubscriptionCoupon" } }, "type": "object" }, - "v1ListEligibleNodesForPlanResponse": { + "v1GetSubscriptionStatusResponse": { "properties": { - "nodes": { + "rules": { "items": { - "$ref": "#/components/schemas/v1PlanLiveValidationNodeView" + "$ref": "#/components/schemas/v1Rules" }, "type": "array" } }, "type": "object" }, - "v1ListEnvironmentVariablesResponse": { + "v1GetTicketResponse": { "properties": { - "environmentVariables": { - "items": { - "$ref": "#/components/schemas/v1EnvironmentVariable" + "organizationDetails": { + "additionalProperties": { + "$ref": "#/components/schemas/v1OrganizationDetails" }, - "type": "array" + "title": "Map of organization ID to organization name", + "type": "object" }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListFilesResponse": { - "properties": { - "files": { + "thread": { "items": { - "$ref": "#/components/schemas/v1GameServerFile" + "$ref": "#/components/schemas/v1TicketMessage" }, + "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" }, - "v1ListFirewallAddressGroupsResponse": { + "v1GetTldRequirementsResponse": { "properties": { - "groups": { - "items": { - "$ref": "#/components/schemas/v1FirewallAddressGroup" - }, - "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" + "requirements": { + "$ref": "#/components/schemas/v1ContactRequirements" } }, "type": "object" }, - "v1ListFirewallRuleSetsResponse": { + "v1GetUsageRecordResponse": { "properties": { - "rulesets": { - "items": { - "$ref": "#/components/schemas/v1FirewallRuleSet" - }, - "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" + "usageRecord": { + "$ref": "#/components/schemas/v1UsageRecord" } }, "type": "object" }, - "v1ListFirewallRulesResponse": { + "v1GetUsageReportResponse": { "properties": { - "rules": { + "aggregates": { "items": { - "$ref": "#/components/schemas/v1FirewallRuleResource" + "$ref": "#/components/schemas/v1UsageAggregate" }, "type": "array" }, - "totalCount": { + "billingPeriodEnd": { + "format": "date-time", + "type": "string" + }, + "billingPeriodStart": { + "format": "date-time", + "type": "string" + }, + "totalRecords": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1ListGameServerAllocationsResponse": { + "v1GetUserResponse": { "properties": { - "allocations": { - "items": { - "$ref": "#/components/schemas/v1GameServerAllocation" - }, - "type": "array" + "user": { + "$ref": "#/components/schemas/v1User" } }, "type": "object" }, - "v1ListGameServerBackupsResponse": { + "v1GetVMTemplateResponse": { "properties": { - "backups": { - "items": { - "$ref": "#/components/schemas/v1GameServerBackup" - }, - "type": "array" + "vmTemplate": { + "$ref": "#/components/schemas/v1VMTemplate" } }, "type": "object" }, - "v1ListGameServerTemplatesResponse": { + "v1GetVNCConsoleResponse": { "properties": { - "templates": { - "items": { - "$ref": "#/components/schemas/v1GameServerTemplate" - }, - "type": "array" + "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" } }, "type": "object" }, - "v1ListGameServersResponse": { + "v1Group": { "properties": { - "gameServers": { + "description": { + "type": "string" + }, + "groupRoles": { "items": { - "$ref": "#/components/schemas/v1GameServer" - }, - "type": "array" - } - }, - "type": "object" - }, - "v1ListGroupsResponse": { - "properties": { - "groups": { - "items": { - "$ref": "#/components/schemas/v1Group" - }, - "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListHeldPayoutsResponse": { - "properties": { - "heldPayouts": { - "items": { - "$ref": "#/components/schemas/v1HeldPayout" + "type": "string" }, + "title": "Relations", "type": "array" }, - "page": { - "format": "int32", - "type": "integer" + "id": { + "title": "Fields", + "type": "string" }, - "pageSize": { - "format": "int32", - "type": "integer" + "metadata": { + "title": "Metadata", + "type": "object" }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListHighRiskCouponsResponse": { - "properties": { - "coupons": { - "items": { - "$ref": "#/components/schemas/v1HighRiskCoupon" - }, - "type": "array" + "name": { + "type": "string" }, - "page": { - "format": "int32", - "type": "integer" + "status": { + "$ref": "#/components/schemas/protov1Status" }, - "pageSize": { - "format": "int32", - "type": "integer" + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" }, - "totalCount": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1ListHookScriptsResponse": { - "properties": { - "hookScripts": { + "userEmails": { "items": { - "$ref": "#/components/schemas/v1HookScript" + "type": "string" }, "type": "array" - }, - "page": { - "format": "int32", - "type": "integer" - }, - "pageSize": { - "format": "int32", - "type": "integer" - }, - "totalCount": { - "format": "int32", - "type": "integer" } }, "type": "object" }, - "v1ListInstantAppsResponse": { + "v1HandleWebhookResponse": { "properties": { - "instantApps": { - "items": { - "$ref": "#/components/schemas/v1InstantApp" - }, - "type": "array" + "eventId": { + "title": "Webhook event ID (for idempotency tracking)", + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "message": { + "title": "Optional message", + "type": "string" + }, + "success": { + "title": "Success indicator", + "type": "boolean" } }, "type": "object" }, - "v1ListInternalCommentsResponse": { + "v1HealthCheckResponse": { "properties": { - "comments": { - "items": { - "$ref": "#/components/schemas/v1TicketInternalComment" - }, - "type": "array" + "status": { + "$ref": "#/components/schemas/v1ServingStatus" } }, "type": "object" }, - "v1ListInvitesResponse": { + "v1HeldPayout": { + "description": "A paid client invoice whose provider payout is waiting on a hold.", "properties": { - "invites": { - "items": { - "$ref": "#/components/schemas/v1Invite" - }, - "type": "array" + "currency": { + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "heldUntil": { + "description": "Unset for dispute holds.", + "format": "date-time", + "type": "string" + }, + "invoiceId": { + "type": "string" + }, + "invoiceNumber": { + "type": "string" + }, + "paidAt": { + "format": "date-time", + "type": "string" + }, + "providerRevenue": { + "description": "This provider's revenue on the invoice, as a decimal string.", + "type": "string" + }, + "reason": { + "$ref": "#/components/schemas/v1PayoutHoldReason" } }, "type": "object" }, - "v1ListInvoicesResponse": { + "v1HighRiskCoupon": { + "description": "A high-risk coupon as seen by platform admins.", "properties": { - "invoices": { - "items": { - "$ref": "#/components/schemas/v1Invoice" - }, - "type": "array" + "coupon": { + "$ref": "#/components/schemas/v1Coupon" }, - "page": { - "format": "int32", - "type": "integer" + "lastRedeemedAt": { + "format": "date-time", + "type": "string" }, - "pageSize": { - "format": "int32", - "type": "integer" + "providerOrganizationId": { + "type": "string" }, - "totalCount": { + "providerOrganizationName": { + "type": "string" + }, + "redemptionsLast7Days": { + "description": "Applications in the last 7 days, excluding reversed ones.", "format": "int32", "type": "integer" } }, "type": "object" }, - "v1ListLinkedIdentitiesResponse": { + "v1HookScript": { + "description": "HookScript is a provider-owned Python script run after a VM lifecycle event.", "properties": { - "hasPassword": { - "description": "True when the user has a local password (can unlink their last SSO identity).", + "enabled": { "type": "boolean" }, - "identities": { - "items": { - "$ref": "#/components/schemas/v1LinkedIdentity" - }, - "type": "array" + "hook": { + "$ref": "#/components/schemas/v1LifecycleHook" }, - "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": { - "format": "int32", - "type": "integer" + "id": { + "type": "string" }, - "pageSize": { - "format": "int32", - "type": "integer" + "organizationId": { + "type": "string" }, - "providers": { - "items": { - "$ref": "#/components/schemas/v1ProviderInfo" - }, - "type": "array" + "script": { + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "subject": { + "$ref": "#/components/schemas/v1HookSubject" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" } }, "type": "object" }, - "v1ListMetricsResponse": { + "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" + }, + "v1IPAllocation": { "properties": { - "metrics": { - "items": { - "$ref": "#/components/schemas/v1Metric" - }, - "type": "array" + "allocatedCidr": { + "title": "Allocated CIDR (host or delegated block)", + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "allocationKind": { + "title": "ipv4_host, ipv6_host, ipv6_prefix", + "type": "string" + }, + "id": { + "title": "Fields", + "type": "string" + }, + "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" }, - "v1ListMetricsWriteCredentialsResponse": { + "v1IPAllocationStatus": { + "default": "IP_ALLOCATION_STATUS_UNSPECIFIED", + "enum": [ + "IP_ALLOCATION_STATUS_UNSPECIFIED", + "IP_ALLOCATION_STATUS_ACTIVE", + "IP_ALLOCATION_STATUS_RELEASED" + ], + "type": "string" + }, + "v1ImportGameServerTemplateRequest": { "properties": { - "credentials": { - "items": { - "$ref": "#/components/schemas/v1MetricsWriteCredential" - }, - "type": "array" + "dockerImage": { + "type": "string" }, - "totalCount": { + "eggId": { "format": "int32", "type": "integer" - } - }, - "type": "object" - }, - "v1ListMyInvitesResponse": { - "properties": { - "invites": { - "items": { - "$ref": "#/components/schemas/v1Invite" - }, - "type": "array" }, - "totalCount": { + "icon": { + "type": "string" + }, + "name": { + "type": "string" + }, + "nestId": { "format": "int32", "type": "integer" + }, + "platformId": { + "type": "string" + }, + "startup": { + "type": "string" } }, "type": "object" }, - "v1ListNetworkNodesResponse": { - "properties": { - "nodes": { - "items": { - "$ref": "#/components/schemas/v1Node" - }, - "title": "List of nodes assigned to this network", - "type": "array" - } - }, - "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" }, - "v1ListNetworksResponse": { + "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": { - "networks": { + "categories": { "items": { - "$ref": "#/components/schemas/v1Network" + "type": "string" }, + "readOnly": true, "type": "array" }, - "total": { + "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": { "format": "int32", + "readOnly": true, "type": "integer" - } - }, - "type": "object" - }, - "v1ListNodesResponse": { - "properties": { - "nodes": { - "items": { - "$ref": "#/components/schemas/v1NodeWithExpandedRegion" - }, - "type": "array" }, - "totalCount": { + "minRamGb": { "format": "int32", + "readOnly": true, "type": "integer" - } - }, - "type": "object" - }, - "v1ListNotificationSettingsResponse": { - "properties": { - "notificationSettings": { - "items": { - "$ref": "#/components/schemas/v1NotificationSetting" - }, - "type": "array" }, - "totalCount": { + "minVcpus": { + "description": "Recommended minimums (plan specifications units); not enforced at create.", "format": "int32", + "readOnly": true, "type": "integer" - } - }, - "type": "object" - }, - "v1ListNotificationTemplatesResponse": { - "properties": { - "notificationTemplates": { - "items": { - "$ref": "#/components/schemas/v1NotificationTemplate" - }, - "type": "array" }, - "totalCount": { + "name": { + "readOnly": true, + "type": "string" + }, + "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" }, - "v1ListOAuth2ClientsResponse": { + "v1Invite": { "properties": { - "clients": { - "items": { - "$ref": "#/components/schemas/v1OAuth2Client" - }, - "type": "array" + "expiresAt": { + "format": "date-time", + "type": "string" }, - "page": { - "format": "int32", - "type": "integer" + "group": { + "type": "string" }, - "pageSize": { - "format": "int32", - "type": "integer" + "id": { + "title": "Fields", + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "inviteStatus": { + "$ref": "#/components/schemas/v1InviteStatus" + }, + "inviteeEmail": { + "type": "string" + }, + "inviter": { + "title": "Relations", + "type": "string" + }, + "inviterEmail": { + "title": "Display fields", + "type": "string" + }, + "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" }, - "v1ListOrderGamesResponse": { - "properties": { - "games": { - "items": { - "$ref": "#/components/schemas/v1OrderGame" - }, - "type": "array" - } - }, - "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" }, - "v1ListOrganizationsResponse": { + "v1Invoice": { "properties": { - "organizations": { + "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": { - "$ref": "#/components/schemas/v1Organization" + "type": "string" }, "type": "array" }, - "totalCount": { - "format": "int32", - "type": "integer" + "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" }, - "v1ListPaymentMethodsResponse": { + "v1InvoiceLine": { "properties": { - "paymentMethods": { - "items": { - "$ref": "#/components/schemas/v1PaymentMethod" - }, - "type": "array" + "amount": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "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" }, - "v1ListPaymentsResponse": { + "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": { - "page": { - "format": "int32", - "type": "integer" + "address": { + "title": "Single-line address fallback", + "type": "string" }, - "pageSize": { - "format": "int32", - "type": "integer" + "addressLine1": { + "type": "string" }, - "payments": { - "items": { - "$ref": "#/components/schemas/v1Payment" - }, - "type": "array" + "addressLine2": { + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "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" }, - "v1ListPayoutInvoicesResponse": { + "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": { - "page": { - "format": "int32", - "type": "integer" - }, - "pageSize": { - "format": "int32", - "type": "integer" + "restoredAt": { + "format": "date-time", + "readOnly": true, + "type": "string" }, - "payoutInvoices": { - "items": { - "$ref": "#/components/schemas/v1PayoutInvoice" - }, - "type": "array" + "restoredBy": { + "readOnly": true, + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "snapshotName": { + "readOnly": true, + "type": "string" } }, + "title": "LastRestore represents the last restore operation for a snapshot", "type": "object" }, - "v1ListPermissionsResponse": { + "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": { - "permissions": { - "items": { - "$ref": "#/components/schemas/v1Permission" - }, - "type": "array" + "createTime": { + "format": "date-time", + "type": "string" }, - "totalCount": { - "format": "int32", - "type": "integer" + "email": { + "type": "string" + }, + "provider": { + "type": "string" } }, "type": "object" }, - "v1ListPlanLiveValidationBenchmarksResponse": { + "v1ListAddonSubscriptionsResponse": { "properties": { - "benchmarks": { + "addonSubscriptions": { "items": { - "$ref": "#/components/schemas/v1PlanLiveValidationBenchmarkView" + "$ref": "#/components/schemas/v1AddonSubscription" }, "type": "array" - } - }, - "type": "object" - }, - "v1ListPlanLiveValidationsResponse": { - "properties": { + }, "totalCount": { "format": "int32", "type": "integer" - }, - "validations": { - "items": { - "$ref": "#/components/schemas/v1PlanLiveValidationView" - }, - "type": "array" } }, "type": "object" }, - "v1ListPlansResponse": { + "v1ListAddonsResponse": { "properties": { - "plans": { + "addons": { "items": { - "$ref": "#/components/schemas/v1Plan" + "$ref": "#/components/schemas/v1Addon" }, "type": "array" }, @@ -9831,11 +10738,11 @@ }, "type": "object" }, - "v1ListPlatformsResponse": { + "v1ListAgentsResponse": { "properties": { - "platforms": { + "agents": { "items": { - "$ref": "#/components/schemas/v1Platform" + "$ref": "#/components/schemas/v1GetAgentResponse" }, "type": "array" }, @@ -9846,38 +10753,22 @@ }, "type": "object" }, - "v1ListPrefixesResponse": { + "v1ListAllDomainOrdersResponse": { "properties": { - "prefixes": { + "orders": { "items": { - "$ref": "#/components/schemas/v1Prefix" + "$ref": "#/components/schemas/v1AdminDomainOrder" }, "type": "array" }, - "total": { + "page": { "format": "int32", "type": "integer" - } - }, - "type": "object" - }, - "v1ListPreflightChecksResponse": { - "properties": { - "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.", + "pageSize": { "format": "int32", "type": "integer" }, - "plans": { - "items": { - "$ref": "#/components/schemas/v1PlanPreflightView" - }, - "type": "array" - }, "totalCount": { "format": "int32", "type": "integer" @@ -9885,11 +10776,11 @@ }, "type": "object" }, - "v1ListPromoCreditGrantsResponse": { + "v1ListAllDomainsResponse": { "properties": { - "grants": { + "domains": { "items": { - "$ref": "#/components/schemas/v1PromoCreditGrant" + "$ref": "#/components/schemas/v1AdminRegisteredDomain" }, "type": "array" }, @@ -9908,127 +10799,118 @@ }, "type": "object" }, - "v1ListProviderCustomerAssetsResponse": { + "v1ListAllocationsResponse": { "properties": { - "assets": { + "allocations": { "items": { - "$ref": "#/components/schemas/v1ProviderCustomerAssetRow" + "$ref": "#/components/schemas/v1IPAllocation" }, "type": "array" }, - "totalCount": { + "total": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1ListProviderCustomersResponse": { + "v1ListAssignableNodesForPlanResponse": { "properties": { - "customers": { + "nodes": { "items": { - "$ref": "#/components/schemas/v1ProviderCustomerRow" + "$ref": "#/components/schemas/v1AssignableNodeView" }, "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" } }, "type": "object" }, - "v1ListProviderReviewsResponse": { + "v1ListAvailableAddonsResponse": { "properties": { - "providerAverageStar": { - "format": "double", - "title": "all reviews for this provider", - "type": "number" - }, - "providerStarSummary": { - "items": { - "$ref": "#/components/schemas/v1ProviderReviewStarSummary" - }, - "type": "array" - }, - "providerTotalReviews": { - "format": "int32", - "title": "all reviews for this provider", - "type": "integer" - }, - "reviews": { + "addons": { "items": { - "$ref": "#/components/schemas/v1ProviderReviewListItem" + "$ref": "#/components/schemas/v1Addon" }, "type": "array" }, "totalCount": { "format": "int32", - "title": "total matching current filters", "type": "integer" } }, "type": "object" }, - "v1ListProvidersResponse": { + "v1ListAvailableIPsResponse": { "properties": { - "page": { + "allocatedCount": { "format": "int32", + "title": "Number of allocated IPs", "type": "integer" }, - "pageSize": { + "availableCount": { "format": "int32", + "title": "Number of available IPs", "type": "integer" }, - "providers": { + "availableIps": { "items": { - "$ref": "#/components/schemas/v1ProviderInfo" + "type": "string" }, + "title": "List of available IP addresses", "type": "array" }, - "totalCount": { + "reservedCount": { + "format": "int32", + "title": "Number of reserved IPs", + "type": "integer" + }, + "totalIps": { "format": "int32", + "title": "Total IPs in prefix", "type": "integer" } }, "type": "object" }, - "v1ListPublicStorefrontsResponse": { + "v1ListAvailablePlansResponse": { "properties": { - "page": { - "format": "int32", - "type": "integer" - }, - "pageSize": { - "format": "int32", - "type": "integer" - }, - "storefronts": { + "plans": { "items": { - "$ref": "#/components/schemas/v1PublicStorefrontCard" + "$ref": "#/components/schemas/v1AvailablePlanCode" }, + "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" }, - "v1ListRefundsResponse": { + "v1ListAvailableRegionsResponse": { "properties": { - "page": { - "format": "int32", - "type": "integer" + "regions": { + "items": { + "$ref": "#/components/schemas/v1RegionLocation" + }, + "title": "List of unique city+country combinations", + "type": "array" }, - "pageSize": { + "totalCount": { "format": "int32", + "title": "Total number of unique regions", "type": "integer" - }, - "refunds": { + } + }, + "type": "object" + }, + "v1ListBackupsResponse": { + "properties": { + "backups": { "items": { - "$ref": "#/components/schemas/v1Refund" + "$ref": "#/components/schemas/v1Backup" }, "type": "array" }, @@ -10039,14 +10921,19 @@ }, "type": "object" }, - "v1ListRegionsResponse": { + "v1ListClientProviderReviewAssetsResponse": { "properties": { - "regions": { + "assets": { "items": { - "$ref": "#/components/schemas/v1Region" + "$ref": "#/components/schemas/v1ClientProviderReviewAssetItem" }, "type": "array" }, + "reviewedAssetCount": { + "description": "Submitted reviews across all assets (not just this page).", + "format": "int32", + "type": "integer" + }, "totalCount": { "format": "int32", "type": "integer" @@ -10054,75 +10941,69 @@ }, "type": "object" }, - "v1ListRoadmapFeatureRequestCommentsResponse": { + "v1ListCloudInitTemplatesResponse": { "properties": { - "comments": { + "cloudInitTemplates": { "items": { - "$ref": "#/components/schemas/v1RoadmapFeatureRequestComment" + "$ref": "#/components/schemas/v1CloudInitTemplate" }, "type": "array" }, - "total": { + "totalCount": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1ListRoadmapFeatureRequestsResponse": { + "v1ListCloudInitUserDataResponse": { "properties": { - "requests": { + "profiles": { "items": { - "$ref": "#/components/schemas/v1RoadmapFeatureRequest" + "$ref": "#/components/schemas/v1CloudInitUserData" }, "type": "array" }, - "total": { + "totalCount": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1ListRoadmapProductCategoriesResponse": { + "v1ListConnectTaxRegistrationsResponse": { "properties": { - "products": { + "registrations": { "items": { - "$ref": "#/components/schemas/v1RoadmapProductCategory" + "$ref": "#/components/schemas/v1ConnectTaxRegistration" }, "type": "array" } }, "type": "object" }, - "v1ListRolesResponse": { + "v1ListConversationsResponse": { "properties": { - "roles": { + "conversations": { "items": { - "$ref": "#/components/schemas/v1Role" + "$ref": "#/components/schemas/v1ConversationInfo" }, + "title": "List of conversations with IDs and titles", "type": "array" }, "totalCount": { "format": "int32", + "title": "Total number of conversations", "type": "integer" } }, "type": "object" }, - "v1ListSSHKeysResponse": { + "v1ListCountriesCitiesResponse": { "properties": { - "page": { - "format": "int32", - "type": "integer" - }, - "pageSize": { - "format": "int32", - "type": "integer" - }, - "sshKeys": { + "countries": { "items": { - "$ref": "#/components/schemas/v1SSHKey" + "$ref": "#/components/schemas/v1Country" }, "type": "array" }, @@ -10133,25 +11014,45 @@ }, "type": "object" }, - "v1ListSchedulesResponse": { + "v1ListCouponCodeBatchesResponse": { "properties": { - "schedules": { + "batches": { "items": { - "$ref": "#/components/schemas/v1GameServerSchedule" + "$ref": "#/components/schemas/v1CouponCodeBatch" }, "type": "array" + }, + "page": { + "format": "int32", + "type": "integer" + }, + "pageSize": { + "format": "int32", + "type": "integer" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1ListSecretsResponse": { + "v1ListCouponCodesResponse": { "properties": { - "secrets": { + "codes": { "items": { - "$ref": "#/components/schemas/v1Secret" + "$ref": "#/components/schemas/v1CouponCode" }, "type": "array" }, + "page": { + "format": "int32", + "type": "integer" + }, + "pageSize": { + "format": "int32", + "type": "integer" + }, "totalCount": { "format": "int32", "type": "integer" @@ -10159,7 +11060,7 @@ }, "type": "object" }, - "v1ListServiceAccountTokensResponse": { + "v1ListCouponRedemptionsResponse": { "properties": { "page": { "format": "int32", @@ -10169,9 +11070,9 @@ "format": "int32", "type": "integer" }, - "tokens": { + "redemptions": { "items": { - "$ref": "#/components/schemas/v1ServiceAccountTokenInfo" + "$ref": "#/components/schemas/v1CouponRedemption" }, "type": "array" }, @@ -10182,8 +11083,14 @@ }, "type": "object" }, - "v1ListServiceAccountsResponse": { + "v1ListCouponsResponse": { "properties": { + "coupons": { + "items": { + "$ref": "#/components/schemas/v1Coupon" + }, + "type": "array" + }, "page": { "format": "int32", "type": "integer" @@ -10192,12 +11099,6 @@ "format": "int32", "type": "integer" }, - "serviceAccounts": { - "items": { - "$ref": "#/components/schemas/v1ServiceAccountResponse" - }, - "type": "array" - }, "totalCount": { "format": "int32", "type": "integer" @@ -10205,14 +11106,22 @@ }, "type": "object" }, - "v1ListSnapshotsResponse": { + "v1ListCreditLedgerEntriesResponse": { "properties": { - "snapshots": { + "entries": { "items": { - "$ref": "#/components/schemas/v1Snapshot" + "$ref": "#/components/schemas/v1CreditLedgerEntryProto" }, "type": "array" }, + "page": { + "format": "int32", + "type": "integer" + }, + "pageSize": { + "format": "int32", + "type": "integer" + }, "totalCount": { "format": "int32", "type": "integer" @@ -10220,2461 +11129,1666 @@ }, "type": "object" }, - "v1ListSubscriptionsResponse": { + "v1ListDashboardAddonCatalogStatsResponse": { "properties": { - "subscriptions": { + "addonCatalog": { "items": { - "$ref": "#/components/schemas/v1Subscription" + "$ref": "#/components/schemas/v1ProviderDashboardAddonCatalogRow" }, "type": "array" }, - "totalCount": { + "addonCatalogFilteredTotal": { + "format": "int32", + "type": "integer" + }, + "kpiActiveAddonSubscriptionsSum": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1ListSupportedCurrenciesResponse": { + "v1ListDashboardInfrastructureResponse": { "properties": { - "currencies": { + "byNode": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1ProviderDashboardNodeRollup" }, - "title": "List of supported currency codes", "type": "array" }, - "lastUpdated": { - "format": "int64", - "title": "Timestamp when rates were last updated", - "type": "string" + "nodeTotalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1ListTicketAttachmentsResponse": { + "v1ListDashboardIpamAssignmentsResponse": { "properties": { - "attachments": { + "assignments": { "items": { - "$ref": "#/components/schemas/v1TicketAttachment" + "$ref": "#/components/schemas/v1DashboardIpamAssignmentRow" }, "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1ListTicketTemplatesResponse": { + "v1ListDashboardIpamResponse": { "properties": { - "availableVariables": { + "allocatedSampleIpsHasMore": { + "type": "boolean" + }, + "networks": { "items": { - "$ref": "#/components/schemas/v1TicketTemplateVariableDefinition" + "$ref": "#/components/schemas/v1DashboardIpamNetworkRollup" }, "type": "array" + } + }, + "type": "object" + }, + "v1ListDashboardPlanSubscriptionStatsResponse": { + "properties": { + "kpiActiveSubscriptionsSum": { + "format": "int32", + "type": "integer" }, - "ticketTemplates": { + "kpiPlanCount": { + "format": "int32", + "type": "integer" + }, + "kpiVmAssetsSum": { + "format": "int32", + "type": "integer" + }, + "plans": { "items": { - "$ref": "#/components/schemas/v1TicketTemplate" + "$ref": "#/components/schemas/v1ProviderDashboardPlanSubscriptionStat" }, "type": "array" }, - "totalCount": { + "plansFilteredTotal": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1ListTicketsResponse": { + "v1ListDashboardTicketStatisticsResponse": { "properties": { - "organizationDetails": { - "additionalProperties": { - "$ref": "#/components/schemas/v1OrganizationDetails" + "averageFirstResponseTimeSeconds": { + "format": "int64", + "type": "string" + }, + "averageResolutionTimeSeconds": { + "format": "int64", + "type": "string" + }, + "awaitingReplyTickets": { + "format": "int32", + "type": "integer" + }, + "byCaseType": { + "items": { + "$ref": "#/components/schemas/v1DashboardTicketStatisticsByCaseType" }, - "title": "Map of organization ID to organization name", - "type": "object" + "type": "array" }, - "tickets": { + "byPriority": { "items": { - "$ref": "#/components/schemas/v1Ticket" + "$ref": "#/components/schemas/v1DashboardTicketStatisticsByPriority" }, "type": "array" }, - "totalCount": { + "byStatus": { + "items": { + "$ref": "#/components/schemas/v1DashboardTicketStatisticsByStatus" + }, + "type": "array" + }, + "closedTickets": { "format": "int32", "type": "integer" }, - "userDetails": { - "additionalProperties": { - "$ref": "#/components/schemas/v1UserDetails" + "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" }, - "title": "Map of user ID to user details (first_name, last_name)", - "type": "object" + "type": "array" + }, + "totalTickets": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1ListUsageRecordsResponse": { + "v1ListDashboardVirtualMachinesResponse": { "properties": { - "totalCount": { + "dashboardVmCountTotal": { "format": "int32", "type": "integer" }, - "usageRecords": { + "virtualMachines": { "items": { - "$ref": "#/components/schemas/v1UsageRecord" + "$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" }, - "v1ListUsersResponse": { + "v1ListDatabasesResponse": { "properties": { - "totalCount": { - "format": "int32", - "type": "integer" - }, - "users": { + "databases": { "items": { - "$ref": "#/components/schemas/v1User" + "$ref": "#/components/schemas/v1GameServerDatabase" }, "type": "array" } }, "type": "object" }, - "v1ListVMTagsResponse": { + "v1ListDatacentersResponse": { "properties": { - "tags": { + "datacenters": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1DatacenterInfo" }, - "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" }, - "v1ListVMTemplatesResponse": { + "v1ListDistrosResponse": { + "description": "ListDistrosResponse is the guest OS catalog.", "properties": { - "totalCount": { - "format": "int32", - "type": "integer" - }, - "totalPages": { - "description": "Page count when pagination packs whole node groups (never splits a node across pages).", - "format": "int32", - "type": "integer" - }, - "vmTemplates": { + "distros": { "items": { - "$ref": "#/components/schemas/v1VMTemplate" + "$ref": "#/components/schemas/v1DistroCatalogEntry" }, "type": "array" } }, "type": "object" }, - "v1ListVirtualMachineSmtpOutboundPoliciesResponse": { + "v1ListDnsGeoLocationsResponse": { "properties": { - "policies": { + "locations": { "items": { - "$ref": "#/components/schemas/v1VirtualMachineSmtpOutboundPolicyView" + "$ref": "#/components/schemas/v1DnsGeoLocation" }, "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" } }, "type": "object" }, - "v1ListVirtualMachinesResponse": { + "v1ListDnsGeoRecordsResponse": { "properties": { - "totalCount": { - "format": "int32", - "type": "integer" - }, - "virtualMachines": { + "records": { "items": { - "$ref": "#/components/schemas/v1VirtualMachine" + "$ref": "#/components/schemas/v1DnsGeoRecord" }, "type": "array" } }, "type": "object" }, - "v1LiveValidationCheckView": { + "v1ListDnsRecordsResponse": { "properties": { - "code": { - "type": "string" + "page": { + "format": "int32", + "type": "integer" }, - "note": { - "type": "string" + "pageSize": { + "format": "int32", + "type": "integer" }, - "passed": { - "type": "boolean" + "records": { + "items": { + "$ref": "#/components/schemas/v1DnsRecord" + }, + "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" + }, + "types": { + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "v1LoginMfaVerifyRequest": { + "v1ListDnsZonesResponse": { "properties": { - "code": { - "description": "Authenticator TOTP code or a one-time recovery code.", - "type": "string" + "page": { + "format": "int32", + "type": "integer" }, - "loginSessionId": { - "type": "string" + "pageSize": { + "format": "int32", + "type": "integer" + }, + "totalCount": { + "format": "int32", + "type": "integer" + }, + "zones": { + "items": { + "$ref": "#/components/schemas/v1DnsZone" + }, + "type": "array" } }, "type": "object" }, - "v1LoginRequest": { + "v1ListDomainContactsResponse": { "properties": { - "email": { - "type": "string" + "contacts": { + "items": { + "$ref": "#/components/schemas/v1DomainContact" + }, + "type": "array" }, - "password": { - "type": "string" + "page": { + "format": "int32", + "type": "integer" }, - "turnstileToken": { - "description": "Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).", - "type": "string" + "pageSize": { + "format": "int32", + "type": "integer" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1LoginResponse": { + "v1ListDomainEventsResponse": { "properties": { - "loginSessionId": { - "type": "string" + "events": { + "items": { + "$ref": "#/components/schemas/v1DomainEvent" + }, + "type": "array" }, - "mfaRequired": { - "description": "When true, token/organization_id are empty and login_session_id must be used with LoginMfaVerify.", - "type": "boolean" + "page": { + "format": "int32", + "type": "integer" }, - "organizationId": { - "type": "string" + "pageSize": { + "format": "int32", + "type": "integer" }, - "token": { - "description": "Present when MFA is not required (or after LoginMfaVerify succeeds).", - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1LogoutRequest": { + "v1ListDomainGlueRecordsResponse": { "properties": { - "invalidateAll": { - "type": "boolean" + "records": { + "items": { + "$ref": "#/components/schemas/v1DomainGlueRecord" + }, + "type": "array" } }, "type": "object" }, - "v1ManualPayout": { + "v1ListDomainInvoicesResponse": { "properties": { - "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" + "invoices": { + "items": { + "$ref": "#/components/schemas/v1DomainInvoice" + }, + "type": "array" }, - "routingNumber": { - "title": "Routing number (for US accounts) or sort code (for UK accounts)", - "type": "string" + "page": { + "format": "int32", + "type": "integer" }, - "updatedAt": { - "format": "date-time", - "title": "Last update timestamp", - "type": "string" + "pageSize": { + "format": "int32", + "type": "integer" }, - "verificationNotes": { - "title": "Admin notes about verification status", - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1MarketplaceSearchParsedQuery": { - "description": "Structured filters extracted from the user query (word matcher today; LLM later).", + "v1ListDomainOrdersResponse": { "properties": { - "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": { + "orders": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1DomainOrder" }, "type": "array" }, - "minDiskGb": { + "page": { "format": "int32", "type": "integer" }, - "minRamGb": { + "pageSize": { "format": "int32", "type": "integer" }, - "minVcpus": { + "totalCount": { "format": "int32", "type": "integer" - }, - "parser": { - "description": "Parser implementation id, e.g. \"word_matcher\" or future \"llm\".", - "type": "string" } }, "type": "object" }, - "v1MarketplaceSearchPlanPriceSummary": { + "v1ListEffectivePermissionsResponse": { "properties": { - "billingPeriod": { - "$ref": "#/components/schemas/v1BillingPeriod" - }, - "currency": { - "type": "string" + "effectivePermissions": { + "additionalProperties": { + "$ref": "#/components/schemas/v1EffectivePermissions" + }, + "type": "object" }, - "freeUnits": { - "description": "Included free units (e.g. bandwidth GB). Used for bandwidth summaries in search.", + "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" }, - "v1MarketplaceSearchResult": { + "v1ListEligibleNodesForPlanResponse": { "properties": { - "addonPrices": { + "nodes": { "items": { - "$ref": "#/components/schemas/v1MarketplaceSearchPlanPriceSummary" + "$ref": "#/components/schemas/v1PlanLiveValidationNodeView" }, "type": "array" - }, - "bandwidthPrices": { - "description": "Bandwidth plan prices (egress/ingress) with free units + overage for search UI.", + } + }, + "type": "object" + }, + "v1ListEnvironmentVariablesResponse": { + "properties": { + "environmentVariables": { "items": { - "$ref": "#/components/schemas/v1MarketplaceSearchPlanPriceSummary" + "$ref": "#/components/schemas/v1EnvironmentVariable" }, "type": "array" }, - "billingType": { - "$ref": "#/components/schemas/v1BillingType" - }, - "ddosProvider": { - "type": "string" - }, - "diskGb": { - "format": "int32", - "type": "integer" - }, - "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" - }, - "rating": { - "format": "float", - "type": "number" - }, - "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" - }, - "vcpus": { + "totalCount": { "format": "int32", "type": "integer" } }, "type": "object" }, - "v1Metadata": { + "v1ListFilesResponse": { "properties": { - "buildBranch": { - "type": "string" - }, - "buildCommit": { - "type": "string" - }, - "buildDate": { - "type": "string" - }, - "buildTag": { - "type": "string" - }, - "name": { - "type": "string" - }, - "version": { - "type": "string" - }, - "versionDetails": { - "type": "string" + "files": { + "items": { + "$ref": "#/components/schemas/v1GameServerFile" + }, + "type": "array" } }, "type": "object" }, - "v1Metric": { + "v1ListFirewallAddressGroupsResponse": { "properties": { - "aggregationType": { - "$ref": "#/components/schemas/v1AggregationType" - }, - "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" + "groups": { + "items": { + "$ref": "#/components/schemas/v1FirewallAddressGroup" + }, + "type": "array" }, - "retentionDays": { + "totalCount": { "format": "int32", "type": "integer" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "unit": { - "type": "string" - }, - "unitPlural": { - "type": "string" } }, "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" - }, - "v1MetricType": { - "default": "METRIC_TYPE_UNSPECIFIED", - "enum": [ - "METRIC_TYPE_UNSPECIFIED", - "METRIC_TYPE_COUNTER", - "METRIC_TYPE_GAUGE", - "METRIC_TYPE_HISTOGRAM", - "METRIC_TYPE_SUMMARY" - ], - "type": "string" - }, - "v1MetricsWriteCredential": { + "v1ListFirewallRuleSetsResponse": { "properties": { - "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": { + "rulesets": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1FirewallRuleSet" }, "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1MoneyAmount": { + "v1ListFirewallRulesResponse": { "properties": { - "amount": { - "title": "Decimal string, e.g. \"11.00\"", - "type": "string" + "rules": { + "items": { + "$ref": "#/components/schemas/v1FirewallRuleResource" + }, + "type": "array" }, - "currency": { - "title": "ISO 4217 currency code", - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1MyStorefront": { + "v1ListGameServerAllocationsResponse": { "properties": { - "highlightAllowlist": { + "allocations": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1GameServerAllocation" }, "type": "array" - }, - "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" }, - "v1Network": { + "v1ListGameServerBackupsResponse": { "properties": { - "description": { - "type": "string" - }, - "dnsServers": { + "backups": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1GameServerBackup" }, - "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": { + } + }, + "type": "object" + }, + "v1ListGameServerTemplatesResponse": { + "properties": { + "templates": { "items": { - "$ref": "#/components/schemas/v1NetworkNode" + "$ref": "#/components/schemas/v1GameServerTemplate" }, - "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": { + "v1ListGameServersResponse": { "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" + "gameServers": { + "items": { + "$ref": "#/components/schemas/v1GameServer" + }, + "type": "array" } }, - "title": "NetworkNode represents a node connected to a network (simplified info)", "type": "object" }, - "v1Node": { + "v1ListGroupsResponse": { "properties": { - "backupStorageCompression": { - "$ref": "#/components/schemas/v1BackupStorageCompression" - }, - "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" + "groups": { + "items": { + "$ref": "#/components/schemas/v1Group" + }, + "type": "array" }, - "cpuOverallocatePercent": { + "totalCount": { "format": "int32", - "title": "Overallocation", "type": "integer" + } + }, + "type": "object" + }, + "v1ListHeldPayoutsResponse": { + "properties": { + "heldPayouts": { + "items": { + "$ref": "#/components/schemas/v1HeldPayout" + }, + "type": "array" }, - "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": { + "page": { "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": "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.", + "pageSize": { "format": "int32", "type": "integer" }, - "organizationId": { - "type": "string" - }, - "panelNodeId": { + "totalCount": { "format": "int32", "type": "integer" + } + }, + "type": "object" + }, + "v1ListHighRiskCouponsResponse": { + "properties": { + "coupons": { + "items": { + "$ref": "#/components/schemas/v1HighRiskCoupon" + }, + "type": "array" }, - "platform": { - "title": "Relations", - "type": "string" - }, - "pterodactylLocationId": { + "page": { "format": "int32", "type": "integer" }, - "region": { - "type": "string" - }, - "serviceStatus": { - "$ref": "#/components/schemas/v1ServiceStatus" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "storageOverallocatePercent": { + "pageSize": { "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": { + "totalCount": { "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" }, - "v1NodeCPUMapCPU": { + "v1ListHookScriptsResponse": { "properties": { - "core": { - "description": "Physical core id (unique within a socket).", + "hookScripts": { + "items": { + "$ref": "#/components/schemas/v1HookScript" + }, + "type": "array" + }, + "page": { "format": "int32", "type": "integer" }, - "cpu": { - "description": "Host logical CPU id (the affinity bit).", + "pageSize": { "format": "int32", "type": "integer" }, - "cpuStatus": { - "$ref": "#/components/schemas/v1NodeCPUStatus" - }, - "numa": { + "totalCount": { "format": "int32", "type": "integer" - }, - "siblings": { - "description": "Full SMT sibling set including this CPU.", + } + }, + "type": "object" + }, + "v1ListInstantAppsResponse": { + "properties": { + "instantApps": { "items": { - "format": "int32", - "type": "integer" + "$ref": "#/components/schemas/v1InstantApp" }, "type": "array" }, - "socket": { + "totalCount": { "format": "int32", "type": "integer" - }, - "vmHostname": { - "type": "string" - }, - "vmId": { - "description": "Set when cpu_status is ALLOCATED_NR.", - "type": "string" } }, "type": "object" }, - "v1NodeCPUMapNUMA": { + "v1ListInternalCommentsResponse": { "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", - "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": { + "comments": { "items": { - "format": "int32", - "type": "integer" + "$ref": "#/components/schemas/v1TicketInternalComment" + }, + "type": "array" + } + }, + "type": "object" + }, + "v1ListInvitesResponse": { + "properties": { + "invites": { + "items": { + "$ref": "#/components/schemas/v1Invite" }, "type": "array" }, - "totalCores": { - "description": "Logical CPU (vCPU) counts on this NUMA node \u2014 sellable capacity units.", + "totalCount": { "format": "int32", "type": "integer" } }, "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": { + "v1ListInvoicesResponse": { "properties": { - "cpuCore": { + "invoices": { + "items": { + "$ref": "#/components/schemas/v1Invoice" + }, + "type": "array" + }, + "page": { "format": "int32", "type": "integer" }, - "cpuCoreAllocated": { + "pageSize": { "format": "int32", "type": "integer" }, - "cpuType": { - "$ref": "#/components/schemas/v1CPUType" + "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" }, - "memory": { + "identities": { + "items": { + "$ref": "#/components/schemas/v1LinkedIdentity" + }, + "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": { "format": "int32", "type": "integer" }, - "memoryAllocated": { + "pageSize": { "format": "int32", "type": "integer" }, - "storagePools": { + "providers": { "items": { - "$ref": "#/components/schemas/v1StoragePool" + "$ref": "#/components/schemas/v1ProviderInfo" }, "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1NodePlacementPolicy": { + "v1ListMetricsResponse": { "properties": { - "defaultStrategy": { - "$ref": "#/components/schemas/v1NodePlacementStrategy" - }, - "regionOverrides": { + "metrics": { "items": { - "$ref": "#/components/schemas/v1NodePlacementRegionOverride" + "$ref": "#/components/schemas/v1Metric" }, "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1NodePlacementRegionOverride": { + "v1ListMetricsWriteCredentialsResponse": { "properties": { - "regionId": { - "type": "string" + "credentials": { + "items": { + "$ref": "#/components/schemas/v1MetricsWriteCredential" + }, + "type": "array" }, - "strategy": { - "$ref": "#/components/schemas/v1NodePlacementStrategy" + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "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": { + "v1ListMyInvitesResponse": { "properties": { - "expandedRegion": { - "$ref": "#/components/schemas/v1Region" + "invites": { + "items": { + "$ref": "#/components/schemas/v1Invite" + }, + "type": "array" }, - "node": { - "$ref": "#/components/schemas/v1Node" + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1NotificationSetting": { + "v1ListNetworkNodesResponse": { "properties": { - "enabled": { - "type": "boolean" - }, - "id": { - "title": "Fields", - "type": "string" - }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "organization": { - "type": "string" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "type": { - "type": "string" - }, - "user": { - "title": "Relations", - "type": "string" + "nodes": { + "items": { + "$ref": "#/components/schemas/v1Node" + }, + "title": "List of nodes assigned to this network", + "type": "array" } }, "type": "object" }, - "v1NotificationTemplate": { + "v1ListNetworksResponse": { "properties": { - "contentType": { - "type": "string" - }, - "description": { - "type": "string" - }, - "emailBodyTemplate": { - "type": "string" - }, - "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" + "networks": { + "items": { + "$ref": "#/components/schemas/v1Network" + }, + "type": "array" }, - "webhookBodyTemplate": { - "type": "string" + "total": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1OAuth2Client": { + "v1ListNodesResponse": { "properties": { - "clientId": { - "type": "string" - }, - "clientType": { - "type": "string" - }, - "description": { - "type": "string" - }, - "isActive": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "redirectUris": { + "nodes": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1NodeWithExpandedRegion" }, "type": "array" }, - "requiresPkce": { - "type": "boolean" - }, - "scopes": { + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListNotificationSettingsResponse": { + "properties": { + "notificationSettings": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1NotificationSetting" }, "type": "array" + }, + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1OpenConsoleResponse": { + "v1ListNotificationTemplatesResponse": { "properties": { - "ticket": { - "type": "string" + "notificationTemplates": { + "items": { + "$ref": "#/components/schemas/v1NotificationTemplate" + }, + "type": "array" }, - "websocketPath": { - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "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": { + "v1ListOAuth2ClientsResponse": { "properties": { - "eula": { - "description": "eula is true when this egg stops until the player accepts the Minecraft EULA.", - "type": "boolean" - }, - "icon": { - "type": "string" + "clients": { + "items": { + "$ref": "#/components/schemas/v1OAuth2Client" + }, + "type": "array" }, - "id": { - "type": "string" + "page": { + "format": "int32", + "type": "integer" }, - "name": { - "type": "string" + "pageSize": { + "format": "int32", + "type": "integer" }, - "variables": { + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListOrderGamesResponse": { + "properties": { + "games": { "items": { - "$ref": "#/components/schemas/v1EggVariable" + "$ref": "#/components/schemas/v1OrderGame" }, "type": "array" } }, "type": "object" }, - "v1Organization": { + "v1ListOrganizationsResponse": { "properties": { - "asn": { - "format": "int64", - "type": "string" - }, - "ddosProvider": { - "description": "DDoS mitigation partner slug (e.g. \"none\"). Provider organizations only.", - "type": "string" - }, - "description": { - "type": "string" - }, - "domains": { + "organizations": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1Organization" }, "type": "array" }, - "enforceMfa": { - "type": "boolean" - }, - "enforceSso": { - "type": "boolean" - }, - "enforceVerifiedDomain": { - "type": "boolean" - }, - "groups": { + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListPaymentMethodsResponse": { + "properties": { + "paymentMethods": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1PaymentMethod" }, "type": "array" }, - "hypervisorDriver": { - "$ref": "#/components/schemas/v1PlatformDriver" - }, - "id": { - "title": "Fields", - "type": "string" - }, - "isVerified": { - "description": "Provider marketplace / admin verification (first-class fields; not part of metadata).", - "type": "boolean" - }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "name": { - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListPaymentsResponse": { + "properties": { + "page": { + "format": "int32", + "type": "integer" }, - "onboarded": { - "description": "True after the provider has completed the self-serve onboarding checklist once.", - "type": "boolean" + "pageSize": { + "format": "int32", + "type": "integer" }, - "organizationRoles": { + "payments": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1Payment" }, "type": "array" }, - "owner": { - "title": "Relations", - "type": "string" - }, - "providerLogoUrl": { - "title": "Provider marketplace logo (data URL or https URL); only used for provider organizations", - "type": "string" - }, - "providerWebsiteUrl": { - "description": "Public storefront / company website (http or https). Provider organizations only.", - "type": "string" - }, - "reviewRequested": { - "type": "boolean" + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListPayoutInvoicesResponse": { + "properties": { + "page": { + "format": "int32", + "type": "integer" }, - "status": { - "$ref": "#/components/schemas/protov1Status" + "pageSize": { + "format": "int32", + "type": "integer" }, - "subscriptions": { + "payoutInvoices": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1PayoutInvoice" }, "type": "array" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "type": { - "$ref": "#/components/schemas/v1OrganizationType" + "totalCount": { + "format": "int32", + "type": "integer" } }, - "title": "Organization object for providers and clients", "type": "object" }, - "v1OrganizationDetails": { + "v1ListPermissionsResponse": { "properties": { - "name": { - "type": "string" + "permissions": { + "items": { + "$ref": "#/components/schemas/v1Permission" + }, + "type": "array" }, - "orgType": { - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" } }, - "title": "OrganizationDetails contains organization information", "type": "object" }, - "v1OrganizationType": { - "default": "ORGANIZATION_TYPE_UNSPECIFIED", - "enum": [ - "ORGANIZATION_TYPE_UNSPECIFIED", - "ORGANIZATION_TYPE_PROVIDER", - "ORGANIZATION_TYPE_CLIENT" - ], - "type": "string" + "v1ListPlanLiveValidationBenchmarksResponse": { + "properties": { + "benchmarks": { + "items": { + "$ref": "#/components/schemas/v1PlanLiveValidationBenchmarkView" + }, + "type": "array" + } + }, + "type": "object" }, - "v1PayInvoiceResponse": { + "v1ListPlanLiveValidationsResponse": { "properties": { - "invoice": { - "$ref": "#/components/schemas/v1Invoice" + "totalCount": { + "format": "int32", + "type": "integer" }, - "invoiceLines": { + "validations": { "items": { - "$ref": "#/components/schemas/v1InvoiceLine" + "$ref": "#/components/schemas/v1PlanLiveValidationView" + }, + "type": "array" + } + }, + "type": "object" + }, + "v1ListPlansResponse": { + "properties": { + "plans": { + "items": { + "$ref": "#/components/schemas/v1Plan" }, "type": "array" }, - "paymentStatus": { - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListPlatformsResponse": { + "properties": { + "platforms": { + "items": { + "$ref": "#/components/schemas/v1Platform" + }, + "type": "array" }, - "transactionId": { - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1Payment": { + "v1ListPrefixesResponse": { "properties": { - "amount": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" + "prefixes": { + "items": { + "$ref": "#/components/schemas/v1Prefix" + }, + "type": "array" }, - "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" + "total": { + "format": "int32", + "type": "integer" } }, - "title": "Payment represents a payment transaction for an invoice", "type": "object" }, - "v1PaymentMethod": { + "v1ListPreflightChecksResponse": { "properties": { - "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" + "marketplaceReadyCheckEnabled": { + "description": "Explicit presence: false when PLAN_MARKETPLACE_READY is disabled in config (interval may be omitted as 0).", + "type": "boolean" }, - "expiryMonth": { + "marketplaceReadyCheckIntervalSeconds": { + "description": "Resolved from preflight.PLAN_MARKETPLACE_READY interval (seconds); for UI scheduling hints.", "format": "int32", - "title": "Expiry month (for cards, 1-12)", "type": "integer" }, - "expiryYear": { + "plans": { + "items": { + "$ref": "#/components/schemas/v1PlanPreflightView" + }, + "type": "array" + }, + "totalCount": { "format": "int32", - "title": "Expiry year (for cards)", "type": "integer" - }, - "id": { - "type": "string" - }, - "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" }, - "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": { + "v1ListPromoCreditGrantsResponse": { "properties": { - "enabled": { - "title": "Whether payout configuration is enabled (default: true)", - "type": "boolean" + "grants": { + "items": { + "$ref": "#/components/schemas/v1PromoCreditGrant" + }, + "type": "array" }, - "scheduleTime": { - "title": "Time in HH:MM format (24-hour, UTC) - e.g., \"09:00\" for 9 AM", - "type": "string" + "page": { + "format": "int32", + "type": "integer" }, - "scheduleTimezone": { - "title": "IANA timezone identifier (e.g., \"UTC\", \"America/New_York\") - defaults to \"UTC\"", - "type": "string" + "pageSize": { + "format": "int32", + "type": "integer" }, - "scheduleType": { - "$ref": "#/components/schemas/v1PayoutScheduleType" + "totalCount": { + "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" - }, - "v1PayoutInvoice": { + "v1ListProviderCustomerAssetsResponse": { "properties": { - "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": { + "assets": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1ProviderCustomerAssetRow" }, - "title": "IDs of client invoices that contributed to this payout", "type": "array" }, - "lastRetryAt": { - "format": "date-time", - "title": "Timestamp of last retry attempt", - "type": "string" - }, - "maxRetries": { + "totalCount": { "format": "int32", - "title": "Maximum number of retry attempts", "type": "integer" + } + }, + "type": "object" + }, + "v1ListProviderCustomersResponse": { + "properties": { + "customers": { + "items": { + "$ref": "#/components/schemas/v1ProviderCustomerRow" + }, + "type": "array" }, - "metadata": { - "title": "Additional metadata", - "type": "object" - }, - "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": { + "totalCount": { "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" }, - "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": { + "v1ListProviderReviewsResponse": { "properties": { - "httpMethod": { - "type": "string" + "providerAverageStar": { + "format": "double", + "title": "all reviews for this provider", + "type": "number" }, - "id": { - "type": "string" + "providerStarSummary": { + "items": { + "$ref": "#/components/schemas/v1ProviderReviewStarSummary" + }, + "type": "array" }, - "methodName": { - "type": "string" + "providerTotalReviews": { + "format": "int32", + "title": "all reviews for this provider", + "type": "integer" }, - "scope": { - "type": "string" + "reviews": { + "items": { + "$ref": "#/components/schemas/v1ProviderReviewListItem" + }, + "type": "array" }, - "serviceName": { - "type": "string" + "totalCount": { + "format": "int32", + "title": "total matching current filters", + "type": "integer" } }, "type": "object" }, - "v1Plan": { + "v1ListProvidersResponse": { "properties": { - "assetCategory": { - "$ref": "#/components/schemas/v1AssetCategory" - }, - "assetType": { - "$ref": "#/components/schemas/v1AssetType" - }, - "autoRenew": { - "type": "boolean" - }, - "billingPeriod": { - "$ref": "#/components/schemas/v1BillingPeriod" - }, - "billingType": { - "$ref": "#/components/schemas/v1BillingType" - }, - "code": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "description": { - "type": "string" - }, - "effectiveFrom": { - "format": "date-time", - "type": "string" - }, - "effectiveUntil": { - "format": "date-time", - "type": "string" - }, - "endUser": { - "$ref": "#/components/schemas/v1EndUser" - }, - "externalBillingId": { - "type": "string" - }, - "gracePeriodDays": { + "page": { "format": "int32", "type": "integer" }, - "id": { - "title": "Fields", - "type": "string" - }, - "isPublic": { - "type": "boolean" - }, - "maxSubscribers": { + "pageSize": { "format": "int32", "type": "integer" }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "name": { - "type": "string" - }, - "nodeIds": { - "description": "Nodes explicitly assigned to this plan (placement / preflight candidates).", + "providers": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1ProviderInfo" }, "type": "array" }, - "onCreditExhaustion": { - "description": "Provider choice when client prepaid credits are exhausted.\nValues: \"suspend\" (default), \"continue_with_dunning\". Relevant for usage-based Offerings.", - "type": "string" - }, - "organizationName": { - "description": "Name of the organization that owns this plan", - "title": "Organization/tenant information", - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListPublicStorefrontsResponse": { + "properties": { + "page": { + "format": "int32", + "type": "integer" }, - "planCategory": { - "$ref": "#/components/schemas/v1PlanCategory" + "pageSize": { + "format": "int32", + "type": "integer" }, - "planPrices": { + "storefronts": { "items": { - "$ref": "#/components/schemas/v1PlanPrice" + "$ref": "#/components/schemas/v1PublicStorefrontCard" }, "type": "array" }, - "planType": { - "$ref": "#/components/schemas/v1PlanType" + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListRefundsResponse": { + "properties": { + "page": { + "format": "int32", + "type": "integer" }, - "regionIds": { + "pageSize": { + "format": "int32", + "type": "integer" + }, + "refunds": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1Refund" }, "type": "array" }, - "requiresManualApproval": { - "type": "boolean" - }, - "rulesetIds": { + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListRegionsResponse": { + "properties": { + "regions": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1Region" }, - "title": "Relations", "type": "array" }, - "setupFee": { - "title": "Decimal string with 6 decimal places", - "type": "string" - }, - "slaHours": { + "totalCount": { "format": "int32", "type": "integer" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "subscriptionIds": { + } + }, + "type": "object" + }, + "v1ListRegisteredDomainsResponse": { + "properties": { + "domains": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1RegisteredDomain" }, "type": "array" }, - "templatePlanId": { - "type": "string" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "page": { + "format": "int32", + "type": "integer" }, - "trialAvailable": { - "type": "boolean" + "pageSize": { + "format": "int32", + "type": "integer" }, - "trialDays": { + "totalCount": { "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": { + "v1ListRoadmapFeatureRequestCommentsResponse": { "properties": { - "cpu": { - "type": "object" - }, - "createTime": { - "format": "date-time", - "type": "string" - }, - "id": { - "type": "string" - }, - "memory": { - "type": "object" - }, - "misc": { - "type": "object" - }, - "network": { - "type": "object" - }, - "nodeId": { - "type": "string" - }, - "nodeName": { - "type": "string" - }, - "passed": { - "type": "boolean" - }, - "planCode": { - "type": "string" - }, - "planId": { - "type": "string" + "comments": { + "items": { + "$ref": "#/components/schemas/v1RoadmapFeatureRequestComment" + }, + "type": "array" }, - "storage": { - "type": "object" + "total": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1PlanLiveValidationNodeView": { + "v1ListRoadmapFeatureRequestsResponse": { "properties": { - "nodeId": { - "type": "string" - }, - "nodeName": { - "type": "string" - }, - "regionId": { - "type": "string" + "requests": { + "items": { + "$ref": "#/components/schemas/v1RoadmapFeatureRequest" + }, + "type": "array" }, - "regionName": { - "type": "string" + "total": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1PlanLiveValidationView": { + "v1ListRoadmapProductCategoriesResponse": { "properties": { - "checkedAt": { - "format": "date-time", - "type": "string" - }, - "checks": { + "products": { "items": { - "$ref": "#/components/schemas/v1LiveValidationCheckView" + "$ref": "#/components/schemas/v1RoadmapProductCategory" }, "type": "array" - }, - "includeBenchmarking": { - "type": "boolean" - }, - "marketplaceLiveValidated": { - "type": "boolean" - }, - "nodeId": { - "type": "string" - }, - "nodeName": { - "type": "string" - }, - "passed": { - "type": "boolean" - }, - "phase": { - "type": "string" - }, - "planCode": { - "type": "string" - }, - "planId": { - "type": "string" - }, - "regionName": { - "type": "string" - }, - "startedAt": { - "format": "date-time", - "type": "string" - }, - "status": { - "type": "string" - }, - "summaryNote": { - "type": "string" } }, "type": "object" }, - "v1PlanPreflightView": { + "v1ListRolesResponse": { "properties": { - "billingType": { - "$ref": "#/components/schemas/v1BillingType" - }, - "infrastructure": { + "roles": { "items": { - "$ref": "#/components/schemas/v1PreflightInfrastructureView" + "$ref": "#/components/schemas/v1Role" }, "type": "array" }, - "marketplaceReady": { - "type": "boolean" + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListSSHKeysResponse": { + "properties": { + "page": { + "format": "int32", + "type": "integer" }, - "planChecks": { + "pageSize": { + "format": "int32", + "type": "integer" + }, + "sshKeys": { "items": { - "$ref": "#/components/schemas/v1PreflightCheckView" + "$ref": "#/components/schemas/v1SSHKey" }, "type": "array" }, - "planCode": { - "type": "string" - }, - "planId": { - "type": "string" - }, - "planName": { - "type": "string" - }, - "regionLabels": { + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListSchedulesResponse": { + "properties": { + "schedules": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1GameServerSchedule" }, "type": "array" - }, - "summaryIssues": { + } + }, + "type": "object" + }, + "v1ListSecretsResponse": { + "properties": { + "secrets": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1Secret" }, "type": "array" }, - "summaryNote": { - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1PlanPrice": { + "v1ListServiceAccountTokensResponse": { "properties": { - "billingInterval": { + "page": { "format": "int32", "type": "integer" }, - "billingPeriod": { - "$ref": "#/components/schemas/v1BillingPeriod" - }, - "chargeTiming": { - "$ref": "#/components/schemas/v1ChargeTiming" - }, - "currency": { - "title": "Pricing details", - "type": "string" - }, - "effectiveFrom": { - "format": "date-time", - "title": "Status and lifecycle", - "type": "string" - }, - "effectiveUntil": { - "format": "date-time", - "type": "string" - }, - "externalId": { - "title": "External integration", - "type": "string" - }, - "freeAmount": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" - }, - "freeUnits": { + "pageSize": { "format": "int32", - "title": "Free tier configuration", "type": "integer" }, - "id": { - "title": "Fields", - "type": "string" + "tokens": { + "items": { + "$ref": "#/components/schemas/v1ServiceAccountTokenInfo" + }, + "type": "array" }, - "maxQuantity": { + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListServiceAccountsResponse": { + "properties": { + "page": { "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" + "pageSize": { + "format": "int32", + "type": "integer" }, - "metricIds": { + "serviceAccounts": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1ServiceAccountResponse" }, "type": "array" }, - "metricName": { - "title": "Usage-based pricing", - "type": "string" - }, - "minQuantity": { + "totalCount": { "format": "int32", - "title": "Minimum quantity (primarily for addons)", "type": "integer" + } + }, + "type": "object" + }, + "v1ListSnapshotsResponse": { + "properties": { + "snapshots": { + "items": { + "$ref": "#/components/schemas/v1Snapshot" + }, + "type": "array" }, - "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": { + "totalCount": { "format": "int32", - "title": "Package pricing", "type": "integer" - }, - "parentPlanId": { - "title": "For addon prices: reference to parent plan (percentage-based pricing)", - "type": "string" - }, - "planPrices": { + } + }, + "type": "object" + }, + "v1ListSubscriptionsResponse": { + "properties": { + "subscriptions": { "items": { - "$ref": "#/components/schemas/v1Plan" + "$ref": "#/components/schemas/v1Subscription" }, - "title": "Relations", "type": "array" }, - "pricingFormula": { - "title": "Pricing formula for percentage/complex calculations", - "type": "object" - }, - "pricingModel": { - "$ref": "#/components/schemas/v1PricingModel" - }, - "pricingTierIds": { + "totalCount": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1ListSupportedCurrenciesResponse": { + "properties": { + "currencies": { "items": { "type": "string" }, + "title": "List of supported currency codes", "type": "array" }, - "productType": { - "$ref": "#/components/schemas/v1ProductType" - }, - "prorate": { - "title": "Proration and billing", - "type": "boolean" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "subscriptionTemplateIds": { + "lastUpdated": { + "format": "int64", + "title": "Timestamp when rates were last updated", + "type": "string" + } + }, + "type": "object" + }, + "v1ListTicketAttachmentsResponse": { + "properties": { + "attachments": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1TicketAttachment" }, "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": { + "v1ListTicketTemplatesResponse": { "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" + "availableVariables": { + "items": { + "$ref": "#/components/schemas/v1TicketTemplateVariableDefinition" + }, + "type": "array" }, - "chargeTiming": { - "$ref": "#/components/schemas/v1ChargeTiming" + "ticketTemplates": { + "items": { + "$ref": "#/components/schemas/v1TicketTemplate" + }, + "type": "array" }, - "freeUnits": { + "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" }, - "maximumCharge": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" - }, - "metricAggregation": { - "$ref": "#/components/schemas/v1MetricAggregation" - }, - "metricName": { - "title": "Usage-based specific", - "type": "string" - }, - "minimumCharge": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" - }, - "overagePrice": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" - }, - "packagePrice": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" + "tickets": { + "items": { + "$ref": "#/components/schemas/v1Ticket" + }, + "type": "array" }, - "packageSize": { + "totalCount": { "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\"}", + "userDetails": { + "additionalProperties": { + "$ref": "#/components/schemas/v1UserDetails" + }, + "title": "Map of user ID to user details (first_name, last_name)", "type": "object" - }, - "pricingModel": { - "$ref": "#/components/schemas/v1PricingModel" - }, - "productType": { - "$ref": "#/components/schemas/v1ProductType" - }, - "prorate": { - "title": "Proration", - "type": "boolean" - }, - "tiers": { + } + }, + "type": "object" + }, + "v1ListTldOfferingsResponse": { + "properties": { + "offerings": { "items": { - "$ref": "#/components/schemas/v1PricingTierInput" + "$ref": "#/components/schemas/v1TldOffering" }, - "title": "Tiered pricing", "type": "array" }, - "unitAmount": { - "description": "Decimal string with 6 decimal places precision", - "title": "Fixed & usage-based pricing", - "type": "string" + "page": { + "format": "int32", + "type": "integer" }, - "unitName": { - "type": "string" + "pageSize": { + "format": "int32", + "type": "integer" }, - "unitQuantity": { + "totalCount": { "format": "int32", "type": "integer" } }, "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.", + "v1ListTldPricesResponse": { "properties": { - "freeUnits": { + "page": { "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" + "pageSize": { + "format": "int32", + "type": "integer" }, - "planPriceId": { - "type": "string" + "tlds": { + "items": { + "$ref": "#/components/schemas/v1TldPrice" + }, + "type": "array" }, - "unitAmount": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1PlanPricingConfig": { + "v1ListUsageRecordsResponse": { "properties": { - "assetCategory": { - "type": "string" - }, - "assetType": { - "type": "string" - }, - "currency": { - "type": "string" - }, - "planName": { - "title": "Plan metadata", - "type": "string" + "totalCount": { + "format": "int32", + "type": "integer" }, - "prices": { + "usageRecords": { "items": { - "$ref": "#/components/schemas/v1PlanPriceInput" + "$ref": "#/components/schemas/v1UsageRecord" }, - "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" - }, - "country": { - "title": "Country name from CityCountry", - "type": "string" - }, - "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" - }, - "v1PlanType": { - "default": "PLAN_TYPE_UNSPECIFIED", - "enum": [ - "PLAN_TYPE_UNSPECIFIED", - "PLAN_TYPE_FREE", - "PLAN_TYPE_TRIAL", - "PLAN_TYPE_PAID", - "PLAN_TYPE_ENTERPRISE" - ], - "type": "string" - }, - "v1Platform": { + "v1ListUsersResponse": { "properties": { - "agentId": { - "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" - }, - "driver": { - "$ref": "#/components/schemas/v1PlatformDriver" - }, - "endpointUrl": { - "type": "string" - }, - "id": { - "title": "Fields", - "type": "string" - }, - "kind": { - "$ref": "#/components/schemas/v1PlatformKind" - }, - "metadata": { - "type": "object" - }, - "name": { - "type": "string" - }, - "organizationId": { - "type": "string" - }, - "serviceStatus": { - "$ref": "#/components/schemas/v1ServiceStatus" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" + "totalCount": { + "format": "int32", + "type": "integer" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "users": { + "items": { + "$ref": "#/components/schemas/v1User" + }, + "type": "array" } }, "type": "object" }, - "v1PlatformDriver": { - "default": "PLATFORM_DRIVER_UNSPECIFIED", - "description": " - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver.", - "enum": [ - "PLATFORM_DRIVER_UNSPECIFIED", - "PLATFORM_DRIVER_PROXMOX", - "PLATFORM_DRIVER_VIRTFUSION", - "PLATFORM_DRIVER_SOLUSVM", - "PLATFORM_DRIVER_PTERODACTYL" - ], - "type": "string" - }, - "v1PlatformKind": { - "default": "PLATFORM_KIND_UNSPECIFIED", - "enum": [ - "PLATFORM_KIND_UNSPECIFIED", - "PLATFORM_KIND_HYPERVISOR", - "PLATFORM_KIND_PTERODACTYL" - ], - "type": "string" - }, - "v1PlatformVersions": { - "description": "PlatformVersions is the install matrix for provider CLI tooling and cluster components.", + "v1ListVMTagsResponse": { "properties": { - "components": { + "tags": { "items": { - "$ref": "#/components/schemas/v1ComponentVersion" + "type": "string" }, + "title": "List of unique tags from all VMs belonging to the organization", "type": "array" }, - "schemaVersion": { - "description": "Schema version for forward-compatible clients (currently \"1\").", - "type": "string" + "totalCount": { + "format": "int32", + "title": "Total number of unique tags", + "type": "integer" } }, "type": "object" }, - "v1Prefix": { + "v1ListVMTemplatesResponse": { "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" - }, - "gateway": { - "description": "Default gateway IP (e.g., 10.0.0.1). Must be within the prefix CIDR.", - "type": "string" - }, - "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" + "totalCount": { + "format": "int32", + "type": "integer" }, - "organizationId": { - "type": "string" + "totalPages": { + "description": "Page count when pagination packs whole node groups (never splits a node across pages).", + "format": "int32", + "type": "integer" }, - "reservedIps": { + "vmTemplates": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1VMTemplate" }, - "title": "List of reserved IP addresses (e.g., [\"10.0.0.1\", \"10.0.0.100\"])", "type": "array" - }, - "reservedPrefixes": { + } + }, + "type": "object" + }, + "v1ListVirtualMachineSmtpOutboundPoliciesResponse": { + "properties": { + "policies": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1VirtualMachineSmtpOutboundPolicyView" }, - "title": "Reserved sub-prefix CIDRs at assignment length", "type": "array" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "vmAssignmentPrefixLength": { + "totalCount": { "format": "int32", - "title": "IPv6 only: VM assignment length (64, 128, \u2026)", "type": "integer" } }, "type": "object" }, - "v1PreflightAgentView": { + "v1ListVirtualMachinesResponse": { "properties": { - "checks": { + "totalCount": { + "format": "int32", + "type": "integer" + }, + "virtualMachines": { "items": { - "$ref": "#/components/schemas/v1PreflightCheckView" + "$ref": "#/components/schemas/v1VirtualMachine" }, "type": "array" - }, - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "platform": { - "$ref": "#/components/schemas/v1PreflightPlatformView" } }, "type": "object" }, - "v1PreflightCheckView": { + "v1LiveValidationCheckView": { "properties": { "code": { "type": "string" @@ -12684,3306 +12798,3404 @@ }, "passed": { "type": "boolean" - }, - "subChecks": { - "items": { - "$ref": "#/components/schemas/v1PreflightCheckView" - }, - "type": "array" } }, "type": "object" }, - "v1PreflightInfrastructureView": { + "v1LoginMfaVerifyRequest": { "properties": { - "agent": { - "$ref": "#/components/schemas/v1PreflightAgentView" + "code": { + "description": "Authenticator TOTP code or a one-time recovery code.", + "type": "string" }, - "passed": { - "type": "boolean" + "loginSessionId": { + "type": "string" } }, "type": "object" }, - "v1PreflightNodeView": { + "v1LoginRequest": { "properties": { - "checks": { - "items": { - "$ref": "#/components/schemas/v1PreflightCheckView" - }, - "type": "array" + "email": { + "type": "string" }, - "id": { + "password": { "type": "string" }, - "name": { + "turnstileToken": { + "description": "Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).", "type": "string" } }, "type": "object" }, - "v1PreflightPlatformView": { + "v1LoginResponse": { "properties": { - "checks": { - "items": { - "$ref": "#/components/schemas/v1PreflightCheckView" - }, - "type": "array" - }, - "id": { + "loginSessionId": { "type": "string" }, - "name": { + "mfaRequired": { + "description": "When true, token/organization_id are empty and login_session_id must be used with LoginMfaVerify.", + "type": "boolean" + }, + "organizationId": { "type": "string" }, - "node": { - "$ref": "#/components/schemas/v1PreflightNodeView" + "token": { + "description": "Present when MFA is not required (or after LoginMfaVerify succeeds).", + "type": "string" } }, "type": "object" }, - "v1PreviewCouponRequest": { + "v1LogoutRequest": { "properties": { - "billingPeriod": { - "$ref": "#/components/schemas/v1BillingPeriod" - }, - "code": { - "type": "string" - }, - "planId": { - "type": "string" - }, - "quantity": { - "format": "int32", - "type": "integer" + "invalidateAll": { + "type": "boolean" } }, "type": "object" }, - "v1PreviewCouponResponse": { + "v1ManualPayout": { "properties": { - "amountOff": { + "accountHolderName": { + "title": "Name of the account holder", "type": "string" }, - "code": { + "accountNumber": { + "title": "Bank account number (for non-SEPA countries)", "type": "string" }, - "currency": { + "bankName": { + "title": "Name of the bank", "type": "string" }, - "discountType": { - "$ref": "#/components/schemas/v1CouponDiscountType" - }, - "discountedPrice": { + "bic": { + "title": "Bank Identifier Code / SWIFT code (for SEPA countries)", "type": "string" }, - "originalPrice": { - "description": "Fixed price for the selected period, empty for usage-priced plans.", + "country": { + "title": "ISO 3166-1 alpha-2 country code", "type": "string" }, - "percentOff": { + "createdAt": { + "format": "date-time", + "title": "Account creation timestamp", "type": "string" }, - "termsSummary": { - "description": "Server-rendered disclosure; show it verbatim.", + "iban": { + "title": "International Bank Account Number (for SEPA countries)", "type": "string" - } - }, - "type": "object" - }, - "v1PreviewMyStorefrontResponse": { - "properties": { - "sourceStatus": { - "$ref": "#/components/schemas/v1StorefrontRevisionStatus" }, - "storefront": { - "$ref": "#/components/schemas/v1PublicStorefront" - } - }, - "type": "object" - }, - "v1PreviewNotificationTemplateResponse": { - "properties": { - "previewEmailBody": { + "id": { + "title": "Manual payout account ID", "type": "string" }, - "previewEmailSubject": { - "type": "string" + "isVerified": { + "title": "Whether the payout account has been verified by admin", + "type": "boolean" }, - "previewPushNotificationBody": { + "notes": { + "title": "User-provided notes about the payout account", "type": "string" }, - "previewPushNotificationTitle": { + "routingNumber": { + "title": "Routing number (for US accounts) or sort code (for UK accounts)", "type": "string" }, - "previewSmsBody": { + "updatedAt": { + "format": "date-time", + "title": "Last update timestamp", "type": "string" }, - "previewWebhookBody": { + "verificationNotes": { + "title": "Admin notes about verification status", "type": "string" } }, "type": "object" }, - "v1PricingCalculationConfig": { + "v1MarketplaceSearchParsedQuery": { + "description": "Structured filters extracted from the user query (word matcher today; LLM later).", "properties": { - "capHours": { - "format": "double", - "title": "Maximum billable hours (default 730 for monthly cap)", - "type": "number" + "filterBillingType": { + "$ref": "#/components/schemas/v1BillingType" }, - "couponValue": { - "title": "Decimal string with 6 decimal places precision (e.g., \"5.00\" for $5.00)", + "filterCity": { "type": "string" }, - "discountPercent": { - "format": "double", - "title": "Discounts", - "type": "number" + "filterComputeCategory": { + "$ref": "#/components/schemas/v1ComputeCategory" }, - "overageRates": { - "additionalProperties": { - "format": "double", - "type": "number" - }, - "title": "Overage rates (metric_name -> rate in minor currency units)", - "type": "object" + "filterComputeType": { + "$ref": "#/components/schemas/v1ComputeType" }, - "taxRate": { - "format": "double", - "title": "Tax rate (e.g., 0.10 for 10%)", - "type": "number" - } - }, - "type": "object" - }, - "v1PricingLineItem": { - "properties": { - "addons": { - "title": "Decimal string with 6 decimal places precision", + "filterCountry": { "type": "string" }, - "base": { - "title": "Decimal string with 6 decimal places precision", + "filterPlanCode": { "type": "string" }, - "currency": { - "type": "string" + "matchedTerms": { + "items": { + "type": "string" + }, + "type": "array" }, - "instanceLabel": { - "title": "Human-readable label", - "type": "string" + "minDiskGb": { + "format": "int32", + "type": "integer" }, - "quantity": { + "minRamGb": { "format": "int32", "type": "integer" }, - "subtotal": { - "title": "Decimal string with 6 decimal places precision", + "minVcpus": { + "format": "int32", + "type": "integer" + }, + "parser": { + "description": "Parser implementation id, e.g. \"word_matcher\" or future \"llm\".", "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": { + "v1MarketplaceSearchPlanPriceSummary": { "properties": { - "endExclusive": { - "format": "double", - "title": "null = unlimited", - "type": "number" - }, - "flatFee": { - "type": "boolean" - }, - "flatFeeAmount": { - "title": "Decimal string with 6 decimal places precision", - "type": "string" - }, - "startInclusive": { - "format": "double", - "type": "number" + "billingPeriod": { + "$ref": "#/components/schemas/v1BillingPeriod" }, - "tierName": { + "currency": { "type": "string" }, - "tierOrder": { + "freeUnits": { + "description": "Included free units (e.g. bandwidth GB). Used for bandwidth summaries in search.", "format": "int32", "type": "integer" }, - "tierType": { - "$ref": "#/components/schemas/v1TierMode" - }, - "unitAmount": { - "title": "Decimal string with 6 decimal places precision", - "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": { - "properties": { - "amount": { + "id": { "type": "string" }, - "code": { - "type": "string" + "metadata": { + "type": "object" }, - "couponName": { + "metricName": { "type": "string" }, - "expiresAt": { - "format": "date-time", + "overagePrice": { + "description": "Overage unit price as decimal string (same precision as PlanPrice.overage_price).", "type": "string" }, - "id": { - "type": "string" + "pricingFormula": { + "description": "Percentage / formula pricing for add-ons (e.g. backup = % of VM price).", + "type": "object" }, - "remaining": { - "type": "string" + "pricingModel": { + "$ref": "#/components/schemas/v1PricingModel" }, - "requiredTopup": { - "description": "USD top-up needed to activate a pending grant. Empty when none is needed.", - "type": "string" + "productType": { + "$ref": "#/components/schemas/v1ProductType" }, - "reserved": { + "unitAmount": { "type": "string" }, - "source": { - "type": "string" - }, - "status": { + "unitName": { "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.", + "v1MarketplaceSearchResult": { "properties": { - "assetType": { - "$ref": "#/components/schemas/v1AssetType" + "addonPrices": { + "items": { + "$ref": "#/components/schemas/v1MarketplaceSearchPlanPriceSummary" + }, + "type": "array" + }, + "bandwidthPrices": { + "description": "Bandwidth plan prices (egress/ingress) with free units + overage for search UI.", + "items": { + "$ref": "#/components/schemas/v1MarketplaceSearchPlanPriceSummary" + }, + "type": "array" }, "billingType": { "$ref": "#/components/schemas/v1BillingType" }, - "computeCategory": { - "$ref": "#/components/schemas/v1ComputeCategory" + "ddosProvider": { + "type": "string" }, - "computeType": { - "$ref": "#/components/schemas/v1ComputeType" + "diskGb": { + "format": "int32", + "type": "integer" }, - "planCode": { + "organizationId": { "type": "string" }, - "planDescription": { + "organizationName": { + "type": "string" + }, + "planCode": { "type": "string" }, "planId": { "type": "string" }, - "planName": { + "planPrice": { + "$ref": "#/components/schemas/v1MarketplaceSearchPlanPriceSummary" + }, + "providerLogoUrl": { "type": "string" }, - "planPrices": { - "items": { - "$ref": "#/components/schemas/v1PlanPrice" - }, - "type": "array" + "ramGb": { + "format": "int32", + "type": "integer" }, - "regions": { - "items": { - "$ref": "#/components/schemas/v1PlanRegion" - }, - "type": "array" + "rating": { + "format": "float", + "type": "number" + }, + "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" + }, + "vcpus": { + "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": { + "v1Metadata": { "properties": { - "activityStatus": { - "$ref": "#/components/schemas/v1ProviderCustomerVmActivityStatus" - }, - "assetType": { - "$ref": "#/components/schemas/v1ProviderCustomerAssetType" - }, - "complianceActor": { - "$ref": "#/components/schemas/v1ComplianceActor" - }, - "complianceHeld": { - "type": "boolean" - }, - "complianceMessage": { + "buildBranch": { "type": "string" }, - "complianceReason": { - "$ref": "#/components/schemas/v1ComplianceReason" + "buildCommit": { + "type": "string" }, - "createdAt": { - "format": "date-time", + "buildDate": { "type": "string" }, - "deleteTime": { - "description": "Set when the VM was deleted or terminated (soft-delete).", - "format": "date-time", + "buildTag": { "type": "string" }, - "displayName": { + "name": { "type": "string" }, - "id": { + "version": { "type": "string" }, - "ipv4": { + "versionDetails": { "type": "string" + } + }, + "type": "object" + }, + "v1Metric": { + "properties": { + "aggregationType": { + "$ref": "#/components/schemas/v1AggregationType" }, - "ipv6": { + "billable": { + "title": "Billing configuration", + "type": "boolean" + }, + "code": { "type": "string" }, - "os": { - "description": "OS/distro label from the VM template (e.g. ubuntu-22).", + "description": { "type": "string" }, - "planCode": { - "description": "Plan code (e.g. DC-HF-32C-\u2026) from the subscription plan.", + "externalId": { + "title": "External integration", "type": "string" }, - "planName": { + "id": { + "title": "Fields", "type": "string" }, - "region": { - "description": "Region label, e.g. \"Frankfurt, DE\".", + "metadata": { + "title": "Metadata", + "type": "object" + }, + "metricType": { + "$ref": "#/components/schemas/v1MetricType" + }, + "name": { + "title": "Metric identification", "type": "string" }, - "regionId": { - "description": "UUID of the node's region (same dimension as ListProviderCustomerAssetsRequest.region_id filter).", + "recurring": { + "type": "boolean" + }, + "retentionDays": { + "format": "int32", + "type": "integer" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "unit": { "type": "string" }, - "spec": { - "description": "Human-readable size, e.g. \"2 vCPU \u00b7 4096 MB RAM \u00b7 80 GB disk\".", + "unitPlural": { "type": "string" } }, "type": "object" }, - "v1ProviderCustomerAssetType": { - "default": "PROVIDER_CUSTOMER_ASSET_TYPE_UNSPECIFIED", + "v1MetricAggregation": { + "default": "METRIC_AGGREGATION_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" + "METRIC_AGGREGATION_UNSPECIFIED", + "METRIC_AGGREGATION_SUM", + "METRIC_AGGREGATION_MAX", + "METRIC_AGGREGATION_LAST_DURING_PERIOD", + "METRIC_AGGREGATION_COUNT" ], "type": "string" }, - "v1ProviderCustomerRow": { + "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": { - "addressSummary": { - "description": "Best-effort summary from organization metadata (billing/address keys).", + "agentId": { "type": "string" }, - "email": { + "createTime": { + "format": "date-time", "type": "string" }, - "firstName": { + "expiresAt": { + "format": "date-time", "type": "string" }, - "lastLoginTime": { + "id": { + "type": "string" + }, + "lastUsedAt": { "format": "date-time", "type": "string" }, - "lastName": { + "name": { "type": "string" }, "organizationId": { "type": "string" }, - "organizationName": { + "publicId": { "type": "string" }, - "paymentMethodBrand": { - "description": "Default payment method brand when known (visa, mastercard, amex, paypal, \u2026).", + "revokedAt": { + "format": "date-time", "type": "string" }, - "paymentMethodLast4": { - "description": "Last 4 digits of the default card. Empty for non-card methods or if unknown.", + "scopes": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "v1MoneyAmount": { + "properties": { + "amount": { + "title": "Decimal string, e.g. \"11.00\"", "type": "string" }, - "purchasesBlocked": { + "currency": { + "title": "ISO 4217 currency code", + "type": "string" + } + }, + "type": "object" + }, + "v1MyStorefront": { + "properties": { + "highlightAllowlist": { + "items": { + "type": "string" + }, + "type": "array" + }, + "liveRevision": { + "$ref": "#/components/schemas/v1StorefrontRevision" + }, + "liveSlug": { + "type": "string" + }, + "optedIn": { "type": "boolean" }, - "purchasesBlockedActor": { - "$ref": "#/components/schemas/v1ComplianceActor" + "participationStatus": { + "$ref": "#/components/schemas/v1StorefrontParticipationStatus" }, - "vmActivityStatus": { - "$ref": "#/components/schemas/v1ProviderCustomerVmActivityStatus" + "slugLocked": { + "type": "boolean" + }, + "suggestedSlug": { + "type": "string" + }, + "unpublishedByOps": { + "type": "boolean" + }, + "workingRevision": { + "$ref": "#/components/schemas/v1StorefrontRevision" } }, "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": { + "v1Network": { "properties": { - "activeSubscriptionCount": { - "format": "int32", - "type": "integer" + "description": { + "type": "string" }, - "addonId": { + "dnsServers": { + "items": { + "type": "string" + }, + "title": "DNS server IP addresses (e.g., [\"8.8.8.8\", \"1.1.1.1\"])", + "type": "array" + }, + "id": { + "title": "Fields", "type": "string" }, - "addonType": { - "$ref": "#/components/schemas/v1AddonType" + "macAddressPrefix": { + "description": "First 3 octets for MAC allocation within this network (e.g. BC:24:11). Default: BC:24:11.", + "type": "string" }, - "billingType": { - "$ref": "#/components/schemas/v1BillingType" + "metadata": { + "title": "Metadata", + "type": "object" }, - "code": { + "name": { "type": "string" }, - "distinctCustomerOrgCount": { - "format": "int32", - "type": "integer" + "nodes": { + "items": { + "$ref": "#/components/schemas/v1NetworkNode" + }, + "title": "Nodes connected to this network (only populated in ListNetworks response)", + "type": "array" }, - "distinctVmCount": { - "format": "int32", - "type": "integer" + "organizationId": { + "title": "Relations", + "type": "string" }, - "name": { + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + } + }, + "type": "object" + }, + "v1NetworkNode": { + "properties": { + "id": { "type": "string" }, - "pricingModel": { - "$ref": "#/components/schemas/v1PricingModel" + "name": { + "type": "string" } }, + "title": "NetworkNode represents a node connected to a network (simplified info)", "type": "object" }, - "v1ProviderDashboardNodeRollup": { + "v1Node": { "properties": { - "capacityCpuCores": { - "format": "int32", - "type": "integer" + "backupStorageCompression": { + "$ref": "#/components/schemas/v1BackupStorageCompression" }, - "capacityMemoryMb": { - "format": "int64", + "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" }, - "hypervisorId": { - "description": "VirtFusion hypervisor_id or SolusVM compute_resource_id; used to join Prom series.", + "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" }, - "nodeCpuCoreAllocated": { - "format": "int32", - "type": "integer" + "metadata": { + "title": "Metadata", + "type": "object" }, - "nodeId": { + "name": { "type": "string" }, - "nodeMemoryAllocatedMb": { - "format": "int64", + "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" }, - "nodeName": { + "networkId": { + "description": "Network ID this node is assigned to (optional)", + "title": "Network assignment (IPAM)", "type": "string" }, - "platformId": { + "networkModel": { + "description": "Proxmox NIC model for primary NIC (virtio, e1000, ...). Default: virtio.", "type": "string" }, - "platformName": { + "networkName": { + "description": "Proxmox net device key for primary NIC (e.g. net0). Default: net0.", "type": "string" }, - "regionId": { - "type": "string" + "networkVlanId": { + "description": "802.1Q VLAN tag on primary NIC (Proxmox tag=); 0 = untagged.", + "format": "int32", + "type": "integer" }, - "soldCpuCores": { - "format": "int64", + "organizationId": { "type": "string" }, - "soldMemoryMb": { - "format": "int64", + "panelNodeId": { + "format": "int32", + "type": "integer" + }, + "platform": { + "title": "Relations", "type": "string" }, - "soldStorageGb": { - "format": "int64", + "pterodactylLocationId": { + "format": "int32", + "type": "integer" + }, + "region": { "type": "string" }, + "serviceStatus": { + "$ref": "#/components/schemas/v1ServiceStatus" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, "storageOverallocatePercent": { "format": "int32", "type": "integer" }, - "vmCount": { + "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" }, - "v1ProviderDashboardPlanSubscriptionStat": { + "v1NodeCPUMapCPU": { "properties": { - "activeSubscriptionCount": { + "core": { + "description": "Physical core id (unique within a socket).", "format": "int32", "type": "integer" }, - "assetType": { - "$ref": "#/components/schemas/v1AssetType" + "cpu": { + "description": "Host logical CPU id (the affinity bit).", + "format": "int32", + "type": "integer" }, - "billingPeriod": { - "$ref": "#/components/schemas/v1BillingPeriod" + "cpuStatus": { + "$ref": "#/components/schemas/v1NodeCPUStatus" }, - "billingType": { - "$ref": "#/components/schemas/v1BillingType" + "numa": { + "format": "int32", + "type": "integer" }, - "code": { - "type": "string" + "siblings": { + "description": "Full SMT sibling set including this CPU.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" }, - "distinctCustomerOrgCount": { + "socket": { "format": "int32", "type": "integer" }, - "name": { + "vmHostname": { "type": "string" }, - "planId": { + "vmId": { + "description": "Set when cpu_status is ALLOCATED_NR.", "type": "string" - }, - "vmAssetCount": { - "format": "int32", - "type": "integer" } }, "type": "object" }, - "v1ProviderDashboardPlansTabStats": { + "v1NodeCPUMapNUMA": { "properties": { - "kpiActiveAddonSubscriptionsSum": { + "freeCores": { "format": "int32", "type": "integer" }, - "kpiActiveSubscriptionsSum": { + "id": { "format": "int32", "type": "integer" }, - "kpiPlanCount": { - "format": "int32", - "type": "integer" + "memoryAllocatedMb": { + "description": "Memory attributed to NodeRings VMs placed on this NUMA node.", + "format": "int64", + "type": "string" }, - "kpiVmAssetsSum": { - "format": "int32", - "type": "integer" - } - }, - "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.).", - "properties": { - "availablePlans": { - "items": { - "$ref": "#/components/schemas/v1ProviderCatalogPlan" - }, - "type": "array" - }, - "availableRegions": { - "items": { - "type": "string" - }, - "type": "array" - }, - "avgTicketResponseSeconds": { - "format": "int64", - "type": "string" - }, - "ddosSolution": { - "type": "string" - }, - "hasIpv6": { - "description": "True when any listed region would report ipv6_available_in_filtered_region.", - "type": "boolean" - }, - "provider": { - "$ref": "#/components/schemas/v1ProviderInfo" - }, - "reviewBreakdown": { - "$ref": "#/components/schemas/v1ProviderReviewBreakdown" - }, - "website": { - "type": "string" - } - }, - "type": "object" - }, - "v1ProviderInfo": { - "properties": { - "capabilities": { - "description": "Capability strings from platformdriver (guest_firewall, instant_apps, \u2026).", - "items": { - "type": "string" - }, - "type": "array" - }, - "ddosProvider": { - "description": "DDoS mitigation partner slug; \"none\" or empty means no DDoS vendor icon in marketplace.", - "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" - }, - "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.", + "memoryEstimated": { "type": "boolean" }, - "metadata": { - "title": "Additional provider metadata", - "type": "object" - }, - "organizationId": { + "memoryFreeMb": { + "format": "int64", "type": "string" }, - "organizationName": { + "memoryMb": { + "format": "int64", "type": "string" }, - "planId": { - "title": "The plan ID for the requested plan code", + "memoryReservedMb": { + "description": "Host reserve withheld from VMs on this NUMA node.", + "format": "int64", "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": { + "sockets": { "items": { - "$ref": "#/components/schemas/v1PlanRegion" + "format": "int32", + "type": "integer" }, - "title": "All regions where the plan is available (region_id, country, city)", "type": "array" }, - "platformDriver": { - "$ref": "#/components/schemas/v1PlatformDriver" - }, - "providerLogoUrl": { - "type": "string" - }, - "rating": { - "format": "float", - "title": "Average rating (0-5 stars)", - "type": "number" - }, - "totalReviews": { + "totalCores": { + "description": "Logical CPU (vCPU) counts on this NUMA node \u2014 sellable capacity units.", "format": "int32", - "title": "Total number of reviews", "type": "integer" } }, - "title": "Provider information for marketplace/discovery", - "type": "object" - }, - "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).", + "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": [ - "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" + "NODE_CPU_STATUS_UNSPECIFIED", + "NODE_CPU_STATUS_AVAILABLE", + "NODE_CPU_STATUS_ALLOCATED_NR", + "NODE_CPU_STATUS_PINNED_FOREIGN", + "NODE_CPU_STATUS_DRIFT" ], "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", + "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": [ - "PROVIDER_PLAN_PRICE_SORT_UNSPECIFIED", - "PROVIDER_PLAN_PRICE_SORT_LEAST_EXPENSIVE_FIRST", - "PROVIDER_PLAN_PRICE_SORT_MOST_EXPENSIVE_FIRST" + "NODE_COMPUTE_TYPE_UNSPECIFIED", + "NODE_COMPUTE_TYPE_SHARED", + "NODE_COMPUTE_TYPE_DEDICATED" ], "type": "string" }, - "v1ProviderRevenueWaterfall": { - "properties": { - "chargeCurrency": { - "type": "string" - }, - "currencyConversionFee": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "grossSales": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "grossSalesSettled": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "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" - }, - "v1ProviderReviewBreakdown": { + "v1NodeInventory": { "properties": { - "fiveStar": { + "cpuCore": { "format": "int32", "type": "integer" }, - "fourStar": { + "cpuCoreAllocated": { "format": "int32", "type": "integer" }, - "oneStar": { - "format": "int32", - "type": "integer" + "cpuType": { + "$ref": "#/components/schemas/v1CPUType" }, - "threeStar": { + "memory": { "format": "int32", "type": "integer" }, - "twoStar": { + "memoryAllocated": { "format": "int32", "type": "integer" + }, + "storagePools": { + "items": { + "$ref": "#/components/schemas/v1StoragePool" + }, + "type": "array" } }, "type": "object" }, - "v1ProviderReviewListItem": { - "description": "Provider UI: list and respond to client reviews (no VM identifiers: anonymous to provider).", + "v1NodePlacementPolicy": { "properties": { - "comment": { - "type": "string" - }, - "createTime": { - "format": "date-time", - "type": "string" - }, - "id": { - "type": "string" - }, - "providerRepliedAt": { - "format": "date-time", - "type": "string" - }, - "providerReply": { - "type": "string" - }, - "starRating": { - "format": "int32", - "type": "integer" + "defaultStrategy": { + "$ref": "#/components/schemas/v1NodePlacementStrategy" }, - "updateTime": { - "format": "date-time", - "type": "string" + "regionOverrides": { + "items": { + "$ref": "#/components/schemas/v1NodePlacementRegionOverride" + }, + "type": "array" } }, "type": "object" }, - "v1ProviderReviewStarSummary": { + "v1NodePlacementRegionOverride": { "properties": { - "reviewCount": { - "format": "int32", - "type": "integer" + "regionId": { + "type": "string" }, - "starRating": { - "format": "int32", - "type": "integer" + "strategy": { + "$ref": "#/components/schemas/v1NodePlacementStrategy" } }, "type": "object" }, - "v1ProviderStripeActivityEvent": { + "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": { - "at": { - "format": "date-time", - "type": "string" + "expandedRegion": { + "$ref": "#/components/schemas/v1Region" }, - "label": { - "type": "string" + "node": { + "$ref": "#/components/schemas/v1Node" } }, "type": "object" }, - "v1ProviderStripePaymentMethodDetails": { + "v1NotificationSetting": { "properties": { - "brand": { - "type": "string" + "enabled": { + "type": "boolean" }, - "cardType": { - "title": "e.g. visa credit card", + "id": { + "title": "Fields", "type": "string" }, - "expMonth": { - "format": "int32", - "type": "integer" - }, - "expYear": { - "format": "int32", - "type": "integer" - }, - "fingerprint": { - "type": "string" + "metadata": { + "title": "Metadata", + "type": "object" }, - "id": { + "organization": { "type": "string" }, - "issuer": { - "type": "string" + "status": { + "$ref": "#/components/schemas/protov1Status" }, - "last4": { - "type": "string" + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" }, - "originCountry": { + "type": { "type": "string" }, - "ownerName": { + "user": { + "title": "Relations", "type": "string" } }, "type": "object" }, - "v1ProviderStripeTransaction": { + "v1NotificationTemplate": { "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": { - "type": "string" - }, - "customerName": { - "type": "string" - }, - "declineReason": { + "contentType": { "type": "string" }, "description": { "type": "string" }, - "exchangeRate": { + "emailBodyTemplate": { "type": "string" }, - "feesTotalSettled": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "netAmount": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "paymentAmountSettled": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "paymentIntentId": { + "emailSubjectTemplate": { "type": "string" }, - "paymentMethodBrand": { + "id": { + "title": "Fields", "type": "string" }, - "paymentMethodDetails": { - "$ref": "#/components/schemas/v1ProviderStripePaymentMethodDetails" + "metadata": { + "title": "Metadata", + "type": "object" }, - "paymentMethodLast4": { + "name": { "type": "string" }, - "platformFee": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "platformFeeSettled": { - "$ref": "#/components/schemas/v1MoneyAmount" - }, - "refundedAt": { - "format": "date-time", + "pushNotificationBodyTemplate": { "type": "string" }, - "settlementMerchant": { + "pushNotificationTitleTemplate": { "type": "string" }, - "statementDescriptor": { + "smsBodyTemplate": { "type": "string" }, "status": { - "type": "string" + "$ref": "#/components/schemas/protov1Status" }, - "stripeProcessingFee": { - "$ref": "#/components/schemas/v1MoneyAmount" + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" }, - "transferredTo": { + "webhookBodyTemplate": { "type": "string" } }, "type": "object" }, - "v1ProviderTicketNotificationPolicy": { + "v1OAuth2Client": { "properties": { - "destinationEmail": { + "clientId": { "type": "string" }, - "effectiveDestinationEmail": { - "description": "Resolved mailbox used when destination_email is empty (support_email fallback).", + "clientType": { "type": "string" }, - "enabled": { + "description": { + "type": "string" + }, + "isActive": { "type": "boolean" }, - "extraEmails": { + "name": { + "type": "string" + }, + "redirectUris": { "items": { "type": "string" }, "type": "array" }, - "id": { - "type": "string" - }, - "inboundRepliesEnabled": { - "description": "True when NodeRings can accept helpdesk replies (inbound secret configured).", + "requiresPkce": { "type": "boolean" }, - "includeClientContact": { - "type": "boolean" + "scopes": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "v1OpenConsoleResponse": { + "properties": { + "ticket": { + "type": "string" }, - "includeMessageBody": { + "websocketPath": { + "type": "string" + } + }, + "type": "object" + }, + "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": { + "eula": { + "description": "eula is true when this egg stops until the player accepts the Minecraft EULA.", "type": "boolean" }, - "minPriority": { - "$ref": "#/components/schemas/v1TicketPriority" - }, - "notifyOnClientReplied": { - "type": "boolean" + "icon": { + "type": "string" }, - "notifyOnClosed": { - "type": "boolean" + "id": { + "type": "string" }, - "notifyOnCreated": { - "type": "boolean" + "name": { + "type": "string" }, - "notifyOnEscalated": { - "type": "boolean" + "variables": { + "items": { + "$ref": "#/components/schemas/v1EggVariable" + }, + "type": "array" } }, "type": "object" }, - "v1PublicStorefront": { + "v1Organization": { "properties": { - "aboutHtml": { + "asn": { + "format": "int64", "type": "string" }, - "approvedAt": { - "format": "date-time", + "ddosProvider": { + "description": "DDoS mitigation partner slug (e.g. \"none\"). Provider organizations only.", "type": "string" }, - "catalog": { - "$ref": "#/components/schemas/v1ProviderDetails" - }, - "coverImageUrl": { + "description": { "type": "string" }, - "faqs": { - "items": { - "$ref": "#/components/schemas/v1StorefrontFAQ" - }, - "type": "array" - }, - "featuredPlanIds": { + "domains": { "items": { "type": "string" }, "type": "array" }, - "highlightCustom": { - "type": "string" + "enforceMfa": { + "type": "boolean" }, - "highlightCustomLines": { - "items": { - "type": "string" - }, - "type": "array" + "enforceSso": { + "type": "boolean" }, - "highlightKeys": { + "enforceVerifiedDomain": { + "type": "boolean" + }, + "groups": { "items": { "type": "string" }, "type": "array" }, - "logoImageUrl": { - "description": "Approved storefront wordmark. Not the organization marketplace logo.", - "type": "string" + "hypervisorDriver": { + "$ref": "#/components/schemas/v1PlatformDriver" }, - "organizationName": { + "id": { + "title": "Fields", "type": "string" }, - "providerId": { - "type": "string" + "isVerified": { + "description": "Provider marketplace / admin verification (first-class fields; not part of metadata).", + "type": "boolean" }, - "reviews": { - "items": { - "$ref": "#/components/schemas/v1StorefrontPublicReview" - }, - "type": "array" + "metadata": { + "title": "Metadata", + "type": "object" }, - "slug": { + "name": { "type": "string" }, - "socialUrls": { - "items": { - "type": "string" - }, - "type": "array" + "onboarded": { + "description": "True after the provider has completed the self-serve onboarding checklist once.", + "type": "boolean" }, - "tagline": { - "type": "string" - } - }, - "type": "object" - }, - "v1PublicStorefrontCard": { - "properties": { - "cities": { + "organizationRoles": { "items": { "type": "string" }, "type": "array" }, - "organizationName": { + "owner": { + "title": "Relations", "type": "string" }, - "providerId": { + "providerLogoUrl": { + "title": "Provider marketplace logo (data URL or https URL); only used for provider organizations", "type": "string" }, - "providerLogoUrl": { - "description": "Approved storefront wordmark. Not the organization marketplace logo.", + "providerWebsiteUrl": { + "description": "Public storefront / company website (http or https). Provider organizations only.", "type": "string" }, - "rating": { - "format": "float", - "type": "number" + "reviewRequested": { + "type": "boolean" }, - "slug": { - "type": "string" + "status": { + "$ref": "#/components/schemas/protov1Status" }, - "tagline": { - "type": "string" + "subscriptions": { + "items": { + "type": "string" + }, + "type": "array" }, - "totalReviews": { - "format": "int32", - "type": "integer" + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" }, - "website": { - "type": "string" + "type": { + "$ref": "#/components/schemas/v1OrganizationType" } }, + "title": "Organization object for providers and clients", "type": "object" }, - "v1PurchaseCreditsRequest": { + "v1OrganizationDetails": { "properties": { - "amount": { - "title": "Decimal string: USD amount to top-up", + "name": { "type": "string" }, - "paymentMethodId": { - "description": "Optional: payment method ID to charge. If omitted, the org's default\npayment method is used.", + "orgType": { "type": "string" } }, + "title": "OrganizationDetails contains organization information", "type": "object" }, - "v1PurchaseCreditsResponse": { + "v1OrganizationType": { + "default": "ORGANIZATION_TYPE_UNSPECIFIED", + "enum": [ + "ORGANIZATION_TYPE_UNSPECIFIED", + "ORGANIZATION_TYPE_PROVIDER", + "ORGANIZATION_TYPE_CLIENT" + ], + "type": "string" + }, + "v1PayInvoiceResponse": { "properties": { - "clientSecret": { - "title": "Stripe PaymentIntent client_secret for 3DS confirmation", - "type": "string" + "invoice": { + "$ref": "#/components/schemas/v1Invoice" }, - "creditPurchaseId": { - "title": "CreditPurchase row id", - "type": "string" + "invoiceLines": { + "items": { + "$ref": "#/components/schemas/v1InvoiceLine" + }, + "type": "array" }, - "paymentIntentId": { - "title": "Stripe PaymentIntent id", + "paymentStatus": { "type": "string" }, - "requiresAction": { - "title": "True if 3DS/SCA confirmation is needed client-side", - "type": "boolean" - } - }, - "type": "object" - }, - "v1ReadFileResponse": { - "properties": { - "content": { - "format": "byte", + "transactionId": { "type": "string" } }, "type": "object" }, - "v1RecordUsageRequest": { + "v1Payment": { "properties": { - "eventId": { - "description": "For idempotent writes", - "title": "Deduplication and metadata", + "amount": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "externalId": { - "title": "External integration", + "createdAt": { + "format": "date-time", "type": "string" }, - "metricCode": { + "currency": { + "title": "Currency code (ISO 4217)", "type": "string" }, - "metricId": { - "title": "Metric reference (either metric_id or metric_code must be provided)", + "failureCode": { + "title": "Payment provider failure code (if applicable)", "type": "string" }, - "properties": { - "title": "Additional metadata (region, instance_id, etc.)", - "type": "object" + "failureReason": { + "title": "Reason for payment failure (if applicable)", + "type": "string" }, - "quantity": { - "description": "Decimal as string", - "title": "Usage data", + "id": { "type": "string" }, - "subscriptionId": { - "title": "Subscription reference", + "invoiceId": { + "title": "Invoice this payment is for", "type": "string" }, - "timestamp": { + "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" - } - }, - "type": "object" - }, - "v1RecordUsageResponse": { - "properties": { - "isDuplicate": { - "title": "True if event_id already existed", - "type": "boolean" }, - "usageRecord": { - "$ref": "#/components/schemas/v1UsageRecord" - } - }, - "type": "object" - }, - "v1RedeemPromoCodeRequest": { - "properties": { - "code": { + "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" }, - "v1RedeemPromoCodeResponse": { + "v1PaymentMethod": { "properties": { - "amount": { + "brand": { + "description": "Card brand (for cards): \"visa\", \"mastercard\", etc.", "type": "string" }, - "expiresAt": { - "description": "For a pending grant, the deadline for the required top-up.", + "createdAt": { "format": "date-time", + "title": "When payment method was attached", "type": "string" }, - "grantId": { + "customerId": { + "title": "Payment provider customer ID", "type": "string" }, - "remaining": { + "expiryMonth": { + "format": "int32", + "title": "Expiry month (for cards, 1-12)", + "type": "integer" + }, + "expiryYear": { + "format": "int32", + "title": "Expiry year (for cards)", + "type": "integer" + }, + "id": { "type": "string" }, - "requiredTopup": { - "description": "USD top-up needed to activate a pending grant.", + "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": { - "description": "active, or pending when the code needs a top-up first.", + "$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" }, - "v1RefreshTokenRequest": { + "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": { - "clientId": { - "type": "string" + "enabled": { + "title": "Whether payout configuration is enabled (default: true)", + "type": "boolean" }, - "clientSecret": { - "title": "Optional for public clients", + "scheduleTime": { + "title": "Time in HH:MM format (24-hour, UTC) - e.g., \"09:00\" for 9 AM", "type": "string" }, - "refreshToken": { + "scheduleTimezone": { + "title": "IANA timezone identifier (e.g., \"UTC\", \"America/New_York\") - defaults to \"UTC\"", "type": "string" + }, + "scheduleType": { + "$ref": "#/components/schemas/v1PayoutScheduleType" } }, "type": "object" }, - "v1Refund": { + "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": { "amount": { - "title": "Decimal string with 6 decimal places precision", + "title": "Payout amount (decimal string with 6 decimal places precision)", "type": "string" }, - "createdAt": { + "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 refund failure (if applicable)", + "title": "Reason for payout failure (if applicable)", "type": "string" }, "id": { + "title": "PayoutInvoice ID", "type": "string" }, - "paymentId": { - "title": "Payment this refund is for", + "invoiceIds": { + "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", "type": "string" }, + "maxRetries": { + "format": "int32", + "title": "Maximum number of retry attempts", + "type": "integer" + }, + "metadata": { + "title": "Additional metadata", + "type": "object" + }, "paymentProvider": { - "description": "Payment provider name (e.g., 'stripe', 'paypal')", - "title": "Stripe refund.id, PayPal refund.id)", + "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 refund was processed", + "title": "When payout transfer was initiated/processed", "type": "string" }, - "providerRefundId": { - "title": "Payment provider refund ID (e.g.,", + "providerOrganizationId": { + "title": "Provider organization that receives this payout", "type": "string" }, - "refundStatus": { - "$ref": "#/components/schemas/v1RefundStatus" + "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" } }, - "title": "Refund represents a refund transaction for a payment", "type": "object" }, - "v1RefundStatus": { - "default": "REFUND_STATUS_UNSPECIFIED", + "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": [ - "REFUND_STATUS_UNSPECIFIED", - "REFUND_STATUS_PENDING", - "REFUND_STATUS_PROCESSING", - "REFUND_STATUS_SUCCEEDED", - "REFUND_STATUS_FAILED", - "REFUND_STATUS_CANCELED" + "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" }, - "v1RegenerateMfaBackupCodesRequest": { - "properties": { - "code": { - "type": "string" - } - }, - "type": "object" - }, - "v1RegenerateMfaBackupCodesResponse": { - "properties": { - "backupCodes": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" + "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" }, - "v1Region": { + "v1Permission": { "properties": { - "cityCountry": { - "$ref": "#/components/schemas/v1CityCountry" - }, - "datacenter": { - "$ref": "#/components/schemas/v1Datacenter" + "httpMethod": { + "type": "string" }, "id": { - "title": "Fields", "type": "string" }, - "organizationId": { + "methodName": { "type": "string" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - } - }, - "type": "object" - }, - "v1RegionLocation": { - "properties": { - "city": { - "title": "City name", + "scope": { "type": "string" }, - "country": { - "title": "Country name", + "serviceName": { "type": "string" } }, - "title": "Region location information (deduplicated city+country combinations)", "type": "object" }, - "v1RegisterUserRequest": { + "v1Plan": { "properties": { - "email": { + "assetCategory": { + "$ref": "#/components/schemas/v1AssetCategory" + }, + "assetType": { + "$ref": "#/components/schemas/v1AssetType" + }, + "autoRenew": { + "type": "boolean" + }, + "billingPeriod": { + "$ref": "#/components/schemas/v1BillingPeriod" + }, + "billingType": { + "$ref": "#/components/schemas/v1BillingType" + }, + "code": { "type": "string" }, - "firstName": { + "currency": { "type": "string" }, - "lastName": { + "description": { "type": "string" }, - "password": { + "effectiveFrom": { + "format": "date-time", "type": "string" }, - "turnstileToken": { - "description": "Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).", - "type": "string" - } - }, - "type": "object" - }, - "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": { - "addonSubscription": { - "$ref": "#/components/schemas/v1AddonSubscription" - } - }, - "type": "object" - }, - "v1RemovePaymentMethodResponse": { - "properties": { - "success": { - "type": "boolean" - } - }, - "type": "object" - }, - "v1ReplaceRoleForGroupRequest": { - "properties": { - "groupId": { + "effectiveUntil": { + "format": "date-time", "type": "string" }, - "roleId": { - "type": "string" - } - }, - "type": "object" - }, - "v1ReplaceRoleForServiceAccountRequest": { - "properties": { - "roleId": { - "type": "string" + "endUser": { + "$ref": "#/components/schemas/v1EndUser" }, - "serviceAccountId": { - "type": "string" - } - }, - "type": "object" - }, - "v1ReplaceRoleForUserRequest": { - "properties": { - "roleId": { + "externalBillingId": { "type": "string" }, - "userId": { - "type": "string" - } - }, - "type": "object" - }, - "v1ResendVerificationEmailRequest": { - "properties": { - "email": { - "type": "string" + "gracePeriodDays": { + "format": "int32", + "type": "integer" }, - "turnstileToken": { - "description": "Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).", + "id": { + "title": "Fields", "type": "string" - } - }, - "type": "object" - }, - "v1ResetPasswordRequest": { - "properties": { - "email": { + }, + "isPublic": { + "type": "boolean" + }, + "maxSubscribers": { + "format": "int32", + "type": "integer" + }, + "metadata": { + "title": "Metadata", + "type": "object" + }, + "name": { "type": "string" }, - "newPassword": { + "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.", "type": "string" }, - "resetToken": { + "organizationName": { + "description": "Name of the organization that owns this plan", + "title": "Organization/tenant information", "type": "string" - } - }, - "type": "object" - }, - "v1ResourceInstanceInput": { - "properties": { - "addons": { + }, + "planCategory": { + "$ref": "#/components/schemas/v1PlanCategory" + }, + "planPrices": { "items": { - "$ref": "#/components/schemas/v1AddonInput" + "$ref": "#/components/schemas/v1PlanPrice" }, - "title": "Add-ons", "type": "array" }, - "hoursUsed": { - "format": "double", - "type": "number" + "planType": { + "$ref": "#/components/schemas/v1PlanType" }, - "quantity": { + "regionIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "requiresManualApproval": { + "type": "boolean" + }, + "rulesetIds": { + "items": { + "type": "string" + }, + "title": "Relations", + "type": "array" + }, + "setupFee": { + "title": "Decimal string with 6 decimal places", + "type": "string" + }, + "slaHours": { "format": "int32", "type": "integer" }, - "region": { - "type": "string" + "status": { + "$ref": "#/components/schemas/protov1Status" }, - "usage": { - "additionalProperties": { - "format": "double", - "type": "number" + "subscriptionIds": { + "items": { + "type": "string" }, - "title": "Usage metrics (e.g., {\"vCPU\": 2, \"RAM_GB\": 4, \"Egress_GB\": 1200})", - "type": "object" + "type": "array" + }, + "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" }, - "v1RestoreStatus": { - "default": "RESTORE_STATUS_UNSPECIFIED", + "v1PlanCategory": { + "default": "PLAN_CATEGORY_UNSPECIFIED", "enum": [ - "RESTORE_STATUS_UNSPECIFIED", - "RESTORE_STATUS_NONE", - "RESTORE_STATUS_REQUESTED", - "RESTORE_STATUS_RESTORING", - "RESTORE_STATUS_COMPLETED", - "RESTORE_STATUS_FAILED" + "PLAN_CATEGORY_UNSPECIFIED", + "PLAN_CATEGORY_FREE", + "PLAN_CATEGORY_STARTER", + "PLAN_CATEGORY_PREMIUM", + "PLAN_CATEGORY_CUSTOM" ], - "title": "RestoreStatus represents the restore status of a backup or snapshot", "type": "string" }, - "v1RetryPaymentRequest": { + "v1PlanLiveValidationBenchmarkView": { "properties": { - "paymentMethodId": { - "title": "Optional: payment method ID to use for retry\nIf not provided, uses the default payment method", + "cpu": { + "type": "object" + }, + "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", + "id": { "type": "string" - } - }, - "type": "object" - }, - "v1RetryPaymentResponse": { - "properties": { - "paymentStatus": { - "title": "Payment status (available after task completes)", + }, + "memory": { + "type": "object" + }, + "misc": { + "type": "object" + }, + "network": { + "type": "object" + }, + "nodeId": { "type": "string" }, - "subscription": { - "$ref": "#/components/schemas/v1Subscription" + "nodeName": { + "type": "string" }, - "taskId": { - "title": "Task ID for tracking async payment retry processing", + "passed": { + "type": "boolean" + }, + "planCode": { "type": "string" }, - "transactionId": { - "title": "Transaction ID from payment provider (available after task completes)", + "planId": { "type": "string" - } - }, - "type": "object" - }, - "v1RevokeCouponResponse": { - "properties": { - "coupon": { - "$ref": "#/components/schemas/v1Coupon" }, - "revokedApplications": { - "format": "int32", - "type": "integer" + "storage": { + "type": "object" } }, "type": "object" }, - "v1RevokeTokenRequest": { + "v1PlanLiveValidationNodeView": { "properties": { - "clientId": { + "nodeId": { "type": "string" }, - "token": { + "nodeName": { "type": "string" }, - "tokenTypeHint": { - "title": "\"access_token\" or \"refresh_token\"", + "regionId": { + "type": "string" + }, + "regionName": { "type": "string" } }, "type": "object" }, - "v1RoadmapFeatureRequest": { + "v1PlanLiveValidationView": { "properties": { - "assigneeName": { + "checkedAt": { + "format": "date-time", "type": "string" }, - "authorDisplayName": { - "type": "string" + "checks": { + "items": { + "$ref": "#/components/schemas/v1LiveValidationCheckView" + }, + "type": "array" }, - "commentCount": { - "format": "int32", - "type": "integer" + "includeBenchmarking": { + "type": "boolean" }, - "createdAt": { - "format": "date-time", - "type": "string" + "marketplaceLiveValidated": { + "type": "boolean" }, - "description": { + "nodeId": { "type": "string" }, - "id": { + "nodeName": { "type": "string" }, - "isPinned": { + "passed": { "type": "boolean" }, - "product": { - "$ref": "#/components/schemas/v1RoadmapProductCategory" - }, - "slug": { + "phase": { "type": "string" }, - "status": { - "$ref": "#/components/schemas/v1RoadmapRequestStatus" + "planCode": { + "type": "string" }, - "statusChangedAt": { - "format": "date-time", + "planId": { "type": "string" }, - "title": { + "regionName": { "type": "string" }, - "upvoteCount": { - "format": "int32", - "type": "integer" + "startedAt": { + "format": "date-time", + "type": "string" }, - "userVote": { - "$ref": "#/components/schemas/v1RoadmapVoteType" + "status": { + "type": "string" }, - "voteScore": { - "format": "int32", - "type": "integer" + "summaryNote": { + "type": "string" } }, "type": "object" }, - "v1RoadmapFeatureRequestComment": { + "v1PlanPreflightView": { "properties": { - "authorDisplayName": { - "type": "string" + "billingType": { + "$ref": "#/components/schemas/v1BillingType" }, - "body": { - "type": "string" + "infrastructure": { + "items": { + "$ref": "#/components/schemas/v1PreflightInfrastructureView" + }, + "type": "array" }, - "canEdit": { + "marketplaceReady": { "type": "boolean" }, - "createdAt": { - "format": "date-time", + "planChecks": { + "items": { + "$ref": "#/components/schemas/v1PreflightCheckView" + }, + "type": "array" + }, + "planCode": { "type": "string" }, - "id": { + "planId": { "type": "string" }, - "isEdited": { - "type": "boolean" + "planName": { + "type": "string" }, - "isOwn": { - "type": "boolean" + "regionLabels": { + "items": { + "type": "string" + }, + "type": "array" }, - "updatedAt": { - "format": "date-time", + "summaryIssues": { + "items": { + "type": "string" + }, + "type": "array" + }, + "summaryNote": { "type": "string" } }, "type": "object" }, - "v1RoadmapProductCategory": { + "v1PlanPrice": { "properties": { - "color": { - "type": "string" + "billingInterval": { + "format": "int32", + "type": "integer" }, - "description": { - "type": "string" + "billingPeriod": { + "$ref": "#/components/schemas/v1BillingPeriod" }, - "icon": { + "chargeTiming": { + "$ref": "#/components/schemas/v1ChargeTiming" + }, + "currency": { + "title": "Pricing details", "type": "string" }, - "id": { + "effectiveFrom": { + "format": "date-time", + "title": "Status and lifecycle", "type": "string" }, - "name": { + "effectiveUntil": { + "format": "date-time", "type": "string" }, - "slug": { + "externalId": { + "title": "External integration", "type": "string" }, - "sortOrder": { - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "v1RoadmapProductStats": { - "properties": { - "completed": { - "format": "int32", - "type": "integer" + "freeAmount": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" }, - "inProgress": { + "freeUnits": { "format": "int32", + "title": "Free tier configuration", "type": "integer" }, - "inReview": { - "format": "int32", - "type": "integer" + "id": { + "title": "Fields", + "type": "string" }, - "planned": { + "maxQuantity": { "format": "int32", + "title": "Maximum quantity (primarily for addons)", "type": "integer" }, - "productName": { + "maximumCharge": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "productSlug": { - "type": "string" - } - }, - "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" - }, - "v1Role": { - "properties": { - "description": { - "type": "string" + "metadata": { + "title": "Metadata", + "type": "object" }, - "groupIds": { + "metered": { + "type": "boolean" + }, + "metricAggregation": { + "$ref": "#/components/schemas/v1MetricAggregation" + }, + "metricIds": { "items": { "type": "string" }, "type": "array" }, - "id": { - "title": "Fields", + "metricName": { + "title": "Usage-based pricing", "type": "string" }, - "isBuiltin": { - "type": "boolean" + "minQuantity": { + "format": "int32", + "title": "Minimum quantity (primarily for addons)", + "type": "integer" }, - "metadata": { - "title": "Metadata", - "type": "object" + "minimumCharge": { + "description": "Decimal string with 6 decimal places precision", + "title": "Minimum and maximum charges", + "type": "string" }, - "name": { + "overagePrice": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "organizationId": { - "title": "Relations", + "packagePrice": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "permissions": { + "packageSize": { + "format": "int32", + "title": "Package pricing", + "type": "integer" + }, + "parentPlanId": { + "title": "For addon prices: reference to parent plan (percentage-based pricing)", + "type": "string" + }, + "planPrices": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1Plan" }, + "title": "Relations", "type": "array" }, - "status": { - "$ref": "#/components/schemas/protov1Status" + "pricingFormula": { + "title": "Pricing formula for percentage/complex calculations", + "type": "object" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "pricingModel": { + "$ref": "#/components/schemas/v1PricingModel" }, - "users": { + "pricingTierIds": { "items": { - "$ref": "#/components/schemas/v1UserSummary" + "type": "string" }, "type": "array" - } - }, - "type": "object" - }, - "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": [ - "RULE_EFFECT_UNSPECIFIED", - "RULE_EFFECT_ENABLE", - "RULE_EFFECT_ENTITLE", - "RULE_EFFECT_LIMIT" - ], - "title": "RuleEffect represents the effect type of a rule", - "type": "string" - }, - "v1Rules": { - "properties": { - "boolValue": { - "title": "Boolean value for ENABLE/ENTITLE effects", + }, + "productType": { + "$ref": "#/components/schemas/v1ProductType" + }, + "prorate": { + "title": "Proration and billing", "type": "boolean" }, - "currentUsage": { - "format": "int64", - "title": "Optional: current usage count (only for LIMIT rules)", - "type": "string" + "status": { + "$ref": "#/components/schemas/protov1Status" }, - "effect": { - "$ref": "#/components/schemas/v1RuleEffect" + "subscriptionTemplateIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "int64Value": { - "format": "int64", - "title": "Numeric value for LIMIT effect", + "tierMode": { + "$ref": "#/components/schemas/v1TierMode" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "unitAmount": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "ruleKey": { - "title": "Rule key (e.g., \"organization.max_members\", \"secrets.enabled\")", + "unitName": { "type": "string" + }, + "unitQuantity": { + "format": "int32", + "type": "integer" } }, - "title": "RuleStatus represents the status of a rule from the ruleset", "type": "object" }, - "v1SSHKey": { + "v1PlanPriceInput": { "properties": { - "fingerprint": { + "addonCode": { + "title": "Addon code (required if product_type is PRODUCT_TYPE_ADDON)", "type": "string" }, - "id": { + "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", "type": "string" }, - "keyType": { - "description": "rsa, ed25519, ecdsa, dsa, etc.", + "metricAggregation": { + "$ref": "#/components/schemas/v1MetricAggregation" + }, + "metricName": { + "title": "Usage-based specific", "type": "string" }, - "name": { + "minimumCharge": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "organizationId": { + "overagePrice": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "publicKey": { + "packagePrice": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - } - }, - "title": "SSH Key messages", - "type": "object" - }, - "v1ScanDnsZoneRecordsResponse": { - "properties": { - "records": { + "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\"}", + "type": "object" + }, + "pricingModel": { + "$ref": "#/components/schemas/v1PricingModel" + }, + "productType": { + "$ref": "#/components/schemas/v1ProductType" + }, + "prorate": { + "title": "Proration", + "type": "boolean" + }, + "tiers": { "items": { - "$ref": "#/components/schemas/v1DnsRecord" + "$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" + }, + "unitName": { + "type": "string" + }, + "unitQuantity": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1SearchMarketplaceRequest": { - "description": "Natural-language marketplace search (anonymous landing page).", + "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": { - "filterBillingType": { - "$ref": "#/components/schemas/v1BillingType" - }, - "page": { + "freeUnits": { "format": "int32", "type": "integer" }, - "pageSize": { - "format": "int32", - "type": "integer" + "maximumCharge": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" }, - "query": { + "metricId": { "type": "string" }, - "turnstileToken": { - "description": "Cloudflare Turnstile token (required for anonymous callers when auth.turnstile.requireOnAnonymousMarketplaceSearch).", + "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" }, - "v1SearchMarketplaceResponse": { + "v1PlanPricingConfig": { "properties": { - "appliedBillingType": { - "$ref": "#/components/schemas/v1BillingType" + "assetCategory": { + "type": "string" }, - "page": { - "format": "int32", - "type": "integer" + "assetType": { + "type": "string" }, - "pageSize": { - "format": "int32", - "type": "integer" + "currency": { + "type": "string" }, - "parsedQuery": { - "$ref": "#/components/schemas/v1MarketplaceSearchParsedQuery" + "planName": { + "title": "Plan metadata", + "type": "string" }, - "results": { + "prices": { "items": { - "$ref": "#/components/schemas/v1MarketplaceSearchResult" + "$ref": "#/components/schemas/v1PlanPriceInput" }, + "title": "Pricing models (at least one required)", "type": "array" - }, - "totalCount": { - "format": "int32", - "type": "integer" } }, "type": "object" }, - "v1SearchTicketsRequest": { + "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": { - "filterCaseType": { - "$ref": "#/components/schemas/v1CaseType" - }, - "filterPriority": { - "$ref": "#/components/schemas/v1TicketPriority" - }, - "filterTicketStatus": { - "$ref": "#/components/schemas/v1TicketStatus" + "city": { + "title": "City name from CityCountry", + "type": "string" }, - "includeHighlights": { - "type": "boolean" + "country": { + "title": "Country name from CityCountry", + "type": "string" }, - "page": { - "format": "int32", - "type": "integer" + "latitude": { + "format": "double", + "title": "Latitude from CityCountry", + "type": "number" }, - "pageSize": { - "format": "int32", - "type": "integer" + "longitude": { + "format": "double", + "title": "Longitude from CityCountry", + "type": "number" }, - "query": { + "regionId": { + "title": "Region ID", "type": "string" } }, "type": "object" }, - "v1SearchTicketsResponse": { + "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": { - "highlights": { - "additionalProperties": { - "$ref": "#/components/schemas/v1TicketSearchHighlight" - }, - "title": "Map of ticket ID to highlighted snippets", - "type": "object" + "agentId": { + "type": "string" }, - "organizationDetails": { - "additionalProperties": { - "$ref": "#/components/schemas/v1OrganizationDetails" - }, - "title": "Map of organization ID to organization name", - "type": "object" + "assignCustomerIpv6": { + "description": "VirtFusion/SolusVM: guests on this platform are offered panel-assigned IPv6.\nIgnored for Proxmox (IPv6 is prefix-derived). Default false.", + "type": "boolean" }, - "tickets": { - "items": { - "$ref": "#/components/schemas/v1Ticket" - }, - "type": "array" + "driver": { + "$ref": "#/components/schemas/v1PlatformDriver" }, - "totalCount": { - "format": "int32", - "type": "integer" + "endpointUrl": { + "type": "string" }, - "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" }, - "key": { - "type": "string" + "kind": { + "$ref": "#/components/schemas/v1PlatformKind" }, "metadata": { - "title": "Metadata", "type": "object" }, - "organization": { + "name": { + "type": "string" + }, + "organizationId": { "type": "string" }, + "serviceStatus": { + "$ref": "#/components/schemas/v1ServiceStatus" + }, "status": { "$ref": "#/components/schemas/protov1Status" }, "timestamps": { "$ref": "#/components/schemas/v1Timestamps" - }, - "user": { - "title": "Relations", - "type": "string" } }, "type": "object" }, - "v1ServiceAccountResponse": { + "v1PlatformDriver": { + "default": "PLATFORM_DRIVER_UNSPECIFIED", + "description": " - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver.", + "enum": [ + "PLATFORM_DRIVER_UNSPECIFIED", + "PLATFORM_DRIVER_PROXMOX", + "PLATFORM_DRIVER_VIRTFUSION", + "PLATFORM_DRIVER_SOLUSVM", + "PLATFORM_DRIVER_PTERODACTYL" + ], + "type": "string" + }, + "v1PlatformKind": { + "default": "PLATFORM_KIND_UNSPECIFIED", + "enum": [ + "PLATFORM_KIND_UNSPECIFIED", + "PLATFORM_KIND_HYPERVISOR", + "PLATFORM_KIND_PTERODACTYL" + ], + "type": "string" + }, + "v1PlatformVersions": { + "description": "PlatformVersions is the install matrix for provider CLI tooling and cluster components.", "properties": { - "activeTokenCount": { - "format": "int32", - "type": "integer" - }, - "allowedIps": { + "components": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1ComponentVersion" }, "type": "array" }, - "createdAt": { - "format": "date-time", + "schemaVersion": { + "description": "Schema version for forward-compatible clients (currently \"1\").", "type": "string" + } + }, + "type": "object" + }, + "v1Prefix": { + "properties": { + "allocationStrategy": { + "$ref": "#/components/schemas/v1AllocationStrategy" }, - "createdByUserId": { + "cidr": { + "title": "Network prefix in CIDR notation (e.g., 10.0.0.0/24, 2001:db8::/64)", "type": "string" }, "description": { "type": "string" }, - "groupIds": { - "items": { - "type": "string" - }, - "type": "array" + "gateway": { + "description": "Default gateway IP (e.g., 10.0.0.1). Must be within the prefix CIDR.", + "type": "string" }, "id": { + "title": "Fields", "type": "string" }, - "isActive": { - "type": "boolean" - }, - "lastUsedAt": { - "format": "date-time", - "type": "string" + "metadata": { + "title": "Metadata", + "type": "object" }, - "name": { + "networkId": { + "description": "Network this prefix belongs to (for DNS servers). Optional.", + "title": "Relations", "type": "string" }, "organizationId": { "type": "string" }, - "roleIds": { + "reservedIps": { "items": { "type": "string" }, + "title": "List of reserved IP addresses (e.g., [\"10.0.0.1\", \"10.0.0.100\"])", "type": "array" }, - "updatedAt": { - "format": "date-time", - "type": "string" + "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" }, - "v1ServiceAccountTokenInfo": { + "v1PreflightAgentView": { "properties": { - "createdAt": { - "format": "date-time", - "type": "string" - }, - "createdByUserId": { - "type": "string" - }, - "expiresAt": { - "format": "date-time", - "type": "string" - }, - "expiresInDays": { - "format": "int32", - "type": "integer" + "checks": { + "items": { + "$ref": "#/components/schemas/v1PreflightCheckView" + }, + "type": "array" }, - "lastUsedAt": { - "format": "date-time", + "id": { "type": "string" }, "name": { "type": "string" }, - "status": { - "type": "string" - }, - "tokenId": { - "type": "string" + "platform": { + "$ref": "#/components/schemas/v1PreflightPlatformView" } }, "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" - }, - "v1SessionInfo": { + "v1PreflightCheckView": { "properties": { - "browser": { - "type": "string" - }, - "country": { - "type": "string" - }, - "deviceType": { + "code": { "type": "string" }, - "id": { + "note": { "type": "string" }, - "isCurrentSession": { + "passed": { "type": "boolean" }, - "lastLogin": { - "type": "string" - }, - "os": { - "type": "string" - }, - "realIp": { - "type": "string" - }, - "requestIp": { - "type": "string" + "subChecks": { + "items": { + "$ref": "#/components/schemas/v1PreflightCheckView" + }, + "type": "array" } }, "type": "object" }, - "v1SetDefaultPaymentMethodResponse": { + "v1PreflightInfrastructureView": { "properties": { - "paymentMethod": { - "$ref": "#/components/schemas/v1PaymentMethod" + "agent": { + "$ref": "#/components/schemas/v1PreflightAgentView" + }, + "passed": { + "type": "boolean" } }, "type": "object" }, - "v1SetGameNestOrderingRequest": { + "v1PreflightNodeView": { "properties": { - "catalogKey": { - "type": "string" + "checks": { + "items": { + "$ref": "#/components/schemas/v1PreflightCheckView" + }, + "type": "array" }, - "orderingEnabled": { - "type": "boolean" + "id": { + "type": "string" }, - "platformId": { + "name": { "type": "string" } }, "type": "object" }, - "v1SetPasswordRequest": { - "description": "SetPassword is for passwordless (SSO-only) accounts that have never set a local password.", + "v1PreflightPlatformView": { "properties": { - "newPassword": { + "checks": { + "items": { + "$ref": "#/components/schemas/v1PreflightCheckView" + }, + "type": "array" + }, + "id": { "type": "string" + }, + "name": { + "type": "string" + }, + "node": { + "$ref": "#/components/schemas/v1PreflightNodeView" } }, "type": "object" }, - "v1SmtpOutboundProviderPolicy": { - "properties": { - "blockByDefault": { - "type": "boolean" - } - }, - "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": { + "v1PreviewCouponRequest": { "properties": { - "createdAt": { - "format": "date-time", - "readOnly": true, - "type": "string" + "billingPeriod": { + "$ref": "#/components/schemas/v1BillingPeriod" }, - "description": { - "readOnly": true, + "code": { "type": "string" }, - "id": { - "readOnly": true, + "planId": { "type": "string" }, - "lastRestore": { - "$ref": "#/components/schemas/v1LastRestore" - }, - "metadata": { - "type": "object" - }, - "name": { - "readOnly": true, + "quantity": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1PreviewCouponResponse": { + "properties": { + "amountOff": { "type": "string" }, - "operationStatus": { - "$ref": "#/components/schemas/v1SnapshotOperationStatus" - }, - "restoreStatus": { - "$ref": "#/components/schemas/v1RestoreStatus" - }, - "restoredAt": { - "format": "date-time", - "readOnly": true, + "code": { "type": "string" }, - "snapshotId": { - "readOnly": true, + "currency": { "type": "string" }, - "snapshotStatus": { - "$ref": "#/components/schemas/v1SnapshotStatus" + "discountType": { + "$ref": "#/components/schemas/v1CouponDiscountType" }, - "status": { - "$ref": "#/components/schemas/protov1Status" + "discountedPrice": { + "type": "string" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "originalPrice": { + "description": "Fixed price for the selected period, empty for usage-priced plans.", + "type": "string" }, - "virtualMachineId": { - "readOnly": true, + "percentOff": { "type": "string" - } - }, - "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": { - "type": "object" - }, - "v1StartConnectOAuthResponse": { - "properties": { - "authorizeUrl": { - "title": "Stripe OAuth authorize URL (single-use state)", + }, + "termsSummary": { + "description": "Server-rendered disclosure; show it verbatim.", "type": "string" } }, "type": "object" }, - "v1StartPlanLiveValidationResponse": { + "v1PreviewMyStorefrontResponse": { "properties": { - "runId": { - "type": "string" + "sourceStatus": { + "$ref": "#/components/schemas/v1StorefrontRevisionStatus" }, - "status": { - "type": "string" + "storefront": { + "$ref": "#/components/schemas/v1PublicStorefront" } }, "type": "object" }, - "v1StartupVariable": { + "v1PreviewNotificationTemplateResponse": { "properties": { - "description": { + "previewEmailBody": { "type": "string" }, - "envVariable": { + "previewEmailSubject": { "type": "string" }, - "name": { + "previewPushNotificationBody": { "type": "string" }, - "rules": { + "previewPushNotificationTitle": { "type": "string" }, - "serverValue": { + "previewSmsBody": { "type": "string" }, - "userEditable": { - "type": "boolean" - }, - "userViewable": { - "type": "boolean" + "previewWebhookBody": { + "type": "string" } }, "type": "object" }, - "v1StoragePool": { + "v1PricingCalculationConfig": { "properties": { - "name": { + "capHours": { + "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" }, - "storage": { - "format": "int32", - "type": "integer" + "discountPercent": { + "format": "double", + "title": "Discounts", + "type": "number" }, - "storageAllocated": { - "format": "int32", - "type": "integer" + "overageRates": { + "additionalProperties": { + "format": "double", + "type": "number" + }, + "title": "Overage rates (metric_name -> rate in minor currency units)", + "type": "object" + }, + "taxRate": { + "format": "double", + "title": "Tax rate (e.g., 0.10 for 10%)", + "type": "number" } }, "type": "object" }, - "v1StorefrontFAQ": { + "v1PricingLineItem": { "properties": { - "answer": { + "addons": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "question": { + "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" }, - "v1StorefrontParticipationStatus": { - "default": "STOREFRONT_PARTICIPATION_STATUS_UNSPECIFIED", + "v1PricingModel": { + "default": "PRICING_MODEL_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" + "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" }, - "v1StorefrontPublicReview": { + "v1PricingTierInput": { "properties": { - "comment": { - "type": "string" + "endExclusive": { + "format": "double", + "title": "null = unlimited", + "type": "number" }, - "createdAt": { - "format": "date-time", - "type": "string" + "flatFee": { + "type": "boolean" }, - "id": { + "flatFeeAmount": { + "title": "Decimal string with 6 decimal places precision", "type": "string" }, - "providerRepliedAt": { - "format": "date-time", - "type": "string" + "startInclusive": { + "format": "double", + "type": "number" }, - "providerReply": { + "tierName": { "type": "string" }, - "starRating": { + "tierOrder": { "format": "int32", "type": "integer" + }, + "tierType": { + "$ref": "#/components/schemas/v1TierMode" + }, + "unitAmount": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" } }, "type": "object" }, - "v1StorefrontRevision": { + "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": { - "aboutHtml": { - "type": "string" - }, - "aboutMarkdown": { + "amount": { "type": "string" }, - "approvedAt": { - "format": "date-time", + "code": { "type": "string" }, - "coverImageUrl": { + "couponName": { "type": "string" }, - "faqs": { - "items": { - "$ref": "#/components/schemas/v1StorefrontFAQ" - }, - "type": "array" - }, - "featuredPlanIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "highlightCustom": { + "expiresAt": { + "format": "date-time", "type": "string" }, - "highlightCustomLines": { - "items": { - "type": "string" - }, - "type": "array" - }, - "highlightKeys": { - "items": { - "type": "string" - }, - "type": "array" - }, "id": { "type": "string" }, - "logoImageUrl": { + "remaining": { "type": "string" }, - "proposedSlug": { + "requiredTopup": { + "description": "USD top-up needed to activate a pending grant. Empty when none is needed.", "type": "string" }, - "rejectReason": { + "reserved": { "type": "string" }, - "status": { - "$ref": "#/components/schemas/v1StorefrontRevisionStatus" - }, - "submittedAt": { - "format": "date-time", + "source": { "type": "string" }, - "tagline": { + "status": { "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" - }, - "v1SubmitRoadmapFeatureRequestRequest": { + "v1ProviderCatalogPlan": { + "description": "One public plan offering for a provider (GetProvider catalog). Reuses PlanRegion + PlanPrice\nfrom the same marketplace encoding as ListProviders rows.", "properties": { - "description": { + "assetType": { + "$ref": "#/components/schemas/v1AssetType" + }, + "billingType": { + "$ref": "#/components/schemas/v1BillingType" + }, + "computeCategory": { + "$ref": "#/components/schemas/v1ComputeCategory" + }, + "computeType": { + "$ref": "#/components/schemas/v1ComputeType" + }, + "planCode": { "type": "string" }, - "productSlug": { + "planDescription": { "type": "string" }, - "title": { + "planId": { "type": "string" - } - }, - "type": "object" - }, - "v1SubmitRoadmapFeatureRequestResponse": { - "properties": { - "message": { + }, + "planName": { "type": "string" }, - "success": { - "type": "boolean" + "planPrices": { + "items": { + "$ref": "#/components/schemas/v1PlanPrice" + }, + "type": "array" + }, + "regions": { + "items": { + "$ref": "#/components/schemas/v1PlanRegion" + }, + "type": "array" } }, "type": "object" }, - "v1SubscribeResponse": { - "properties": { - "subscription": { - "$ref": "#/components/schemas/v1Subscription" - } - }, - "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" }, - "v1Subscription": { + "v1ProviderCustomerAssetRow": { "properties": { - "activatedByServiceAccount": { - "description": "Service account that started this subscription. Empty when a user did, or when neither is recorded.", - "type": "string" - }, - "activatedByUser": { - "type": "string" + "activityStatus": { + "$ref": "#/components/schemas/v1ProviderCustomerVmActivityStatus" }, - "addonSubscriptions": { - "description": "Active add-on subscriptions on this subscription (name, quantity, and catalog price).", - "items": { - "$ref": "#/components/schemas/v1AddonSubscription" - }, - "type": "array" + "assetType": { + "$ref": "#/components/schemas/v1ProviderCustomerAssetType" }, - "billingType": { - "$ref": "#/components/schemas/v1BillingType" + "complianceActor": { + "$ref": "#/components/schemas/v1ComplianceActor" }, - "cancelAtPeriodEnd": { + "complianceHeld": { "type": "boolean" }, - "canceledAt": { - "format": "date-time", + "complianceMessage": { "type": "string" }, - "currency": { - "description": "ISO currency for recurring_amount (e.g. USD).", - "type": "string" + "complianceReason": { + "$ref": "#/components/schemas/v1ComplianceReason" }, - "currentPeriodEnd": { + "createdAt": { "format": "date-time", "type": "string" }, - "currentPeriodStart": { + "deleteTime": { + "description": "Set when the VM was deleted or terminated (soft-delete).", "format": "date-time", "type": "string" }, - "hasUsageCharges": { - "description": "True when the bound plan also has metered/usage prices (bandwidth, compute hours, etc.).", - "type": "boolean" + "displayName": { + "type": "string" }, "id": { - "title": "Fields", "type": "string" }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "organization": { - "title": "Relations", + "ipv4": { "type": "string" }, - "organizationName": { + "ipv6": { "type": "string" }, - "plan": { + "os": { + "description": "OS/distro label from the VM template (e.g. ubuntu-22).", "type": "string" }, - "planBillingPeriod": { - "$ref": "#/components/schemas/v1BillingPeriod" - }, "planCode": { - "description": "Plan catalog code (e.g. SC-GC-1C-1G-20) for display alongside plan_name.", + "description": "Plan code (e.g. DC-HF-32C-\u2026) from the subscription plan.", "type": "string" }, "planName": { "type": "string" }, - "platformFeeCurrency": { - "title": "Currency for platform fee", + "region": { + "description": "Region label, e.g. \"Frankfurt, DE\".", "type": "string" }, - "platformFeeId": { - "description": "Platform fee ID if applicable", - "title": "Platform fee (only for provider organizations)", + "regionId": { + "description": "UUID of the node's region (same dimension as ListProviderCustomerAssetsRequest.region_id filter).", "type": "string" }, - "platformFeePercent": { - "format": "double", - "title": "Platform fee percentage (e.g., 10.0 for 10%)", - "type": "number" - }, - "platformFeeType": { - "title": "Platform fee type (percentage, fixed, etc.)", + "spec": { + "description": "Human-readable size, e.g. \"2 vCPU \u00b7 4096 MB RAM \u00b7 80 GB disk\".", + "type": "string" + } + }, + "type": "object" + }, + "v1ProviderCustomerAssetType": { + "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" + }, + "v1ProviderCustomerRow": { + "properties": { + "addressSummary": { + "description": "Best-effort summary from organization metadata (billing/address keys).", "type": "string" }, - "pricingModel": { - "$ref": "#/components/schemas/v1PricingModel" + "email": { + "type": "string" }, - "quantity": { - "format": "int32", - "title": "Quantity of this subscription item (e.g., number of VMs,", - "type": "integer" + "firstName": { + "type": "string" }, - "recurringAmount": { - "description": "Bound catalog amount for the current period (plan unit price \u00d7 quantity). Empty when unknown.", + "lastLoginTime": { + "format": "date-time", "type": "string" }, - "resourceCpu": { - "description": "Linked VM resource snapshot for display (0 when not applicable).", - "format": "int32", - "type": "integer" + "lastName": { + "type": "string" }, - "resourceHostname": { - "description": "Primary linked VM hostname for client compute subscriptions (empty otherwise).", - "type": "string" - }, - "resourceMemory": { - "format": "int32", - "type": "integer" - }, - "resourceProviderName": { - "description": "Provider organization name for the linked VM (empty when not applicable).", + "organizationId": { "type": "string" }, - "resourceRegionName": { - "description": "Region label for the linked VM (e.g. city and country, or datacenter name).", + "organizationName": { "type": "string" }, - "resourceStorage": { - "format": "int32", - "type": "integer" - }, - "resourceVmId": { - "description": "Linked VM id for navigation (empty when not applicable).", + "paymentMethodBrand": { + "description": "Default payment method brand when known (visa, mastercard, amex, paypal, \u2026).", "type": "string" }, - "startDate": { - "format": "date-time", + "paymentMethodLast4": { + "description": "Last 4 digits of the default card. Empty for non-card methods or if unknown.", "type": "string" }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "subscriptionStatus": { - "$ref": "#/components/schemas/v1SubscriptionStatus" + "purchasesBlocked": { + "type": "boolean" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "purchasesBlockedActor": { + "$ref": "#/components/schemas/v1ComplianceActor" }, - "trialEndDate": { - "format": "date-time", - "type": "string" + "vmActivityStatus": { + "$ref": "#/components/schemas/v1ProviderCustomerVmActivityStatus" } }, "type": "object" }, - "v1SubscriptionCoupon": { - "description": "The coupon attached to one subscription.", + "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": { - "applicationId": { - "type": "string" + "activeSubscriptionCount": { + "format": "int32", + "type": "integer" }, - "appliedAt": { - "format": "date-time", + "addonId": { "type": "string" }, + "addonType": { + "$ref": "#/components/schemas/v1AddonType" + }, + "billingType": { + "$ref": "#/components/schemas/v1BillingType" + }, "code": { "type": "string" }, - "periodsRemaining": { + "distinctCustomerOrgCount": { "format": "int32", "type": "integer" }, - "status": { - "$ref": "#/components/schemas/v1CouponApplicationStatus" - }, - "subscriptionId": { - "type": "string" + "distinctVmCount": { + "format": "int32", + "type": "integer" }, - "termsSummary": { - "description": "Disclosure text the customer accepted.", + "name": { "type": "string" }, - "windowEndsAt": { - "format": "date-time", - "type": "string" - } - }, - "type": "object" - }, - "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": { - "success": { - "type": "boolean" + "pricingModel": { + "$ref": "#/components/schemas/v1PricingModel" } }, "type": "object" }, - "v1Ticket": { + "v1ProviderDashboardNodeRollup": { "properties": { - "assignedToUser": { - "type": "string" - }, - "caseType": { - "$ref": "#/components/schemas/v1CaseType" - }, - "firstResponseAt": { - "format": "date-time", - "type": "string" + "capacityCpuCores": { + "format": "int32", + "type": "integer" }, - "firstResponseTimeSeconds": { + "capacityMemoryMb": { "format": "int64", "type": "string" }, - "fromOrganization": { - "type": "string" + "cpuOverallocatePercent": { + "format": "int32", + "type": "integer" }, - "fromUser": { + "hypervisorId": { + "description": "VirtFusion hypervisor_id or SolusVM compute_resource_id; used to join Prom series.", "type": "string" }, - "id": { - "title": "Fields", - "type": "string" + "memoryOverallocatePercent": { + "format": "int32", + "type": "integer" }, - "lastActivityAt": { - "format": "date-time", - "type": "string" + "nodeCpuCoreAllocated": { + "format": "int32", + "type": "integer" }, - "lockedAt": { - "format": "date-time", + "nodeId": { "type": "string" }, - "lockedByUser": { + "nodeMemoryAllocatedMb": { + "format": "int64", "type": "string" }, - "message": { + "nodeName": { "type": "string" }, - "metadata": { - "title": "Metadata", - "type": "object" - }, - "priority": { - "$ref": "#/components/schemas/v1TicketPriority" - }, - "replies": { - "title": "Relations", + "platformId": { "type": "string" }, - "resolutionTimeSeconds": { - "format": "int64", + "platformName": { "type": "string" }, - "resolvedAt": { - "format": "date-time", + "regionId": { "type": "string" }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" - }, - "ticketId": { + "soldCpuCores": { "format": "int64", "type": "string" }, - "ticketStatus": { - "$ref": "#/components/schemas/v1TicketStatus" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "title": { + "soldMemoryMb": { + "format": "int64", "type": "string" }, - "toOrganization": { + "soldStorageGb": { + "format": "int64", "type": "string" }, - "toUser": { - "type": "string" + "storageOverallocatePercent": { + "format": "int32", + "type": "integer" }, - "virtualMachines": { - "type": "string" + "vmCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1TicketAttachment": { + "v1ProviderDashboardPlanSubscriptionStat": { "properties": { - "fileName": { - "type": "string" + "activeSubscriptionCount": { + "format": "int32", + "type": "integer" }, - "fileSize": { - "format": "int64", - "type": "string" + "assetType": { + "$ref": "#/components/schemas/v1AssetType" }, - "id": { - "type": "string" + "billingPeriod": { + "$ref": "#/components/schemas/v1BillingPeriod" }, - "mimeType": { - "type": "string" + "billingType": { + "$ref": "#/components/schemas/v1BillingType" }, - "ticketId": { + "code": { "type": "string" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "distinctCustomerOrgCount": { + "format": "int32", + "type": "integer" }, - "uploadedByUserId": { + "name": { "type": "string" + }, + "planId": { + "type": "string" + }, + "vmAssetCount": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1TicketInternalComment": { + "v1ProviderDashboardPlansTabStats": { "properties": { - "comment": { - "type": "string" - }, - "createdByUserId": { - "type": "string" + "kpiActiveAddonSubscriptionsSum": { + "format": "int32", + "type": "integer" }, - "id": { - "type": "string" + "kpiActiveSubscriptionsSum": { + "format": "int32", + "type": "integer" }, - "ticketId": { - "type": "string" + "kpiPlanCount": { + "format": "int32", + "type": "integer" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "kpiVmAssetsSum": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1TicketMessage": { + "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": { - "fromOrganization": { - "title": "Organization of the user who sent this message", - "type": "string" + "availablePlans": { + "items": { + "$ref": "#/components/schemas/v1ProviderCatalogPlan" + }, + "type": "array" }, - "fromUser": { - "title": "User who sent this message", - "type": "string" + "availableRegions": { + "items": { + "type": "string" + }, + "type": "array" }, - "id": { - "title": "Ticket ID (same for original, different for each reply)", + "avgTicketResponseSeconds": { + "format": "int64", "type": "string" }, - "isReply": { - "title": "True if this is a reply, false if it's the original message", - "type": "boolean" - }, - "message": { - "title": "The message content", + "ddosSolution": { "type": "string" }, - "sequence": { - "format": "int64", - "title": "Order in the thread (0 for original, 1+ for replies, based on creation time)", - "type": "string" + "hasIpv6": { + "description": "True when any listed region would report ipv6_available_in_filtered_region.", + "type": "boolean" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" + "provider": { + "$ref": "#/components/schemas/v1ProviderInfo" }, - "toOrganization": { - "title": "Organization of the recipient", - "type": "string" + "reviewBreakdown": { + "$ref": "#/components/schemas/v1ProviderReviewBreakdown" }, - "toUser": { - "title": "User who should receive this message", + "website": { "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": { + "v1ProviderInfo": { "properties": { - "message": { - "type": "string" - }, - "ticketId": { - "type": "string" + "capabilities": { + "description": "Capability strings from platformdriver (guest_firewall, instant_apps, \u2026).", + "items": { + "type": "string" + }, + "type": "array" }, - "title": { + "ddosProvider": { + "description": "DDoS mitigation partner slug; \"none\" or empty means no DDoS vendor icon in marketplace.", "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": { + "description": { "type": "string" }, - "id": { - "type": "string" + "hasCapacityInFilteredRegion": { + "title": "True if provider has at least one node with capacity in the filtered region (plan + country + city)", + "type": "boolean" }, - "isActive": { + "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" }, - "messageTemplate": { + "metadata": { + "title": "Additional provider metadata", + "type": "object" + }, + "organizationId": { "type": "string" }, - "name": { + "organizationName": { "type": "string" }, - "tags": { + "planId": { + "title": "The plan ID for the requested plan code", + "type": "string" + }, + "planPrices": { "items": { - "type": "string" + "$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" }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "titleTemplate": { - "type": "string" - }, - "variables": { + "planRegions": { "items": { - "type": "string" + "$ref": "#/components/schemas/v1PlanRegion" }, + "title": "All regions where the plan is available (region_id, country, city)", "type": "array" - } - }, - "type": "object" - }, - "v1TicketTemplateInput": { - "properties": { - "caseType": { - "$ref": "#/components/schemas/v1CaseType" - }, - "isActive": { - "type": "boolean" }, - "messageTemplate": { - "type": "string" + "platformDriver": { + "$ref": "#/components/schemas/v1PlatformDriver" }, - "name": { + "providerLogoUrl": { "type": "string" }, - "tags": { - "items": { - "type": "string" - }, - "type": "array" + "rating": { + "format": "float", + "title": "Average rating (0-5 stars)", + "type": "number" }, - "titleTemplate": { - "type": "string" + "totalReviews": { + "format": "int32", + "title": "Total number of reviews", + "type": "integer" } }, + "title": "Provider information for marketplace/discovery", "type": "object" }, - "v1TicketTemplateVariableDefinition": { + "v1ProviderOnboardingStep": { "properties": { - "description": { + "actionPath": { + "description": "Deep-link path in the provider console (e.g. \"/organization/settings\").", "type": "string" }, - "example": { - "type": "string" + "code": { + "$ref": "#/components/schemas/v1ProviderOnboardingStepCode" }, - "name": { + "completed": { + "type": "boolean" + }, + "description": { "type": "string" }, - "required": { - "type": "boolean" + "hint": { + "description": "Optional guidance when incomplete (e.g. agent/Proxmox metrics hint).", + "type": "string" }, - "source": { + "title": { "type": "string" } }, "type": "object" }, - "v1TierMode": { - "default": "TIER_MODE_UNSPECIFIED", + "v1ProviderOnboardingStepCode": { + "default": "PROVIDER_ONBOARDING_STEP_CODE_UNSPECIFIED", + "description": "Provider self-serve onboarding checklist (provider orgs only).", "enum": [ - "TIER_MODE_UNSPECIFIED", - "TIER_MODE_NONE", - "TIER_MODE_VOLUME", - "TIER_MODE_TIERED", - "TIER_MODE_GRADUATED" + "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" ], "type": "string" }, - "v1Timestamps": { - "properties": { - "createTime": { - "format": "date-time", - "type": "string" - }, - "updateTime": { - "format": "date-time", - "type": "string" - } - }, - "title": "Object details", - "type": "object" + "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" }, - "v1TokenRequest": { + "v1ProviderRevenueWaterfall": { "properties": { - "clientId": { + "chargeCurrency": { "type": "string" }, - "clientSecret": { - "title": "Optional for public clients", - "type": "string" + "currencyConversionFee": { + "$ref": "#/components/schemas/v1MoneyAmount" }, - "code": { - "title": "Required for authorization_code grant", - "type": "string" + "grossSales": { + "$ref": "#/components/schemas/v1MoneyAmount" }, - "codeVerifier": { - "title": "Required for PKCE", - "type": "string" + "grossSalesSettled": { + "$ref": "#/components/schemas/v1MoneyAmount" }, - "grantType": { - "type": "string" + "netProfit": { + "$ref": "#/components/schemas/v1MoneyAmount" }, - "redirectUri": { - "title": "Required for authorization_code grant", - "type": "string" + "platformFee": { + "$ref": "#/components/schemas/v1MoneyAmount" }, - "refreshToken": { - "title": "Required for refresh_token grant", + "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" }, - "v1TokenResponse": { + "v1ProviderReviewBreakdown": { "properties": { - "accessToken": { - "type": "string" + "fiveStar": { + "format": "int32", + "type": "integer" }, - "expiresIn": { - "format": "int64", - "title": "Seconds until expiry", - "type": "string" + "fourStar": { + "format": "int32", + "type": "integer" }, - "refreshToken": { - "type": "string" + "oneStar": { + "format": "int32", + "type": "integer" }, - "scope": { - "type": "string" + "threeStar": { + "format": "int32", + "type": "integer" }, - "tokenType": { - "title": "\"Bearer\"", - "type": "string" + "twoStar": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1UndoCancelRenewalRequest": { + "v1ProviderReviewListItem": { + "description": "Provider UI: list and respond to client reviews (no VM identifiers: anonymous to provider).", "properties": { - "subscriptionId": { + "comment": { + "type": "string" + }, + "createTime": { + "format": "date-time", + "type": "string" + }, + "id": { + "type": "string" + }, + "providerRepliedAt": { + "format": "date-time", + "type": "string" + }, + "providerReply": { + "type": "string" + }, + "starRating": { + "format": "int32", + "type": "integer" + }, + "updateTime": { + "format": "date-time", "type": "string" } }, "type": "object" }, - "v1UpdateAgentResponse": { + "v1ProviderReviewStarSummary": { "properties": { - "agent": { - "$ref": "#/components/schemas/v1Agent" + "reviewCount": { + "format": "int32", + "type": "integer" + }, + "starRating": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1UpdateClientReviewResponse": { + "v1ProviderStripeActivityEvent": { "properties": { - "review": { - "$ref": "#/components/schemas/v1ClientProviderReview" + "at": { + "format": "date-time", + "type": "string" + }, + "label": { + "type": "string" } }, "type": "object" }, - "v1UpdateCloudInitTemplateResponse": { + "v1ProviderStripePaymentMethodDetails": { "properties": { - "cloudInitTemplate": { - "$ref": "#/components/schemas/v1CloudInitTemplate" + "brand": { + "type": "string" + }, + "cardType": { + "title": "e.g. visa credit card", + "type": "string" + }, + "expMonth": { + "format": "int32", + "type": "integer" + }, + "expYear": { + "format": "int32", + "type": "integer" + }, + "fingerprint": { + "type": "string" + }, + "id": { + "type": "string" + }, + "issuer": { + "type": "string" + }, + "last4": { + "type": "string" + }, + "originCountry": { + "type": "string" + }, + "ownerName": { + "type": "string" } }, "type": "object" }, - "v1UpdateConnectTaxSettingsRequest": { + "v1ProviderStripeTransaction": { "properties": { - "defaultTaxBehavior": { + "activity": { + "items": { + "$ref": "#/components/schemas/v1ProviderStripeActivityEvent" + }, + "type": "array" + }, + "amount": { + "$ref": "#/components/schemas/v1MoneyAmount" + }, + "applicationFeeId": { "type": "string" }, - "defaultTaxCode": { + "chargeId": { "type": "string" }, - "headOffice": { - "$ref": "#/components/schemas/v1ConnectTaxAddress" + "createdAt": { + "format": "date-time", + "type": "string" + }, + "currencyConversionFee": { + "$ref": "#/components/schemas/v1MoneyAmount" + }, + "customerId": { + "type": "string" + }, + "customerName": { + "type": "string" + }, + "declineReason": { + "type": "string" + }, + "description": { + "type": "string" + }, + "exchangeRate": { + "type": "string" + }, + "feesTotalSettled": { + "$ref": "#/components/schemas/v1MoneyAmount" + }, + "netAmount": { + "$ref": "#/components/schemas/v1MoneyAmount" + }, + "paymentAmountSettled": { + "$ref": "#/components/schemas/v1MoneyAmount" + }, + "paymentIntentId": { + "type": "string" + }, + "paymentMethodBrand": { + "type": "string" + }, + "paymentMethodDetails": { + "$ref": "#/components/schemas/v1ProviderStripePaymentMethodDetails" + }, + "paymentMethodLast4": { + "type": "string" + }, + "platformFee": { + "$ref": "#/components/schemas/v1MoneyAmount" + }, + "platformFeeSettled": { + "$ref": "#/components/schemas/v1MoneyAmount" + }, + "refundedAt": { + "format": "date-time", + "type": "string" + }, + "settlementMerchant": { + "type": "string" + }, + "statementDescriptor": { + "type": "string" + }, + "status": { + "type": "string" + }, + "stripeProcessingFee": { + "$ref": "#/components/schemas/v1MoneyAmount" + }, + "transferredTo": { + "type": "string" } }, "type": "object" }, - "v1UpdateConnectTaxSettingsResponse": { + "v1ProviderTicketNotificationPolicy": { "properties": { - "settings": { - "$ref": "#/components/schemas/v1ConnectTaxSettingsDetails" + "destinationEmail": { + "type": "string" + }, + "effectiveDestinationEmail": { + "description": "Resolved mailbox used when destination_email is empty (support_email fallback).", + "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" + }, + "notifyOnEscalated": { + "type": "boolean" } }, "type": "object" }, - "v1UpdateGroupResponse": { + "v1PublicProductCount": { + "description": "One product's provisioning counters.", "properties": { - "group": { - "$ref": "#/components/schemas/v1Group" + "last30Days": { + "description": "Provisioned in the last 30 days.", + "format": "int32", + "type": "integer" + }, + "total": { + "description": "Provisioned since launch, including ones deleted since.", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1UpdateInviteRequest": { + "v1PublicStorefront": { "properties": { - "groupId": { + "aboutHtml": { "type": "string" }, - "inviteId": { + "approvedAt": { + "format": "date-time", "type": "string" }, - "roleId": { - "type": "string" - } - }, - "type": "object" - }, - "v1UpdateMyStorefrontRequest": { - "properties": { - "aboutMarkdown": { - "type": "string" + "catalog": { + "$ref": "#/components/schemas/v1ProviderDetails" }, "coverImageUrl": { "type": "string" @@ -16016,1039 +16228,5264 @@ "type": "array" }, "logoImageUrl": { + "description": "Approved storefront wordmark. Not the organization marketplace logo.", "type": "string" }, - "proposedSlug": { + "organizationName": { + "type": "string" + }, + "providerId": { + "type": "string" + }, + "reviews": { + "items": { + "$ref": "#/components/schemas/v1StorefrontPublicReview" + }, + "type": "array" + }, + "slug": { "type": "string" }, + "socialUrls": { + "items": { + "type": "string" + }, + "type": "array" + }, "tagline": { "type": "string" } }, "type": "object" }, - "v1UpdateNetworkResponse": { - "properties": { - "network": { - "$ref": "#/components/schemas/v1Network" - } - }, - "type": "object" - }, - "v1UpdateNodePlacementPolicyRequest": { + "v1PublicStorefrontCard": { "properties": { - "defaultStrategy": { - "$ref": "#/components/schemas/v1NodePlacementStrategy" - }, - "regionOverrides": { + "cities": { "items": { - "$ref": "#/components/schemas/v1NodePlacementRegionOverride" + "type": "string" }, "type": "array" + }, + "organizationName": { + "type": "string" + }, + "providerId": { + "type": "string" + }, + "providerLogoUrl": { + "description": "Approved storefront wordmark. Not the organization marketplace logo.", + "type": "string" + }, + "rating": { + "format": "float", + "type": "number" + }, + "slug": { + "type": "string" + }, + "tagline": { + "type": "string" + }, + "totalReviews": { + "format": "int32", + "type": "integer" + }, + "website": { + "type": "string" } }, "type": "object" }, - "v1UpdateNodePlacementPolicyResponse": { + "v1PurchaseCreditsRequest": { "properties": { - "policy": { - "$ref": "#/components/schemas/v1NodePlacementPolicy" + "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" }, - "v1UpdateNodeResponse": { + "v1PurchaseCreditsResponse": { "properties": { - "node": { - "$ref": "#/components/schemas/v1Node" + "clientSecret": { + "title": "Stripe PaymentIntent client_secret for 3DS confirmation", + "type": "string" + }, + "creditPurchaseId": { + "title": "CreditPurchase row id", + "type": "string" + }, + "paymentIntentId": { + "title": "Stripe PaymentIntent id", + "type": "string" + }, + "requiresAction": { + "title": "True if 3DS/SCA confirmation is needed client-side", + "type": "boolean" } }, "type": "object" }, - "v1UpdateNotificationSettingResponse": { + "v1ReadFileResponse": { "properties": { - "notificationSetting": { - "$ref": "#/components/schemas/v1NotificationSetting" + "content": { + "format": "byte", + "type": "string" } }, "type": "object" }, - "v1UpdateNotificationTemplateResponse": { + "v1ReauthenticateUserRequest": { "properties": { - "notificationTemplate": { - "$ref": "#/components/schemas/v1NotificationTemplate" + "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" } }, "type": "object" }, - "v1UpdateOrganizationRequest": { + "v1ReauthenticateUserResponse": { "properties": { - "accountHolderName": { - "type": "string" - }, - "address": { + "expiresAt": { + "format": "date-time", "type": "string" }, - "addressCity": { + "method": { + "description": "What was re-checked: \"password\", \"mfa\" or \"password+mfa\".", "type": "string" }, - "addressCountry": { - "description": "ISO 3166-1 alpha-2 (e.g. US, DE).", + "reauthToken": { + "description": "Step-up token; pass it as reauth_token to sensitive actions.", "type": "string" - }, - "addressLine1": { + } + }, + "type": "object" + }, + "v1RecordUsageRequest": { + "properties": { + "eventId": { + "description": "For idempotent writes", + "title": "Deduplication and metadata", "type": "string" }, - "addressLine2": { + "externalId": { + "title": "External integration", "type": "string" }, - "addressPostcode": { + "metricCode": { "type": "string" }, - "addressRegion": { + "metricId": { + "title": "Metric reference (either metric_id or metric_code must be provided)", "type": "string" }, - "asn": { - "format": "int64", - "type": "string" + "properties": { + "title": "Additional metadata (region, instance_id, etc.)", + "type": "object" }, - "billingEmail": { + "quantity": { + "description": "Decimal as string", + "title": "Usage data", "type": "string" }, - "ddosProvider": { + "subscriptionId": { + "title": "Subscription reference", "type": "string" }, - "description": { + "timestamp": { + "format": "date-time", "type": "string" - }, - "enforceMfa": { - "type": "boolean" - }, - "enforceSso": { - "type": "boolean" - }, - "enforceVerifiedDomain": { + } + }, + "type": "object" + }, + "v1RecordUsageResponse": { + "properties": { + "isDuplicate": { + "title": "True if event_id already existed", "type": "boolean" }, - "name": { + "usageRecord": { + "$ref": "#/components/schemas/v1UsageRecord" + } + }, + "type": "object" + }, + "v1RedeemPromoCodeRequest": { + "properties": { + "code": { "type": "string" - }, - "providerLogoUrl": { + } + }, + "type": "object" + }, + "v1RedeemPromoCodeResponse": { + "properties": { + "amount": { "type": "string" }, - "providerWebsiteUrl": { + "expiresAt": { + "description": "For a pending grant, the deadline for the required top-up.", + "format": "date-time", "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).", + "grantId": { "type": "string" }, - "supportEmail": { + "remaining": { "type": "string" }, - "supportPhone": { + "requiredTopup": { + "description": "USD top-up needed to activate a pending grant.", "type": "string" }, - "taxId": { - "type": "string" - }, - "vatId": { + "status": { + "description": "active, or pending when the code needs a top-up first.", "type": "string" } }, "type": "object" }, - "v1UpdateOrganizationResponse": { + "v1RefreshTokenRequest": { "properties": { - "organization": { - "$ref": "#/components/schemas/v1Organization" + "clientId": { + "type": "string" + }, + "clientSecret": { + "title": "Optional for public clients", + "type": "string" + }, + "refreshToken": { + "type": "string" } }, "type": "object" }, - "v1UpdatePayoutConfigurationRequest": { + "v1Refund": { "properties": { - "enabled": { - "title": "Whether to enable/disable payout configuration", - "type": "boolean" + "amount": { + "title": "Decimal string with 6 decimal places precision", + "type": "string" }, - "scheduleTime": { - "title": "Required for daily/weekly/monthly, ignored for immediate. Format: HH:MM (24-hour)", + "createdAt": { + "format": "date-time", "type": "string" }, - "scheduleTimezone": { - "title": "IANA timezone - defaults to \"UTC\"", + "currency": { + "title": "Currency code (ISO 4217)", "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" + "failureReason": { + "title": "Reason for refund failure (if applicable)", + "type": "string" + }, + "id": { + "type": "string" + }, + "paymentId": { + "title": "Payment this refund is for", + "type": "string" + }, + "paymentProvider": { + "description": "Payment provider name (e.g., 'stripe', 'paypal')", + "title": "Stripe refund.id, PayPal refund.id)", + "type": "string" + }, + "processedAt": { + "format": "date-time", + "title": "When refund was processed", + "type": "string" + }, + "providerRefundId": { + "title": "Payment provider refund ID (e.g.,", + "type": "string" + }, + "refundStatus": { + "$ref": "#/components/schemas/v1RefundStatus" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" } }, + "title": "Refund represents a refund transaction for a payment", "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" + "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" }, - "v1UpdateUserResponse": { + "v1RegenerateMfaBackupCodesRequest": { "properties": { - "user": { - "$ref": "#/components/schemas/v1User" + "code": { + "type": "string" } }, "type": "object" }, - "v1UpdateVMTemplateResponse": { + "v1RegenerateMfaBackupCodesResponse": { "properties": { - "vmTemplate": { - "$ref": "#/components/schemas/v1VMTemplate" + "backupCodes": { + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "v1UploadInboundPeeringConfigResponse": { + "v1Region": { "properties": { - "inboundPeeringState": { - "$ref": "#/components/schemas/v1InboundPeeringState" + "cityCountry": { + "$ref": "#/components/schemas/v1CityCountry" + }, + "datacenter": { + "$ref": "#/components/schemas/v1Datacenter" + }, + "id": { + "title": "Fields", + "type": "string" + }, + "organizationId": { + "type": "string" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" } }, "type": "object" }, - "v1UploadTicketAttachmentContentRequest": { + "v1RegionLocation": { "properties": { - "fileContent": { - "format": "byte", + "city": { + "title": "City name", "type": "string" }, - "uploadToken": { + "country": { + "title": "Country name", "type": "string" } }, + "title": "Region location information (deduplicated city+country combinations)", "type": "object" }, - "v1UpsertHookScriptRequest": { + "v1RegisterUserRequest": { "properties": { - "enabled": { - "title": "Omit to keep the stored value; create defaults to true", - "type": "boolean" + "email": { + "type": "string" }, - "hook": { - "$ref": "#/components/schemas/v1LifecycleHook" + "firstName": { + "type": "string" }, - "script": { + "lastName": { "type": "string" }, - "subject": { - "$ref": "#/components/schemas/v1HookSubject" + "password": { + "type": "string" + }, + "turnstileToken": { + "description": "Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).", + "type": "string" } }, "type": "object" }, - "v1UsageAggregate": { + "v1RegisteredDomain": { "properties": { - "aggregationType": { - "$ref": "#/components/schemas/v1AggregationType" + "adminContact": { + "$ref": "#/components/schemas/v1DomainContact" }, - "billingPeriodEnd": { - "format": "date-time", + "autoRenew": { + "type": "boolean" + }, + "dnsZoneId": { + "description": "NodeRings DNS zone for this domain, if any.", "type": "string" }, - "billingPeriodStart": { + "dnssec": { + "$ref": "#/components/schemas/v1DomainDnssec" + }, + "expiresAt": { "format": "date-time", - "title": "Billing period", "type": "string" }, - "firstTimestamp": { - "format": "date-time", + "holds": { + "items": { + "$ref": "#/components/schemas/v1DomainHold" + }, + "type": "array" + }, + "id": { + "readOnly": true, "type": "string" }, - "lastTimestamp": { + "lastSyncedAt": { "format": "date-time", "type": "string" }, - "metricCode": { + "name": { "type": "string" }, - "metricId": { - "type": "string" + "nameservers": { + "items": { + "type": "string" + }, + "type": "array" }, - "metricName": { - "type": "string" + "nsMode": { + "$ref": "#/components/schemas/v1DomainNsMode" }, - "recordCount": { - "format": "int32", - "type": "integer" + "operationPending": { + "description": "A registrar update is in progress (\"Updating at the registry\u2026\").", + "type": "boolean" }, - "subscriptionId": { + "organizationId": { + "readOnly": true, "type": "string" }, - "totalQuantity": { - "description": "Decimal as string", - "title": "Aggregated values", - "type": "string" - } - }, - "type": "object" - }, - "v1UsageRecord": { - "properties": { - "billingPeriodEnd": { - "format": "date-time", - "type": "string" + "privacyAllowed": { + "type": "boolean" }, - "billingPeriodStart": { + "registeredAt": { "format": "date-time", "type": "string" }, - "errorMessage": { - "type": "string" + "registrant": { + "$ref": "#/components/schemas/v1DomainContact" }, - "eventId": { - "description": "For deduplication", - "title": "Usage metadata", - "type": "string" + "registrantChange": { + "$ref": "#/components/schemas/v1RegistrantChange" }, - "externalId": { - "title": "External integration", + "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, "type": "string" }, - "id": { - "title": "Fields", + "registrantDisplayName": { + "readOnly": true, "type": "string" }, - "invoiceId": { + "registrarName": { + "description": "Sponsoring registrar shown on the domain page (RAA reseller duty).", "type": "string" }, - "invoiceLineId": { + "renewBy": { + "description": "Date the domain stops working if not renewed (registrar renewal date).", + "format": "date-time", "type": "string" }, - "metadata": { - "title": "Metadata", - "type": "object" + "renewal": { + "$ref": "#/components/schemas/v1DomainRenewalInfo" }, - "metricCode": { + "renewalPaymentMethodId": { "type": "string" }, - "metricId": { - "type": "string" + "state": { + "$ref": "#/components/schemas/v1RegisteredDomainState" }, - "metricName": { - "type": "string" + "techContact": { + "$ref": "#/components/schemas/v1DomainContact" }, - "processedAt": { - "format": "date-time", + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "tld": { "type": "string" }, - "properties": { - "title": "Additional metadata (region, instance_id, etc.)", - "type": "object" + "transferIn": { + "$ref": "#/components/schemas/v1DomainTransferIn" }, - "quantity": { - "description": "Stored as string for decimal precision", - "title": "Usage data", + "transferLock": { + "type": "boolean" + }, + "transferLockUntil": { + "format": "date-time", "type": "string" }, - "status": { - "$ref": "#/components/schemas/protov1Status" + "transferOut": { + "$ref": "#/components/schemas/v1DomainTransferOut" }, - "subscriptionId": { - "title": "Relations", - "type": "string" + "verification": { + "$ref": "#/components/schemas/v1DomainVerification" }, - "subscriptionName": { - "title": "Relation details (populated in responses)", - "type": "string" + "whoisPrivacy": { + "type": "boolean" }, - "timestamp": { + "whoisPrivacyAutoRenew": { + "type": "boolean" + }, + "whoisPrivacyPaidUntil": { "format": "date-time", "type": "string" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" - }, - "usageRecordStatus": { - "$ref": "#/components/schemas/v1UsageRecordStatus" } }, "type": "object" }, - "v1UsageRecordStatus": { - "default": "USAGE_RECORD_STATUS_UNSPECIFIED", + "v1RegisteredDomainState": { + "default": "REGISTERED_DOMAIN_STATE_UNSPECIFIED", + "description": "Lifecycle state of a registered domain.", "enum": [ - "USAGE_RECORD_STATUS_UNSPECIFIED", - "USAGE_RECORD_STATUS_PENDING", - "USAGE_RECORD_STATUS_PROCESSED", - "USAGE_RECORD_STATUS_BILLED", - "USAGE_RECORD_STATUS_FAILED" + "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" }, - "v1User": { + "v1RegistrantChange": { "properties": { - "allowOrgInvites": { - "type": "boolean" - }, - "email": { - "type": "string" - }, - "firstName": { + "expiresAt": { + "format": "date-time", "type": "string" }, - "groupIds": { - "items": { - "type": "string" - }, - "type": "array" - }, - "id": { - "title": "Fields", + "newContactId": { "type": "string" }, - "isVerified": { + "state": { + "$ref": "#/components/schemas/v1RegistrantChangeState" + } + }, + "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", + "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": { + "addonSubscription": { + "$ref": "#/components/schemas/v1AddonSubscription" + } + }, + "type": "object" + }, + "v1RemovePaymentMethodResponse": { + "properties": { + "success": { "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": { + "v1ReplaceRoleForGroupRequest": { "properties": { - "firstName": { + "groupId": { "type": "string" }, - "lastName": { + "roleId": { "type": "string" } }, - "title": "UserDetails contains user information", "type": "object" }, - "v1UserSummary": { + "v1ReplaceRoleForServiceAccountRequest": { "properties": { - "email": { - "type": "string" - }, - "firstName": { - "type": "string" - }, - "id": { - "title": "Fields", + "roleId": { "type": "string" }, - "lastName": { + "serviceAccountId": { "type": "string" } }, "type": "object" }, - "v1VMTemplate": { + "v1ReplaceRoleForUserRequest": { "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": { + "roleId": { "type": "string" }, - "nodeName": { + "userId": { "type": "string" - }, - "platformName": { + } + }, + "type": "object" + }, + "v1ResendRegistrantVerificationResponse": { + "properties": { + "verification": { + "$ref": "#/components/schemas/v1DomainVerification" + } + }, + "type": "object" + }, + "v1ResendVerificationEmailRequest": { + "properties": { + "email": { "type": "string" }, - "proxmoxCpuType": { - "description": "Proxmox cpu= guest CPU model for VMs cloned from this template. Default: host.", + "turnstileToken": { + "description": "Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled).", "type": "string" - }, - "status": { - "$ref": "#/components/schemas/protov1Status" - }, - "templateId": { - "format": "int32", - "type": "integer" - }, - "timestamps": { - "$ref": "#/components/schemas/v1Timestamps" } }, "type": "object" }, - "v1ValidateNodeTopologyRequest": { + "v1ResetPasswordRequest": { "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.", + "email": { "type": "string" }, - "topologyPaste": { - "description": "Raw topology paste to validate without persisting.", + "newPassword": { + "type": "string" + }, + "resetToken": { "type": "string" } }, "type": "object" }, - "v1ValidateNodeTopologyResponse": { + "v1ResourceInstanceInput": { "properties": { - "error": { - "description": "Parse/validation error when valid is false.", - "type": "string" + "addons": { + "items": { + "$ref": "#/components/schemas/v1AddonInput" + }, + "title": "Add-ons", + "type": "array" }, - "logicalCpus": { + "hoursUsed": { + "format": "double", + "type": "number" + }, + "quantity": { "format": "int32", "type": "integer" }, - "modelName": { + "region": { "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" + "usage": { + "additionalProperties": { + "format": "double", + "type": "number" }, - "type": "array" - }, - "physicalCores": { - "format": "int32", - "type": "integer" - }, - "smtEnabled": { - "type": "boolean" + "title": "Usage metrics (e.g., {\"vCPU\": 2, \"RAM_GB\": 4, \"Egress_GB\": 1200})", + "type": "object" + } + }, + "type": "object" + }, + "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": { + "paymentMethodId": { + "title": "Optional: payment method ID to use for retry\nIf not provided, uses the default payment method", + "type": "string" }, - "sockets": { - "format": "int32", - "type": "integer" + "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" }, - "threadsPerCore": { - "format": "int32", - "type": "integer" + "subscription": { + "$ref": "#/components/schemas/v1Subscription" }, - "valid": { - "type": "boolean" + "taskId": { + "title": "Task ID for tracking async payment retry processing", + "type": "string" }, - "warnings": { - "items": { - "$ref": "#/components/schemas/v1ValidateNodeTopologyWarning" - }, - "type": "array" + "transactionId": { + "title": "Transaction ID from payment provider (available after task completes)", + "type": "string" } }, "type": "object" }, - "v1ValidateNodeTopologyWarning": { + "v1RetryRegistrarOperationRequest": { "properties": { - "code": { + "orderItemId": { + "description": "Exactly one of order_item_id / renewal_id.", "type": "string" }, - "message": { + "reason": { + "type": "string" + }, + "renewalId": { "type": "string" } }, "type": "object" }, - "v1VerificationType": { - "default": "VERIFICATION_TYPE_UNSPECIFIED", - "enum": [ - "VERIFICATION_TYPE_UNSPECIFIED", - "VERIFICATION_TYPE_DNS", - "VERIFICATION_TYPE_HTTPS" - ], - "type": "string" - }, - "v1VerifyMfaEnrollmentRequest": { + "v1RevokeCouponResponse": { "properties": { - "code": { - "type": "string" + "coupon": { + "$ref": "#/components/schemas/v1Coupon" + }, + "revokedApplications": { + "format": "int32", + "type": "integer" } }, "type": "object" }, - "v1VerifyMfaEnrollmentResponse": { + "v1RevokeTokenRequest": { "properties": { - "backupCodes": { - "items": { - "type": "string" - }, - "type": "array" + "clientId": { + "type": "string" + }, + "token": { + "type": "string" + }, + "tokenTypeHint": { + "title": "\"access_token\" or \"refresh_token\"", + "type": "string" } }, "type": "object" }, - "v1VirtualMachine": { - "description": "VirtualMachine represents a managed virtual machine resource.", + "v1RoadmapFeatureRequest": { "properties": { - "activeBackupSubscriptionName": { - "description": "Display name of the active backup addon (empty when has_active_backup_subscription is false).", - "readOnly": true, + "assigneeName": { "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" + "authorDisplayName": { + "type": "string" }, - "bandwidthEgress": { - "$ref": "#/components/schemas/v1VirtualMachineBandwidthQuota" + "commentCount": { + "format": "int32", + "type": "integer" }, - "bandwidthIngress": { - "$ref": "#/components/schemas/v1VirtualMachineBandwidthQuota" + "createdAt": { + "format": "date-time", + "type": "string" }, - "capabilities": { - "description": "Features that hypervisor supports (same strings as marketplace ProviderInfo).", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" + "description": { + "type": "string" }, - "complianceActor": { - "$ref": "#/components/schemas/v1ComplianceActor" + "id": { + "type": "string" }, - "complianceHeld": { - "description": "True when the VM is seized for fraud, abuse, copyright, or related reasons.", - "readOnly": true, + "isPinned": { "type": "boolean" }, - "complianceHeldAt": { - "format": "date-time", - "readOnly": true, + "product": { + "$ref": "#/components/schemas/v1RoadmapProductCategory" + }, + "slug": { "type": "string" }, - "complianceMessage": { - "readOnly": true, + "status": { + "$ref": "#/components/schemas/v1RoadmapRequestStatus" + }, + "statusChangedAt": { + "format": "date-time", "type": "string" }, - "complianceReason": { - "$ref": "#/components/schemas/v1ComplianceReason" + "title": { + "type": "string" }, - "cpu": { - "description": "The number of CPU cores allocated to the virtual machine.", + "upvoteCount": { "format": "int32", "type": "integer" }, - "crStatus": { - "$ref": "#/components/schemas/v1CRStatus" + "userVote": { + "$ref": "#/components/schemas/v1RoadmapVoteType" }, - "createTime": { - "description": "The creation timestamp of the virtual machine.", - "format": "date-time", - "readOnly": true, + "voteScore": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1RoadmapFeatureRequestComment": { + "properties": { + "authorDisplayName": { "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, + "body": { "type": "string" }, - "hasActiveBackupSubscription": { - "description": "True when this VM has an active backup-class addon subscription (derived from subscription add-ons).", - "readOnly": true, + "canEdit": { "type": "boolean" }, - "hostname": { - "description": "The name of the virtual machine.", + "createdAt": { + "format": "date-time", "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" + "isEdited": { + "type": "boolean" }, - "instantAppIconUrl": { - "description": "Optional override; when empty, clients fall back to the family icon path.", - "readOnly": true, - "type": "string" + "isOwn": { + "type": "boolean" }, - "instantAppId": { - "description": "Platform Instant App used when this VM was created/reinstalled (empty when OS-only).", - "readOnly": true, + "updatedAt": { + "format": "date-time", + "type": "string" + } + }, + "type": "object" + }, + "v1RoadmapProductCategory": { + "properties": { + "color": { "type": "string" }, - "instantAppName": { - "readOnly": true, + "description": { "type": "string" }, - "instantAppSlug": { - "readOnly": true, + "icon": { "type": "string" }, - "instantAppVersion": { - "readOnly": true, + "id": { "type": "string" }, - "ipv4": { - "description": "Primary IPv4 from active IPAM allocations (when available).", - "readOnly": true, + "name": { "type": "string" }, - "ipv6": { - "description": "Primary IPv6 from active IPAM allocations (when available).", - "readOnly": true, + "slug": { "type": "string" }, - "memory": { - "description": "The amount of memory in MB allocated to the virtual machine.", + "sortOrder": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1RoadmapProductStats": { + "properties": { + "completed": { "format": "int32", "type": "integer" }, - "operationStatus": { - "$ref": "#/components/schemas/v1OperationStatus" + "inProgress": { + "format": "int32", + "type": "integer" }, - "planBillingType": { - "$ref": "#/components/schemas/v1BillingType" + "inReview": { + "format": "int32", + "type": "integer" }, - "planCode": { - "description": "Marketplace plan code for this VM's subscription (e.g. \"DC-CPU-4C-4G-160\").", - "readOnly": true, - "type": "string" + "planned": { + "format": "int32", + "type": "integer" }, - "planId": { - "description": "Marketplace plan this VM was purchased with (from its subscription).", - "readOnly": true, + "productName": { "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, + "productSlug": { "type": "string" - }, - "providerOrganizationId": { - "description": "The ID of the service provider organization for the virtual machine.", + } + }, + "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" + }, + "v1Role": { + "properties": { + "description": { "type": "string" }, - "regionCity": { - "description": "The city of the region where the virtual machine is located.", - "readOnly": true, - "type": "string" + "groupIds": { + "items": { + "type": "string" + }, + "type": "array" }, - "regionCountry": { - "description": "The country of the region where the virtual machine is located.", - "readOnly": true, + "id": { + "title": "Fields", "type": "string" }, - "regionId": { - "description": "Region of the node hosting this VM.", - "readOnly": true, - "type": "string" + "isBuiltin": { + "type": "boolean" }, - "reinstallStatus": { - "$ref": "#/components/schemas/v1ReinstallStatus" + "metadata": { + "title": "Metadata", + "type": "object" }, - "reinstalledAt": { - "format": "date-time", - "readOnly": true, + "name": { "type": "string" }, - "storage": { - "description": "Target storage for full clone.", - "format": "int32", - "type": "integer" + "organizationId": { + "title": "Relations", + "type": "string" }, - "tags": { + "permissions": { "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" + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "users": { + "items": { + "$ref": "#/components/schemas/v1UserSummary" + }, + "type": "array" } }, "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.", + "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": [ + "RULE_EFFECT_UNSPECIFIED", + "RULE_EFFECT_ENABLE", + "RULE_EFFECT_ENTITLE", + "RULE_EFFECT_LIMIT" + ], + "title": "RuleEffect represents the effect type of a rule", + "type": "string" + }, + "v1Rules": { "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, + "boolValue": { + "title": "Boolean value for ENABLE/ENTITLE effects", "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, + "currentUsage": { + "format": "int64", + "title": "Optional: current usage count (only for LIMIT rules)", "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" + "effect": { + "$ref": "#/components/schemas/v1RuleEffect" }, - "periodEnd": { - "format": "date-time", - "readOnly": true, + "int64Value": { + "format": "int64", + "title": "Numeric value for LIMIT effect", "type": "string" }, - "periodStart": { - "format": "date-time", - "readOnly": true, + "ruleKey": { + "title": "Rule key (e.g., \"organization.max_members\", \"secrets.enabled\")", "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" } }, + "title": "RuleStatus represents the status of a rule from the ruleset", "type": "object" }, - "v1VirtualMachineSmtpOutboundPolicyView": { + "v1SSHKey": { "properties": { - "action": { - "$ref": "#/components/schemas/v1SmtpOutboundVmAction" - }, - "clientContactEmail": { - "description": "Contact email of that owner (when resolved).", + "fingerprint": { "type": "string" }, - "clientOrganizationId": { - "description": "Client organization that owns the VM (grouping key for provider UI).", + "id": { "type": "string" }, - "clientOwnerUserId": { - "description": "First owner user of that client organization (when resolved).", + "keyType": { + "description": "rsa, ed25519, ecdsa, dsa, etc.", "type": "string" }, - "effectiveBlocked": { - "type": "boolean" - }, - "hostname": { + "name": { "type": "string" }, - "ipv4": { - "description": "Primary active IPv4 / IPv6 from IPAM allocations (empty when none).", + "organizationId": { "type": "string" }, - "ipv6": { + "publicKey": { "type": "string" }, - "virtualMachineId": { - "type": "string" + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" } }, + "title": "SSH Key messages", "type": "object" }, - "v1VoteRoadmapFeatureRequestResponse": { + "v1ScanDnsZoneRecordsResponse": { "properties": { - "request": { - "$ref": "#/components/schemas/v1RoadmapFeatureRequest" + "records": { + "items": { + "$ref": "#/components/schemas/v1DnsRecord" + }, + "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.", + "items": { + "type": "string" + }, + "type": "array" + }, + "turnstileToken": { + "description": "Turnstile token; required for anonymous callers.", + "type": "string" + } + }, + "type": "object" + }, + "v1SearchDomainsResponse": { + "properties": { + "normalizedLabel": { + "description": "Label extracted from the query (LDH, lower case).", + "type": "string" + }, + "query": { + "type": "string" + }, + "results": { + "description": "Exact match first, then featured TLDs, then suggestions (max 25).", + "items": { + "$ref": "#/components/schemas/v1DomainSearchResult" + }, + "type": "array" + } + }, + "type": "object" + }, + "v1SearchMarketplaceRequest": { + "description": "Natural-language marketplace search (anonymous landing page).", + "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" + } + }, + "type": "object" + }, + "v1SearchMarketplaceResponse": { + "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" + } + }, + "type": "object" + }, + "v1SearchTicketsRequest": { + "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" + } + }, + "type": "object" + }, + "v1SearchTicketsResponse": { + "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" + } + }, + "type": "object" + }, + "v1Secret": { + "properties": { + "id": { + "title": "Fields", + "type": "string" + }, + "key": { + "type": "string" + }, + "metadata": { + "title": "Metadata", + "type": "object" + }, + "organization": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "user": { + "title": "Relations", + "type": "string" + } + }, + "type": "object" + }, + "v1ServiceAccountResponse": { + "properties": { + "activeTokenCount": { + "format": "int32", + "type": "integer" + }, + "allowedIps": { + "items": { + "type": "string" + }, + "type": "array" + }, + "createdAt": { + "format": "date-time", + "type": "string" + }, + "createdByUserId": { + "type": "string" + }, + "description": { + "type": "string" + }, + "groupIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "id": { + "type": "string" + }, + "isActive": { + "type": "boolean" + }, + "lastUsedAt": { + "format": "date-time", + "type": "string" + }, + "name": { + "type": "string" + }, + "organizationId": { + "type": "string" + }, + "roleIds": { + "items": { + "type": "string" + }, + "type": "array" + }, + "updatedAt": { + "format": "date-time", + "type": "string" + } + }, + "type": "object" + }, + "v1ServiceAccountTokenInfo": { + "properties": { + "createdAt": { + "format": "date-time", + "type": "string" + }, + "createdByUserId": { + "type": "string" + }, + "expiresAt": { + "format": "date-time", + "type": "string" + }, + "expiresInDays": { + "format": "int32", + "type": "integer" + }, + "lastUsedAt": { + "format": "date-time", + "type": "string" + }, + "name": { + "type": "string" + }, + "status": { + "type": "string" + }, + "tokenId": { + "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" + }, + "v1SessionInfo": { + "properties": { + "browser": { + "type": "string" + }, + "country": { + "type": "string" + }, + "deviceType": { + "type": "string" + }, + "id": { + "type": "string" + }, + "isCurrentSession": { + "type": "boolean" + }, + "lastLogin": { + "type": "string" + }, + "os": { + "type": "string" + }, + "realIp": { + "type": "string" + }, + "requestIp": { + "type": "string" + } + }, + "type": "object" + }, + "v1SetDefaultPaymentMethodResponse": { + "properties": { + "paymentMethod": { + "$ref": "#/components/schemas/v1PaymentMethod" + } + }, + "type": "object" + }, + "v1SetDomainPrivacyResponse": { + "properties": { + "domain": { + "$ref": "#/components/schemas/v1RegisteredDomain" + }, + "orderId": { + "description": "Set when enabling privacy needs payment: continue at /domains/checkout/.", + "type": "string" + } + }, + "type": "object" + }, + "v1SetGameNestOrderingRequest": { + "properties": { + "catalogKey": { + "type": "string" + }, + "orderingEnabled": { + "type": "boolean" + }, + "platformId": { + "type": "string" + } + }, + "type": "object" + }, + "v1SetPasswordRequest": { + "description": "SetPassword is for passwordless (SSO-only) accounts that have never set a local password.", + "properties": { + "newPassword": { + "type": "string" + } + }, + "type": "object" + }, + "v1SmtpOutboundProviderPolicy": { + "properties": { + "blockByDefault": { + "type": "boolean" + } + }, + "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": { + "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" + } + }, + "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": { + "type": "object" + }, + "v1StartConnectOAuthResponse": { + "properties": { + "authorizeUrl": { + "title": "Stripe OAuth authorize URL (single-use state)", + "type": "string" + } + }, + "type": "object" + }, + "v1StartPlanLiveValidationResponse": { + "properties": { + "runId": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "type": "object" + }, + "v1StartupVariable": { + "properties": { + "description": { + "type": "string" + }, + "envVariable": { + "type": "string" + }, + "name": { + "type": "string" + }, + "rules": { + "type": "string" + }, + "serverValue": { + "type": "string" + }, + "userEditable": { + "type": "boolean" + }, + "userViewable": { + "type": "boolean" + } + }, + "type": "object" + }, + "v1StoragePool": { + "properties": { + "name": { + "type": "string" + }, + "storage": { + "format": "int32", + "type": "integer" + }, + "storageAllocated": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1StorefrontFAQ": { + "properties": { + "answer": { + "type": "string" + }, + "question": { + "type": "string" + } + }, + "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": { + "properties": { + "comment": { + "type": "string" + }, + "createdAt": { + "format": "date-time", + "type": "string" + }, + "id": { + "type": "string" + }, + "providerRepliedAt": { + "format": "date-time", + "type": "string" + }, + "providerReply": { + "type": "string" + }, + "starRating": { + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "v1StorefrontRevision": { + "properties": { + "aboutHtml": { + "type": "string" + }, + "aboutMarkdown": { + "type": "string" + }, + "approvedAt": { + "format": "date-time", + "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" + }, + "id": { + "type": "string" + }, + "logoImageUrl": { + "type": "string" + }, + "proposedSlug": { + "type": "string" + }, + "rejectReason": { + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/v1StorefrontRevisionStatus" + }, + "submittedAt": { + "format": "date-time", + "type": "string" + }, + "tagline": { + "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" + }, + "v1SubmitRoadmapFeatureRequestRequest": { + "properties": { + "description": { + "type": "string" + }, + "productSlug": { + "type": "string" + }, + "title": { + "type": "string" + } + }, + "type": "object" + }, + "v1SubmitRoadmapFeatureRequestResponse": { + "properties": { + "message": { + "type": "string" + }, + "success": { + "type": "boolean" + } + }, + "type": "object" + }, + "v1SubscribeResponse": { + "properties": { + "subscription": { + "$ref": "#/components/schemas/v1Subscription" + } + }, + "type": "object" + }, + "v1SubscribeToBlogRequest": { + "properties": { + "email": { + "description": "Address that should receive new posts.", + "type": "string" + }, + "source": { + "description": "Where the form was shown, for example \"blog_index\" or \"post:what-noderings-is\".", + "type": "string" + }, + "turnstileToken": { + "description": "Cloudflare Turnstile token from the widget. Required when the backend enables Turnstile for blog sign-ups.", + "type": "string" + }, + "website": { + "description": "Honeypot. Real readers never see or fill this field.", + "type": "string" + } + }, + "type": "object" + }, + "v1SubscribeToBlogResponse": { + "properties": { + "message": { + "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" + } + }, + "type": "object" + }, + "v1Subscription": { + "properties": { + "activatedByServiceAccount": { + "description": "Service account that started this subscription. Empty when a user did, or when neither is recorded.", + "type": "string" + }, + "activatedByUser": { + "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", + "type": "string" + }, + "currency": { + "description": "ISO currency for recurring_amount (e.g. USD).", + "type": "string" + }, + "currentPeriodEnd": { + "format": "date-time", + "type": "string" + }, + "currentPeriodStart": { + "format": "date-time", + "type": "string" + }, + "hasUsageCharges": { + "description": "True when the bound plan also has metered/usage prices (bandwidth, compute hours, etc.).", + "type": "boolean" + }, + "id": { + "title": "Fields", + "type": "string" + }, + "metadata": { + "title": "Metadata", + "type": "object" + }, + "organization": { + "title": "Relations", + "type": "string" + }, + "organizationName": { + "type": "string" + }, + "plan": { + "type": "string" + }, + "planBillingPeriod": { + "$ref": "#/components/schemas/v1BillingPeriod" + }, + "planCode": { + "description": "Plan catalog code (e.g. SC-GC-1C-1G-20) for display alongside plan_name.", + "type": "string" + }, + "planName": { + "type": "string" + }, + "platformFeeCurrency": { + "title": "Currency for platform fee", + "type": "string" + }, + "platformFeeId": { + "description": "Platform fee ID if applicable", + "title": "Platform fee (only for provider organizations)", + "type": "string" + }, + "platformFeePercent": { + "format": "double", + "title": "Platform fee percentage (e.g., 10.0 for 10%)", + "type": "number" + }, + "platformFeeType": { + "title": "Platform fee type (percentage, fixed, etc.)", + "type": "string" + }, + "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" + }, + "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" + }, + "resourceMemory": { + "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" + }, + "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" + } + }, + "type": "object" + }, + "v1SubscriptionCoupon": { + "description": "The coupon attached to one subscription.", + "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", + "type": "string" + } + }, + "type": "object" + }, + "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": { + "success": { + "type": "boolean" + } + }, + "type": "object" + }, + "v1SyncTldCatalogRequest": { + "properties": { + "provider": { + "description": "Empty = every configured provider.", + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "type": "object" + }, + "v1SyncTldCatalogResponse": { + "properties": { + "queued": { + "description": "The sync was queued on the registrar task queue.", + "type": "boolean" + }, + "taskId": { + "type": "string" + } + }, + "type": "object" + }, + "v1Ticket": { + "properties": { + "assignedToUser": { + "type": "string" + }, + "caseType": { + "$ref": "#/components/schemas/v1CaseType" + }, + "firstResponseAt": { + "format": "date-time", + "type": "string" + }, + "firstResponseTimeSeconds": { + "format": "int64", + "type": "string" + }, + "fromOrganization": { + "type": "string" + }, + "fromUser": { + "type": "string" + }, + "id": { + "title": "Fields", + "type": "string" + }, + "lastActivityAt": { + "format": "date-time", + "type": "string" + }, + "lockedAt": { + "format": "date-time", + "type": "string" + }, + "lockedByUser": { + "type": "string" + }, + "message": { + "type": "string" + }, + "metadata": { + "title": "Metadata", + "type": "object" + }, + "priority": { + "$ref": "#/components/schemas/v1TicketPriority" + }, + "replies": { + "title": "Relations", + "type": "string" + }, + "resolutionTimeSeconds": { + "format": "int64", + "type": "string" + }, + "resolvedAt": { + "format": "date-time", + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/protov1Status" + }, + "tags": { + "items": { + "type": "string" + }, + "type": "array" + }, + "ticketId": { + "format": "int64", + "type": "string" + }, + "ticketStatus": { + "$ref": "#/components/schemas/v1TicketStatus" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "title": { + "type": "string" + }, + "toOrganization": { + "type": "string" + }, + "toUser": { + "type": "string" + }, + "virtualMachines": { + "type": "string" + } + }, + "type": "object" + }, + "v1TicketAttachment": { + "properties": { + "fileName": { + "type": "string" + }, + "fileSize": { + "format": "int64", + "type": "string" + }, + "id": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "ticketId": { + "type": "string" + }, + "timestamps": { + "$ref": "#/components/schemas/v1Timestamps" + }, + "uploadedByUserId": { + "type": "string" + } + }, + "type": "object" + }, + "v1TicketInternalComment": { + "properties": { + "comment": { + "type": "string" + }, + "createdByUserId": { + "type": "string" + }, + "id": { + "type": "string" + }, + "ticketId": { + "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": { + "format": "int32", + "type": "integer" + }, + "privacyAllowed": { + "type": "boolean" + }, + "privacyPrice": { + "type": "string" + }, + "registerPrice": { + "type": "string" + }, + "renewPrice": { + "type": "string" + }, + "requiresExtensionData": { + "type": "boolean" + }, + "restorePrice": { + "type": "string" + }, + "riskNote": { + "type": "string" + }, + "riskTier": { + "$ref": "#/components/schemas/v1TldRiskTier" + }, + "tld": { + "type": "string" + }, + "transferPrice": { + "type": "string" + }, + "transferSupported": { + "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" + } + }, + "type": "object" + }, + "v1TransferCheckResult": { + "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" + }, + "name": { + "type": "string" + }, + "reason": { + "description": "Why it cannot be transferred (product copy).", + "type": "string" + }, + "transferPrice": { + "type": "string" + }, + "transferable": { + "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": { + "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": { + "type": "string" + }, + "defaultTaxCode": { + "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", + "type": "string" + }, + "registrantChangePending": { + "description": "A change of registrant was started; it waits for email approval.", + "type": "boolean" + } + }, + "type": "object" + }, + "v1UpdateGroupResponse": { + "properties": { + "group": { + "$ref": "#/components/schemas/v1Group" + } + }, + "type": "object" + }, + "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." } }, - "type": "object" + "tags": [ + "UserService" + ] } }, - "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" + "/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" + ] } - } - }, - "info": { - "contact": { - "name": "NodeRings", - "url": "https://noderings.com" }, - "title": "NodeRings API", - "version": "1.0" - }, - "openapi": "3.0.0", - "paths": { - "/api/v1/webhooks/{provider}": { + "/v1/auth/mfa/backup-codes/regenerate": { "post": { - "operationId": "WebhookService_HandleWebhook", + "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": [ { - "description": "Payment provider identifier (e.g., \"stripe\", \"paypal\")\nValidated in implementation to ensure supported providers", - "in": "path", - "name": "provider", - "required": true, + "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" + ] + } + }, + "/v1/blog/subscriptions/unsubscribe": { + "post": { + "operationId": "BlogSubscriptionService_UnsubscribeFromBlog", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WebhookServiceHandleWebhookBody" + "$ref": "#/components/schemas/v1UnsubscribeFromBlogRequest" } } }, @@ -17059,39 +21496,100 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1HandleWebhookResponse" + "$ref": "#/components/schemas/v1UnsubscribeFromBlogResponse" } } }, "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", + "summary": "Stop emails with the token from an unsubscribe link.", "tags": [ - "WebhookService" + "BlogSubscriptionService" ] } }, - "/v1/addon-subscriptions/{addonSubscriptionId}": { + "/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" + } + } + }, + "description": "A successful response." + } + }, + "summary": "ListConversations returns all conversation IDs for the authenticated user", + "tags": [ + "ChatService" + ] + } + }, + "/v1/chat/conversations/{conversationId}": { "delete": { - "operationId": "AddonService_RemoveAddon", + "operationId": "ChatService_DeleteConversation", "parameters": [ { + "description": "Conversation ID", "in": "path", - "name": "addonSubscriptionId", + "name": "conversationId", "required": true, "schema": { "type": "string" } - }, - { - "description": "If false, cancels at period end", - "in": "query", - "name": "cancelImmediately", - "required": false, - "schema": { - "type": "boolean" - } } ], "responses": { @@ -17099,63 +21597,94 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1RemoveAddonResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "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.", + "summary": "DeleteConversation marks a conversation as deleted (soft delete)", "tags": [ - "AddonService" + "ChatService" ] } }, - "/v1/addon-subscriptions/{addonSubscriptionId}:undo-cancel": { - "post": { - "operationId": "AddonService_UndoCancelAddon", + "/v1/chat/conversations/{conversationId}/history": { + "get": { + "operationId": "ChatService_GetConversationHistory", "parameters": [ { + "description": "Conversation ID", "in": "path", - "name": "addonSubscriptionId", + "name": "conversationId", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AddonServiceUndoCancelAddonBody" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1GetConversationHistoryResponse" + } } - } - }, - "required": true + }, + "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/v1RemoveAddonResponse" + "$ref": "#/components/schemas/v1GetClientDashboardBillingResponse" } } }, "description": "A successful response." } }, - "summary": "UndoCancelAddon clears cancel_at_period_end so the add-on renews with the VM.", "tags": [ - "AddonService" + "ClientDashboardService" ] } }, - "/v1/addons": { + "/v1/client/dashboard/summary": { "get": { - "operationId": "AddonService_ListAddons", + "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", @@ -17176,58 +21705,7 @@ } }, { - "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", + "description": "Optional filter (hostname / provider name), case-insensitive substring.", "in": "query", "name": "search", "required": false, @@ -17241,25 +21719,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListAddonsResponse" + "$ref": "#/components/schemas/v1ListClientProviderReviewAssetsResponse" } } }, "description": "A successful response." } }, - "summary": "List available addons", "tags": [ - "AddonService" + "ClientProviderReviewService" ] - }, + } + }, + "/v1/cloudinittemplate": { "post": { - "operationId": "AddonService_CreateAddon", + "operationId": "CloudInitTemplateService_CreateCloudInitTemplate", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateAddonRequest" + "$ref": "#/components/schemas/v1CreateCloudInitTemplateRequest" } } }, @@ -17277,15 +21756,14 @@ "description": "A successful response." } }, - "summary": "Create an addon from a template addon", "tags": [ - "AddonService" + "CloudInitTemplateService" ] } }, - "/v1/addons/{id}": { + "/v1/cloudinittemplate/{id}": { "delete": { - "operationId": "AddonService_DeleteAddon", + "operationId": "CloudInitTemplateService_DeleteCloudInitTemplate", "parameters": [ { "in": "path", @@ -17308,13 +21786,12 @@ "description": "A successful response." } }, - "summary": "Delete an addon (soft delete)", "tags": [ - "AddonService" + "CloudInitTemplateService" ] }, "get": { - "operationId": "AddonService_GetAddon", + "operationId": "CloudInitTemplateService_GetCloudInitTemplate", "parameters": [ { "in": "path", @@ -17330,20 +21807,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetAddonResponse" + "$ref": "#/components/schemas/v1GetCloudInitTemplateResponse" } } }, "description": "A successful response." } }, - "summary": "Get a specific addon with its prices", "tags": [ - "AddonService" + "CloudInitTemplateService" ] }, "patch": { - "operationId": "AddonService_UpdateAddon", + "operationId": "CloudInitTemplateService_UpdateCloudInitTemplate", "parameters": [ { "in": "path", @@ -17358,7 +21834,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddonServiceUpdateAddonBody" + "$ref": "#/components/schemas/CloudInitTemplateServiceUpdateCloudInitTemplateBody" } } }, @@ -17369,22 +21845,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1UpdateCloudInitTemplateResponse" } } }, "description": "A successful response." } }, - "summary": "Update an addon (allows changing price and currency)", "tags": [ - "AddonService" + "CloudInitTemplateService" ] } }, - "/v1/admin/coupons/high-risk": { + "/v1/cloudinittemplates": { "get": { - "operationId": "CouponService_ListHighRiskCoupons", + "operationId": "CloudInitTemplateService_ListCloudInitTemplates", "parameters": [ { "in": "query", @@ -17405,17 +21880,9 @@ } }, { + "description": "If not set, returns both template and non-template. If true, returns only templates. If false, returns only non-templates.", "in": "query", - "name": "providerOrganizationId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "description": "Also list inactive and banned coupons.", - "in": "query", - "name": "includeInactive", + "name": "filterIsTemplate", "required": false, "schema": { "type": "boolean" @@ -17427,22 +21894,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListHighRiskCouponsResponse" + "$ref": "#/components/schemas/v1ListCloudInitTemplatesResponse" } } }, "description": "A successful response." } }, - "summary": "Platform admins only: high-risk coupons across all providers, most redeemed first.", "tags": [ - "CouponService" + "CloudInitTemplateService" ] } }, - "/v1/agents": { + "/v1/cloudinituserdata": { "get": { - "operationId": "AgentService_ListAgents", + "operationId": "CloudInitUserDataService_ListCloudInitUserData", "parameters": [ { "in": "query", @@ -17461,27 +21927,6 @@ "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": { @@ -17489,7 +21934,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListAgentsResponse" + "$ref": "#/components/schemas/v1ListCloudInitUserDataResponse" } } }, @@ -17497,16 +21942,16 @@ } }, "tags": [ - "AgentService" + "CloudInitUserDataService" ] }, "post": { - "operationId": "AgentService_CreateAgent", + "operationId": "CloudInitUserDataService_CreateCloudInitUserData", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateAgentRequest" + "$ref": "#/components/schemas/v1CreateCloudInitUserDataRequest" } } }, @@ -17517,7 +21962,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetAgentResponse" + "$ref": "#/components/schemas/v1CloudInitUserData" } } }, @@ -17525,13 +21970,13 @@ } }, "tags": [ - "AgentService" + "CloudInitUserDataService" ] } }, - "/v1/agents/{id}": { + "/v1/cloudinituserdata/{id}": { "delete": { - "operationId": "AgentService_DeleteAgent", + "operationId": "CloudInitUserDataService_DeleteCloudInitUserData", "parameters": [ { "in": "path", @@ -17555,11 +22000,11 @@ } }, "tags": [ - "AgentService" + "CloudInitUserDataService" ] }, "get": { - "operationId": "AgentService_GetAgent", + "operationId": "CloudInitUserDataService_GetCloudInitUserData", "parameters": [ { "in": "path", @@ -17575,7 +22020,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetAgentResponse" + "$ref": "#/components/schemas/v1CloudInitUserData" } } }, @@ -17583,11 +22028,11 @@ } }, "tags": [ - "AgentService" + "CloudInitUserDataService" ] }, "patch": { - "operationId": "AgentService_UpdateAgent", + "operationId": "CloudInitUserDataService_UpdateCloudInitUserData", "parameters": [ { "in": "path", @@ -17602,7 +22047,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AgentServiceUpdateAgentBody" + "$ref": "#/components/schemas/CloudInitUserDataServiceUpdateCloudInitUserDataBody" } } }, @@ -17613,7 +22058,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateAgentResponse" + "$ref": "#/components/schemas/v1CloudInitUserData" } } }, @@ -17621,40 +22066,47 @@ } }, "tags": [ - "AgentService" + "CloudInitUserDataService" ] } }, - "/v1/agents/{id}:generateInstallCommand": { - "post": { - "operationId": "AgentService_GenerateInstallCommand", + "/v1/countries-cities": { + "get": { + "operationId": "RegionService_ListCountriesCities", "parameters": [ { - "description": "The ID of the agent to generate the install command for", - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "query", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentServiceGenerateInstallCommandBody" - } + }, + { + "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/v1GenerateInstallCommandResponse" + "$ref": "#/components/schemas/v1ListCountriesCitiesResponse" } } }, @@ -17662,13 +22114,13 @@ } }, "tags": [ - "AgentService" + "RegionService" ] } }, - "/v1/agents/{id}:generatePeeringConfig": { - "post": { - "operationId": "AgentService_GeneratePeeringConfig", + "/v1/coupon-codes/{id}": { + "patch": { + "operationId": "CouponService_UpdateCouponCode", "parameters": [ { "in": "path", @@ -17683,7 +22135,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AgentServiceGeneratePeeringConfigBody" + "$ref": "#/components/schemas/CouponServiceUpdateCouponCodeBody" } } }, @@ -17694,7 +22146,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GeneratePeeringConfigResponse" + "$ref": "#/components/schemas/v1CouponCode" } } }, @@ -17702,39 +22154,64 @@ } }, "tags": [ - "AgentService" + "CouponService" ] } }, - "/v1/agents/{id}:uploadInboundPeeringConfig": { - "post": { - "operationId": "AgentService_UploadInboundPeeringConfig", + "/v1/coupons": { + "get": { + "operationId": "CouponService_ListCoupons", "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": "assetType", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AgentServiceUploadInboundPeeringConfigBody" - } + }, + { + "description": "Only coupons whose validity ends within 14 days.", + "in": "query", + "name": "expiringSoon", + "required": false, + "schema": { + "type": "boolean" } }, - "required": true - }, + { + "in": "query", + "name": "search", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UploadInboundPeeringConfigResponse" + "$ref": "#/components/schemas/v1ListCouponsResponse" } } }, @@ -17742,18 +22219,16 @@ } }, "tags": [ - "AgentService" + "CouponService" ] - } - }, - "/v1/auth/change-password": { + }, "post": { - "operationId": "UserService_ChangePassword", + "operationId": "CouponService_CreateCoupon", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ChangePasswordRequest" + "$ref": "#/components/schemas/v1CreateCouponRequest" } } }, @@ -17764,7 +22239,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1CreateCouponResponse" } } }, @@ -17772,29 +22247,47 @@ } }, "tags": [ - "UserService" + "CouponService" ] } }, - "/v1/auth/forgot-password": { - "post": { - "operationId": "UserService_ForgotPassword", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ForgotPasswordRequest" - } + "/v1/coupons/{couponId}/code-batches": { + "get": { + "operationId": "CouponService_ListCouponCodeBatches", + "parameters": [ + { + "in": "path", + "name": "couponId", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "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/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListCouponCodeBatchesResponse" } } }, @@ -17802,19 +22295,37 @@ } }, "tags": [ - "UserService" + "CouponService" ] } }, - "/v1/auth/identities": { + "/v1/coupons/{couponId}/code-batches/{batchId}": { "get": { - "operationId": "UserService_ListLinkedIdentities", + "operationId": "CouponService_GetCouponCodeBatch", + "parameters": [ + { + "in": "path", + "name": "couponId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "batchId", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListLinkedIdentitiesResponse" + "$ref": "#/components/schemas/v1CouponCodeBatch" } } }, @@ -17822,21 +22333,63 @@ } }, "tags": [ - "UserService" + "CouponService" ] } }, - "/v1/auth/identities/{provider}": { - "delete": { - "operationId": "UserService_UnlinkIdentity", + "/v1/coupons/{couponId}/codes": { + "get": { + "operationId": "CouponService_ListCouponCodes", "parameters": [ { "in": "path", - "name": "provider", + "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": "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": { @@ -17844,7 +22397,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListCouponCodesResponse" } } }, @@ -17852,18 +22405,26 @@ } }, "tags": [ - "UserService" + "CouponService" ] - } - }, - "/v1/auth/login": { + }, "post": { - "operationId": "UserService_Login", + "operationId": "CouponService_CreateCouponCode", + "parameters": [ + { + "in": "path", + "name": "couponId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1LoginRequest" + "$ref": "#/components/schemas/CouponServiceCreateCouponCodeBody" } } }, @@ -17874,7 +22435,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1LoginResponse" + "$ref": "#/components/schemas/v1CouponCode" } } }, @@ -17882,29 +22443,37 @@ } }, "tags": [ - "UserService" + "CouponService" ] } }, - "/v1/auth/login/mfa": { - "post": { - "operationId": "UserService_LoginMfaVerify", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1LoginMfaVerifyRequest" - } + "/v1/coupons/{couponId}/codes:export": { + "get": { + "operationId": "CouponService_ExportCouponCodes", + "parameters": [ + { + "in": "path", + "name": "couponId", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "in": "query", + "name": "batchId", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1LoginResponse" + "$ref": "#/components/schemas/v1ExportCouponCodesResponse" } } }, @@ -17912,18 +22481,28 @@ } }, "tags": [ - "UserService" + "CouponService" ] } }, - "/v1/auth/logout": { + "/v1/coupons/{couponId}/codes:generate": { "post": { - "operationId": "UserService_Logout", + "operationId": "CouponService_GenerateCouponCodes", + "parameters": [ + { + "in": "path", + "name": "couponId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1LogoutRequest" + "$ref": "#/components/schemas/CouponServiceGenerateCouponCodesBody" } } }, @@ -17934,7 +22513,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GenerateCouponCodesResponse" } } }, @@ -17942,29 +22521,55 @@ } }, "tags": [ - "UserService" + "CouponService" ] } }, - "/v1/auth/mfa/backup-codes/regenerate": { - "post": { - "operationId": "UserService_RegenerateMfaBackupCodes", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1RegenerateMfaBackupCodesRequest" - } + "/v1/coupons/{couponId}/redemptions": { + "get": { + "operationId": "CouponService_ListCouponRedemptions", + "parameters": [ + { + "in": "path", + "name": "couponId", + "required": true, + "schema": { + "type": "string" } }, - "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" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1RegenerateMfaBackupCodesResponse" + "$ref": "#/components/schemas/v1ListCouponRedemptionsResponse" } } }, @@ -17972,59 +22577,120 @@ } }, "tags": [ - "UserService" + "CouponService" ] } }, - "/v1/auth/mfa/disable": { - "post": { - "operationId": "UserService_DisableMfa", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1DisableMfaRequest" - } + "/v1/coupons/{couponId}/report": { + "get": { + "operationId": "CouponService_GetCouponReport", + "parameters": [ + { + "in": "path", + "name": "couponId", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "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" + } + }, + { + "in": "query", + "name": "endTime", + "required": false, + "schema": { + "format": "date-time", + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetCouponReportResponse" } } }, "description": "A successful response." } }, + "summary": "Attribution and ROI figures, grouped by code, campaign, channel, or asset type.", "tags": [ - "UserService" + "CouponService" ] } }, - "/v1/auth/mfa/enroll": { - "post": { - "operationId": "UserService_EnrollMfaTotp", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1EnrollMfaTotpRequest" - } + "/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/v1EnrollMfaTotpResponse" + "$ref": "#/components/schemas/v1Coupon" } } }, @@ -18032,19 +22698,37 @@ } }, "tags": [ - "UserService" + "CouponService" ] - } - }, - "/v1/auth/mfa/status": { - "get": { - "operationId": "UserService_GetMfaStatus", + }, + "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 + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetMfaStatusResponse" + "$ref": "#/components/schemas/v1Coupon" } } }, @@ -18052,18 +22736,28 @@ } }, "tags": [ - "UserService" + "CouponService" ] } }, - "/v1/auth/mfa/verify-enrollment": { + "/v1/coupons/{id}:deactivate": { "post": { - "operationId": "UserService_VerifyMfaEnrollment", + "operationId": "CouponService_DeactivateCoupon", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VerifyMfaEnrollmentRequest" + "$ref": "#/components/schemas/CouponServiceDeactivateCouponBody" } } }, @@ -18074,26 +22768,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VerifyMfaEnrollmentResponse" + "$ref": "#/components/schemas/v1Coupon" } } }, "description": "A successful response." } }, + "summary": "Blocks new attachments; customers keep the periods they were promised.", "tags": [ - "UserService" + "CouponService" ] } }, - "/v1/auth/register": { + "/v1/coupons/{id}:revoke": { "post": { - "operationId": "UserService_RegisterUser", + "operationId": "CouponService_RevokeCoupon", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1RegisterUserRequest" + "$ref": "#/components/schemas/CouponServiceRevokeCouponBody" } } }, @@ -18104,26 +22809,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": [ - "UserService" + "CouponService" ] } }, - "/v1/auth/resend-verification-email": { + "/v1/coupons:preview": { "post": { - "operationId": "UserService_ResendVerificationEmail", + "operationId": "CouponService_PreviewCoupon", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ResendVerificationEmailRequest" + "$ref": "#/components/schemas/v1PreviewCouponRequest" } } }, @@ -18134,37 +22840,28 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1PreviewCouponResponse" } } }, "description": "A successful response." } }, + "summary": "Checks a code against a plan without attaching it.", "tags": [ - "UserService" + "CouponService" ] } }, - "/v1/auth/reset-password": { - "post": { - "operationId": "UserService_ResetPassword", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ResetPasswordRequest" - } - } - }, - "required": true - }, + "/v1/credits/balance": { + "get": { + "operationId": "CreditService_GetCreditBalance", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetCreditBalanceResponse" } } }, @@ -18172,19 +22869,62 @@ } }, "tags": [ - "UserService" + "CreditService" ] } }, - "/v1/auth/sessions": { + "/v1/credits/ledger": { "get": { - "operationId": "UserService_GetActiveSessions", + "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" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetActiveSessionsResponse" + "$ref": "#/components/schemas/v1ListCreditLedgerEntriesResponse" } } }, @@ -18192,30 +22932,39 @@ } }, "tags": [ - "UserService" + "CreditService" ] } }, - "/v1/auth/set-password": { - "post": { - "operationId": "UserService_SetPassword", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SetPasswordRequest" - } + "/v1/credits/promo": { + "get": { + "operationId": "CreditService_ListPromoCreditGrants", + "parameters": [ + { + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" } }, - "description": "SetPassword is for passwordless (SSO-only) accounts that have never set a local password.", - "required": true - }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListPromoCreditGrantsResponse" } } }, @@ -18223,18 +22972,18 @@ } }, "tags": [ - "UserService" + "CreditService" ] } }, - "/v1/auth/sso/exchange": { + "/v1/credits:purchase": { "post": { - "operationId": "UserService_ExchangeSSOCode", + "operationId": "CreditService_PurchaseCredits", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ExchangeSSOCodeRequest" + "$ref": "#/components/schemas/v1PurchaseCreditsRequest" } } }, @@ -18245,7 +22994,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1LoginResponse" + "$ref": "#/components/schemas/v1PurchaseCreditsResponse" } } }, @@ -18253,18 +23002,18 @@ } }, "tags": [ - "UserService" + "CreditService" ] } }, - "/v1/auth/sso/link": { + "/v1/credits:redeemPromoCode": { "post": { - "operationId": "UserService_CompleteSSOLink", + "operationId": "CreditService_RedeemPromoCode", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CompleteSSOLinkRequest" + "$ref": "#/components/schemas/v1RedeemPromoCodeRequest" } } }, @@ -18275,7 +23024,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1LoginResponse" + "$ref": "#/components/schemas/v1RedeemPromoCodeResponse" } } }, @@ -18283,17 +23032,17 @@ } }, "tags": [ - "UserService" + "CreditService" ] } }, - "/v1/auth/verify-email": { + "/v1/datacenters": { "get": { - "operationId": "UserService_VerifyEmail", + "operationId": "RegionService_ListDatacenters", "parameters": [ { "in": "query", - "name": "userId", + "name": "query", "required": false, "schema": { "type": "string" @@ -18301,10 +23050,20 @@ }, { "in": "query", - "name": "code", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" } } ], @@ -18313,96 +23072,48 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "UserService" - ] - } - }, - "/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" + "$ref": "#/components/schemas/v1ListDatacentersResponse" } } }, "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" + "RegionService" ] } }, - "/v1/chat/conversations": { + "/v1/distros": { "get": { - "operationId": "ChatService_ListConversations", + "operationId": "MetadataService_ListDistros", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListConversationsResponse" + "$ref": "#/components/schemas/v1ListDistrosResponse" } } }, "description": "A successful response." } }, - "summary": "ListConversations returns all conversation IDs for the authenticated user", + "summary": "ListDistros returns the guest OS catalog used by the virtual machine image picker.", "tags": [ - "ChatService" + "MetadataService" ] } }, - "/v1/chat/conversations/{conversationId}": { - "delete": { - "operationId": "ChatService_DeleteConversation", + "/v1/dns/geo-locations": { + "get": { + "operationId": "DnsRecordService_ListDnsGeoLocations", "parameters": [ { - "description": "Conversation ID", - "in": "path", - "name": "conversationId", - "required": true, + "description": "Optional filter: continent, country, region, or group.", + "in": "query", + "name": "kind", + "required": false, "schema": { "type": "string" } @@ -18413,28 +23124,34 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListDnsGeoLocationsResponse" } } }, "description": "A successful response." } }, - "summary": "DeleteConversation marks a conversation as deleted (soft delete)", "tags": [ - "ChatService" + "DnsRecordService" ] } }, - "/v1/chat/conversations/{conversationId}/history": { + "/v1/dns/scan": { "get": { - "operationId": "ChatService_GetConversationHistory", + "operationId": "DnsZoneService_ScanDnsZoneRecords", "parameters": [ { - "description": "Conversation ID", - "in": "path", - "name": "conversationId", - "required": true, + "in": "query", + "name": "name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "zoneId", + "required": false, "schema": { "type": "string" } @@ -18445,48 +23162,7 @@ "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" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "ClientDashboardService" - ] - } - }, - "/v1/client/dashboard/summary": { - "get": { - "operationId": "ClientDashboardService_GetClientDashboardSummary", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetClientDashboardSummaryResponse" + "$ref": "#/components/schemas/v1ScanDnsZoneRecordsResponse" } } }, @@ -18494,13 +23170,13 @@ } }, "tags": [ - "ClientDashboardService" + "DnsZoneService" ] } }, - "/v1/client/provider-review-assets": { + "/v1/dns/zones": { "get": { - "operationId": "ClientProviderReviewService_ListClientProviderReviewAssets", + "operationId": "DnsZoneService_ListDnsZones", "parameters": [ { "in": "query", @@ -18519,15 +23195,6 @@ "format": "int32", "type": "integer" } - }, - { - "description": "Optional filter (hostname / provider name), case-insensitive substring.", - "in": "query", - "name": "search", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { @@ -18535,7 +23202,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListClientProviderReviewAssetsResponse" + "$ref": "#/components/schemas/v1ListDnsZonesResponse" } } }, @@ -18543,18 +23210,16 @@ } }, "tags": [ - "ClientProviderReviewService" + "DnsZoneService" ] - } - }, - "/v1/cloudinittemplate": { + }, "post": { - "operationId": "CloudInitTemplateService_CreateCloudInitTemplate", + "operationId": "DnsZoneService_CreateDnsZone", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateCloudInitTemplateRequest" + "$ref": "#/components/schemas/v1CreateDnsZoneRequest" } } }, @@ -18565,7 +23230,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1CreateDnsZoneResponse" } } }, @@ -18573,13 +23238,13 @@ } }, "tags": [ - "CloudInitTemplateService" + "DnsZoneService" ] } }, - "/v1/cloudinittemplate/{id}": { + "/v1/dns/zones/{id}": { "delete": { - "operationId": "CloudInitTemplateService_DeleteCloudInitTemplate", + "operationId": "DnsZoneService_DeleteDnsZone", "parameters": [ { "in": "path", @@ -18588,6 +23253,14 @@ "schema": { "type": "string" } + }, + { + "in": "query", + "name": "force", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -18603,11 +23276,11 @@ } }, "tags": [ - "CloudInitTemplateService" + "DnsZoneService" ] }, "get": { - "operationId": "CloudInitTemplateService_GetCloudInitTemplate", + "operationId": "DnsZoneService_GetDnsZone", "parameters": [ { "in": "path", @@ -18623,7 +23296,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetCloudInitTemplateResponse" + "$ref": "#/components/schemas/v1GetDnsZoneResponse" } } }, @@ -18631,11 +23304,13 @@ } }, "tags": [ - "CloudInitTemplateService" + "DnsZoneService" ] - }, - "patch": { - "operationId": "CloudInitTemplateService_UpdateCloudInitTemplate", + } + }, + "/v1/dns/zones/{id}/check-delegation": { + "post": { + "operationId": "DnsZoneService_CheckDnsZoneDelegation", "parameters": [ { "in": "path", @@ -18650,7 +23325,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CloudInitTemplateServiceUpdateCloudInitTemplateBody" + "$ref": "#/components/schemas/DnsZoneServiceCheckDnsZoneDelegationBody" } } }, @@ -18661,7 +23336,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateCloudInitTemplateResponse" + "$ref": "#/components/schemas/v1GetDnsZoneResponse" } } }, @@ -18669,39 +23344,20 @@ } }, "tags": [ - "CloudInitTemplateService" + "DnsZoneService" ] } }, - "/v1/cloudinittemplates": { + "/v1/dns/zones/{id}/export": { "get": { - "operationId": "CloudInitTemplateService_ListCloudInitTemplates", + "operationId": "DnsZoneService_ExportDnsZone", "parameters": [ { - "in": "query", - "name": "page", - "required": false, - "schema": { - "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, + "in": "path", + "name": "id", + "required": true, "schema": { - "type": "boolean" + "type": "string" } } ], @@ -18710,7 +23366,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListCloudInitTemplatesResponse" + "$ref": "#/components/schemas/v1ExportDnsZoneResponse" } } }, @@ -18718,56 +23374,28 @@ } }, "tags": [ - "CloudInitTemplateService" + "DnsZoneService" ] } }, - "/v1/cloudinituserdata": { - "get": { - "operationId": "CloudInitUserDataService_ListCloudInitUserData", + "/v1/dns/zones/{id}/import": { + "post": { + "operationId": "DnsZoneService_ImportDnsZone", "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" } } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListCloudInitUserDataResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "CloudInitUserDataService" - ] - }, - "post": { - "operationId": "CloudInitUserDataService_CreateCloudInitUserData", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateCloudInitUserDataRequest" + "$ref": "#/components/schemas/DnsZoneServiceImportDnsZoneBody" } } }, @@ -18778,7 +23406,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CloudInitUserData" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -18786,45 +23414,17 @@ } }, "tags": [ - "CloudInitUserDataService" + "DnsZoneService" ] } }, - "/v1/cloudinituserdata/{id}": { - "delete": { - "operationId": "CloudInitUserDataService_DeleteCloudInitUserData", - "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": [ - "CloudInitUserDataService" - ] - }, + "/v1/dns/zones/{zoneId}/dnssec": { "get": { - "operationId": "CloudInitUserDataService_GetCloudInitUserData", + "operationId": "DnssecService_GetDnssec", "parameters": [ { "in": "path", - "name": "id", + "name": "zoneId", "required": true, "schema": { "type": "string" @@ -18836,7 +23436,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CloudInitUserData" + "$ref": "#/components/schemas/v1DnssecInfo" } } }, @@ -18844,15 +23444,17 @@ } }, "tags": [ - "CloudInitUserDataService" + "DnssecService" ] - }, - "patch": { - "operationId": "CloudInitUserDataService_UpdateCloudInitUserData", + } + }, + "/v1/dns/zones/{zoneId}/dnssec/check-ds": { + "post": { + "operationId": "DnssecService_CheckDnssecDs", "parameters": [ { "in": "path", - "name": "id", + "name": "zoneId", "required": true, "schema": { "type": "string" @@ -18863,7 +23465,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CloudInitUserDataServiceUpdateCloudInitUserDataBody" + "$ref": "#/components/schemas/DnssecServiceCheckDnssecDsBody" } } }, @@ -18874,7 +23476,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CloudInitUserData" + "$ref": "#/components/schemas/v1DnssecInfo" } } }, @@ -18882,47 +23484,39 @@ } }, "tags": [ - "CloudInitUserDataService" + "DnssecService" ] } }, - "/v1/countries-cities": { - "get": { - "operationId": "RegionService_ListCountriesCities", + "/v1/dns/zones/{zoneId}/dnssec/disable": { + "post": { + "operationId": "DnssecService_DisableDnssec", "parameters": [ { - "in": "query", - "name": "query", - "required": false, + "in": "path", + "name": "zoneId", + "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/DnssecServiceDisableDnssecBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListCountriesCitiesResponse" + "$ref": "#/components/schemas/v1DnssecInfo" } } }, @@ -18930,17 +23524,17 @@ } }, "tags": [ - "RegionService" + "DnssecService" ] } }, - "/v1/coupon-codes/{id}": { - "patch": { - "operationId": "CouponService_UpdateCouponCode", + "/v1/dns/zones/{zoneId}/dnssec/enable": { + "post": { + "operationId": "DnssecService_EnableDnssec", "parameters": [ { "in": "path", - "name": "id", + "name": "zoneId", "required": true, "schema": { "type": "string" @@ -18951,7 +23545,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CouponServiceUpdateCouponCodeBody" + "$ref": "#/components/schemas/DnssecServiceEnableDnssecBody" } } }, @@ -18962,7 +23556,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CouponCode" + "$ref": "#/components/schemas/v1DnssecInfo" } } }, @@ -18970,64 +23564,111 @@ } }, "tags": [ - "CouponService" + "DnssecService" ] } }, - "/v1/coupons": { - "get": { - "operationId": "CouponService_ListCoupons", + "/v1/dns/zones/{zoneId}/geo-records": { + "delete": { + "operationId": "DnsRecordService_DeleteDnsGeoRecord", "parameters": [ { - "in": "query", - "name": "page", - "required": false, + "in": "path", + "name": "zoneId", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "pageSize", + "name": "name", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "assetType", + "name": "type", "required": false, "schema": { "type": "string" } - }, + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1SuccessResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "DnsRecordService" + ] + }, + "get": { + "operationId": "DnsRecordService_ListDnsGeoRecords", + "parameters": [ { - "description": "Only coupons whose validity ends within 14 days.", - "in": "query", - "name": "expiringSoon", - "required": false, + "in": "path", + "name": "zoneId", + "required": true, "schema": { - "type": "boolean" + "type": "string" } - }, + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ListDnsGeoRecordsResponse" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "DnsRecordService" + ] + }, + "put": { + "operationId": "DnsRecordService_UpsertDnsGeoRecord", + "parameters": [ { - "in": "query", - "name": "search", - "required": false, + "in": "path", + "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/v1ListCouponsResponse" + "$ref": "#/components/schemas/v1DnsGeoRecord" } } }, @@ -19035,16 +23676,28 @@ } }, "tags": [ - "CouponService" + "DnsRecordService" ] - }, + } + }, + "/v1/dns/zones/{zoneId}/geo-records:check": { "post": { - "operationId": "CouponService_CreateCoupon", + "operationId": "DnsRecordService_CheckDnsGeoRecord", + "parameters": [ + { + "in": "path", + "name": "zoneId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateCouponRequest" + "$ref": "#/components/schemas/DnsRecordServiceCheckDnsGeoRecordBody" } } }, @@ -19055,7 +23708,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateCouponResponse" + "$ref": "#/components/schemas/v1CheckDnsGeoRecordResponse" } } }, @@ -19063,17 +23716,17 @@ } }, "tags": [ - "CouponService" + "DnsRecordService" ] } }, - "/v1/coupons/{couponId}/code-batches": { + "/v1/dns/zones/{zoneId}/geo-records:get": { "get": { - "operationId": "CouponService_ListCouponCodeBatches", + "operationId": "DnsRecordService_GetDnsGeoRecord", "parameters": [ { "in": "path", - "name": "couponId", + "name": "zoneId", "required": true, "schema": { "type": "string" @@ -19081,20 +23734,18 @@ }, { "in": "query", - "name": "page", + "name": "name", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "pageSize", + "name": "type", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } } ], @@ -19103,7 +23754,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListCouponCodeBatchesResponse" + "$ref": "#/components/schemas/v1DnsGeoRecord" } } }, @@ -19111,26 +23762,34 @@ } }, "tags": [ - "CouponService" + "DnsRecordService" ] } }, - "/v1/coupons/{couponId}/code-batches/{batchId}": { - "get": { - "operationId": "CouponService_GetCouponCodeBatch", + "/v1/dns/zones/{zoneId}/records": { + "delete": { + "operationId": "DnsRecordService_DeleteDnsRecord", "parameters": [ { "in": "path", - "name": "couponId", + "name": "zoneId", "required": true, "schema": { "type": "string" } }, { - "in": "path", - "name": "batchId", - "required": true, + "in": "query", + "name": "name", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "type", + "required": false, "schema": { "type": "string" } @@ -19141,7 +23800,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CouponCodeBatch" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -19149,17 +23808,15 @@ } }, "tags": [ - "CouponService" + "DnsRecordService" ] - } - }, - "/v1/coupons/{couponId}/codes": { + }, "get": { - "operationId": "CouponService_ListCouponCodes", + "operationId": "DnsRecordService_ListDnsRecords", "parameters": [ { "in": "path", - "name": "couponId", + "name": "zoneId", "required": true, "schema": { "type": "string" @@ -19167,53 +23824,83 @@ }, { "in": "query", - "name": "page", + "name": "name", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "pageSize", + "name": "type", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "batchId", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "campaign", + "name": "pageSize", "required": false, "schema": { - "type": "string" + "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": "query", - "name": "channel", - "required": false, + "in": "path", + "name": "zoneId", + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DnsRecordServiceUpsertDnsRecordBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListCouponCodesResponse" + "$ref": "#/components/schemas/v1DnsRecord" } } }, @@ -19221,15 +23908,17 @@ } }, "tags": [ - "CouponService" + "DnsRecordService" ] - }, + } + }, + "/v1/dns/zones/{zoneId}/records:import": { "post": { - "operationId": "CouponService_CreateCouponCode", + "operationId": "DnsZoneService_ImportDnsRecords", "parameters": [ { "in": "path", - "name": "couponId", + "name": "zoneId", "required": true, "schema": { "type": "string" @@ -19240,7 +23929,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CouponServiceCreateCouponCodeBody" + "$ref": "#/components/schemas/DnsZoneServiceImportDnsRecordsBody" } } }, @@ -19251,7 +23940,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CouponCode" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -19259,17 +23948,17 @@ } }, "tags": [ - "CouponService" + "DnsZoneService" ] } }, - "/v1/coupons/{couponId}/codes:export": { + "/v1/dns/zones/{zoneId}/scan": { "get": { - "operationId": "CouponService_ExportCouponCodes", + "operationId": "DnsZoneService_ScanDnsZoneRecords2", "parameters": [ { "in": "path", - "name": "couponId", + "name": "zoneId", "required": true, "schema": { "type": "string" @@ -19277,7 +23966,7 @@ }, { "in": "query", - "name": "batchId", + "name": "name", "required": false, "schema": { "type": "string" @@ -19289,7 +23978,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ExportCouponCodesResponse" + "$ref": "#/components/schemas/v1ScanDnsZoneRecordsResponse" } } }, @@ -19297,28 +23986,36 @@ } }, "tags": [ - "CouponService" + "DnsZoneService" ] } }, - "/v1/coupons/{couponId}/codes:generate": { - "post": { - "operationId": "CouponService_GenerateCouponCodes", - "parameters": [ - { - "in": "path", - "name": "couponId", - "required": true, - "schema": { - "type": "string" - } + "/v1/domain": { + "get": { + "operationId": "DomainService_GetDomain", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1GetDomainResponse" + } + } + }, + "description": "A successful response." } - ], + }, + "tags": [ + "DomainService" + ] + }, + "post": { + "operationId": "DomainService_CreateDomain", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CouponServiceGenerateCouponCodesBody" + "$ref": "#/components/schemas/v1CreateDomainRequest" } } }, @@ -19329,7 +24026,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GenerateCouponCodesResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -19337,47 +24034,21 @@ } }, "tags": [ - "CouponService" + "DomainService" ] } }, - "/v1/coupons/{couponId}/redemptions": { + "/v1/domain/verify/{id}": { "get": { - "operationId": "CouponService_ListCouponRedemptions", + "operationId": "DomainService_VerifyDomain", "parameters": [ { "in": "path", - "name": "couponId", + "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" - } - }, - { - "in": "query", - "name": "assetType", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { @@ -19385,7 +24056,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListCouponRedemptionsResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -19393,79 +24064,67 @@ } }, "tags": [ - "CouponService" + "DomainService" ] } }, - "/v1/coupons/{couponId}/report": { - "get": { - "operationId": "CouponService_GetCouponReport", + "/v1/domain/{id}": { + "delete": { + "operationId": "DomainService_DeleteDomain", "parameters": [ { "in": "path", - "name": "couponId", + "name": "id", "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" - } - }, + } + ], + "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": "channel", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { - "description": "Applications created in [start_time, end_time); open ends are unbounded.", "in": "query", - "name": "startTime", + "name": "pageSize", "required": false, "schema": { - "format": "date-time", - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "endTime", + "name": "filterKey", "required": false, "schema": { - "format": "date-time", "type": "string" } } @@ -19475,38 +24134,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetCouponReportResponse" + "$ref": "#/components/schemas/v1ListEnvironmentVariablesResponse" } } }, "description": "A successful response." } }, - "summary": "Attribution and ROI figures, grouped by code, campaign, channel, or asset type.", "tags": [ - "CouponService" + "EnvironmentVariableService" ] - } - }, - "/v1/coupons/{id}": { - "get": { - "operationId": "CouponService_GetCoupon", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" + }, + "post": { + "operationId": "EnvironmentVariableService_CreateEnvironmentVariable", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1CreateEnvironmentVariableRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1Coupon" + "$ref": "#/components/schemas/v1CreateEnvironmentVariableResponse" } } }, @@ -19514,11 +24170,13 @@ } }, "tags": [ - "CouponService" + "EnvironmentVariableService" ] - }, - "patch": { - "operationId": "CouponService_UpdateCoupon", + } + }, + "/v1/environment-variables/{id}": { + "delete": { + "operationId": "EnvironmentVariableService_DeleteEnvironmentVariable", "parameters": [ { "in": "path", @@ -19529,22 +24187,12 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CouponServiceUpdateCouponBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1Coupon" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -19552,13 +24200,11 @@ } }, "tags": [ - "CouponService" + "EnvironmentVariableService" ] - } - }, - "/v1/coupons/{id}:deactivate": { - "post": { - "operationId": "CouponService_DeactivateCoupon", + }, + "get": { + "operationId": "EnvironmentVariableService_GetEnvironmentVariable", "parameters": [ { "in": "path", @@ -19569,37 +24215,24 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CouponServiceDeactivateCouponBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1Coupon" + "$ref": "#/components/schemas/v1GetEnvironmentVariableResponse" } } }, "description": "A successful response." } }, - "summary": "Blocks new attachments; customers keep the periods they were promised.", "tags": [ - "CouponService" + "EnvironmentVariableService" ] - } - }, - "/v1/coupons/{id}:revoke": { - "post": { - "operationId": "CouponService_RevokeCoupon", + }, + "patch": { + "operationId": "EnvironmentVariableService_UpdateEnvironmentVariable", "parameters": [ { "in": "path", @@ -19614,7 +24247,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CouponServiceRevokeCouponBody" + "$ref": "#/components/schemas/EnvironmentVariableServiceUpdateEnvironmentVariableBody" } } }, @@ -19625,27 +24258,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" + "EnvironmentVariableService" ] } }, - "/v1/coupons:preview": { + "/v1/exchange-rate/convert": { "post": { - "operationId": "CouponService_PreviewCoupon", + "operationId": "ExchangeRateService_ConvertCurrency", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1PreviewCouponRequest" + "$ref": "#/components/schemas/v1ConvertCurrencyRequest" } } }, @@ -19656,81 +24288,50 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1PreviewCouponResponse" + "$ref": "#/components/schemas/v1ConvertCurrencyResponse" } } }, "description": "A successful response." } }, - "summary": "Checks a code against a plan without attaching it.", + "summary": "Convert an amount from USD to a target currency", "tags": [ - "CouponService" + "ExchangeRateService" ] } }, - "/v1/credits/balance": { + "/v1/exchange-rate/currencies": { "get": { - "operationId": "CreditService_GetCreditBalance", + "operationId": "ExchangeRateService_ListSupportedCurrencies", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetCreditBalanceResponse" + "$ref": "#/components/schemas/v1ListSupportedCurrenciesResponse" } } }, "description": "A successful response." } }, + "summary": "List all supported currency codes", "tags": [ - "CreditService" + "ExchangeRateService" ] } }, - "/v1/credits/ledger": { + "/v1/exchange-rate/rate/{currencyCode}": { "get": { - "operationId": "CreditService_ListCreditLedgerEntries", + "operationId": "ExchangeRateService_GetExchangeRate", "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, + "description": "Currency code to get exchange rate for (from USD)", + "in": "path", + "name": "currencyCode", + "required": true, "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" } } @@ -19740,21 +24341,43 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListCreditLedgerEntriesResponse" + "$ref": "#/components/schemas/v1GetExchangeRateResponse" } } }, "description": "A successful response." } }, + "summary": "Get the current exchange rate for a specific currency (from USD)", "tags": [ - "CreditService" + "ExchangeRateService" ] } }, - "/v1/credits/promo": { + "/v1/exchange-rate/rates": { "get": { - "operationId": "CreditService_ListPromoCreditGrants", + "operationId": "ExchangeRateService_GetAllExchangeRates", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1GetAllExchangeRatesResponse" + } + } + }, + "description": "A successful response." + } + }, + "summary": "Get all exchange rates at once (returns map of currency codes to rates)", + "tags": [ + "ExchangeRateService" + ] + } + }, + "/v1/firewall/address-groups": { + "get": { + "operationId": "FirewallService_ListFirewallAddressGroups", "parameters": [ { "in": "query", @@ -19773,6 +24396,15 @@ "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": { @@ -19780,7 +24412,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPromoCreditGrantsResponse" + "$ref": "#/components/schemas/v1ListFirewallAddressGroupsResponse" } } }, @@ -19788,18 +24420,16 @@ } }, "tags": [ - "CreditService" + "FirewallService" ] - } - }, - "/v1/credits:purchase": { + }, "post": { - "operationId": "CreditService_PurchaseCredits", + "operationId": "FirewallService_CreateFirewallAddressGroup", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1PurchaseCreditsRequest" + "$ref": "#/components/schemas/v1CreateFirewallAddressGroupRequest" } } }, @@ -19810,7 +24440,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1PurchaseCreditsResponse" + "$ref": "#/components/schemas/v1CreateFirewallAddressGroupResponse" } } }, @@ -19818,29 +24448,29 @@ } }, "tags": [ - "CreditService" + "FirewallService" ] } }, - "/v1/credits:redeemPromoCode": { - "post": { - "operationId": "CreditService_RedeemPromoCode", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1RedeemPromoCodeRequest" - } + "/v1/firewall/address-groups/{id}": { + "delete": { + "operationId": "FirewallService_DeleteFirewallAddressGroup", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1RedeemPromoCodeResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -19848,47 +24478,65 @@ } }, "tags": [ - "CreditService" + "FirewallService" ] - } - }, - "/v1/datacenters": { + }, "get": { - "operationId": "RegionService_ListDatacenters", + "operationId": "FirewallService_GetFirewallAddressGroup", "parameters": [ { - "in": "query", - "name": "query", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1FirewallAddressGroup" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "FirewallService" + ] + }, + "patch": { + "operationId": "FirewallService_UpdateFirewallAddressGroup", + "parameters": [ { - "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/FirewallServiceUpdateFirewallAddressGroupBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDatacentersResponse" + "$ref": "#/components/schemas/v1FirewallAddressGroup" } } }, @@ -19896,41 +24544,62 @@ } }, "tags": [ - "RegionService" + "FirewallService" ] } }, - "/v1/distros": { - "get": { - "operationId": "MetadataService_ListDistros", + "/v1/firewall/rules/{id}": { + "delete": { + "operationId": "FirewallService_DeleteFirewallRule", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDistrosResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "ListDistros returns the guest OS catalog used by the virtual machine image picker.", "tags": [ - "MetadataService" + "FirewallService" ] - } - }, - "/v1/dns/geo-locations": { + }, "get": { - "operationId": "DnsRecordService_ListDnsGeoLocations", + "operationId": "FirewallService_GetFirewallRule", "parameters": [ { - "description": "Optional filter: continent, country, region, or group.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "Optional: Filter by direction. If not specified, returns the rule regardless of direction.", "in": "query", - "name": "kind", + "name": "direction", "required": false, "schema": { + "default": "FIREWALL_DIRECTION_UNSPECIFIED", + "enum": [ + "FIREWALL_DIRECTION_UNSPECIFIED", + "FIREWALL_DIRECTION_INGRESS", + "FIREWALL_DIRECTION_EGRESS" + ], "type": "string" } } @@ -19940,7 +24609,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDnsGeoLocationsResponse" + "$ref": "#/components/schemas/v1FirewallRuleResource" } } }, @@ -19948,37 +24617,78 @@ } }, "tags": [ - "DnsRecordService" + "FirewallService" ] - } - }, - "/v1/dns/scan": { - "get": { - "operationId": "DnsZoneService_ScanDnsZoneRecords", + }, + "patch": { + "operationId": "FirewallService_UpdateFirewallRule", "parameters": [ { - "in": "query", - "name": "name", - "required": false, + "in": "path", + "name": "id", + "required": true, "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": [ { - "in": "query", - "name": "zoneId", - "required": false, + "description": "ID of the rule to move", + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FirewallServiceMoveFirewallRuleBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ScanDnsZoneRecordsResponse" + "$ref": "#/components/schemas/v1FirewallRuleResource" } } }, @@ -19986,13 +24696,13 @@ } }, "tags": [ - "DnsZoneService" + "FirewallService" ] } }, - "/v1/dns/zones": { + "/v1/firewall/rulesets": { "get": { - "operationId": "DnsZoneService_ListDnsZones", + "operationId": "FirewallService_ListFirewallRuleSets", "parameters": [ { "in": "query", @@ -20011,6 +24721,29 @@ "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": { @@ -20018,7 +24751,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDnsZonesResponse" + "$ref": "#/components/schemas/v1ListFirewallRuleSetsResponse" } } }, @@ -20026,16 +24759,16 @@ } }, "tags": [ - "DnsZoneService" + "FirewallService" ] }, "post": { - "operationId": "DnsZoneService_CreateDnsZone", + "operationId": "FirewallService_CreateFirewallRuleSet", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateDnsZoneRequest" + "$ref": "#/components/schemas/v1CreateFirewallRuleSetRequest" } } }, @@ -20046,7 +24779,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateDnsZoneResponse" + "$ref": "#/components/schemas/v1CreateFirewallRuleSetResponse" } } }, @@ -20054,13 +24787,13 @@ } }, "tags": [ - "DnsZoneService" + "FirewallService" ] } }, - "/v1/dns/zones/{id}": { + "/v1/firewall/rulesets/{id}": { "delete": { - "operationId": "DnsZoneService_DeleteDnsZone", + "operationId": "FirewallService_DeleteFirewallRuleSet", "parameters": [ { "in": "path", @@ -20092,11 +24825,11 @@ } }, "tags": [ - "DnsZoneService" + "FirewallService" ] }, "get": { - "operationId": "DnsZoneService_GetDnsZone", + "operationId": "FirewallService_GetFirewallRuleSet", "parameters": [ { "in": "path", @@ -20112,7 +24845,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetDnsZoneResponse" + "$ref": "#/components/schemas/v1FirewallRuleSet" } } }, @@ -20120,13 +24853,11 @@ } }, "tags": [ - "DnsZoneService" + "FirewallService" ] - } - }, - "/v1/dns/zones/{id}/check-delegation": { - "post": { - "operationId": "DnsZoneService_CheckDnsZoneDelegation", + }, + "patch": { + "operationId": "FirewallService_UpdateFirewallRuleSet", "parameters": [ { "in": "path", @@ -20141,7 +24872,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DnsZoneServiceCheckDnsZoneDelegationBody" + "$ref": "#/components/schemas/FirewallServiceUpdateFirewallRuleSetBody" } } }, @@ -20152,7 +24883,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetDnsZoneResponse" + "$ref": "#/components/schemas/v1FirewallRuleSet" } } }, @@ -20160,21 +24891,54 @@ } }, "tags": [ - "DnsZoneService" + "FirewallService" ] } }, - "/v1/dns/zones/{id}/export": { + "/v1/firewall/rulesets/{rulesetId}/rules": { "get": { - "operationId": "DnsZoneService_ExportDnsZone", + "operationId": "FirewallService_ListFirewallRules", "parameters": [ { "in": "path", - "name": "id", + "name": "rulesetId", "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": { @@ -20182,7 +24946,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ExportDnsZoneResponse" + "$ref": "#/components/schemas/v1ListFirewallRulesResponse" } } }, @@ -20190,17 +24954,15 @@ } }, "tags": [ - "DnsZoneService" + "FirewallService" ] - } - }, - "/v1/dns/zones/{id}/import": { + }, "post": { - "operationId": "DnsZoneService_ImportDnsZone", + "operationId": "FirewallService_CreateFirewallRule", "parameters": [ { "in": "path", - "name": "id", + "name": "rulesetId", "required": true, "schema": { "type": "string" @@ -20211,7 +24973,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DnsZoneServiceImportDnsZoneBody" + "$ref": "#/components/schemas/FirewallServiceCreateFirewallRuleBody" } } }, @@ -20222,7 +24984,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1CreateFirewallRuleResponse" } } }, @@ -20230,18 +24992,18 @@ } }, "tags": [ - "DnsZoneService" + "FirewallService" ] } }, - "/v1/dns/zones/{zoneId}/dnssec": { + "/v1/game-server-templates": { "get": { - "operationId": "DnssecService_GetDnssec", + "operationId": "GameServerTemplateService_ListGameServerTemplates", "parameters": [ { - "in": "path", - "name": "zoneId", - "required": true, + "in": "query", + "name": "platformId", + "required": false, "schema": { "type": "string" } @@ -20252,7 +25014,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DnssecInfo" + "$ref": "#/components/schemas/v1ListGameServerTemplatesResponse" } } }, @@ -20260,17 +25022,17 @@ } }, "tags": [ - "DnssecService" + "GameServerTemplateService" ] } }, - "/v1/dns/zones/{zoneId}/dnssec/check-ds": { - "post": { - "operationId": "DnssecService_CheckDnssecDs", + "/v1/game-server-templates/{id}": { + "patch": { + "operationId": "GameServerTemplateService_UpdateGameServerTemplate", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "id", "required": true, "schema": { "type": "string" @@ -20281,7 +25043,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DnssecServiceCheckDnssecDsBody" + "$ref": "#/components/schemas/GameServerTemplateServiceUpdateGameServerTemplateBody" } } }, @@ -20292,7 +25054,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DnssecInfo" + "$ref": "#/components/schemas/v1GameServerTemplate" } } }, @@ -20300,17 +25062,17 @@ } }, "tags": [ - "DnssecService" + "GameServerTemplateService" ] } }, - "/v1/dns/zones/{zoneId}/dnssec/disable": { + "/v1/game-server-templates/{id}:duplicate": { "post": { - "operationId": "DnssecService_DisableDnssec", + "operationId": "GameServerTemplateService_DuplicateGameServerTemplate", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "id", "required": true, "schema": { "type": "string" @@ -20321,7 +25083,67 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DnssecServiceDisableDnssecBody" + "$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" } } }, @@ -20332,7 +25154,38 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DnssecInfo" + "$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" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ListGameServersResponse" } } }, @@ -20340,28 +25193,16 @@ } }, "tags": [ - "DnssecService" + "GameServerService" ] - } - }, - "/v1/dns/zones/{zoneId}/dnssec/enable": { + }, "post": { - "operationId": "DnssecService_EnableDnssec", - "parameters": [ - { - "in": "path", - "name": "zoneId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "GameServerService_CreateGameServer", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DnssecServiceEnableDnssecBody" + "$ref": "#/components/schemas/v1CreateGameServerRequest" } } }, @@ -20372,7 +25213,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DnssecInfo" + "$ref": "#/components/schemas/v1GameServer" } } }, @@ -20380,37 +25221,21 @@ } }, "tags": [ - "DnssecService" + "GameServerService" ] } }, - "/v1/dns/zones/{zoneId}/geo-records": { + "/v1/game-servers/{id}": { "delete": { - "operationId": "DnsRecordService_DeleteDnsGeoRecord", + "operationId": "GameServerService_DeleteGameServer", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "id", "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "type", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { @@ -20426,15 +25251,15 @@ } }, "tags": [ - "DnsRecordService" + "GameServerService" ] }, "get": { - "operationId": "DnsRecordService_ListDnsGeoRecords", + "operationId": "GameServerService_GetGameServer", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "id", "required": true, "schema": { "type": "string" @@ -20446,7 +25271,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDnsGeoRecordsResponse" + "$ref": "#/components/schemas/v1GameServer" } } }, @@ -20454,37 +25279,29 @@ } }, "tags": [ - "DnsRecordService" + "GameServerService" ] - }, - "put": { - "operationId": "DnsRecordService_UpsertDnsGeoRecord", + } + }, + "/v1/game-servers/{id}/allocations": { + "get": { + "operationId": "GameServerService_ListAllocations", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "id", "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/v1DnsGeoRecord" + "$ref": "#/components/schemas/v1ListGameServerAllocationsResponse" } } }, @@ -20492,17 +25309,15 @@ } }, "tags": [ - "DnsRecordService" + "GameServerService" ] - } - }, - "/v1/dns/zones/{zoneId}/geo-records:check": { + }, "post": { - "operationId": "DnsRecordService_CheckDnsGeoRecord", + "operationId": "GameServerService_CreateAllocation", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "id", "required": true, "schema": { "type": "string" @@ -20513,7 +25328,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DnsRecordServiceCheckDnsGeoRecordBody" + "$ref": "#/components/schemas/GameServerServiceCreateAllocationBody" } } }, @@ -20524,7 +25339,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CheckDnsGeoRecordResponse" + "$ref": "#/components/schemas/v1GameServerAllocation" } } }, @@ -20532,82 +25347,29 @@ } }, "tags": [ - "DnsRecordService" + "GameServerService" ] } }, - "/v1/dns/zones/{zoneId}/geo-records:get": { - "get": { - "operationId": "DnsRecordService_GetDnsGeoRecord", + "/v1/game-servers/{id}/allocations/{allocationId}": { + "delete": { + "operationId": "GameServerService_DeleteAllocation", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "id", "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": "zoneId", + "name": "allocationId", "required": true, "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "name", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "type", - "required": false, - "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ], @@ -20624,80 +25386,27 @@ } }, "tags": [ - "DnsRecordService" + "GameServerService" ] }, - "get": { - "operationId": "DnsRecordService_ListDnsRecords", + "post": { + "operationId": "GameServerService_UpdateAllocation", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "id", "required": true, "schema": { "type": "string" } }, - { - "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", + "name": "allocationId", "required": true, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ], @@ -20705,7 +25414,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DnsRecordServiceUpsertDnsRecordBody" + "$ref": "#/components/schemas/GameServerServiceUpdateAllocationBody" } } }, @@ -20716,7 +25425,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DnsRecord" + "$ref": "#/components/schemas/v1GameServerAllocation" } } }, @@ -20724,28 +25433,37 @@ } }, "tags": [ - "DnsRecordService" + "GameServerService" ] } }, - "/v1/dns/zones/{zoneId}/records:import": { + "/v1/game-servers/{id}/allocations/{allocationId}:primary": { "post": { - "operationId": "DnsZoneService_ImportDnsRecords", + "operationId": "GameServerService_SetPrimaryAllocation", "parameters": [ { "in": "path", - "name": "zoneId", + "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/DnsZoneServiceImportDnsRecordsBody" + "$ref": "#/components/schemas/GameServerServiceSetPrimaryAllocationBody" } } }, @@ -20764,29 +25482,21 @@ } }, "tags": [ - "DnsZoneService" + "GameServerService" ] } }, - "/v1/dns/zones/{zoneId}/scan": { + "/v1/game-servers/{id}/backups": { "get": { - "operationId": "DnsZoneService_ScanDnsZoneRecords2", + "operationId": "GameServerService_ListBackups", "parameters": [ { "in": "path", - "name": "zoneId", + "name": "id", "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "name", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { @@ -20794,27 +25504,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ScanDnsZoneRecordsResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "DnsZoneService" - ] - } - }, - "/v1/domain": { - "get": { - "operationId": "DomainService_GetDomain", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetDomainResponse" + "$ref": "#/components/schemas/v1ListGameServerBackupsResponse" } } }, @@ -20822,16 +25512,26 @@ } }, "tags": [ - "DomainService" + "GameServerService" ] }, "post": { - "operationId": "DomainService_CreateDomain", + "operationId": "GameServerService_CreateBackup", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateDomainRequest" + "$ref": "#/components/schemas/GameServerServiceCreateBackupBody" } } }, @@ -20842,7 +25542,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GameServerBackup" } } }, @@ -20850,13 +25550,13 @@ } }, "tags": [ - "DomainService" + "GameServerService" ] } }, - "/v1/domain/verify/{id}": { - "get": { - "operationId": "DomainService_VerifyDomain", + "/v1/game-servers/{id}/backups/{backupUuid}": { + "delete": { + "operationId": "GameServerService_DeleteBackup", "parameters": [ { "in": "path", @@ -20865,6 +25565,23 @@ "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": { @@ -20880,13 +25597,13 @@ } }, "tags": [ - "DomainService" + "GameServerService" ] } }, - "/v1/domain/{id}": { - "delete": { - "operationId": "DomainService_DeleteDomain", + "/v1/game-servers/{id}/backups/{backupUuid}:lock": { + "post": { + "operationId": "GameServerService_LockBackup", "parameters": [ { "in": "path", @@ -20895,8 +25612,26 @@ "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": { @@ -20910,64 +25645,36 @@ } }, "tags": [ - "DomainService" + "GameServerService" ] } }, - "/v1/environment-variables": { - "get": { - "operationId": "EnvironmentVariableService_ListEnvironmentVariables", + "/v1/game-servers/{id}/backups/{backupUuid}:restore": { + "post": { + "operationId": "GameServerService_RestoreBackup", "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" } }, { - "in": "query", - "name": "filterKey", - "required": false, + "in": "path", + "name": "backupUuid", + "required": true, "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/v1CreateEnvironmentVariableRequest" + "$ref": "#/components/schemas/v1GameServerServiceRestoreBackupBody" } } }, @@ -20978,7 +25685,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateEnvironmentVariableResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -20986,13 +25693,13 @@ } }, "tags": [ - "EnvironmentVariableService" + "GameServerService" ] } }, - "/v1/environment-variables/{id}": { - "delete": { - "operationId": "EnvironmentVariableService_DeleteEnvironmentVariable", + "/v1/game-servers/{id}/databases": { + "get": { + "operationId": "GameServerService_ListDatabases", "parameters": [ { "in": "path", @@ -21008,7 +25715,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListDatabasesResponse" } } }, @@ -21016,11 +25723,11 @@ } }, "tags": [ - "EnvironmentVariableService" + "GameServerService" ] }, - "get": { - "operationId": "EnvironmentVariableService_GetEnvironmentVariable", + "post": { + "operationId": "GameServerService_CreateDatabase", "parameters": [ { "in": "path", @@ -21031,12 +25738,22 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceCreateDatabaseBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetEnvironmentVariableResponse" + "$ref": "#/components/schemas/v1GameServerDatabase" } } }, @@ -21044,11 +25761,13 @@ } }, "tags": [ - "EnvironmentVariableService" + "GameServerService" ] - }, - "patch": { - "operationId": "EnvironmentVariableService_UpdateEnvironmentVariable", + } + }, + "/v1/game-servers/{id}/databases/{databaseId}": { + "delete": { + "operationId": "GameServerService_DeleteDatabase", "parameters": [ { "in": "path", @@ -21057,18 +25776,16 @@ "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": { @@ -21082,141 +25799,113 @@ } }, "tags": [ - "EnvironmentVariableService" + "GameServerService" ] } }, - "/v1/exchange-rate/convert": { + "/v1/game-servers/{id}/databases/{databaseId}:rotate": { "post": { - "operationId": "ExchangeRateService_ConvertCurrency", + "operationId": "GameServerService_RotateDatabasePassword", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "databaseId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ConvertCurrencyRequest" + "$ref": "#/components/schemas/GameServerServiceRotateDatabasePasswordBody" } } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ConvertCurrencyResponse" - } - } - }, - "description": "A successful response." - } + }, + "required": true }, - "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" + "$ref": "#/components/schemas/v1GameServerDatabase" } } }, "description": "A successful response." } }, - "summary": "List all supported currency codes", "tags": [ - "ExchangeRateService" + "GameServerService" ] } }, - "/v1/exchange-rate/rate/{currencyCode}": { - "get": { - "operationId": "ExchangeRateService_GetExchangeRate", + "/v1/game-servers/{id}/docker-image": { + "put": { + "operationId": "GameServerService_UpdateDockerImage", "parameters": [ { - "description": "Currency code to get exchange rate for (from USD)", "in": "path", - "name": "currencyCode", + "name": "id", "required": true, "schema": { "type": "string" } } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetExchangeRateResponse" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceUpdateDockerImageBody" } - }, - "description": "A successful response." - } + } + }, + "required": true }, - "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/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "Get all exchange rates at once (returns map of currency codes to rates)", "tags": [ - "ExchangeRateService" + "GameServerService" ] } }, - "/v1/firewall/address-groups": { + "/v1/game-servers/{id}/files": { "get": { - "operationId": "FirewallService_ListFirewallAddressGroups", + "operationId": "GameServerService_ListFiles", "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": "Note: family filter removed as address groups can now contain mixed IPv4/IPv6", "in": "query", - "name": "name", + "name": "directory", "required": false, "schema": { "type": "string" @@ -21228,7 +25917,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListFirewallAddressGroupsResponse" + "$ref": "#/components/schemas/v1ListFilesResponse" } } }, @@ -21236,16 +25925,26 @@ } }, "tags": [ - "FirewallService" + "GameServerService" ] }, - "post": { - "operationId": "FirewallService_CreateFirewallAddressGroup", + "put": { + "operationId": "GameServerService_WriteFile", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateFirewallAddressGroupRequest" + "$ref": "#/components/schemas/GameServerServiceWriteFileBody" } } }, @@ -21256,7 +25955,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateFirewallAddressGroupResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -21264,13 +25963,13 @@ } }, "tags": [ - "FirewallService" + "GameServerService" ] } }, - "/v1/firewall/address-groups/{id}": { - "delete": { - "operationId": "FirewallService_DeleteFirewallAddressGroup", + "/v1/game-servers/{id}/files/content": { + "get": { + "operationId": "GameServerService_ReadFile", "parameters": [ { "in": "path", @@ -21279,6 +25978,14 @@ "schema": { "type": "string" } + }, + { + "in": "query", + "name": "path", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -21286,7 +25993,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ReadFileResponse" } } }, @@ -21294,11 +26001,13 @@ } }, "tags": [ - "FirewallService" + "GameServerService" ] - }, + } + }, + "/v1/game-servers/{id}/files/download": { "get": { - "operationId": "FirewallService_GetFirewallAddressGroup", + "operationId": "GameServerService_DownloadFile", "parameters": [ { "in": "path", @@ -21307,6 +26016,14 @@ "schema": { "type": "string" } + }, + { + "in": "query", + "name": "path", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -21314,7 +26031,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1FirewallAddressGroup" + "$ref": "#/components/schemas/v1DownloadFileResponse" } } }, @@ -21322,11 +26039,13 @@ } }, "tags": [ - "FirewallService" + "GameServerService" ] - }, - "patch": { - "operationId": "FirewallService_UpdateFirewallAddressGroup", + } + }, + "/v1/game-servers/{id}/files:archive": { + "post": { + "operationId": "GameServerService_ArchiveFiles", "parameters": [ { "in": "path", @@ -21341,7 +26060,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FirewallServiceUpdateFirewallAddressGroupBody" + "$ref": "#/components/schemas/GameServerServiceArchiveFilesBody" } } }, @@ -21352,7 +26071,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1FirewallAddressGroup" + "$ref": "#/components/schemas/v1ArchiveFilesResponse" } } }, @@ -21360,13 +26079,13 @@ } }, "tags": [ - "FirewallService" + "GameServerService" ] } }, - "/v1/firewall/rules/{id}": { - "delete": { - "operationId": "FirewallService_DeleteFirewallRule", + "/v1/game-servers/{id}/files:copy": { + "post": { + "operationId": "GameServerService_CopyFile", "parameters": [ { "in": "path", @@ -21377,6 +26096,16 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceCopyFileBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { @@ -21390,11 +26119,13 @@ } }, "tags": [ - "FirewallService" + "GameServerService" ] - }, - "get": { - "operationId": "FirewallService_GetFirewallRule", + } + }, + "/v1/game-servers/{id}/files:delete": { + "post": { + "operationId": "GameServerService_DeleteFiles", "parameters": [ { "in": "path", @@ -21403,29 +26134,24 @@ "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/v1FirewallRuleResource" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -21433,11 +26159,13 @@ } }, "tags": [ - "FirewallService" + "GameServerService" ] - }, - "patch": { - "operationId": "FirewallService_UpdateFirewallRule", + } + }, + "/v1/game-servers/{id}/files:folder": { + "post": { + "operationId": "GameServerService_CreateFolder", "parameters": [ { "in": "path", @@ -21452,7 +26180,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FirewallServiceUpdateFirewallRuleBody" + "$ref": "#/components/schemas/GameServerServiceCreateFolderBody" } } }, @@ -21463,7 +26191,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1FirewallRuleResource" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -21471,16 +26199,15 @@ } }, "tags": [ - "FirewallService" + "GameServerService" ] } }, - "/v1/firewall/rules/{id}/move": { + "/v1/game-servers/{id}/files:rename": { "post": { - "operationId": "FirewallService_MoveFirewallRule", + "operationId": "GameServerService_RenameFile", "parameters": [ { - "description": "ID of the rule to move", "in": "path", "name": "id", "required": true, @@ -21493,7 +26220,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FirewallServiceMoveFirewallRuleBody" + "$ref": "#/components/schemas/GameServerServiceRenameFileBody" } } }, @@ -21504,7 +26231,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1FirewallRuleResource" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -21512,79 +26239,28 @@ } }, "tags": [ - "FirewallService" + "GameServerService" ] } }, - "/v1/firewall/rulesets": { - "get": { - "operationId": "FirewallService_ListFirewallRuleSets", + "/v1/game-servers/{id}/files:upload": { + "post": { + "operationId": "GameServerService_UploadFile", "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": "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, + "in": "path", + "name": "id", + "required": true, "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/v1CreateFirewallRuleSetRequest" + "$ref": "#/components/schemas/GameServerServiceUploadFileBody" } } }, @@ -21595,7 +26271,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateFirewallRuleSetResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -21603,13 +26279,13 @@ } }, "tags": [ - "FirewallService" + "GameServerService" ] } }, - "/v1/firewall/rulesets/{id}": { - "delete": { - "operationId": "FirewallService_DeleteFirewallRuleSet", + "/v1/game-servers/{id}/resources": { + "get": { + "operationId": "GameServerService_GetGameServerResources", "parameters": [ { "in": "path", @@ -21618,14 +26294,6 @@ "schema": { "type": "string" } - }, - { - "in": "query", - "name": "force", - "required": false, - "schema": { - "type": "boolean" - } } ], "responses": { @@ -21633,7 +26301,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GameServerResources" } } }, @@ -21641,11 +26309,13 @@ } }, "tags": [ - "FirewallService" + "GameServerService" ] - }, + } + }, + "/v1/game-servers/{id}/schedules": { "get": { - "operationId": "FirewallService_GetFirewallRuleSet", + "operationId": "GameServerService_ListSchedules", "parameters": [ { "in": "path", @@ -21661,7 +26331,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1FirewallRuleSet" + "$ref": "#/components/schemas/v1ListSchedulesResponse" } } }, @@ -21669,11 +26339,11 @@ } }, "tags": [ - "FirewallService" + "GameServerService" ] }, - "patch": { - "operationId": "FirewallService_UpdateFirewallRuleSet", + "post": { + "operationId": "GameServerService_CreateSchedule", "parameters": [ { "in": "path", @@ -21688,7 +26358,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FirewallServiceUpdateFirewallRuleSetBody" + "$ref": "#/components/schemas/GameServerServiceCreateScheduleBody" } } }, @@ -21699,7 +26369,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1FirewallRuleSet" + "$ref": "#/components/schemas/v1GameServerSchedule" } } }, @@ -21707,52 +26377,27 @@ } }, "tags": [ - "FirewallService" + "GameServerService" ] } }, - "/v1/firewall/rulesets/{rulesetId}/rules": { - "get": { - "operationId": "FirewallService_ListFirewallRules", + "/v1/game-servers/{id}/schedules/{scheduleId}": { + "delete": { + "operationId": "GameServerService_DeleteSchedule", "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, + "in": "path", + "name": "scheduleId", + "required": true, "schema": { - "default": "FIREWALL_DIRECTION_UNSPECIFIED", - "enum": [ - "FIREWALL_DIRECTION_UNSPECIFIED", - "FIREWALL_DIRECTION_INGRESS", - "FIREWALL_DIRECTION_EGRESS" - ], "type": "string" } } @@ -21762,7 +26407,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListFirewallRulesResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -21770,15 +26415,23 @@ } }, "tags": [ - "FirewallService" + "GameServerService" ] }, "post": { - "operationId": "FirewallService_CreateFirewallRule", + "operationId": "GameServerService_UpdateSchedule", "parameters": [ { "in": "path", - "name": "rulesetId", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "scheduleId", "required": true, "schema": { "type": "string" @@ -21789,7 +26442,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FirewallServiceCreateFirewallRuleBody" + "$ref": "#/components/schemas/GameServerServiceUpdateScheduleBody" } } }, @@ -21800,7 +26453,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateFirewallRuleResponse" + "$ref": "#/components/schemas/v1GameServerSchedule" } } }, @@ -21808,47 +26461,25 @@ } }, "tags": [ - "FirewallService" + "GameServerService" ] } }, - "/v1/game-server-templates": { - "get": { - "operationId": "GameServerTemplateService_ListGameServerTemplates", + "/v1/game-servers/{id}/schedules/{scheduleId}/tasks": { + "post": { + "operationId": "GameServerService_CreateScheduleTask", "parameters": [ { - "in": "query", - "name": "platformId", - "required": false, + "in": "path", + "name": "id", + "required": true, "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": "id", + "name": "scheduleId", "required": true, "schema": { "type": "string" @@ -21859,7 +26490,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerTemplateServiceUpdateGameServerTemplateBody" + "$ref": "#/components/schemas/GameServerServiceCreateScheduleTaskBody" } } }, @@ -21870,7 +26501,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerTemplate" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -21878,13 +26509,13 @@ } }, "tags": [ - "GameServerTemplateService" + "GameServerService" ] } }, - "/v1/game-server-templates/{id}:duplicate": { - "post": { - "operationId": "GameServerTemplateService_DuplicateGameServerTemplate", + "/v1/game-servers/{id}/schedules/{scheduleId}/tasks/{taskId}": { + "delete": { + "operationId": "GameServerService_DeleteScheduleTask", "parameters": [ { "in": "path", @@ -21893,43 +26524,73 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerTemplateServiceDuplicateGameServerTemplateBody" - } + }, + { + "in": "path", + "name": "scheduleId", + "required": true, + "schema": { + "type": "string" } }, - "required": true - }, + { + "in": "path", + "name": "taskId", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerTemplate" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } - }, - "tags": [ - "GameServerTemplateService" - ] - } - }, - "/v1/game-server-templates:import": { - "post": { - "operationId": "GameServerTemplateService_ImportGameServerTemplate", + }, + "tags": [ + "GameServerService" + ] + }, + "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" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ImportGameServerTemplateRequest" + "$ref": "#/components/schemas/GameServerServiceUpdateScheduleTaskBody" } } }, @@ -21940,7 +26601,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerTemplate" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -21948,18 +26609,36 @@ } }, "tags": [ - "GameServerTemplateService" + "GameServerService" ] } }, - "/v1/game-server-templates:nest-ordering": { + "/v1/game-servers/{id}/schedules/{scheduleId}:execute": { "post": { - "operationId": "GameServerTemplateService_SetGameNestOrdering", + "operationId": "GameServerService_ExecuteSchedule", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "scheduleId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SetGameNestOrderingRequest" + "$ref": "#/components/schemas/GameServerServiceExecuteScheduleBody" } } }, @@ -21978,21 +26657,20 @@ } }, "tags": [ - "GameServerTemplateService" + "GameServerService" ] } }, - "/v1/game-servers": { + "/v1/game-servers/{id}/startup": { "get": { - "operationId": "GameServerService_ListGameServers", + "operationId": "GameServerService_GetStartup", "parameters": [ { - "in": "query", - "name": "pageSize", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } } ], @@ -22001,7 +26679,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListGameServersResponse" + "$ref": "#/components/schemas/v1GetStartupResponse" } } }, @@ -22012,13 +26690,23 @@ "GameServerService" ] }, - "post": { - "operationId": "GameServerService_CreateGameServer", + "put": { + "operationId": "GameServerService_UpdateStartupVariable", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateGameServerRequest" + "$ref": "#/components/schemas/GameServerServiceUpdateStartupVariableBody" } } }, @@ -22029,7 +26717,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServer" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -22041,9 +26729,9 @@ ] } }, - "/v1/game-servers/{id}": { - "delete": { - "operationId": "GameServerService_DeleteGameServer", + "/v1/game-servers/{id}:changeGame": { + "post": { + "operationId": "GameServerService_ChangeGameServerGame", "parameters": [ { "in": "path", @@ -22054,12 +26742,22 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceChangeGameServerGameBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GameServer" } } }, @@ -22069,9 +26767,11 @@ "tags": [ "GameServerService" ] - }, - "get": { - "operationId": "GameServerService_GetGameServer", + } + }, + "/v1/game-servers/{id}:console": { + "post": { + "operationId": "GameServerService_OpenConsole", "parameters": [ { "in": "path", @@ -22082,12 +26782,22 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServiceOpenConsoleBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServer" + "$ref": "#/components/schemas/v1OpenConsoleResponse" } } }, @@ -22099,9 +26809,9 @@ ] } }, - "/v1/game-servers/{id}/allocations": { - "get": { - "operationId": "GameServerService_ListAllocations", + "/v1/game-servers/{id}:power": { + "post": { + "operationId": "GameServerService_PowerGameServer", "parameters": [ { "in": "path", @@ -22112,12 +26822,22 @@ } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GameServerServicePowerGameServerBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListGameServerAllocationsResponse" + "$ref": "#/components/schemas/v1GameServer" } } }, @@ -22127,9 +26847,11 @@ "tags": [ "GameServerService" ] - }, + } + }, + "/v1/game-servers/{id}:reinstall": { "post": { - "operationId": "GameServerService_CreateAllocation", + "operationId": "GameServerService_ReinstallGameServer", "parameters": [ { "in": "path", @@ -22144,7 +26866,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceCreateAllocationBody" + "$ref": "#/components/schemas/GameServerServiceReinstallGameServerBody" } } }, @@ -22155,7 +26877,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerAllocation" + "$ref": "#/components/schemas/v1GameServer" } } }, @@ -22167,9 +26889,9 @@ ] } }, - "/v1/game-servers/{id}/allocations/{allocationId}": { - "delete": { - "operationId": "GameServerService_DeleteAllocation", + "/v1/game-servers/{id}:rename": { + "post": { + "operationId": "GameServerService_RenameGameServer", "parameters": [ { "in": "path", @@ -22178,23 +26900,24 @@ "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/v1SuccessResponse" + "$ref": "#/components/schemas/v1GameServer" } } }, @@ -22204,44 +26927,27 @@ "tags": [ "GameServerService" ] - }, - "post": { - "operationId": "GameServerService_UpdateAllocation", + } + }, + "/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" } - }, - { - "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/v1GameServerAllocation" + "$ref": "#/components/schemas/v1ListOrderGamesResponse" } } }, @@ -22253,33 +26959,84 @@ ] } }, - "/v1/game-servers/{id}/allocations/{allocationId}:primary": { - "post": { - "operationId": "GameServerService_SetPrimaryAllocation", + "/v1/groups": { + "get": { + "operationId": "GroupService_ListGroups", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { - "in": "path", - "name": "allocationId", - "required": true, + "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" + } } ], + "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/GameServerServiceSetPrimaryAllocationBody" + "$ref": "#/components/schemas/v1CreateGroupRequest" } } }, @@ -22290,7 +27047,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1CreateGroupResponse" } } }, @@ -22298,29 +27055,29 @@ } }, "tags": [ - "GameServerService" + "GroupService" ] } }, - "/v1/game-servers/{id}/backups": { - "get": { - "operationId": "GameServerService_ListBackups", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" + "/v1/groups/add-service-account": { + "post": { + "operationId": "GroupService_AddServiceAccountToGroup", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1AddServiceAccountToGroupRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListGameServerBackupsResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -22328,26 +27085,18 @@ } }, "tags": [ - "GameServerService" + "GroupService" ] - }, + } + }, + "/v1/groups/add-user": { "post": { - "operationId": "GameServerService_CreateBackup", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "GroupService_AddUserToGroup", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceCreateBackupBody" + "$ref": "#/components/schemas/v1AddUserToGroupRequest" } } }, @@ -22358,7 +27107,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerBackup" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -22366,37 +27115,32 @@ } }, "tags": [ - "GameServerService" + "GroupService" ] } }, - "/v1/game-servers/{id}/backups/{backupUuid}": { + "/v1/groups/remove-service-account": { "delete": { - "operationId": "GameServerService_DeleteBackup", + "operationId": "GroupService_RemoveServiceAccountFromGroup", "parameters": [ { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "backupUuid", - "required": true, + "in": "query", + "name": "groupId", + "required": false, "schema": { "type": "string" } }, { - "description": "Restore only. When true, the panel deletes every file before extracting the backup.", + "explode": true, "in": "query", - "name": "truncate", + "name": "serviceAccountIds", "required": false, "schema": { - "type": "boolean" + "items": { + "type": "string" + }, + "type": "array" } } ], @@ -22413,41 +27157,35 @@ } }, "tags": [ - "GameServerService" + "GroupService" ] } }, - "/v1/game-servers/{id}/backups/{backupUuid}:lock": { - "post": { - "operationId": "GameServerService_LockBackup", + "/v1/groups/remove-user": { + "delete": { + "operationId": "GroupService_RemoveUserFromGroup", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "groupId", + "required": false, "schema": { "type": "string" } }, { - "in": "path", - "name": "backupUuid", - "required": true, + "explode": true, + "in": "query", + "name": "userIds", + "required": false, "schema": { - "type": "string" + "items": { + "type": "string" + }, + "type": "array" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerServiceLockBackupBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -22461,13 +27199,13 @@ } }, "tags": [ - "GameServerService" + "GroupService" ] } }, - "/v1/game-servers/{id}/backups/{backupUuid}:restore": { - "post": { - "operationId": "GameServerService_RestoreBackup", + "/v1/groups/{id}": { + "delete": { + "operationId": "GroupService_DeleteGroup", "parameters": [ { "in": "path", @@ -22476,26 +27214,8 @@ "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": { @@ -22509,13 +27229,11 @@ } }, "tags": [ - "GameServerService" + "GroupService" ] - } - }, - "/v1/game-servers/{id}/databases": { + }, "get": { - "operationId": "GameServerService_ListDatabases", + "operationId": "GroupService_GetGroup", "parameters": [ { "in": "path", @@ -22531,7 +27249,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDatabasesResponse" + "$ref": "#/components/schemas/v1GetGroupResponse" } } }, @@ -22539,11 +27257,11 @@ } }, "tags": [ - "GameServerService" + "GroupService" ] }, - "post": { - "operationId": "GameServerService_CreateDatabase", + "patch": { + "operationId": "GroupService_UpdateGroup", "parameters": [ { "in": "path", @@ -22558,7 +27276,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceCreateDatabaseBody" + "$ref": "#/components/schemas/GroupServiceUpdateGroupBody" } } }, @@ -22569,7 +27287,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerDatabase" + "$ref": "#/components/schemas/v1UpdateGroupResponse" } } }, @@ -22577,37 +27295,19 @@ } }, "tags": [ - "GameServerService" + "GroupService" ] } }, - "/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" - } - } - ], + "/v1/healthz": { + "get": { + "operationId": "MetadataService_HealthCheck", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1HealthCheckResponse" } } }, @@ -22615,36 +27315,71 @@ } }, "tags": [ - "GameServerService" + "MetadataService" ] } }, - "/v1/game-servers/{id}/databases/{databaseId}:rotate": { - "post": { - "operationId": "GameServerService_RotateDatabasePassword", + "/v1/hook-scripts": { + "get": { + "operationId": "HookScriptService_ListHookScripts", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { - "in": "path", - "name": "databaseId", - "required": true, + "in": "query", + "name": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "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." + } + }, + "tags": [ + "HookScriptService" + ] + }, + "put": { + "operationId": "HookScriptService_UpsertHookScript", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceRotateDatabasePasswordBody" + "$ref": "#/components/schemas/v1UpsertHookScriptRequest" } } }, @@ -22655,7 +27390,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerDatabase" + "$ref": "#/components/schemas/v1HookScript" } } }, @@ -22663,13 +27398,13 @@ } }, "tags": [ - "GameServerService" + "HookScriptService" ] } }, - "/v1/game-servers/{id}/docker-image": { - "put": { - "operationId": "GameServerService_UpdateDockerImage", + "/v1/hook-scripts/{id}": { + "delete": { + "operationId": "HookScriptService_DeleteHookScript", "parameters": [ { "in": "path", @@ -22680,16 +27415,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerServiceUpdateDockerImageBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -22703,27 +27428,78 @@ } }, "tags": [ - "GameServerService" + "HookScriptService" ] } }, - "/v1/game-servers/{id}/files": { + "/v1/instantapps": { "get": { - "operationId": "GameServerService_ListFiles", + "operationId": "InstantAppService_ListInstantApps", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "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, "schema": { "type": "string" } }, { + "description": "Filter: app must include all listed categories when non-empty.", + "explode": true, "in": "query", - "name": "directory", + "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", "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" } } @@ -22733,7 +27509,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListFilesResponse" + "$ref": "#/components/schemas/v1ListInstantAppsResponse" } } }, @@ -22741,37 +27517,38 @@ } }, "tags": [ - "GameServerService" + "InstantAppService" ] - }, - "put": { - "operationId": "GameServerService_WriteFile", + } + }, + "/v1/instantapps/slug/{slug}": { + "get": { + "operationId": "InstantAppService_GetInstantApp2", "parameters": [ { "in": "path", - "name": "id", + "name": "slug", "required": true, "schema": { "type": "string" } + }, + { + "description": "Exactly one of id or slug must be set.", + "in": "query", + "name": "id", + "required": false, + "schema": { + "type": "string" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerServiceWriteFileBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1InstantApp" } } }, @@ -22779,15 +27556,16 @@ } }, "tags": [ - "GameServerService" + "InstantAppService" ] } }, - "/v1/game-servers/{id}/files/content": { + "/v1/instantapps/{id}": { "get": { - "operationId": "GameServerService_ReadFile", + "operationId": "InstantAppService_GetInstantApp", "parameters": [ { + "description": "Exactly one of id or slug must be set.", "in": "path", "name": "id", "required": true, @@ -22797,7 +27575,7 @@ }, { "in": "query", - "name": "path", + "name": "slug", "required": false, "schema": { "type": "string" @@ -22809,7 +27587,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ReadFileResponse" + "$ref": "#/components/schemas/v1InstantApp" } } }, @@ -22817,25 +27595,43 @@ } }, "tags": [ - "GameServerService" + "InstantAppService" ] } }, - "/v1/game-servers/{id}/files/download": { + "/v1/invites": { "get": { - "operationId": "GameServerService_DownloadFile", + "operationId": "InviteService_ListInvites", "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": "filterEmail", + "required": false, "schema": { "type": "string" } }, { "in": "query", - "name": "path", + "name": "search", "required": false, "schema": { "type": "string" @@ -22847,7 +27643,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DownloadFileResponse" + "$ref": "#/components/schemas/v1ListInvitesResponse" } } }, @@ -22855,28 +27651,16 @@ } }, "tags": [ - "GameServerService" + "InviteService" ] - } - }, - "/v1/game-servers/{id}/files:archive": { - "post": { - "operationId": "GameServerService_ArchiveFiles", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + }, + "patch": { + "operationId": "InviteService_UpdateInvite", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceArchiveFilesBody" + "$ref": "#/components/schemas/v1UpdateInviteRequest" } } }, @@ -22887,7 +27671,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ArchiveFilesResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -22895,28 +27679,16 @@ } }, "tags": [ - "GameServerService" + "InviteService" ] - } - }, - "/v1/game-servers/{id}/files:copy": { + }, "post": { - "operationId": "GameServerService_CopyFile", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "InviteService_CreateInvite", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceCopyFileBody" + "$ref": "#/components/schemas/v1CreateInviteRequest" } } }, @@ -22935,33 +27707,23 @@ } }, "tags": [ - "GameServerService" + "InviteService" ] } }, - "/v1/game-servers/{id}/files:delete": { - "post": { - "operationId": "GameServerService_DeleteFiles", + "/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/GameServerServiceDeleteFilesBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -22975,33 +27737,23 @@ } }, "tags": [ - "GameServerService" + "InviteService" ] } }, - "/v1/game-servers/{id}/files:folder": { - "post": { - "operationId": "GameServerService_CreateFolder", + "/v1/invites/decline": { + "get": { + "operationId": "InviteService_DeclineInvite", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "inviteId", + "required": false, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerServiceCreateFolderBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -23015,39 +27767,39 @@ } }, "tags": [ - "GameServerService" + "InviteService" ] } }, - "/v1/game-servers/{id}/files:rename": { - "post": { - "operationId": "GameServerService_RenameFile", + "/v1/invites/me": { + "get": { + "operationId": "InviteService_ListMyInvites", "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/GameServerServiceRenameFileBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListMyInvitesResponse" } } }, @@ -23055,33 +27807,23 @@ } }, "tags": [ - "GameServerService" + "InviteService" ] } }, - "/v1/game-servers/{id}/files:upload": { + "/v1/invites/resend/{inviteId}": { "post": { - "operationId": "GameServerService_UploadFile", + "operationId": "InviteService_ResendInvite", "parameters": [ { "in": "path", - "name": "id", + "name": "inviteId", "required": true, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerServiceUploadFileBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -23095,13 +27837,13 @@ } }, "tags": [ - "GameServerService" + "InviteService" ] } }, - "/v1/game-servers/{id}/resources": { - "get": { - "operationId": "GameServerService_GetGameServerResources", + "/v1/invites/{id}": { + "delete": { + "operationId": "InviteService_DeleteInvite", "parameters": [ { "in": "path", @@ -23117,7 +27859,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerResources" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -23125,93 +27867,92 @@ } }, "tags": [ - "GameServerService" + "InviteService" ] } }, - "/v1/game-servers/{id}/schedules": { + "/v1/invoices": { "get": { - "operationId": "GameServerService_ListSchedules", + "operationId": "InvoiceService_ListInvoices", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "subscriptionId", + "required": false, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListSchedulesResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "GameServerService" - ] - }, - "post": { - "operationId": "GameServerService_CreateSchedule", - "parameters": [ + }, { - "in": "path", - "name": "id", - "required": true, + "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" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerServiceCreateScheduleBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerSchedule" + "$ref": "#/components/schemas/v1ListInvoicesResponse" } } }, "description": "A successful response." } }, + "summary": "ListInvoices lists invoices for a subscription or organization", "tags": [ - "GameServerService" + "InvoiceService" ] } }, - "/v1/game-servers/{id}/schedules/{scheduleId}": { - "delete": { - "operationId": "GameServerService_DeleteSchedule", + "/v1/invoices/{invoiceId}": { + "get": { + "operationId": "InvoiceService_GetInvoice", "parameters": [ { "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "scheduleId", + "name": "invoiceId", "required": true, "schema": { "type": "string" @@ -23223,31 +27964,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetInvoiceResponse" } } }, "description": "A successful response." } }, + "summary": "GetInvoice retrieves a single invoice with line items", "tags": [ - "GameServerService" + "InvoiceService" ] - }, + } + }, + "/v1/invoices/{invoiceId}:pay": { "post": { - "operationId": "GameServerService_UpdateSchedule", + "operationId": "InvoiceService_PayInvoice", "parameters": [ { "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "scheduleId", + "name": "invoiceId", "required": true, "schema": { "type": "string" @@ -23258,7 +27994,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceUpdateScheduleBody" + "$ref": "#/components/schemas/InvoiceServicePayInvoiceBody" } } }, @@ -23269,92 +28005,89 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServerSchedule" + "$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": [ - "GameServerService" + "InvoiceService" ] } }, - "/v1/game-servers/{id}/schedules/{scheduleId}/tasks": { - "post": { - "operationId": "GameServerService_CreateScheduleTask", + "/v1/ipam/allocations": { + "get": { + "operationId": "IPAMService_ListAllocations", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { - "in": "path", - "name": "scheduleId", - "required": true, + "in": "query", + "name": "pageSize", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GameServerServiceCreateScheduleTaskBody" - } + }, + { + "description": "Filter by prefix ID (required for filtering allocations)", + "in": "query", + "name": "prefixId", + "required": false, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListAllocationsResponse" } } }, "description": "A successful response." } }, + "summary": "IP Allocation (read-only - allocations are managed automatically)", "tags": [ - "GameServerService" + "IPAMService" ] } }, - "/v1/game-servers/{id}/schedules/{scheduleId}/tasks/{taskId}": { - "delete": { - "operationId": "GameServerService_DeleteScheduleTask", + "/v1/ipam/networks": { + "get": { + "operationId": "IPAMService_ListNetworks", "parameters": [ { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "scheduleId", - "required": true, + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { - "in": "path", - "name": "taskId", - "required": true, + "in": "query", + "name": "pageSize", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ], @@ -23363,7 +28096,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListNetworksResponse" } } }, @@ -23371,42 +28104,16 @@ } }, "tags": [ - "GameServerService" + "IPAMService" ] }, "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" - } - } - ], + "operationId": "IPAMService_CreateNetwork", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceUpdateScheduleTaskBody" + "$ref": "#/components/schemas/v1CreateNetworkRequest" } } }, @@ -23424,14 +28131,15 @@ "description": "A successful response." } }, + "summary": "IPAM Network management", "tags": [ - "GameServerService" + "IPAMService" ] } }, - "/v1/game-servers/{id}/schedules/{scheduleId}:execute": { - "post": { - "operationId": "GameServerService_ExecuteSchedule", + "/v1/ipam/networks/{id}": { + "delete": { + "operationId": "IPAMService_DeleteNetwork", "parameters": [ { "in": "path", @@ -23440,26 +28148,8 @@ "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": { @@ -23473,13 +28163,11 @@ } }, "tags": [ - "GameServerService" + "IPAMService" ] - } - }, - "/v1/game-servers/{id}/startup": { + }, "get": { - "operationId": "GameServerService_GetStartup", + "operationId": "IPAMService_GetNetwork", "parameters": [ { "in": "path", @@ -23495,7 +28183,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetStartupResponse" + "$ref": "#/components/schemas/v1GetNetworkResponse" } } }, @@ -23503,11 +28191,11 @@ } }, "tags": [ - "GameServerService" + "IPAMService" ] }, - "put": { - "operationId": "GameServerService_UpdateStartupVariable", + "patch": { + "operationId": "IPAMService_UpdateNetwork", "parameters": [ { "in": "path", @@ -23522,7 +28210,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceUpdateStartupVariableBody" + "$ref": "#/components/schemas/IPAMServiceUpdateNetworkBody" } } }, @@ -23533,7 +28221,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1UpdateNetworkResponse" } } }, @@ -23541,17 +28229,17 @@ } }, "tags": [ - "GameServerService" + "IPAMService" ] } }, - "/v1/game-servers/{id}:changeGame": { + "/v1/ipam/networks/{networkId}/assign-node": { "post": { - "operationId": "GameServerService_ChangeGameServerGame", + "operationId": "IPAMService_AssignNetworkToNode", "parameters": [ { "in": "path", - "name": "id", + "name": "networkId", "required": true, "schema": { "type": "string" @@ -23562,7 +28250,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GameServerServiceChangeGameServerGameBody" + "$ref": "#/components/schemas/IPAMServiceAssignNetworkToNodeBody" } } }, @@ -23573,47 +28261,38 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServer" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, + "summary": "Node-Network assignment", "tags": [ - "GameServerService" + "IPAMService" ] } }, - "/v1/game-servers/{id}:console": { - "post": { - "operationId": "GameServerService_OpenConsole", + "/v1/ipam/networks/{networkId}/nodes": { + "get": { + "operationId": "IPAMService_ListNetworkNodes", "parameters": [ { "in": "path", - "name": "id", + "name": "networkId", "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/v1OpenConsoleResponse" + "$ref": "#/components/schemas/v1ListNetworkNodesResponse" } } }, @@ -23621,39 +28300,29 @@ } }, "tags": [ - "GameServerService" + "IPAMService" ] } }, - "/v1/game-servers/{id}:power": { - "post": { - "operationId": "GameServerService_PowerGameServer", + "/v1/ipam/nodes/{nodeId}/network": { + "get": { + "operationId": "IPAMService_GetNodeNetwork", "parameters": [ { "in": "path", - "name": "id", + "name": "nodeId", "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/v1GameServer" + "$ref": "#/components/schemas/v1GetNodeNetworkResponse" } } }, @@ -23661,39 +28330,29 @@ } }, "tags": [ - "GameServerService" + "IPAMService" ] } }, - "/v1/game-servers/{id}:reinstall": { + "/v1/ipam/nodes/{nodeId}/unassign-network": { "post": { - "operationId": "GameServerService_ReinstallGameServer", + "operationId": "IPAMService_UnassignNetworkFromNode", "parameters": [ { "in": "path", - "name": "id", + "name": "nodeId", "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/v1GameServer" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -23701,28 +28360,64 @@ } }, "tags": [ - "GameServerService" + "IPAMService" ] } }, - "/v1/game-servers/{id}:rename": { - "post": { - "operationId": "GameServerService_RenameGameServer", + "/v1/ipam/prefixes": { + "get": { + "operationId": "IPAMService_ListPrefixes", "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": "filterNetworkId", + "required": false, "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/GameServerServiceRenameGameServerBody" + "$ref": "#/components/schemas/v1CreatePrefixRequest" } } }, @@ -23733,26 +28428,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GameServer" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, + "summary": "Prefix management", "tags": [ - "GameServerService" + "IPAMService" ] } }, - "/v1/game-servers:order-games": { - "get": { - "operationId": "GameServerService_ListOrderGames", + "/v1/ipam/prefixes/{id}": { + "delete": { + "operationId": "IPAMService_DeletePrefix", "parameters": [ { - "in": "query", - "name": "planId", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } @@ -23763,7 +28459,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListOrderGamesResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -23771,60 +28467,16 @@ } }, "tags": [ - "GameServerService" + "IPAMService" ] - } - }, - "/v1/groups": { + }, "get": { - "operationId": "GroupService_ListGroups", + "operationId": "IPAMService_GetPrefix", "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": "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, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } @@ -23835,7 +28487,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListGroupsResponse" + "$ref": "#/components/schemas/v1GetPrefixResponse" } } }, @@ -23843,16 +28495,26 @@ } }, "tags": [ - "GroupService" + "IPAMService" ] }, - "post": { - "operationId": "GroupService_CreateGroup", + "patch": { + "operationId": "IPAMService_UpdatePrefix", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateGroupRequest" + "$ref": "#/components/schemas/IPAMServiceUpdatePrefixBody" } } }, @@ -23863,7 +28525,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateGroupResponse" + "$ref": "#/components/schemas/v1UpdatePrefixResponse" } } }, @@ -23871,29 +28533,39 @@ } }, "tags": [ - "GroupService" + "IPAMService" ] } }, - "/v1/groups/add-service-account": { - "post": { - "operationId": "GroupService_AddServiceAccountToGroup", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1AddServiceAccountToGroupRequest" - } + "/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/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListAvailableIPsResponse" } } }, @@ -23901,18 +28573,28 @@ } }, "tags": [ - "GroupService" + "IPAMService" ] } }, - "/v1/groups/add-user": { + "/v1/ipam/prefixes/{prefixId}/reserved-ips": { "post": { - "operationId": "GroupService_AddUserToGroup", + "operationId": "IPAMService_AddReservedIP", + "parameters": [ + { + "in": "path", + "name": "prefixId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1AddUserToGroupRequest" + "$ref": "#/components/schemas/IPAMServiceAddReservedIPBody" } } }, @@ -23930,36 +28612,35 @@ "description": "A successful response." } }, + "summary": "IP Reservation (manage reserved_ips array in prefix)", "tags": [ - "GroupService" + "IPAMService" ] } }, - "/v1/groups/remove-service-account": { - "delete": { - "operationId": "GroupService_RemoveServiceAccountFromGroup", + "/v1/ipam/prefixes/{prefixId}/reserved-ips/clear-all": { + "post": { + "operationId": "IPAMService_ClearAllPrefixReservedIPs", "parameters": [ { - "in": "query", - "name": "groupId", - "required": false, + "in": "path", + "name": "prefixId", + "required": true, "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": { @@ -23973,35 +28654,33 @@ } }, "tags": [ - "GroupService" + "IPAMService" ] } }, - "/v1/groups/remove-user": { - "delete": { - "operationId": "GroupService_RemoveUserFromGroup", + "/v1/ipam/prefixes/{prefixId}/reserved-ips/reserve-all": { + "post": { + "operationId": "IPAMService_ReserveAllPrefixIPs", "parameters": [ { - "in": "query", - "name": "groupId", - "required": false, + "in": "path", + "name": "prefixId", + "required": true, "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": { @@ -24015,17 +28694,25 @@ } }, "tags": [ - "GroupService" + "IPAMService" ] } }, - "/v1/groups/{id}": { + "/v1/ipam/prefixes/{prefixId}/reserved-ips/{ipAddress}": { "delete": { - "operationId": "GroupService_DeleteGroup", + "operationId": "IPAMService_RemoveReservedIP", "parameters": [ { "in": "path", - "name": "id", + "name": "prefixId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "ipAddress", "required": true, "schema": { "type": "string" @@ -24045,19 +28732,29 @@ } }, "tags": [ - "GroupService" + "IPAMService" ] - }, - "get": { - "operationId": "GroupService_GetGroup", + } + }, + "/v1/ipam/prefixes/{prefixId}/reserved-prefixes": { + "delete": { + "operationId": "IPAMService_RemoveReservedPrefix", "parameters": [ { "in": "path", - "name": "id", + "name": "prefixId", "required": true, "schema": { "type": "string" } + }, + { + "in": "query", + "name": "cidr", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -24065,7 +28762,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetGroupResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -24073,15 +28770,15 @@ } }, "tags": [ - "GroupService" + "IPAMService" ] }, - "patch": { - "operationId": "GroupService_UpdateGroup", + "post": { + "operationId": "IPAMService_AddReservedPrefix", "parameters": [ { "in": "path", - "name": "id", + "name": "prefixId", "required": true, "schema": { "type": "string" @@ -24092,7 +28789,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GroupServiceUpdateGroupBody" + "$ref": "#/components/schemas/IPAMServiceAddReservedPrefixBody" } } }, @@ -24103,7 +28800,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateGroupResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -24111,34 +28808,101 @@ } }, "tags": [ - "GroupService" + "IPAMService" ] } }, - "/v1/healthz": { + "/v1/ipam/prefixes/{prefixId}/utilization": { "get": { - "operationId": "MetadataService_HealthCheck", + "operationId": "IPAMService_GetPrefixUtilization", + "parameters": [ + { + "in": "path", + "name": "prefixId", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1HealthCheckResponse" + "$ref": "#/components/schemas/v1GetPrefixUtilizationResponse" } } }, "description": "A successful response." } }, + "summary": "Utility", "tags": [ - "MetadataService" + "IPAMService" ] } }, - "/v1/hook-scripts": { + "/v1/marketplace/addons": { "get": { - "operationId": "HookScriptService_ListHookScripts", + "operationId": "MarketplaceService_ListAvailableAddons", "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", @@ -24156,18 +28920,118 @@ "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": "Unspecified lists VM scripts, which is the previous behavior.", + "description": "Filter by city name (case-insensitive)", "in": "query", - "name": "subject", + "name": "filterCity", "required": false, "schema": { - "default": "HOOK_SUBJECT_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": [ - "HOOK_SUBJECT_UNSPECIFIED", - "HOOK_SUBJECT_VM", - "HOOK_SUBJECT_GAMESERVER" + "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" + } + }, + { + "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" } @@ -24178,7 +29042,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListHookScriptsResponse" + "$ref": "#/components/schemas/v1ListAvailablePlansResponse" } } }, @@ -24186,27 +29050,29 @@ } }, "tags": [ - "HookScriptService" + "MarketplaceService" ] - }, - "put": { - "operationId": "HookScriptService_UpsertHookScript", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1UpsertHookScriptRequest" - } + } + }, + "/v1/marketplace/plans/{planId}": { + "get": { + "operationId": "MarketplaceService_GetMarketplacePlan", + "parameters": [ + { + "in": "path", + "name": "planId", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1HookScript" + "$ref": "#/components/schemas/v1GetMarketplacePlanResponse" } } }, @@ -24214,19 +29080,58 @@ } }, "tags": [ - "HookScriptService" + "MarketplaceService" ] } }, - "/v1/hook-scripts/{id}": { - "delete": { - "operationId": "HookScriptService_DeleteHookScript", + "/v1/marketplace/provider-directory": { + "get": { + "operationId": "MarketplaceService_ListMarketplaceProviderDirectory", "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": "search", + "required": false, + "schema": { + "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" } } @@ -24236,7 +29141,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListMarketplaceProviderDirectoryResponse" } } }, @@ -24244,13 +29149,13 @@ } }, "tags": [ - "HookScriptService" + "MarketplaceService" ] } }, - "/v1/instantapps": { + "/v1/marketplace/providers": { "get": { - "operationId": "InstantAppService_ListInstantApps", + "operationId": "MarketplaceService_ListProviders", "parameters": [ { "in": "query", @@ -24262,7 +29167,6 @@ } }, { - "description": "-1 returns all apps (create/reinstall picker); otherwise 1..100.", "in": "query", "name": "pageSize", "required": false, @@ -24272,52 +29176,102 @@ } }, { - "description": "Case-insensitive match on name or slug.", + "description": "Filter providers that offer this plan code (required)", "in": "query", - "name": "query", + "name": "filterPlanCode", "required": false, "schema": { "type": "string" } }, { - "description": "Filter: app must include all listed categories when non-empty.", - "explode": true, + "description": "Filter by country name (required, case-insensitive)", "in": "query", - "name": "categories", + "name": "filterCountry", "required": false, "schema": { - "items": { - "type": "string" - }, - "type": "array" + "type": "string" } }, { - "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", + "description": "Filter by city name (required, case-insensitive)", "in": "query", - "name": "distro", + "name": "filterCity", "required": false, "schema": { - "default": "DISTRO_UNSPECIFIED", + "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": [ - "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" + "BILLING_TYPE_UNSPECIFIED", + "BILLING_TYPE_SUBSCRIPTION", + "BILLING_TYPE_USAGE", + "BILLING_TYPE_FREE", + "BILLING_TYPE_PERCENTAGE" + ], + "type": "string" + } + }, + { + "description": "Search by organization name or description", + "in": "query", + "name": "search", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "filterIpv6AvailableOnly", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "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": "planPriceSort", + "required": false, + "schema": { + "default": "PROVIDER_PLAN_PRICE_SORT_UNSPECIFIED", + "enum": [ + "PROVIDER_PLAN_PRICE_SORT_UNSPECIFIED", + "PROVIDER_PLAN_PRICE_SORT_LEAST_EXPENSIVE_FIRST", + "PROVIDER_PLAN_PRICE_SORT_MOST_EXPENSIVE_FIRST" ], "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": { @@ -24325,7 +29279,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListInstantAppsResponse" + "$ref": "#/components/schemas/v1ListProvidersResponse" } } }, @@ -24333,28 +29287,63 @@ } }, "tags": [ - "InstantAppService" + "MarketplaceService" ] } }, - "/v1/instantapps/slug/{slug}": { + "/v1/marketplace/providers/{providerId}": { "get": { - "operationId": "InstantAppService_GetInstantApp2", + "operationId": "MarketplaceService_GetProvider", "parameters": [ { "in": "path", - "name": "slug", + "name": "providerId", "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": "Exactly one of id or slug must be set.", + "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": "id", + "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" } } @@ -24364,7 +29353,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1InstantApp" + "$ref": "#/components/schemas/v1ListAvailableRegionsResponse" } } }, @@ -24372,29 +29361,69 @@ } }, "tags": [ - "InstantAppService" + "MarketplaceService" ] } }, - "/v1/instantapps/{id}": { + "/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" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "MarketplaceService" + ] + } + }, + "/v1/metrics": { "get": { - "operationId": "InstantAppService_GetInstantApp", + "operationId": "MetricService_ListMetrics", "parameters": [ { - "description": "Exactly one of id or slug must be set.", - "in": "path", - "name": "id", - "required": true, + "in": "query", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "slug", + "name": "billableOnly", "required": false, "schema": { - "type": "string" + "type": "boolean" } } ], @@ -24403,54 +29432,57 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1InstantApp" + "$ref": "#/components/schemas/v1ListMetricsResponse" } } }, "description": "A successful response." } }, + "summary": "List all available metrics", "tags": [ - "InstantAppService" + "MetricService" ] } }, - "/v1/invites": { + "/v1/metrics-write-credentials": { "get": { - "operationId": "InviteService_ListInvites", + "operationId": "MetricsCredentialService_ListMetricsWriteCredentials", "parameters": [ { + "description": "Optional: omit or leave empty to list credentials for the whole organization.", "in": "query", - "name": "page", + "name": "agentId", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "pageSize", + "name": "includeRevoked", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "boolean" } }, { "in": "query", - "name": "filterEmail", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { + "description": "-1 means fetch all; otherwise 1..100.", "in": "query", - "name": "search", + "name": "pageSize", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ], @@ -24459,7 +29491,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListInvitesResponse" + "$ref": "#/components/schemas/v1ListMetricsWriteCredentialsResponse" } } }, @@ -24467,16 +29499,16 @@ } }, "tags": [ - "InviteService" + "MetricsCredentialService" ] }, - "patch": { - "operationId": "InviteService_UpdateInvite", + "post": { + "operationId": "MetricsCredentialService_CreateMetricsWriteCredential", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateInviteRequest" + "$ref": "#/components/schemas/v1CreateMetricsWriteCredentialRequest" } } }, @@ -24487,7 +29519,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1CreateMetricsWriteCredentialResponse" } } }, @@ -24495,16 +29527,28 @@ } }, "tags": [ - "InviteService" + "MetricsCredentialService" ] - }, + } + }, + "/v1/metrics-write-credentials/{id}:revoke": { "post": { - "operationId": "InviteService_CreateInvite", + "operationId": "MetricsCredentialService_RevokeMetricsWriteCredential", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateInviteRequest" + "$ref": "#/components/schemas/MetricsCredentialServiceRevokeMetricsWriteCredentialBody" } } }, @@ -24523,59 +29567,39 @@ } }, "tags": [ - "InviteService" + "MetricsCredentialService" ] } }, - "/v1/invites/accept": { - "get": { - "operationId": "InviteService_AcceptInvite", + "/v1/metrics-write-credentials/{id}:rotate": { + "post": { + "operationId": "MetricsCredentialService_RotateMetricsWriteCredential", "parameters": [ { - "in": "query", - "name": "inviteId", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MetricsCredentialServiceRotateMetricsWriteCredentialBody" } - }, - "description": "A successful response." - } - }, - "tags": [ - "InviteService" - ] - } - }, - "/v1/invites/decline": { - "get": { - "operationId": "InviteService_DeclineInvite", - "parameters": [ - { - "in": "query", - "name": "inviteId", - "required": false, - "schema": { - "type": "string" } - } - ], + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1CreateMetricsWriteCredentialResponse" } } }, @@ -24583,30 +29607,29 @@ } }, "tags": [ - "InviteService" + "MetricsCredentialService" ] } }, - "/v1/invites/me": { + "/v1/metrics/{id}": { "get": { - "operationId": "InviteService_ListMyInvites", + "operationId": "MetricService_GetMetric", "parameters": [ { - "in": "query", - "name": "page", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { + "description": "Alternative to id", "in": "query", - "name": "pageSize", + "name": "code", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } } ], @@ -24615,31 +29638,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListMyInvitesResponse" + "$ref": "#/components/schemas/v1GetMetricResponse" } } }, "description": "A successful response." } }, + "summary": "Get a specific metric by ID or code", "tags": [ - "InviteService" + "MetricService" ] } }, - "/v1/invites/resend/{inviteId}": { + "/v1/monitoring/business/datasource-token:rotate": { "post": { - "operationId": "InviteService_ResendInvite", - "parameters": [ - { - "in": "path", - "name": "inviteId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "BusinessMonitoringService_RotateBusinessMonitoringDatasourceToken", + "requestBody": { + "$ref": "#/components/requestBodies/v1RotateMonitoringDatasourceTokenRequest" + }, "responses": { "200": { "content": { @@ -24653,29 +29670,22 @@ } }, "tags": [ - "InviteService" + "BusinessMonitoringService" ] } }, - "/v1/invites/{id}": { - "delete": { - "operationId": "InviteService_DeleteInvite", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "/v1/monitoring/business/launch": { + "post": { + "operationId": "BusinessMonitoringService_CreateBusinessMonitoringLaunch", + "requestBody": { + "$ref": "#/components/requestBodies/v1CreateMonitoringLaunchRequest" + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1CreateMonitoringLaunchResponse" } } }, @@ -24683,134 +29693,66 @@ } }, "tags": [ - "InviteService" + "BusinessMonitoringService" ] } }, - "/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" - } - } - ], + "/v1/monitoring/datasource-token:rotate": { + "post": { + "operationId": "MonitoringService_RotateMonitoringDatasourceToken", + "requestBody": { + "$ref": "#/components/requestBodies/v1RotateMonitoringDatasourceTokenRequest" + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListInvoicesResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "ListInvoices lists invoices for a subscription or organization", + "summary": "RotateMonitoringDatasourceToken replaces the organization's Grafana datasource token.", "tags": [ - "InvoiceService" + "MonitoringService" ] } }, - "/v1/invoices/{invoiceId}": { - "get": { - "operationId": "InvoiceService_GetInvoice", - "parameters": [ - { - "in": "path", - "name": "invoiceId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "/v1/monitoring/launch": { + "post": { + "operationId": "MonitoringService_CreateMonitoringLaunch", + "requestBody": { + "$ref": "#/components/requestBodies/v1CreateMonitoringLaunchRequest" + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetInvoiceResponse" + "$ref": "#/components/schemas/v1CreateMonitoringLaunchResponse" } } }, "description": "A successful response." } }, - "summary": "GetInvoice retrieves a single invoice with line items", + "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": [ - "InvoiceService" + "MonitoringService" ] } }, - "/v1/invoices/{invoiceId}:pay": { + "/v1/node": { "post": { - "operationId": "InvoiceService_PayInvoice", - "parameters": [ - { - "in": "path", - "name": "invoiceId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "NodeService_CreateNode", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvoiceServicePayInvoiceBody" + "$ref": "#/components/schemas/v1CreateNodeRequest" } } }, @@ -24821,98 +29763,55 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1PayInvoiceResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "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" + "NodeService" ] } }, - "/v1/ipam/allocations": { + "/v1/node-placement-policy": { "get": { - "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" - } - } - ], + "operationId": "NodePlacementService_GetNodePlacementPolicy", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListAllocationsResponse" + "$ref": "#/components/schemas/v1GetNodePlacementPolicyResponse" } } }, "description": "A successful response." } }, - "summary": "IP Allocation (read-only - allocations are managed automatically)", "tags": [ - "IPAMService" + "NodePlacementService" ] - } - }, - "/v1/ipam/networks": { - "get": { - "operationId": "IPAMService_ListNetworks", - "parameters": [ - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" + }, + "put": { + "operationId": "NodePlacementService_UpdateNodePlacementPolicy", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1UpdateNodePlacementPolicyRequest" + } } }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListNetworksResponse" + "$ref": "#/components/schemas/v1UpdateNodePlacementPolicyResponse" } } }, @@ -24920,16 +29819,18 @@ } }, "tags": [ - "IPAMService" + "NodePlacementService" ] - }, + } + }, + "/v1/node/topology/validate": { "post": { - "operationId": "IPAMService_CreateNetwork", + "operationId": "NodeService_ValidateNodeTopology", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateNetworkRequest" + "$ref": "#/components/schemas/v1ValidateNodeTopologyRequest" } } }, @@ -24940,22 +29841,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ValidateNodeTopologyResponse" } } }, "description": "A successful response." } }, - "summary": "IPAM Network management", + "summary": "Dedicated CPU cores: parse-preview of a topology paste without persisting.", "tags": [ - "IPAMService" + "NodeService" ] } }, - "/v1/ipam/networks/{id}": { + "/v1/node/{id}": { "delete": { - "operationId": "IPAMService_DeleteNetwork", + "operationId": "NodeService_DeleteNode", "parameters": [ { "in": "path", @@ -24979,11 +29880,11 @@ } }, "tags": [ - "IPAMService" + "NodeService" ] }, "get": { - "operationId": "IPAMService_GetNetwork", + "operationId": "NodeService_GetNode", "parameters": [ { "in": "path", @@ -24999,7 +29900,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetNetworkResponse" + "$ref": "#/components/schemas/v1GetNodeResponse" } } }, @@ -25007,11 +29908,11 @@ } }, "tags": [ - "IPAMService" + "NodeService" ] }, "patch": { - "operationId": "IPAMService_UpdateNetwork", + "operationId": "NodeService_UpdateNode", "parameters": [ { "in": "path", @@ -25026,7 +29927,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IPAMServiceUpdateNetworkBody" + "$ref": "#/components/schemas/NodeServiceUpdateNodeBody" } } }, @@ -25037,7 +29938,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateNetworkResponse" + "$ref": "#/components/schemas/v1UpdateNodeResponse" } } }, @@ -25045,59 +29946,111 @@ } }, "tags": [ - "IPAMService" + "NodeService" ] } }, - "/v1/ipam/networks/{networkId}/assign-node": { - "post": { - "operationId": "IPAMService_AssignNetworkToNode", + "/v1/node/{id}/cpu-map": { + "get": { + "operationId": "NodeService_GetNodeCPUMap", "parameters": [ { "in": "path", - "name": "networkId", + "name": "id", "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/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetNodeCPUMapResponse" } } }, "description": "A successful response." } }, - "summary": "Node-Network assignment", + "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": [ - "IPAMService" + "NodeService" ] } }, - "/v1/ipam/networks/{networkId}/nodes": { + "/v1/nodes": { "get": { - "operationId": "IPAMService_ListNetworkNodes", + "operationId": "NodeService_ListNodes", "parameters": [ { - "in": "path", - "name": "networkId", - "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; 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, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "regionId", + "required": false, "schema": { "type": "string" } @@ -25108,7 +30061,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListNetworkNodesResponse" + "$ref": "#/components/schemas/v1ListNodesResponse" } } }, @@ -25116,48 +30069,69 @@ } }, "tags": [ - "IPAMService" + "NodeService" ] } }, - "/v1/ipam/nodes/{nodeId}/network": { + "/v1/oauth2/authorize": { "get": { - "operationId": "IPAMService_GetNodeNetwork", + "operationId": "OAuth2Service_Authorize", "parameters": [ { - "in": "path", - "name": "nodeId", - "required": true, + "in": "query", + "name": "clientId", + "required": false, "schema": { "type": "string" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetNodeNetworkResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "IPAMService" - ] - } - }, - "/v1/ipam/nodes/{nodeId}/unassign-network": { - "post": { - "operationId": "IPAMService_UnassignNetworkFromNode", - "parameters": [ + }, { - "in": "path", - "name": "nodeId", - "required": true, + "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, "schema": { "type": "string" } @@ -25168,21 +30142,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1AuthorizeResponse" } } }, "description": "A successful response." } }, + "summary": "Authorize initiates the OAuth2 authorization flow", "tags": [ - "IPAMService" + "OAuth2Service" ] } }, - "/v1/ipam/prefixes": { + "/v1/oauth2/clients": { "get": { - "operationId": "IPAMService_ListPrefixes", + "operationId": "OAuth2Service_ListClients", "parameters": [ { "in": "query", @@ -25201,14 +30176,6 @@ "format": "int32", "type": "integer" } - }, - { - "in": "query", - "name": "filterNetworkId", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { @@ -25216,24 +30183,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPrefixesResponse" + "$ref": "#/components/schemas/v1ListOAuth2ClientsResponse" } } }, "description": "A successful response." } }, + "summary": "ListClients lists OAuth2 clients for the organization", "tags": [ - "IPAMService" + "OAuth2Service" ] }, "post": { - "operationId": "IPAMService_CreatePrefix", + "operationId": "OAuth2Service_CreateClient", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreatePrefixRequest" + "$ref": "#/components/schemas/v1CreateOAuth2ClientRequest" } } }, @@ -25244,54 +30212,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1CreateOAuth2ClientResponse" } } }, "description": "A successful response." } }, - "summary": "Prefix management", + "summary": "CreateClient creates a new OAuth2 client", "tags": [ - "IPAMService" + "OAuth2Service" ] } }, - "/v1/ipam/prefixes/{id}": { + "/v1/oauth2/clients/{clientId}": { "delete": { - "operationId": "IPAMService_DeletePrefix", - "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": [ - "IPAMService" - ] - }, - "get": { - "operationId": "IPAMService_GetPrefix", + "operationId": "OAuth2Service_DeleteClient", "parameters": [ { "in": "path", - "name": "id", + "name": "clientId", "required": true, "schema": { "type": "string" @@ -25303,34 +30243,28 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPrefixResponse" + "properties": {}, + "type": "object" } } }, "description": "A successful response." } }, + "summary": "DeleteClient deletes an OAuth2 client", "tags": [ - "IPAMService" + "OAuth2Service" ] - }, - "patch": { - "operationId": "IPAMService_UpdatePrefix", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + } + }, + "/v1/oauth2/refresh": { + "post": { + "operationId": "OAuth2Service_RefreshToken", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IPAMServiceUpdatePrefixBody" + "$ref": "#/components/schemas/v1RefreshTokenRequest" } } }, @@ -25341,76 +30275,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdatePrefixResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "IPAMService" - ] - } - }, - "/v1/ipam/prefixes/{prefixId}/available-ips": { - "get": { - "operationId": "IPAMService_ListAvailableIPs", - "parameters": [ - { - "in": "path", - "name": "prefixId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "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/v1ListAvailableIPsResponse" + "$ref": "#/components/schemas/v1TokenResponse" } } }, "description": "A successful response." } }, + "summary": "RefreshToken exchanges refresh token for new access token", "tags": [ - "IPAMService" + "OAuth2Service" ] } }, - "/v1/ipam/prefixes/{prefixId}/reserved-ips": { + "/v1/oauth2/revoke": { "post": { - "operationId": "IPAMService_AddReservedIP", - "parameters": [ - { - "in": "path", - "name": "prefixId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "OAuth2Service_RevokeToken", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IPAMServiceAddReservedIPBody" + "$ref": "#/components/schemas/v1RevokeTokenRequest" } } }, @@ -25421,37 +30306,28 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "properties": {}, + "type": "object" } } }, "description": "A successful response." } }, - "summary": "IP Reservation (manage reserved_ips array in prefix)", + "summary": "RevokeToken revokes an access or refresh token", "tags": [ - "IPAMService" + "OAuth2Service" ] } }, - "/v1/ipam/prefixes/{prefixId}/reserved-ips/clear-all": { + "/v1/oauth2/token": { "post": { - "operationId": "IPAMService_ClearAllPrefixReservedIPs", - "parameters": [ - { - "in": "path", - "name": "prefixId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "OAuth2Service_Token", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IPAMServiceClearAllPrefixReservedIPsBody" + "$ref": "#/components/schemas/v1TokenRequest" } } }, @@ -25462,47 +30338,28 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1TokenResponse" } } }, "description": "A successful response." } }, + "summary": "Token exchanges authorization code for access token", "tags": [ - "IPAMService" + "OAuth2Service" ] } }, - "/v1/ipam/prefixes/{prefixId}/reserved-ips/reserve-all": { - "post": { - "operationId": "IPAMService_ReserveAllPrefixIPs", - "parameters": [ - { - "in": "path", - "name": "prefixId", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IPAMServiceReserveAllPrefixIPsBody" - } - } - }, - "required": true - }, + "/v1/organization": { + "get": { + "operationId": "OrganizationService_GetOrganization", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetOrganizationResponse" } } }, @@ -25510,31 +30367,13 @@ } }, "tags": [ - "IPAMService" + "OrganizationService" ] } }, - "/v1/ipam/prefixes/{prefixId}/reserved-ips/{ipAddress}": { + "/v1/organizations": { "delete": { - "operationId": "IPAMService_RemoveReservedIP", - "parameters": [ - { - "in": "path", - "name": "prefixId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "ipAddress", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "OrganizationService_DeleteOrganization", "responses": { "200": { "content": { @@ -25548,28 +30387,28 @@ } }, "tags": [ - "IPAMService" + "OrganizationService" ] - } - }, - "/v1/ipam/prefixes/{prefixId}/reserved-prefixes": { - "delete": { - "operationId": "IPAMService_RemoveReservedPrefix", + }, + "get": { + "operationId": "OrganizationService_ListOrganizations", "parameters": [ { - "in": "path", - "name": "prefixId", - "required": true, + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "cidr", + "name": "pageSize", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ], @@ -25578,7 +30417,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListOrganizationsResponse" } } }, @@ -25586,26 +30425,16 @@ } }, "tags": [ - "IPAMService" + "OrganizationService" ] }, - "post": { - "operationId": "IPAMService_AddReservedPrefix", - "parameters": [ - { - "in": "path", - "name": "prefixId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "patch": { + "operationId": "OrganizationService_UpdateOrganization", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/IPAMServiceAddReservedPrefixBody" + "$ref": "#/components/schemas/v1UpdateOrganizationRequest" } } }, @@ -25616,7 +30445,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1UpdateOrganizationResponse" } } }, @@ -25624,102 +30453,62 @@ } }, "tags": [ - "IPAMService" + "OrganizationService" ] - } - }, - "/v1/ipam/prefixes/{prefixId}/utilization": { - "get": { - "operationId": "IPAMService_GetPrefixUtilization", - "parameters": [ - { - "in": "path", - "name": "prefixId", - "required": true, - "schema": { - "type": "string" + }, + "post": { + "operationId": "OrganizationService_CreateOrganization", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1CreateOrganizationRequest" + } } - } - ], + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPrefixUtilizationResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "Utility", "tags": [ - "IPAMService" + "OrganizationService" ] } }, - "/v1/marketplace/addons": { + "/v1/payment-methods": { "get": { - "operationId": "MarketplaceService_ListAvailableAddons", + "operationId": "PaymentMethodService_ListPaymentMethods", "parameters": [ { + "description": "Filters\n\nFilter by subscription", "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", + "name": "subscriptionId", "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": "Only return default payment method", "in": "query", - "name": "search", + "name": "onlyDefault", "required": false, "schema": { - "type": "string" + "type": "boolean" } }, { + "description": "Pagination", "in": "query", "name": "page", "required": false, @@ -25743,113 +30532,167 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListAvailableAddonsResponse" + "$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": [ + "PaymentMethodService" + ] + }, + "post": { + "operationId": "PaymentMethodService_AttachPaymentMethod", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1AttachPaymentMethodRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$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": [ + "PaymentMethodService" + ] + } + }, + "/v1/payment-methods/{paymentMethodId}": { + "delete": { + "operationId": "PaymentMethodService_RemovePaymentMethod", + "parameters": [ + { + "in": "path", + "name": "paymentMethodId", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$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": [ - "MarketplaceService" + "PaymentMethodService" ] } }, - "/v1/marketplace/plans": { - "get": { - "operationId": "MarketplaceService_ListAvailablePlans", + "/v1/payment-methods/{paymentMethodId}:set-default": { + "post": { + "operationId": "PaymentMethodService_SetDefaultPaymentMethod", "parameters": [ { - "description": "Optional filters\n\nFilter by country name (case-insensitive)", - "in": "query", - "name": "filterCountry", - "required": false, + "in": "path", + "name": "paymentMethodId", + "required": true, "schema": { "type": "string" } - }, - { - "description": "Filter by city name (case-insensitive)", - "in": "query", - "name": "filterCity", - "required": false, - "schema": { - "type": "string" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentMethodServiceSetDefaultPaymentMethodBody" + } } }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1SetDefaultPaymentMethodResponse" + } + } + }, + "description": "A successful response." + } + }, + "summary": "Set a payment method as the default payment method\nValidates payment method belongs to organization/subscription", + "tags": [ + "PaymentMethodService" + ] + } + }, + "/v1/payments": { + "get": { + "operationId": "PaymentService_ListPayments", + "parameters": [ { - "description": "Filter by billing type\n\n - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan)", "in": "query", - "name": "filterBillingType", + "name": "invoiceId", "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", + "name": "status", "required": false, "schema": { - "default": "COMPUTE_TYPE_UNSPECIFIED", + "default": "PAYMENT_STATUS_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" + "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" } }, { - "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", + "name": "page", "required": false, "schema": { - "default": "COMPUTE_CATEGORY_UNSPECIFIED", - "enum": [ - "COMPUTE_CATEGORY_UNSPECIFIED", - "COMPUTE_CATEGORY_SHARED_COMPUTE", - "COMPUTE_CATEGORY_DEDICATED_COMPUTE" - ], - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "filterAssetType", + "name": "pageSize", "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" + "format": "int32", + "type": "integer" } } ], @@ -25858,25 +30701,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListAvailablePlansResponse" + "$ref": "#/components/schemas/v1ListPaymentsResponse" } } }, "description": "A successful response." } }, + "summary": "ListPayments lists payments for an invoice or organization", "tags": [ - "MarketplaceService" + "PaymentService" ] } }, - "/v1/marketplace/plans/{planId}": { + "/v1/payments/{paymentId}": { "get": { - "operationId": "MarketplaceService_GetMarketplacePlan", + "operationId": "PaymentService_GetPayment", "parameters": [ { "in": "path", - "name": "planId", + "name": "paymentId", "required": true, "schema": { "type": "string" @@ -25888,21 +30732,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetMarketplacePlanResponse" + "$ref": "#/components/schemas/v1GetPaymentResponse" } } }, "description": "A successful response." } }, + "summary": "GetPayment retrieves a single payment with refunds", "tags": [ - "MarketplaceService" + "PaymentService" ] } }, - "/v1/marketplace/provider-directory": { + "/v1/permissions": { "get": { - "operationId": "MarketplaceService_ListMarketplaceProviderDirectory", + "operationId": "PermissionService_ListPermissions", "parameters": [ { "in": "query", @@ -25924,31 +30769,74 @@ }, { "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": [ { + "explode": true, "in": "query", - "name": "filterAssetType", + "name": "userIds", "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" + "items": { + "type": "string" + }, + "type": "array" } } ], @@ -25957,7 +30845,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListMarketplaceProviderDirectoryResponse" + "$ref": "#/components/schemas/v1ListEffectivePermissionsResponse" } } }, @@ -25965,78 +30853,102 @@ } }, "tags": [ - "MarketplaceService" + "PermissionService" ] } }, - "/v1/marketplace/providers": { - "get": { - "operationId": "MarketplaceService_ListProviders", + "/v1/permissions/remove-from-role": { + "delete": { + "operationId": "PermissionService_RemovePermissionFromRole", "parameters": [ { + "explode": true, "in": "query", - "name": "page", + "name": "permissionIds", "required": false, "schema": { - "format": "int32", - "type": "integer" + "items": { + "type": "string" + }, + "type": "array" } }, { "in": "query", - "name": "pageSize", + "name": "roleId", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } - }, + } + ], + "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": "filterPlanCode", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { - "description": "Filter by country name (required, case-insensitive)", "in": "query", - "name": "filterCountry", + "name": "pageSize", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { - "description": "Filter by city name (required, case-insensitive)", + "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": "filterCity", + "name": "isTemplate", "required": false, "schema": { - "type": "string" + "type": "boolean" } }, { - "description": "Filter by billing type (subscription/fixed or usage-based)\n\n - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan)", + "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": "filterBillingType", + "name": "endUser", "required": false, "schema": { - "default": "BILLING_TYPE_UNSPECIFIED", + "default": "END_USER_UNSPECIFIED", "enum": [ - "BILLING_TYPE_UNSPECIFIED", - "BILLING_TYPE_SUBSCRIPTION", - "BILLING_TYPE_USAGE", - "BILLING_TYPE_FREE", - "BILLING_TYPE_PERCENTAGE" + "END_USER_UNSPECIFIED", + "END_USER_CLIENT", + "END_USER_PROVIDER", + "END_USER_ALL", + "END_USER_USER" ], "type": "string" } }, { - "description": "Search by organization name or description", + "description": "Search filter for plan name, code, or description", "in": "query", "name": "search", "required": false, @@ -26045,48 +30957,60 @@ } }, { + "description": "Filter by asset type (vm, gameserver, etc.)", "in": "query", - "name": "filterIpv6AvailableOnly", + "name": "assetType", "required": false, "schema": { - "type": "boolean" + "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" } }, { - "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": "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": "planPriceSort", + "name": "billingType", "required": false, "schema": { - "default": "PROVIDER_PLAN_PRICE_SORT_UNSPECIFIED", + "default": "BILLING_TYPE_UNSPECIFIED", "enum": [ - "PROVIDER_PLAN_PRICE_SORT_UNSPECIFIED", - "PROVIDER_PLAN_PRICE_SORT_LEAST_EXPENSIVE_FIRST", - "PROVIDER_PLAN_PRICE_SORT_MOST_EXPENSIVE_FIRST" + "BILLING_TYPE_UNSPECIFIED", + "BILLING_TYPE_SUBSCRIPTION", + "BILLING_TYPE_USAGE", + "BILLING_TYPE_FREE", + "BILLING_TYPE_PERCENTAGE" ], "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).", + "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": "filterUnlimitedBandwidthOnly", + "name": "filterComputeType", "required": false, "schema": { - "type": "boolean" + "type": "string" } }, { - "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, + "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": "filterDdosProviders", + "name": "filterCode", "required": false, "schema": { - "items": { - "type": "string" - }, - "type": "array" + "type": "string" } } ], @@ -26095,7 +31019,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListProvidersResponse" + "$ref": "#/components/schemas/v1ListPlansResponse" } } }, @@ -26103,29 +31027,27 @@ } }, "tags": [ - "MarketplaceService" + "PlanService" ] - } - }, - "/v1/marketplace/providers/{providerId}": { - "get": { - "operationId": "MarketplaceService_GetProvider", - "parameters": [ - { - "in": "path", - "name": "providerId", - "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/v1GetProviderResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -26133,33 +31055,19 @@ } }, "tags": [ - "MarketplaceService" + "ProviderPlanService" ] } }, - "/v1/marketplace/regions": { - "get": { - "operationId": "MarketplaceService_ListAvailableRegions", + "/v1/plans/{id}": { + "delete": { + "operationId": "ProviderPlanService_DeletePlan", "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).", - "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" } } @@ -26169,7 +31077,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListAvailableRegionsResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -26177,22 +31085,30 @@ } }, "tags": [ - "MarketplaceService" + "ProviderPlanService" ] - } - }, - "/v1/marketplace/search": { - "post": { - "operationId": "MarketplaceService_SearchMarketplace", + }, + "patch": { + "operationId": "ProviderPlanService_UpdatePlan", + "parameters": [ + { + "description": "Plan ID to update (required)", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SearchMarketplaceRequest" + "$ref": "#/components/schemas/ProviderPlanServiceUpdatePlanBody" } } }, - "description": "Natural-language marketplace search (anonymous landing page).", "required": true }, "responses": { @@ -26200,105 +31116,47 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SearchMarketplaceResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "MarketplaceService" - ] - } - }, - "/v1/metrics": { - "get": { - "operationId": "MetricService_ListMetrics", - "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": "billableOnly", - "required": false, - "schema": { - "type": "boolean" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1ListMetricsResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "List all available metrics", "tags": [ - "MetricService" + "ProviderPlanService" ] } }, - "/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": { - "type": "string" - } - }, - { - "in": "query", - "name": "includeRevoked", - "required": false, - "schema": { - "type": "boolean" - } - }, + "/v1/plans/{planId}:subscribe": { + "post": { + "operationId": "PlanService_Subscribe", + "parameters": [ { - "in": "query", - "name": "page", - "required": false, + "in": "path", + "name": "planId", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { - "description": "-1 means fetch all; otherwise 1..100.", + "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": "pageSize", + "name": "billingPeriod", "required": false, "schema": { - "format": "int32", - "type": "integer" + "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" } } ], @@ -26307,7 +31165,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListMetricsWriteCredentialsResponse" + "$ref": "#/components/schemas/v1SubscribeResponse" } } }, @@ -26315,16 +31173,18 @@ } }, "tags": [ - "MetricsCredentialService" + "PlanService" ] - }, + } + }, + "/v1/plans:calculate": { "post": { - "operationId": "MetricsCredentialService_CreateMetricsWriteCredential", + "operationId": "ProviderPlanService_CalculatePlanPricing", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateMetricsWriteCredentialRequest" + "$ref": "#/components/schemas/v1CalculatePlanPricingRequest" } } }, @@ -26335,7 +31195,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateMetricsWriteCredentialResponse" + "$ref": "#/components/schemas/v1CalculatePlanPricingResponse" } } }, @@ -26343,28 +31203,18 @@ } }, "tags": [ - "MetricsCredentialService" + "ProviderPlanService" ] } }, - "/v1/metrics-write-credentials/{id}:revoke": { + "/v1/platform": { "post": { - "operationId": "MetricsCredentialService_RevokeMetricsWriteCredential", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "PlatformService_CreatePlatform", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MetricsCredentialServiceRevokeMetricsWriteCredentialBody" + "$ref": "#/components/schemas/v1CreatePlatformRequest" } } }, @@ -26383,17 +31233,38 @@ } }, "tags": [ - "MetricsCredentialService" + "PlatformService" ] } }, - "/v1/metrics-write-credentials/{id}:rotate": { + "/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" + ] + } + }, + "/v1/platform/organizations/{organizationId}:ban": { "post": { - "operationId": "MetricsCredentialService_RotateMetricsWriteCredential", + "operationId": "EnforcementService_BanOrganization", "parameters": [ { "in": "path", - "name": "id", + "name": "organizationId", "required": true, "schema": { "type": "string" @@ -26404,7 +31275,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MetricsCredentialServiceRotateMetricsWriteCredentialBody" + "$ref": "#/components/schemas/EnforcementServiceBanOrganizationBody" } } }, @@ -26415,7 +31286,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateMetricsWriteCredentialResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -26423,55 +31294,72 @@ } }, "tags": [ - "MetricsCredentialService" + "EnforcementService" ] } }, - "/v1/metrics/{id}": { - "get": { - "operationId": "MetricService_GetMetric", + "/v1/platform/organizations/{organizationId}:block-purchases": { + "post": { + "operationId": "EnforcementService_BlockOrganizationPurchases", "parameters": [ { "in": "path", - "name": "id", + "name": "organizationId", "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/v1GetMetricResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "description": "A successful response." } }, - "summary": "Get a specific metric by ID or code", "tags": [ - "MetricService" + "EnforcementService" ] } }, - "/v1/monitoring/business/datasource-token:rotate": { + "/v1/platform/organizations/{organizationId}:unban": { "post": { - "operationId": "BusinessMonitoringService_RotateBusinessMonitoringDatasourceToken", + "operationId": "EnforcementService_UnbanOrganization", + "parameters": [ + { + "in": "path", + "name": "organizationId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { - "$ref": "#/components/requestBodies/v1RotateMonitoringDatasourceTokenRequest" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnforcementServiceUnbanOrganizationBody" + } + } + }, + "required": true }, "responses": { "200": { @@ -26486,22 +31374,39 @@ } }, "tags": [ - "BusinessMonitoringService" + "EnforcementService" ] } }, - "/v1/monitoring/business/launch": { + "/v1/platform/organizations/{organizationId}:unblock-purchases": { "post": { - "operationId": "BusinessMonitoringService_CreateBusinessMonitoringLaunch", + "operationId": "EnforcementService_UnblockOrganizationPurchases", + "parameters": [ + { + "in": "path", + "name": "organizationId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { - "$ref": "#/components/requestBodies/v1CreateMonitoringLaunchRequest" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnforcementServiceUnblockOrganizationPurchasesBody" + } + } + }, + "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateMonitoringLaunchResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -26509,15 +31414,32 @@ } }, "tags": [ - "BusinessMonitoringService" + "EnforcementService" ] } }, - "/v1/monitoring/datasource-token:rotate": { + "/v1/platform/users/{userId}:ban": { "post": { - "operationId": "MonitoringService_RotateMonitoringDatasourceToken", + "operationId": "EnforcementService_BanUser", + "parameters": [ + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { - "$ref": "#/components/requestBodies/v1RotateMonitoringDatasourceTokenRequest" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnforcementServiceBanUserBody" + } + } + }, + "required": true }, "responses": { "200": { @@ -26531,44 +31453,69 @@ "description": "A successful response." } }, - "summary": "RotateMonitoringDatasourceToken replaces the organization's Grafana datasource token.", "tags": [ - "MonitoringService" + "EnforcementService" ] } }, - "/v1/monitoring/launch": { + "/v1/platform/users/{userId}:unban": { "post": { - "operationId": "MonitoringService_CreateMonitoringLaunch", + "operationId": "EnforcementService_UnbanUser", + "parameters": [ + { + "in": "path", + "name": "userId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { - "$ref": "#/components/requestBodies/v1CreateMonitoringLaunchRequest" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EnforcementServiceUnbanUserBody" + } + } + }, + "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateMonitoringLaunchResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "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": [ - "MonitoringService" + "EnforcementService" ] } }, - "/v1/node": { + "/v1/platform/virtual-machines/{virtualMachineId}:delete": { "post": { - "operationId": "NodeService_CreateNode", + "operationId": "EnforcementService_DeletePlatformVirtualMachine", + "parameters": [ + { + "in": "path", + "name": "virtualMachineId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateNodeRequest" + "$ref": "#/components/schemas/EnforcementServiceDeletePlatformVirtualMachineBody" } } }, @@ -26587,36 +31534,28 @@ } }, "tags": [ - "NodeService" + "EnforcementService" ] } }, - "/v1/node-placement-policy": { - "get": { - "operationId": "NodePlacementService_GetNodePlacementPolicy", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetNodePlacementPolicyResponse" - } - } - }, - "description": "A successful response." + "/v1/platform/virtual-machines/{virtualMachineId}:suspend": { + "post": { + "operationId": "EnforcementService_SuspendPlatformVirtualMachine", + "parameters": [ + { + "in": "path", + "name": "virtualMachineId", + "required": true, + "schema": { + "type": "string" + } } - }, - "tags": [ - "NodePlacementService" - ] - }, - "put": { - "operationId": "NodePlacementService_UpdateNodePlacementPolicy", + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateNodePlacementPolicyRequest" + "$ref": "#/components/schemas/EnforcementServiceSuspendPlatformVirtualMachineBody" } } }, @@ -26627,7 +31566,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateNodePlacementPolicyResponse" + "$ref": "#/components/schemas/v1VirtualMachine" } } }, @@ -26635,18 +31574,28 @@ } }, "tags": [ - "NodePlacementService" + "EnforcementService" ] } }, - "/v1/node/topology/validate": { + "/v1/platform/virtual-machines/{virtualMachineId}:unblock": { "post": { - "operationId": "NodeService_ValidateNodeTopology", + "operationId": "EnforcementService_UnblockPlatformVirtualMachine", + "parameters": [ + { + "in": "path", + "name": "virtualMachineId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ValidateNodeTopologyRequest" + "$ref": "#/components/schemas/EnforcementServiceUnblockPlatformVirtualMachineBody" } } }, @@ -26657,22 +31606,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ValidateNodeTopologyResponse" + "$ref": "#/components/schemas/v1VirtualMachine" } } }, "description": "A successful response." } }, - "summary": "Dedicated CPU cores: parse-preview of a topology paste without persisting.", "tags": [ - "NodeService" + "EnforcementService" ] } }, - "/v1/node/{id}": { + "/v1/platform/{id}": { "delete": { - "operationId": "NodeService_DeleteNode", + "operationId": "PlatformService_DeletePlatform", "parameters": [ { "in": "path", @@ -26696,11 +31644,11 @@ } }, "tags": [ - "NodeService" + "PlatformService" ] }, "get": { - "operationId": "NodeService_GetNode", + "operationId": "PlatformService_GetPlatform", "parameters": [ { "in": "path", @@ -26716,7 +31664,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetNodeResponse" + "$ref": "#/components/schemas/v1GetPlatformResponse" } } }, @@ -26724,11 +31672,11 @@ } }, "tags": [ - "NodeService" + "PlatformService" ] }, "patch": { - "operationId": "NodeService_UpdateNode", + "operationId": "PlatformService_UpdatePlatform", "parameters": [ { "in": "path", @@ -26743,7 +31691,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/NodeServiceUpdateNodeBody" + "$ref": "#/components/schemas/PlatformServiceUpdatePlatformBody" } } }, @@ -26754,52 +31702,21 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateNodeResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "NodeService" - ] - } - }, - "/v1/node/{id}/cpu-map": { - "get": { - "operationId": "NodeService_GetNodeCPUMap", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetNodeCPUMapResponse" + "$ref": "#/components/schemas/v1UpdatePlatformResponse" } } }, "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" + "PlatformService" ] } }, - "/v1/nodes": { + "/v1/platforms": { "get": { - "operationId": "NodeService_ListNodes", + "operationId": "PlatformService_ListPlatforms", "parameters": [ { "in": "query", @@ -26819,15 +31736,6 @@ "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", @@ -26843,18 +31751,6 @@ "type": "string" } }, - { - "explode": true, - "in": "query", - "name": "expand", - "required": false, - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - }, { "in": "query", "name": "search", @@ -26862,14 +31758,6 @@ "schema": { "type": "string" } - }, - { - "in": "query", - "name": "regionId", - "required": false, - "schema": { - "type": "string" - } } ], "responses": { @@ -26877,7 +31765,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListNodesResponse" + "$ref": "#/components/schemas/v1ListPlatformsResponse" } } }, @@ -26885,99 +31773,106 @@ } }, "tags": [ - "NodeService" + "PlatformService" ] } }, - "/v1/oauth2/authorize": { - "get": { - "operationId": "OAuth2Service_Authorize", + "/v1/platforms/{platformId}:AssignAgent": { + "post": { + "operationId": "PlatformService_AssignAgent", "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, + "in": "path", + "name": "platformId", + "required": true, "schema": { "type": "string" } - }, - { - "description": "PKCE challenge", - "in": "query", - "name": "codeChallenge", - "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": [ { - "description": "Only S256, not plain", - "in": "query", - "name": "codeChallengeMethod", - "required": false, + "in": "path", + "name": "platformId", + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PlatformServiceUnassignAgentBody" + } + } + }, + "required": true + }, "responses": { "200": { "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" + "PlatformService" ] } }, - "/v1/oauth2/clients": { + "/v1/provider-reviews": { "get": { - "operationId": "OAuth2Service_ListClients", + "operationId": "ProviderReviewService_ListProviderReviews", "parameters": [ { "in": "query", - "name": "page", + "name": "page", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "in": "query", + "name": "pageSize", "required": false, "schema": { "format": "int32", @@ -26985,8 +31880,32 @@ } }, { + "description": "Multi-select star filter (e.g. [5,4]); empty means any stars.", + "explode": true, "in": "query", - "name": "pageSize", + "name": "starRatings", + "required": false, + "schema": { + "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": "search", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Inbox: 0 = awaiting provider reply / empty reply (default), 1 = replied only, 2 = all reviews.", + "in": "query", + "name": "replyFilter", "required": false, "schema": { "format": "int32", @@ -26999,25 +31918,24 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListOAuth2ClientsResponse" + "$ref": "#/components/schemas/v1ListProviderReviewsResponse" } } }, "description": "A successful response." } }, - "summary": "ListClients lists OAuth2 clients for the organization", "tags": [ - "OAuth2Service" + "ProviderReviewService" ] }, "post": { - "operationId": "OAuth2Service_CreateClient", + "operationId": "ClientProviderReviewService_CreateClientReview", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateOAuth2ClientRequest" + "$ref": "#/components/schemas/v1CreateClientReviewRequest" } } }, @@ -27028,26 +31946,25 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateOAuth2ClientResponse" + "$ref": "#/components/schemas/v1CreateClientReviewResponse" } } }, "description": "A successful response." } }, - "summary": "CreateClient creates a new OAuth2 client", "tags": [ - "OAuth2Service" + "ClientProviderReviewService" ] } }, - "/v1/oauth2/clients/{clientId}": { - "delete": { - "operationId": "OAuth2Service_DeleteClient", + "/v1/provider-reviews/virtual-machines/{virtualMachineId}": { + "get": { + "operationId": "ClientProviderReviewService_GetClientReviewForVirtualMachine", "parameters": [ { "in": "path", - "name": "clientId", + "name": "virtualMachineId", "required": true, "schema": { "type": "string" @@ -27059,28 +31976,64 @@ "content": { "application/json": { "schema": { - "properties": {}, - "type": "object" + "$ref": "#/components/schemas/v1GetClientReviewForVirtualMachineResponse" } } }, "description": "A successful response." } }, - "summary": "DeleteClient deletes an OAuth2 client", "tags": [ - "OAuth2Service" + "ClientProviderReviewService" ] } }, - "/v1/oauth2/refresh": { - "post": { - "operationId": "OAuth2Service_RefreshToken", + "/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" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1RefreshTokenRequest" + "$ref": "#/components/schemas/ClientProviderReviewServiceUpdateClientReviewBody" } } }, @@ -27091,27 +32044,64 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1TokenResponse" + "$ref": "#/components/schemas/v1UpdateClientReviewResponse" } } }, "description": "A successful response." } }, - "summary": "RefreshToken exchanges refresh token for new access token", "tags": [ - "OAuth2Service" + "ClientProviderReviewService" ] } }, - "/v1/oauth2/revoke": { - "post": { - "operationId": "OAuth2Service_RevokeToken", + "/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" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1RevokeTokenRequest" + "$ref": "#/components/schemas/ProviderReviewServiceUpdateProviderReviewReplyBody" } } }, @@ -27122,28 +32112,34 @@ "content": { "application/json": { "schema": { - "properties": {}, - "type": "object" + "$ref": "#/components/schemas/v1UpdateProviderReviewReplyResponse" } } }, "description": "A successful response." } }, - "summary": "RevokeToken revokes an access or refresh token", "tags": [ - "OAuth2Service" + "ProviderReviewService" ] - } - }, - "/v1/oauth2/token": { + }, "post": { - "operationId": "OAuth2Service_Token", + "operationId": "ProviderReviewService_CreateProviderReviewReply", + "parameters": [ + { + "in": "path", + "name": "reviewId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1TokenRequest" + "$ref": "#/components/schemas/ProviderReviewServiceCreateProviderReviewReplyBody" } } }, @@ -27154,28 +32150,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1TokenResponse" + "$ref": "#/components/schemas/v1CreateProviderReviewReplyResponse" } } }, "description": "A successful response." } }, - "summary": "Token exchanges authorization code for access token", "tags": [ - "OAuth2Service" + "ProviderReviewService" ] } }, - "/v1/organization": { - "get": { - "operationId": "OrganizationService_GetOrganization", + "/v1/provider/connect/account": { + "delete": { + "operationId": "ProviderConnectService_DisconnectConnectAccount", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetOrganizationResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -27183,19 +32178,17 @@ } }, "tags": [ - "OrganizationService" + "ProviderConnectService" ] - } - }, - "/v1/organizations": { - "delete": { - "operationId": "OrganizationService_DeleteOrganization", + }, + "get": { + "operationId": "ProviderConnectService_GetConnectAccount", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetConnectAccountResponse" } } }, @@ -27203,37 +32196,27 @@ } }, "tags": [ - "OrganizationService" + "ProviderConnectService" ] }, - "get": { - "operationId": "OrganizationService_ListOrganizations", - "parameters": [ - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" + "post": { + "operationId": "ProviderConnectService_CreateConnectAccount", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1CreateConnectAccountRequest" + } } }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListOrganizationsResponse" + "$ref": "#/components/schemas/v1CreateConnectAccountResponse" } } }, @@ -27241,16 +32224,18 @@ } }, "tags": [ - "OrganizationService" + "ProviderConnectService" ] - }, - "patch": { - "operationId": "OrganizationService_UpdateOrganization", + } + }, + "/v1/provider/connect/oauth:complete": { + "post": { + "operationId": "ProviderConnectService_CompleteConnectOAuth", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateOrganizationRequest" + "$ref": "#/components/schemas/v1CompleteConnectOAuthRequest" } } }, @@ -27261,24 +32246,27 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateOrganizationResponse" + "$ref": "#/components/schemas/v1CompleteConnectOAuthResponse" } } }, "description": "A successful response." } }, + "summary": "Completes Stripe Connect OAuth after Stripe redirects back with a code.", "tags": [ - "OrganizationService" + "ProviderConnectService" ] - }, + } + }, + "/v1/provider/connect/oauth:start": { "post": { - "operationId": "OrganizationService_CreateOrganization", + "operationId": "ProviderConnectService_StartConnectOAuth", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateOrganizationRequest" + "$ref": "#/components/schemas/v1StartConnectOAuthRequest" } } }, @@ -27289,84 +32277,45 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1StartConnectOAuthResponse" } } }, "description": "A successful response." } }, + "summary": "Starts Stripe Connect OAuth so a provider can attach an existing Standard account.", "tags": [ - "OrganizationService" + "ProviderConnectService" ] } }, - "/v1/payment-methods": { + "/v1/provider/connect/tax-registrations": { "get": { - "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" - } - } - ], + "operationId": "ProviderConnectService_ListConnectTaxRegistrations", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPaymentMethodsResponse" + "$ref": "#/components/schemas/v1ListConnectTaxRegistrationsResponse" } } }, "description": "A successful response." } }, - "summary": "List payment methods for an organization/subscription\nReturns payment method details (type, last4, brand, expiry, is_default)", "tags": [ - "PaymentMethodService" + "ProviderConnectService" ] }, "post": { - "operationId": "PaymentMethodService_AttachPaymentMethod", + "operationId": "ProviderConnectService_CreateConnectTaxRegistration", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1AttachPaymentMethodRequest" + "$ref": "#/components/schemas/v1CreateConnectTaxRegistrationRequest" } } }, @@ -27377,57 +32326,25 @@ "content": { "application/json": { "schema": { - "$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": [ - "PaymentMethodService" - ] - } - }, - "/v1/payment-methods/{paymentMethodId}": { - "delete": { - "operationId": "PaymentMethodService_RemovePaymentMethod", - "parameters": [ - { - "in": "path", - "name": "paymentMethodId", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1RemovePaymentMethodResponse" + "$ref": "#/components/schemas/v1CreateConnectTaxRegistrationResponse" } } }, "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": [ - "PaymentMethodService" + "ProviderConnectService" ] } }, - "/v1/payment-methods/{paymentMethodId}:set-default": { + "/v1/provider/connect/tax-registrations/{id}/expire": { "post": { - "operationId": "PaymentMethodService_SetDefaultPaymentMethod", + "operationId": "ProviderConnectService_ExpireConnectTaxRegistration", "parameters": [ { "in": "path", - "name": "paymentMethodId", + "name": "id", "required": true, "schema": { "type": "string" @@ -27438,7 +32355,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaymentMethodServiceSetDefaultPaymentMethodBody" + "$ref": "#/components/schemas/ProviderConnectServiceExpireConnectTaxRegistrationBody" } } }, @@ -27449,155 +32366,79 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SetDefaultPaymentMethodResponse" + "$ref": "#/components/schemas/v1ExpireConnectTaxRegistrationResponse" } } }, "description": "A successful response." } }, - "summary": "Set a payment method as the default payment method\nValidates payment method belongs to organization/subscription", "tags": [ - "PaymentMethodService" + "ProviderConnectService" ] } }, - "/v1/payments": { - "get": { - "operationId": "PaymentService_ListPayments", - "parameters": [ - { - "in": "query", - "name": "invoiceId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "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" - } - } - ], + "/v1/provider/connect/tax-session": { + "post": { + "operationId": "ProviderConnectService_CreateConnectTaxSession", + "requestBody": { + "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPaymentsResponse" + "$ref": "#/components/schemas/v1CreateConnectTaxSessionResponse" } } }, "description": "A successful response." } }, - "summary": "ListPayments lists payments for an invoice or organization", + "summary": "Creates a Stripe AccountSession client secret for Connect tax_settings /\ntax_registrations embedded components (legacy; prefer native tax RPCs).", "tags": [ - "PaymentService" + "ProviderConnectService" ] } }, - "/v1/payments/{paymentId}": { + "/v1/provider/connect/tax-settings": { "get": { - "operationId": "PaymentService_GetPayment", - "parameters": [ - { - "in": "path", - "name": "paymentId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "ProviderConnectService_GetConnectTaxSettings", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPaymentResponse" + "$ref": "#/components/schemas/v1GetConnectTaxSettingsResponse" } } }, "description": "A successful response." } }, - "summary": "GetPayment retrieves a single payment with refunds", "tags": [ - "PaymentService" + "ProviderConnectService" ] - } - }, - "/v1/permissions": { - "get": { - "operationId": "PermissionService_ListPermissions", - "parameters": [ - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" + }, + "put": { + "operationId": "ProviderConnectService_UpdateConnectTaxSettings", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1UpdateConnectTaxSettingsRequest" + } } }, - { - "in": "query", - "name": "filterName", - "required": false, - "schema": { - "type": "string" - } - } - ], + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPermissionsResponse" + "$ref": "#/components/schemas/v1UpdateConnectTaxSettingsResponse" } } }, @@ -27605,54 +32446,78 @@ } }, "tags": [ - "PermissionService" + "ProviderConnectService" ] } - }, - "/v1/permissions/assign-to-role": { - "post": { - "operationId": "PermissionService_AssignPermissionToRole", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1AssignPermissionToRoleRequest" - } - } - }, - "required": true - }, + }, + "/v1/provider/customer-stats": { + "get": { + "operationId": "ProviderCustomerService_GetProviderCustomerStats", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$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": [ - "PermissionService" + "ProviderCustomerService" ] } }, - "/v1/permissions/effective": { + "/v1/provider/customers": { "get": { - "operationId": "PermissionService_ListEffectivePermissions", + "operationId": "ProviderCustomerService_ListProviderCustomers", "parameters": [ { - "explode": true, + "description": "0-based page (default 0).", "in": "query", - "name": "userIds", + "name": "page", "required": false, "schema": { - "items": { - "type": "string" - }, - "type": "array" + "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": "pageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + }, + { + "description": "Case-insensitive match on client organization name or any member email (owners/members via roles & groups).", + "in": "query", + "name": "search", + "required": false, + "schema": { + "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": "activityFilter", + "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" } } ], @@ -27661,7 +32526,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListEffectivePermissionsResponse" + "$ref": "#/components/schemas/v1ListProviderCustomersResponse" } } }, @@ -27669,30 +32534,18 @@ } }, "tags": [ - "PermissionService" + "ProviderCustomerService" ] } }, - "/v1/permissions/remove-from-role": { - "delete": { - "operationId": "PermissionService_RemovePermissionFromRole", + "/v1/provider/customers/{clientOrganizationId}": { + "get": { + "operationId": "ProviderCustomerService_GetProviderCustomer", "parameters": [ { - "explode": true, - "in": "query", - "name": "permissionIds", - "required": false, - "schema": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - { - "in": "query", - "name": "roleId", - "required": false, + "in": "path", + "name": "clientOrganizationId", + "required": true, "schema": { "type": "string" } @@ -27703,7 +32556,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetProviderCustomerResponse" } } }, @@ -27711,26 +32564,25 @@ } }, "tags": [ - "PermissionService" + "ProviderCustomerService" ] } }, - "/v1/plans": { + "/v1/provider/customers/{clientOrganizationId}/assets": { "get": { - "operationId": "PlanService_ListPlans", + "operationId": "ProviderCustomerService_ListProviderCustomerAssets", "parameters": [ { - "in": "query", - "name": "page", - "required": false, + "in": "path", + "name": "clientOrganizationId", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "pageSize", + "name": "page", "required": false, "schema": { "format": "int32", @@ -27738,33 +32590,16 @@ } }, { - "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", + "description": "Same rules as ListProviderCustomers.page_size.", "in": "query", - "name": "endUser", + "name": "pageSize", "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" + "format": "int32", + "type": "integer" } }, { - "description": "Search filter for plan name, code, or description", "in": "query", "name": "search", "required": false, @@ -27773,57 +32608,40 @@ } }, { - "description": "Filter by asset type (vm, gameserver, etc.)", "in": "query", "name": "assetType", "required": false, "schema": { - "default": "ASSET_TYPE_UNSPECIFIED", + "default": "PROVIDER_CUSTOMER_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" + "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 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": "When set (not UNSPECIFIED), only assets matching this activity status are returned.", "in": "query", - "name": "billingType", + "name": "activityStatus", "required": false, "schema": { - "default": "BILLING_TYPE_UNSPECIFIED", + "default": "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_UNSPECIFIED", "enum": [ - "BILLING_TYPE_UNSPECIFIED", - "BILLING_TYPE_SUBSCRIPTION", - "BILLING_TYPE_USAGE", - "BILLING_TYPE_FREE", - "BILLING_TYPE_PERCENTAGE" + "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_UNSPECIFIED", + "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_ACTIVE", + "PROVIDER_CUSTOMER_VM_ACTIVITY_STATUS_INACTIVE" ], "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.", - "in": "query", - "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.", + "description": "When set to a non-empty UUID, only assets whose VM node is in this region are returned.", "in": "query", - "name": "filterCode", + "name": "regionId", "required": false, "schema": { "type": "string" @@ -27835,35 +32653,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPlansResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "PlanService" - ] - }, - "post": { - "operationId": "ProviderPlanService_CreatePlan", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1CreatePlanRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListProviderCustomerAssetsResponse" } } }, @@ -27871,17 +32661,17 @@ } }, "tags": [ - "ProviderPlanService" + "ProviderCustomerService" ] } }, - "/v1/plans/{id}": { - "delete": { - "operationId": "ProviderPlanService_DeletePlan", + "/v1/provider/customers/{clientOrganizationId}/billing": { + "get": { + "operationId": "ProviderCustomerService_GetProviderCustomerBilling", "parameters": [ { "in": "path", - "name": "id", + "name": "clientOrganizationId", "required": true, "schema": { "type": "string" @@ -27893,7 +32683,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetProviderCustomerBillingResponse" } } }, @@ -27901,16 +32691,25 @@ } }, "tags": [ - "ProviderPlanService" + "ProviderCustomerService" ] - }, - "patch": { - "operationId": "ProviderPlanService_UpdatePlan", + } + }, + "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:restart": { + "post": { + "operationId": "ProviderCustomerService_RestartProviderCustomerVirtualMachine", "parameters": [ { - "description": "Plan ID to update (required)", "in": "path", - "name": "id", + "name": "clientOrganizationId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "virtualMachineId", "required": true, "schema": { "type": "string" @@ -27921,7 +32720,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderPlanServiceUpdatePlanBody" + "$ref": "#/components/schemas/ProviderCustomerServiceRestartProviderCustomerVirtualMachineBody" } } }, @@ -27932,7 +32731,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1VirtualMachine" } } }, @@ -27940,48 +32739,47 @@ } }, "tags": [ - "ProviderPlanService" + "ProviderCustomerService" ] } }, - "/v1/plans/{planId}:subscribe": { + "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:start": { "post": { - "operationId": "PlanService_Subscribe", + "operationId": "ProviderCustomerService_StartProviderCustomerVirtualMachine", "parameters": [ { "in": "path", - "name": "planId", + "name": "clientOrganizationId", "required": true, "schema": { "type": "string" } }, { - "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, + "in": "path", + "name": "virtualMachineId", + "required": true, "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/ProviderCustomerServiceStartProviderCustomerVirtualMachineBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SubscribeResponse" + "$ref": "#/components/schemas/v1VirtualMachine" } } }, @@ -27989,18 +32787,36 @@ } }, "tags": [ - "PlanService" + "ProviderCustomerService" ] } }, - "/v1/plans:calculate": { + "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:stop": { "post": { - "operationId": "ProviderPlanService_CalculatePlanPricing", + "operationId": "ProviderCustomerService_StopProviderCustomerVirtualMachine", + "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/v1CalculatePlanPricingRequest" + "$ref": "#/components/schemas/ProviderCustomerServiceStopProviderCustomerVirtualMachineBody" } } }, @@ -28011,7 +32827,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CalculatePlanPricingResponse" + "$ref": "#/components/schemas/v1VirtualMachine" } } }, @@ -28019,18 +32835,36 @@ } }, "tags": [ - "ProviderPlanService" + "ProviderCustomerService" ] } }, - "/v1/platform": { + "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:suspend": { "post": { - "operationId": "PlatformService_CreatePlatform", + "operationId": "ProviderCustomerService_SuspendProviderCustomerVirtualMachine", + "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/v1CreatePlatformRequest" + "$ref": "#/components/schemas/ProviderCustomerServiceSuspendProviderCustomerVirtualMachineBody" } } }, @@ -28041,7 +32875,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1VirtualMachine" } } }, @@ -28049,38 +32883,65 @@ } }, "tags": [ - "PlatformService" + "ProviderCustomerService" ] } }, - "/v1/platform-versions": { - "get": { - "operationId": "MetadataService_GetPlatformVersions", + "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:unblock": { + "post": { + "operationId": "ProviderCustomerService_UnblockProviderCustomerVirtualMachine", + "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/ProviderCustomerServiceUnblockProviderCustomerVirtualMachineBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1PlatformVersions" + "$ref": "#/components/schemas/v1VirtualMachine" } } }, "description": "A successful response." } }, - "summary": "GetPlatformVersions returns pinned versions for k3s, k3d, calico, liqo, liqoctl, and helm.", "tags": [ - "MetadataService" + "ProviderCustomerService" ] } }, - "/v1/platform/organizations/{organizationId}:ban": { + "/v1/provider/customers/{clientOrganizationId}:block-purchases": { "post": { - "operationId": "EnforcementService_BanOrganization", + "operationId": "ProviderCustomerService_BlockProviderCustomerPurchases", "parameters": [ { "in": "path", - "name": "organizationId", + "name": "clientOrganizationId", "required": true, "schema": { "type": "string" @@ -28091,7 +32952,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnforcementServiceBanOrganizationBody" + "$ref": "#/components/schemas/ProviderCustomerServiceBlockProviderCustomerPurchasesBody" } } }, @@ -28110,17 +32971,17 @@ } }, "tags": [ - "EnforcementService" + "ProviderCustomerService" ] } }, - "/v1/platform/organizations/{organizationId}:block-purchases": { + "/v1/provider/customers/{clientOrganizationId}:unblock-purchases": { "post": { - "operationId": "EnforcementService_BlockOrganizationPurchases", + "operationId": "ProviderCustomerService_UnblockProviderCustomerPurchases", "parameters": [ { "in": "path", - "name": "organizationId", + "name": "clientOrganizationId", "required": true, "schema": { "type": "string" @@ -28131,7 +32992,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EnforcementServiceBlockOrganizationPurchasesBody" + "$ref": "#/components/schemas/ProviderCustomerServiceUnblockProviderCustomerPurchasesBody" } } }, @@ -28150,39 +33011,94 @@ } }, "tags": [ - "EnforcementService" + "ProviderCustomerService" ] } }, - "/v1/platform/organizations/{organizationId}:unban": { - "post": { - "operationId": "EnforcementService_UnbanOrganization", + "/v1/provider/dashboard/addon-catalog-stats": { + "get": { + "operationId": "ProviderDashboardService_ListDashboardAddonCatalogStats", "parameters": [ { - "in": "path", - "name": "organizationId", - "required": true, + "in": "query", + "name": "addonSearch", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "addonTypeFilter", + "required": false, "schema": { "type": "string" } + }, + { + "in": "query", + "name": "addonBillingTypeFilter", + "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" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnforcementServiceUnbanOrganizationBody" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1ListDashboardAddonCatalogStatsResponse" + } } - } - }, - "required": true + }, + "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" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetDashboardAssetSalesTimeseriesResponse" } } }, @@ -28190,39 +33106,66 @@ } }, "tags": [ - "EnforcementService" + "ProviderDashboardService" ] } }, - "/v1/platform/organizations/{organizationId}:unblock-purchases": { - "post": { - "operationId": "EnforcementService_UnblockOrganizationPurchases", + "/v1/provider/dashboard/billing-sales": { + "get": { + "operationId": "ProviderDashboardService_GetDashboardBillingSales", "parameters": [ { - "in": "path", - "name": "organizationId", - "required": true, + "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, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnforcementServiceUnblockOrganizationPurchasesBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetDashboardBillingSalesResponse" } } }, @@ -28230,39 +33173,30 @@ } }, "tags": [ - "EnforcementService" + "ProviderDashboardService" ] } }, - "/v1/platform/users/{userId}:ban": { - "post": { - "operationId": "EnforcementService_BanUser", + "/v1/provider/dashboard/customer-acquisition-timeseries": { + "get": { + "operationId": "ProviderDashboardService_GetDashboardCustomerAcquisitionTimeseries", "parameters": [ { - "in": "path", - "name": "userId", - "required": true, + "in": "query", + "name": "rangeDays", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnforcementServiceBanUserBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetDashboardCustomerAcquisitionTimeseriesResponse" } } }, @@ -28270,39 +33204,55 @@ } }, "tags": [ - "EnforcementService" + "ProviderDashboardService" ] } }, - "/v1/platform/users/{userId}:unban": { - "post": { - "operationId": "EnforcementService_UnbanUser", + "/v1/provider/dashboard/infrastructure": { + "get": { + "operationId": "ProviderDashboardService_ListDashboardInfrastructure", "parameters": [ { - "in": "path", - "name": "userId", - "required": true, + "in": "query", + "name": "platformId", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnforcementServiceUnbanUserBody" - } + }, + { + "in": "query", + "name": "regionId", + "required": false, + "schema": { + "type": "string" } }, - "required": true - }, + { + "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/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListDashboardInfrastructureResponse" } } }, @@ -28310,39 +33260,47 @@ } }, "tags": [ - "EnforcementService" + "ProviderDashboardService" ] } }, - "/v1/platform/virtual-machines/{virtualMachineId}:delete": { - "post": { - "operationId": "EnforcementService_DeletePlatformVirtualMachine", + "/v1/provider/dashboard/ipam": { + "get": { + "operationId": "ProviderDashboardService_ListDashboardIpam", "parameters": [ { - "in": "path", - "name": "virtualMachineId", - "required": true, + "in": "query", + "name": "networkId", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnforcementServiceDeletePlatformVirtualMachineBody" - } + }, + { + "in": "query", + "name": "allocatedSampleIpsPage", + "required": false, + "schema": { + "format": "int32", + "type": "integer" } }, - "required": true - }, + { + "in": "query", + "name": "allocatedSampleIpsPageSize", + "required": false, + "schema": { + "format": "int32", + "type": "integer" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListDashboardIpamResponse" } } }, @@ -28350,39 +33308,77 @@ } }, "tags": [ - "EnforcementService" + "ProviderDashboardService" ] } }, - "/v1/platform/virtual-machines/{virtualMachineId}:suspend": { - "post": { - "operationId": "EnforcementService_SuspendPlatformVirtualMachine", + "/v1/provider/dashboard/ipam/assignments": { + "get": { + "operationId": "ProviderDashboardService_ListDashboardIpamAssignments", "parameters": [ { - "in": "path", - "name": "virtualMachineId", - "required": true, + "in": "query", + "name": "networkId", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnforcementServiceSuspendPlatformVirtualMachineBody" - } + }, + { + "in": "query", + "name": "search", + "required": false, + "schema": { + "type": "string" } }, - "required": true - }, + { + "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, + "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" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VirtualMachine" + "$ref": "#/components/schemas/v1ListDashboardIpamAssignmentsResponse" } } }, @@ -28390,39 +33386,63 @@ } }, "tags": [ - "EnforcementService" + "ProviderDashboardService" ] } }, - "/v1/platform/virtual-machines/{virtualMachineId}:unblock": { - "post": { - "operationId": "EnforcementService_UnblockPlatformVirtualMachine", + "/v1/provider/dashboard/plan-subscription-stats": { + "get": { + "operationId": "ProviderDashboardService_ListDashboardPlanSubscriptionStats", "parameters": [ { - "in": "path", - "name": "virtualMachineId", - "required": true, + "in": "query", + "name": "planSearch", + "required": false, "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EnforcementServiceUnblockPlatformVirtualMachineBody" - } + }, + { + "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/v1VirtualMachine" + "$ref": "#/components/schemas/v1ListDashboardPlanSubscriptionStatsResponse" } } }, @@ -28430,29 +33450,19 @@ } }, "tags": [ - "EnforcementService" + "ProviderDashboardService" ] } }, - "/v1/platform/{id}": { - "delete": { - "operationId": "PlatformService_DeletePlatform", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "/v1/provider/dashboard/plans-tab-stats": { + "get": { + "operationId": "ProviderDashboardPlansTabService_GetDashboardPlansTabStats", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ProviderDashboardPlansTabStats" } } }, @@ -28460,27 +33470,19 @@ } }, "tags": [ - "PlatformService" + "ProviderDashboardPlansTabService" ] - }, + } + }, + "/v1/provider/dashboard/summary": { "get": { - "operationId": "PlatformService_GetPlatform", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "ProviderDashboardService_GetDashboardSummary", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPlatformResponse" + "$ref": "#/components/schemas/v1GetDashboardSummaryResponse" } } }, @@ -28488,37 +33490,39 @@ } }, "tags": [ - "PlatformService" + "ProviderDashboardService" ] - }, - "patch": { - "operationId": "PlatformService_UpdatePlatform", + } + }, + "/v1/provider/dashboard/tickets/statistics": { + "get": { + "operationId": "ProviderDashboardService_ListDashboardTicketStatistics", "parameters": [ { - "in": "path", - "name": "id", - "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/PlatformServiceUpdatePlatformBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdatePlatformResponse" + "$ref": "#/components/schemas/v1ListDashboardTicketStatisticsResponse" } } }, @@ -28526,26 +33530,49 @@ } }, "tags": [ - "PlatformService" + "ProviderDashboardService" ] } }, - "/v1/platforms": { + "/v1/provider/dashboard/virtual-machines": { "get": { - "operationId": "PlatformService_ListPlatforms", + "operationId": "ProviderDashboardService_ListDashboardVirtualMachines", "parameters": [ { "in": "query", - "name": "page", + "name": "platformId", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "pageSize", + "name": "regionId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "nodeId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "customerEmailContains", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "vmPage", "required": false, "schema": { "format": "int32", @@ -28554,22 +33581,16 @@ }, { "in": "query", - "name": "serviceStatus", + "name": "vmPageSize", "required": false, "schema": { - "default": "SERVICE_STATUS_UNSPECIFIED", - "enum": [ - "SERVICE_STATUS_UNSPECIFIED", - "SERVICE_STATUS_ONLINE", - "SERVICE_STATUS_OFFLINE", - "SERVICE_STATUS_MAINTENANCE" - ], - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "search", + "name": "vmtemplateId", "required": false, "schema": { "type": "string" @@ -28581,7 +33602,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPlatformsResponse" + "$ref": "#/components/schemas/v1ListDashboardVirtualMachinesResponse" } } }, @@ -28589,139 +33610,83 @@ } }, "tags": [ - "PlatformService" + "ProviderDashboardService" ] } }, - "/v1/platforms/{platformId}:AssignAgent": { - "post": { - "operationId": "PlatformService_AssignAgent", + "/v1/provider/held-payouts": { + "get": { + "operationId": "PayoutInvoiceService_ListHeldPayouts", "parameters": [ { - "in": "path", - "name": "platformId", - "required": true, + "in": "query", + "name": "page", + "required": false, "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlatformServiceAssignAgentBody" - } + "format": "int32", + "type": "integer" } }, - "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": "pageSize", + "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlatformServiceUnassignAgentBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListHeldPayoutsResponse" } } }, "description": "A successful response." } }, + "summary": "Paid client invoices whose payout to this provider is on hold, soonest release first.", "tags": [ - "PlatformService" + "PayoutInvoiceService" ] } }, - "/v1/provider-reviews": { + "/v1/provider/live-validations": { "get": { - "operationId": "ProviderReviewService_ListProviderReviews", + "operationId": "LiveValidationService_ListPlanLiveValidations", "parameters": [ { "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", + "name": "planId", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { - "description": "Multi-select star filter (e.g. [5,4]); empty means any stars.", - "explode": true, "in": "query", - "name": "starRatings", + "name": "search", "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.", "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", @@ -28734,35 +33699,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListProviderReviewsResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "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" + "$ref": "#/components/schemas/v1ListPlanLiveValidationsResponse" } } }, @@ -28770,29 +33707,19 @@ } }, "tags": [ - "ClientProviderReviewService" + "LiveValidationService" ] } }, - "/v1/provider-reviews/virtual-machines/{virtualMachineId}": { - "get": { - "operationId": "ClientProviderReviewService_GetClientReviewForVirtualMachine", - "parameters": [ - { - "in": "path", - "name": "virtualMachineId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "/v1/provider/manual-payout": { + "delete": { + "operationId": "ManualPayoutService_DeleteManualPayout", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetClientReviewForVirtualMachineResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -28800,29 +33727,17 @@ } }, "tags": [ - "ClientProviderReviewService" + "ManualPayoutService" ] - } - }, - "/v1/provider-reviews/{reviewId}": { - "delete": { - "operationId": "ClientProviderReviewService_DeleteClientReview", - "parameters": [ - { - "in": "path", - "name": "reviewId", - "required": true, - "schema": { - "type": "string" - } - } - ], + }, + "get": { + "operationId": "ManualPayoutService_GetManualPayout", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetManualPayoutResponse" } } }, @@ -28830,26 +33745,16 @@ } }, "tags": [ - "ClientProviderReviewService" + "ManualPayoutService" ] }, - "patch": { - "operationId": "ClientProviderReviewService_UpdateClientReview", - "parameters": [ - { - "in": "path", - "name": "reviewId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "post": { + "operationId": "ManualPayoutService_CreateManualPayout", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ClientProviderReviewServiceUpdateClientReviewBody" + "$ref": "#/components/schemas/v1CreateManualPayoutRequest" } } }, @@ -28860,7 +33765,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateClientReviewResponse" + "$ref": "#/components/schemas/v1CreateManualPayoutResponse" } } }, @@ -28868,18 +33773,37 @@ } }, "tags": [ - "ClientProviderReviewService" + "ManualPayoutService" ] } }, - "/v1/provider-reviews/{reviewId}/reply": { - "delete": { - "operationId": "ProviderReviewService_DeleteProviderReviewReply", + "/v1/provider/network/smtp-outbound-policies": { + "get": { + "operationId": "ProviderNetworkService_ListVirtualMachineSmtpOutboundPolicies", "parameters": [ { - "in": "path", - "name": "reviewId", - "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": "Case-insensitive substring match on hostname, customer contact email, or exact virtual machine UUID.", + "in": "query", + "name": "search", + "required": false, "schema": { "type": "string" } @@ -28890,7 +33814,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1DeleteProviderReviewReplyResponse" + "$ref": "#/components/schemas/v1ListVirtualMachineSmtpOutboundPoliciesResponse" } } }, @@ -28898,15 +33822,17 @@ } }, "tags": [ - "ProviderReviewService" + "ProviderNetworkService" ] - }, - "patch": { - "operationId": "ProviderReviewService_UpdateProviderReviewReply", + } + }, + "/v1/provider/network/smtp-outbound-policies/{virtualMachineId}": { + "put": { + "operationId": "ProviderNetworkService_UpdateVirtualMachineSmtpOutboundPolicy", "parameters": [ { "in": "path", - "name": "reviewId", + "name": "virtualMachineId", "required": true, "schema": { "type": "string" @@ -28917,7 +33843,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderReviewServiceUpdateProviderReviewReplyBody" + "$ref": "#/components/schemas/ProviderNetworkServiceUpdateVirtualMachineSmtpOutboundPolicyBody" } } }, @@ -28928,7 +33854,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateProviderReviewReplyResponse" + "$ref": "#/components/schemas/v1VirtualMachineSmtpOutboundPolicyView" } } }, @@ -28936,26 +33862,36 @@ } }, "tags": [ - "ProviderReviewService" + "ProviderNetworkService" ] - }, - "post": { - "operationId": "ProviderReviewService_CreateProviderReviewReply", - "parameters": [ - { - "in": "path", - "name": "reviewId", - "required": true, - "schema": { - "type": "string" - } + } + }, + "/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/ProviderReviewServiceCreateProviderReviewReplyBody" + "$ref": "#/components/schemas/v1UpdateSmtpOutboundProviderPolicyRequest" } } }, @@ -28966,7 +33902,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateProviderReviewReplyResponse" + "$ref": "#/components/schemas/v1GetSmtpOutboundProviderPolicyResponse" } } }, @@ -28974,19 +33910,19 @@ } }, "tags": [ - "ProviderReviewService" + "ProviderNetworkService" ] } }, - "/v1/provider/connect/account": { - "delete": { - "operationId": "ProviderConnectService_DisconnectConnectAccount", + "/v1/provider/onboarding/checklist": { + "get": { + "operationId": "ProviderOnboardingService_GetProviderOnboardingChecklist", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetProviderOnboardingChecklistResponse" } } }, @@ -28994,17 +33930,19 @@ } }, "tags": [ - "ProviderConnectService" + "ProviderOnboardingService" ] - }, + } + }, + "/v1/provider/payout-configuration": { "get": { - "operationId": "ProviderConnectService_GetConnectAccount", + "operationId": "PayoutConfigurationService_GetPayoutConfiguration", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetConnectAccountResponse" + "$ref": "#/components/schemas/v1GetPayoutConfigurationResponse" } } }, @@ -29012,16 +33950,16 @@ } }, "tags": [ - "ProviderConnectService" + "PayoutConfigurationService" ] }, - "post": { - "operationId": "ProviderConnectService_CreateConnectAccount", + "put": { + "operationId": "PayoutConfigurationService_UpdatePayoutConfiguration", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateConnectAccountRequest" + "$ref": "#/components/schemas/v1UpdatePayoutConfigurationRequest" } } }, @@ -29032,7 +33970,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateConnectAccountResponse" + "$ref": "#/components/schemas/v1GetPayoutConfigurationResponse" } } }, @@ -29040,193 +33978,210 @@ } }, "tags": [ - "ProviderConnectService" + "PayoutConfigurationService" ] } }, - "/v1/provider/connect/oauth:complete": { - "post": { - "operationId": "ProviderConnectService_CompleteConnectOAuth", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1CompleteConnectOAuthRequest" - } + "/v1/provider/payout-invoices": { + "get": { + "operationId": "PayoutInvoiceService_ListPayoutInvoices", + "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" + } + }, + { + "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" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CompleteConnectOAuthResponse" + "$ref": "#/components/schemas/v1ListPayoutInvoicesResponse" } } }, "description": "A successful response." } }, - "summary": "Completes Stripe Connect OAuth after Stripe redirects back with a code.", "tags": [ - "ProviderConnectService" + "PayoutInvoiceService" ] } }, - "/v1/provider/connect/oauth:start": { - "post": { - "operationId": "ProviderConnectService_StartConnectOAuth", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1StartConnectOAuthRequest" - } + "/v1/provider/payout-invoices/{id}": { + "get": { + "operationId": "PayoutInvoiceService_GetPayoutInvoice", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" } - }, - "required": true - }, + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1StartConnectOAuthResponse" + "$ref": "#/components/schemas/v1GetPayoutInvoiceResponse" } } }, "description": "A successful response." } }, - "summary": "Starts Stripe Connect OAuth so a provider can attach an existing Standard account.", "tags": [ - "ProviderConnectService" + "PayoutInvoiceService" ] } }, - "/v1/provider/connect/tax-registrations": { + "/v1/provider/plans/assignable-nodes": { "get": { - "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" - } + "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" } }, - "required": true - }, + { + "description": "Optional: set for edit existing plan. Empty when template_plan_id is used.", + "in": "query", + "name": "planId", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "regionId", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateConnectTaxRegistrationResponse" + "$ref": "#/components/schemas/v1ListAssignableNodesForPlanResponse" } } }, "description": "A successful response." } }, + "summary": "Nodes the provider may assign to a plan (catalog-eligible for tier/category).", "tags": [ - "ProviderConnectService" + "ProviderPlanService" ] } }, - "/v1/provider/connect/tax-registrations/{id}/expire": { - "post": { - "operationId": "ProviderConnectService_ExpireConnectTaxRegistration", + "/v1/provider/plans/{planId}/live-validation": { + "delete": { + "operationId": "LiveValidationService_DeletePlanLiveValidation", "parameters": [ { "in": "path", - "name": "id", + "name": "planId", "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" - } - } - }, - "description": "A successful response." + { + "in": "query", + "name": "nodeId", + "required": false, + "schema": { + "type": "string" + } } - }, - "tags": [ - "ProviderConnectService" - ] - } - }, - "/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" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, "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" + "LiveValidationService" ] - } - }, - "/v1/provider/connect/tax-settings": { + }, "get": { - "operationId": "ProviderConnectService_GetConnectTaxSettings", + "operationId": "LiveValidationService_GetPlanLiveValidation", + "parameters": [ + { + "in": "path", + "name": "planId", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "nodeId", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetConnectTaxSettingsResponse" + "$ref": "#/components/schemas/v1GetPlanLiveValidationResponse" } } }, @@ -29234,16 +34189,26 @@ } }, "tags": [ - "ProviderConnectService" + "LiveValidationService" ] }, - "put": { - "operationId": "ProviderConnectService_UpdateConnectTaxSettings", + "post": { + "operationId": "LiveValidationService_StartPlanLiveValidation", + "parameters": [ + { + "in": "path", + "name": "planId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateConnectTaxSettingsRequest" + "$ref": "#/components/schemas/LiveValidationServiceStartPlanLiveValidationBody" } } }, @@ -29254,86 +34219,54 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateConnectTaxSettingsResponse" - } - } - }, - "description": "A successful response." - } - }, - "tags": [ - "ProviderConnectService" - ] - } - }, - "/v1/provider/customer-stats": { - "get": { - "operationId": "ProviderCustomerService_GetProviderCustomerStats", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetProviderCustomerStatsResponse" + "$ref": "#/components/schemas/v1StartPlanLiveValidationResponse" } } }, "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" + "LiveValidationService" ] } }, - "/v1/provider/customers": { + "/v1/provider/plans/{planId}/live-validation/benchmarks": { "get": { - "operationId": "ProviderCustomerService_ListProviderCustomers", + "operationId": "LiveValidationService_ListPlanLiveValidationBenchmarks", "parameters": [ { - "description": "0-based page (default 0).", - "in": "query", - "name": "page", - "required": false, + "in": "path", + "name": "planId", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { - "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", + "name": "nodeId", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { - "description": "Case-insensitive match on client organization name or any member email (owners/members via roles & groups).", "in": "query", - "name": "search", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { - "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": "activityFilter", + "name": "pageSize", "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" + "format": "int32", + "type": "integer" } } ], @@ -29342,7 +34275,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListProviderCustomersResponse" + "$ref": "#/components/schemas/v1ListPlanLiveValidationBenchmarksResponse" } } }, @@ -29350,17 +34283,17 @@ } }, "tags": [ - "ProviderCustomerService" + "LiveValidationService" ] } }, - "/v1/provider/customers/{clientOrganizationId}": { + "/v1/provider/plans/{planId}/live-validation/nodes": { "get": { - "operationId": "ProviderCustomerService_GetProviderCustomer", + "operationId": "LiveValidationService_ListEligibleNodesForPlan", "parameters": [ { "in": "path", - "name": "clientOrganizationId", + "name": "planId", "required": true, "schema": { "type": "string" @@ -29372,7 +34305,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetProviderCustomerResponse" + "$ref": "#/components/schemas/v1ListEligibleNodesForPlanResponse" } } }, @@ -29380,22 +34313,38 @@ } }, "tags": [ - "ProviderCustomerService" + "LiveValidationService" ] } }, - "/v1/provider/customers/{clientOrganizationId}/assets": { + "/v1/provider/preflight-checks": { "get": { - "operationId": "ProviderCustomerService_ListProviderCustomerAssets", + "operationId": "PreflightService_ListPreflightChecks", "parameters": [ { - "in": "path", - "name": "clientOrganizationId", - "required": true, + "in": "query", + "name": "planCode", + "required": false, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "planId", + "required": false, "schema": { "type": "string" } }, + { + "in": "query", + "name": "issuesOnly", + "required": false, + "schema": { + "type": "boolean" + } + }, { "in": "query", "name": "page", @@ -29406,7 +34355,6 @@ } }, { - "description": "Same rules as ListProviderCustomers.page_size.", "in": "query", "name": "pageSize", "required": false, @@ -29414,54 +34362,75 @@ "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": "search", + "name": "startDate", "required": false, "schema": { + "format": "date-time", "type": "string" } }, { + "description": "End date for revenue calculation (inclusive)", "in": "query", - "name": "assetType", + "name": "endDate", "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" - ], + "format": "date-time", "type": "string" } }, { - "description": "When set (not UNSPECIFIED), only assets matching this activity status are returned.", + "description": "Filter by plan ID (optional)", "in": "query", - "name": "activityStatus", + "name": "planId", "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": "When set to a non-empty UUID, only assets whose VM node is in this region are returned.", + "description": "Filter by client organization ID (optional)", "in": "query", - "name": "regionId", + "name": "clientOrganizationId", "required": false, "schema": { "type": "string" } + }, + { + "description": "Include pending/processing payouts in calculations (default: true)", + "in": "query", + "name": "includePending", + "required": false, + "schema": { + "type": "boolean" + } } ], "responses": { @@ -29469,7 +34438,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListProviderCustomerAssetsResponse" + "$ref": "#/components/schemas/v1GetProviderRevenueResponse" } } }, @@ -29477,29 +34446,19 @@ } }, "tags": [ - "ProviderCustomerService" + "PayoutInvoiceService" ] } }, - "/v1/provider/customers/{clientOrganizationId}/billing": { + "/v1/provider/storefront": { "get": { - "operationId": "ProviderCustomerService_GetProviderCustomerBilling", - "parameters": [ - { - "in": "path", - "name": "clientOrganizationId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "ProviderStorefrontService_GetMyStorefront", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetProviderCustomerBillingResponse" + "$ref": "#/components/schemas/v1GetMyStorefrontResponse" } } }, @@ -29507,36 +34466,16 @@ } }, "tags": [ - "ProviderCustomerService" + "ProviderStorefrontService" ] - } - }, - "/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" - } - } - ], + }, + "patch": { + "operationId": "ProviderStorefrontService_UpdateMyStorefront", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderCustomerServiceRestartProviderCustomerVirtualMachineBody" + "$ref": "#/components/schemas/v1UpdateMyStorefrontRequest" } } }, @@ -29547,7 +34486,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VirtualMachine" + "$ref": "#/components/schemas/v1GetMyStorefrontResponse" } } }, @@ -29555,47 +34494,65 @@ } }, "tags": [ - "ProviderCustomerService" + "ProviderStorefrontService" ] } }, - "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:start": { + "/v1/provider/storefront/opt-in": { "post": { - "operationId": "ProviderCustomerService_StartProviderCustomerVirtualMachine", - "parameters": [ - { - "in": "path", - "name": "clientOrganizationId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "virtualMachineId", - "required": true, - "schema": { - "type": "string" - } + "operationId": "ProviderStorefrontService_OptInStorefront", + "requestBody": { + "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1GetMyStorefrontResponse" + } + } + }, + "description": "A successful response." } - ], + }, + "tags": [ + "ProviderStorefrontService" + ] + } + }, + "/v1/provider/storefront/opt-out": { + "post": { + "operationId": "ProviderStorefrontService_OptOutStorefront", "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProviderCustomerServiceStartProviderCustomerVirtualMachineBody" + "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1GetMyStorefrontResponse" + } } - } - }, - "required": true + }, + "description": "A successful response." + } }, + "tags": [ + "ProviderStorefrontService" + ] + } + }, + "/v1/provider/storefront/preview": { + "get": { + "operationId": "ProviderStorefrontService_PreviewMyStorefront", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VirtualMachine" + "$ref": "#/components/schemas/v1PreviewMyStorefrontResponse" } } }, @@ -29603,36 +34560,59 @@ } }, "tags": [ - "ProviderCustomerService" + "ProviderStorefrontService" ] } }, - "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:stop": { + "/v1/provider/storefront/submit": { "post": { - "operationId": "ProviderCustomerService_StopProviderCustomerVirtualMachine", - "parameters": [ - { - "in": "path", - "name": "clientOrganizationId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "virtualMachineId", - "required": true, - "schema": { - "type": "string" - } + "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." + } + }, + "tags": [ + "ProviderTicketNotificationService" + ] + }, + "put": { + "operationId": "ProviderTicketNotificationService_UpdateProviderTicketNotificationPolicy", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderCustomerServiceStopProviderCustomerVirtualMachineBody" + "$ref": "#/components/schemas/v1UpdateProviderTicketNotificationPolicyRequest" } } }, @@ -29643,7 +34623,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VirtualMachine" + "$ref": "#/components/schemas/v1GetProviderTicketNotificationPolicyResponse" } } }, @@ -29651,95 +34631,99 @@ } }, "tags": [ - "ProviderCustomerService" + "ProviderTicketNotificationService" ] } }, - "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:suspend": { + "/v1/provider/ticket-notification-policy:send-test": { "post": { - "operationId": "ProviderCustomerService_SuspendProviderCustomerVirtualMachine", - "parameters": [ - { - "in": "path", - "name": "clientOrganizationId", - "required": true, - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "virtualMachineId", - "required": true, - "schema": { - "type": "string" - } - } - ], + "operationId": "ProviderTicketNotificationService_SendProviderTicketNotificationTest", "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProviderCustomerServiceSuspendProviderCustomerVirtualMachineBody" + "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1SuccessResponse" + } } - } - }, - "required": true + }, + "description": "A successful response." + } }, + "tags": [ + "ProviderTicketNotificationService" + ] + } + }, + "/v1/public/stats": { + "get": { + "operationId": "MarketplaceService_GetPublicPlatformStats", "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VirtualMachine" + "$ref": "#/components/schemas/v1GetPublicPlatformStatsResponse" } } }, "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": [ - "ProviderCustomerService" + "MarketplaceService" ] } }, - "/v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:unblock": { - "post": { - "operationId": "ProviderCustomerService_UnblockProviderCustomerVirtualMachine", + "/v1/public/storefronts": { + "get": { + "operationId": "MarketplaceService_ListPublicStorefronts", "parameters": [ { - "in": "path", - "name": "clientOrganizationId", - "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": "path", - "name": "virtualMachineId", - "required": true, + "in": "query", + "name": "filterCountry", + "required": false, "schema": { "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProviderCustomerServiceUnblockProviderCustomerVirtualMachineBody" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VirtualMachine" + "$ref": "#/components/schemas/v1ListPublicStorefrontsResponse" } } }, @@ -29747,39 +34731,29 @@ } }, "tags": [ - "ProviderCustomerService" + "MarketplaceService" ] } }, - "/v1/provider/customers/{clientOrganizationId}:block-purchases": { - "post": { - "operationId": "ProviderCustomerService_BlockProviderCustomerPurchases", + "/v1/public/storefronts/by-id/{providerId}": { + "get": { + "operationId": "MarketplaceService_GetPublicStorefrontByID", "parameters": [ { "in": "path", - "name": "clientOrganizationId", + "name": "providerId", "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/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetPublicStorefrontResponse" } } }, @@ -29787,39 +34761,29 @@ } }, "tags": [ - "ProviderCustomerService" + "MarketplaceService" ] } }, - "/v1/provider/customers/{clientOrganizationId}:unblock-purchases": { - "post": { - "operationId": "ProviderCustomerService_UnblockProviderCustomerPurchases", + "/v1/public/storefronts/{slug}": { + "get": { + "operationId": "MarketplaceService_GetPublicStorefront", "parameters": [ { "in": "path", - "name": "clientOrganizationId", + "name": "slug", "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/v1SuccessResponse" + "$ref": "#/components/schemas/v1GetPublicStorefrontResponse" } } }, @@ -29827,17 +34791,17 @@ } }, "tags": [ - "ProviderCustomerService" + "MarketplaceService" ] } }, - "/v1/provider/dashboard/addon-catalog-stats": { + "/v1/refunds": { "get": { - "operationId": "ProviderDashboardService_ListDashboardAddonCatalogStats", + "operationId": "RefundService_ListRefunds", "parameters": [ { "in": "query", - "name": "addonSearch", + "name": "paymentId", "required": false, "schema": { "type": "string" @@ -29845,7 +34809,7 @@ }, { "in": "query", - "name": "addonTypeFilter", + "name": "invoiceId", "required": false, "schema": { "type": "string" @@ -29853,9 +34817,18 @@ }, { "in": "query", - "name": "addonBillingTypeFilter", + "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" } }, @@ -29883,29 +34856,29 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDashboardAddonCatalogStatsResponse" + "$ref": "#/components/schemas/v1ListRefundsResponse" } } }, "description": "A successful response." } }, + "summary": "ListRefunds lists refunds for a payment, invoice, or organization", "tags": [ - "ProviderDashboardService" + "RefundService" ] } }, - "/v1/provider/dashboard/asset-sales-timeseries": { + "/v1/refunds/{refundId}": { "get": { - "operationId": "ProviderDashboardService_GetDashboardAssetSalesTimeseries", + "operationId": "RefundService_GetRefund", "parameters": [ { - "in": "query", - "name": "rangeDays", - "required": false, + "in": "path", + "name": "refundId", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } } ], @@ -29914,25 +34887,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetDashboardAssetSalesTimeseriesResponse" + "$ref": "#/components/schemas/v1GetRefundResponse" } } }, "description": "A successful response." } }, + "summary": "GetRefund retrieves a single refund with payment and invoice details", "tags": [ - "ProviderDashboardService" + "RefundService" ] } }, - "/v1/provider/dashboard/billing-sales": { + "/v1/regions": { "get": { - "operationId": "ProviderDashboardService_GetDashboardBillingSales", + "operationId": "RegionService_ListRegions", "parameters": [ { "in": "query", - "name": "rangeDays", + "name": "page", "required": false, "schema": { "format": "int32", @@ -29941,16 +34915,7 @@ }, { "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", + "name": "pageSize", "required": false, "schema": { "format": "int32", @@ -29959,17 +34924,15 @@ }, { "in": "query", - "name": "revenueByCustomerPageSize", + "name": "search", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { - "description": "Case-insensitive substring match on contact email, organization id, or organization name.", "in": "query", - "name": "revenueByCustomerEmailFilter", + "name": "platformId", "required": false, "schema": { "type": "string" @@ -29981,7 +34944,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetDashboardBillingSalesResponse" + "$ref": "#/components/schemas/v1ListRegionsResponse" } } }, @@ -29989,21 +34952,48 @@ } }, "tags": [ - "ProviderDashboardService" + "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" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "RegionService" ] } }, - "/v1/provider/dashboard/customer-acquisition-timeseries": { - "get": { - "operationId": "ProviderDashboardService_GetDashboardCustomerAcquisitionTimeseries", + "/v1/regions/{id}": { + "delete": { + "operationId": "RegionService_DeleteRegion", "parameters": [ { - "in": "query", - "name": "rangeDays", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } } ], @@ -30012,7 +35002,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetDashboardCustomerAcquisitionTimeseriesResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -30020,47 +35010,19 @@ } }, "tags": [ - "ProviderDashboardService" + "RegionService" ] - } - }, - "/v1/provider/dashboard/infrastructure": { + }, "get": { - "operationId": "ProviderDashboardService_ListDashboardInfrastructure", + "operationId": "RegionService_GetRegion", "parameters": [ { - "in": "query", - "name": "platformId", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "regionId", - "required": false, + "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" - } } ], "responses": { @@ -30068,7 +35030,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDashboardInfrastructureResponse" + "$ref": "#/components/schemas/v1Region" } } }, @@ -30076,39 +35038,22 @@ } }, "tags": [ - "ProviderDashboardService" + "RegionService" ] } }, - "/v1/provider/dashboard/ipam": { + "/v1/registrar/admin/balance": { "get": { - "operationId": "ProviderDashboardService_ListDashboardIpam", + "operationId": "RegistrarAdminService_GetRegistrarBalance", "parameters": [ { + "description": "Empty = configured default provider.", "in": "query", - "name": "networkId", + "name": "provider", "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": { @@ -30116,7 +35061,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDashboardIpamResponse" + "$ref": "#/components/schemas/v1GetRegistrarBalanceResponse" } } }, @@ -30124,68 +35069,93 @@ } }, "tags": [ - "ProviderDashboardService" + "RegistrarAdminService" ] } }, - "/v1/provider/dashboard/ipam/assignments": { + "/v1/registrar/admin/domains": { "get": { - "operationId": "ProviderDashboardService_ListDashboardIpamAssignments", + "operationId": "RegistrarAdminService_ListAllDomains", "parameters": [ { "in": "query", - "name": "networkId", + "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" } }, { + "explode": true, "in": "query", - "name": "platformId", + "name": "states", "required": false, "schema": { - "type": "string" + "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" } }, { "in": "query", - "name": "page", + "name": "search", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "pageSize", + "name": "organizationId", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { + "explode": true, "in": "query", - "name": "ipFamily", + "name": "holds", "required": false, "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" + "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" } } ], @@ -30194,7 +35164,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDashboardIpamAssignmentsResponse" + "$ref": "#/components/schemas/v1ListAllDomainsResponse" } } }, @@ -30202,83 +35172,80 @@ } }, "tags": [ - "ProviderDashboardService" + "RegistrarAdminService" ] } }, - "/v1/provider/dashboard/plan-subscription-stats": { - "get": { - "operationId": "ProviderDashboardService_ListDashboardPlanSubscriptionStats", + "/v1/registrar/admin/domains/{name}/client-hold": { + "put": { + "operationId": "RegistrarAdminService_SetClientHold", "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": "name", + "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/RegistrarAdminServiceSetClientHoldBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDashboardPlanSubscriptionStatsResponse" + "$ref": "#/components/schemas/v1AdminRegisteredDomain" } } }, "description": "A successful response." } }, + "summary": "Registry clientHold (suspends resolution).", "tags": [ - "ProviderDashboardService" + "RegistrarAdminService" ] } }, - "/v1/provider/dashboard/plans-tab-stats": { - "get": { - "operationId": "ProviderDashboardPlansTabService_GetDashboardPlansTabStats", + "/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 + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ProviderDashboardPlansTabStats" + "$ref": "#/components/schemas/v1AdminRegisteredDomain" } } }, @@ -30286,19 +35253,39 @@ } }, "tags": [ - "ProviderDashboardPlansTabService" + "RegistrarAdminService" ] } }, - "/v1/provider/dashboard/summary": { - "get": { - "operationId": "ProviderDashboardService_GetDashboardSummary", + "/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 + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetDashboardSummaryResponse" + "$ref": "#/components/schemas/v1AdminRegisteredDomain" } } }, @@ -30306,39 +35293,39 @@ } }, "tags": [ - "ProviderDashboardService" + "RegistrarAdminService" ] } }, - "/v1/provider/dashboard/tickets/statistics": { - "get": { - "operationId": "ProviderDashboardService_ListDashboardTicketStatistics", + "/v1/registrar/admin/domains/{name}/move": { + "post": { + "operationId": "RegistrarAdminService_MoveDomainToOrganization", "parameters": [ { - "in": "query", - "name": "fromTime", - "required": false, - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "in": "query", - "name": "toTime", - "required": false, + "in": "path", + "name": "name", + "required": true, "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/v1ListDashboardTicketStatisticsResponse" + "$ref": "#/components/schemas/v1AdminRegisteredDomain" } } }, @@ -30346,49 +35333,96 @@ } }, "tags": [ - "ProviderDashboardService" + "RegistrarAdminService" ] } }, - "/v1/provider/dashboard/virtual-machines": { - "get": { - "operationId": "ProviderDashboardService_ListDashboardVirtualMachines", + "/v1/registrar/admin/domains/{name}/sync": { + "post": { + "operationId": "RegistrarAdminService_SyncDomain", "parameters": [ { - "in": "query", - "name": "platformId", - "required": false, + "in": "path", + "name": "name", + "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "regionId", - "required": false, - "schema": { - "type": "string" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegistrarAdminServiceSyncDomainBody" + } } }, - { - "in": "query", - "name": "nodeId", - "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" + } } }, + "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": "customerEmailContains", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "vmPage", + "name": "pageSize", "required": false, "schema": { "format": "int32", @@ -30396,17 +35430,34 @@ } }, { + "explode": true, "in": "query", - "name": "vmPageSize", + "name": "states", "required": false, "schema": { - "format": "int32", - "type": "integer" + "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" } }, { "in": "query", - "name": "vmtemplateId", + "name": "organizationId", "required": false, "schema": { "type": "string" @@ -30418,7 +35469,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListDashboardVirtualMachinesResponse" + "$ref": "#/components/schemas/v1ListAllDomainOrdersResponse" } } }, @@ -30426,87 +35477,87 @@ } }, "tags": [ - "ProviderDashboardService" + "RegistrarAdminService" ] } }, - "/v1/provider/held-payouts": { - "get": { - "operationId": "PayoutInvoiceService_ListHeldPayouts", + "/v1/registrar/admin/orders/{id}/review": { + "post": { + "operationId": "RegistrarAdminService_ReviewDomainOrder", "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/RegistrarAdminServiceReviewDomainOrderBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListHeldPayoutsResponse" + "$ref": "#/components/schemas/v1AdminDomainOrder" } } }, "description": "A successful response." } }, - "summary": "Paid client invoices whose payout to this provider is on hold, soonest release first.", + "summary": "Approve or decline an order in in_review.", "tags": [ - "PayoutInvoiceService" + "RegistrarAdminService" ] } }, - "/v1/provider/live-validations": { + "/v1/registrar/admin/tlds": { "get": { - "operationId": "LiveValidationService_ListPlanLiveValidations", + "operationId": "RegistrarAdminService_ListTldOfferings", "parameters": [ { "in": "query", - "name": "planId", + "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" } }, { "in": "query", - "name": "page", + "name": "provider", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } }, { "in": "query", - "name": "pageSize", + "name": "search", "required": false, "schema": { - "format": "int32", - "type": "integer" + "type": "string" } } ], @@ -30515,7 +35566,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPlanLiveValidationsResponse" + "$ref": "#/components/schemas/v1ListTldOfferingsResponse" } } }, @@ -30523,54 +35574,90 @@ } }, "tags": [ - "LiveValidationService" + "RegistrarAdminService" ] } }, - "/v1/provider/manual-payout": { - "delete": { - "operationId": "ManualPayoutService_DeleteManualPayout", + "/v1/registrar/admin/tlds/sync": { + "post": { + "operationId": "RegistrarAdminService_SyncTldCatalog", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1SyncTldCatalogRequest" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1SyncTldCatalogResponse" } } }, "description": "A successful response." } }, - "tags": [ - "ManualPayoutService" - ] - }, - "get": { - "operationId": "ManualPayoutService_GetManualPayout", + "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 + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetManualPayoutResponse" + "$ref": "#/components/schemas/v1TldOffering" } } }, "description": "A successful response." } }, + "summary": "Enable/disable, feature, block, override price.", "tags": [ - "ManualPayoutService" + "RegistrarAdminService" ] - }, + } + }, + "/v1/registrar/check": { "post": { - "operationId": "ManualPayoutService_CreateManualPayout", + "operationId": "DomainSearchService_CheckDomains", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateManualPayoutRequest" + "$ref": "#/components/schemas/v1CheckDomainsRequest" } } }, @@ -30581,21 +35668,67 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateManualPayoutResponse" + "$ref": "#/components/schemas/v1CheckDomainsResponse" } } }, "description": "A successful response." } }, + "summary": "Live, uncached availability (add-to-cart and checkout). Login required.", "tags": [ - "ManualPayoutService" + "DomainSearchService" ] } }, - "/v1/provider/network/smtp-outbound-policies": { + "/v1/registrar/contact-schema": { "get": { - "operationId": "ProviderNetworkService_ListVirtualMachineSmtpOutboundPolicies", + "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" + } + } + }, + "description": "A successful response." + } + }, + "summary": "Per-country rules and base field specs for the client-side (zod) schema.", + "tags": [ + "DomainContactService" + ] + } + }, + "/v1/registrar/contacts": { + "get": { + "operationId": "DomainContactService_ListDomainContacts", "parameters": [ { "in": "query", @@ -30616,7 +35749,6 @@ } }, { - "description": "Case-insensitive substring match on hostname, customer contact email, or exact virtual machine UUID.", "in": "query", "name": "search", "required": false, @@ -30630,7 +35762,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListVirtualMachineSmtpOutboundPoliciesResponse" + "$ref": "#/components/schemas/v1ListDomainContactsResponse" } } }, @@ -30638,28 +35770,16 @@ } }, "tags": [ - "ProviderNetworkService" + "DomainContactService" ] - } - }, - "/v1/provider/network/smtp-outbound-policies/{virtualMachineId}": { - "put": { - "operationId": "ProviderNetworkService_UpdateVirtualMachineSmtpOutboundPolicy", - "parameters": [ - { - "in": "path", - "name": "virtualMachineId", - "required": true, - "schema": { - "type": "string" - } - } - ], + }, + "post": { + "operationId": "DomainContactService_CreateDomainContact", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProviderNetworkServiceUpdateVirtualMachineSmtpOutboundPolicyBody" + "$ref": "#/components/schemas/v1CreateDomainContactRequest" } } }, @@ -30670,7 +35790,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1VirtualMachineSmtpOutboundPolicyView" + "$ref": "#/components/schemas/v1DomainContact" } } }, @@ -30678,36 +35798,18 @@ } }, "tags": [ - "ProviderNetworkService" + "DomainContactService" ] } }, - "/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", + "/v1/registrar/contacts/validate": { + "post": { + "operationId": "DomainContactService_ValidateDomainContact", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateSmtpOutboundProviderPolicyRequest" + "$ref": "#/components/schemas/v1ValidateDomainContactRequest" } } }, @@ -30718,27 +35820,38 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetSmtpOutboundProviderPolicyResponse" + "$ref": "#/components/schemas/v1ValidateDomainContactResponse" } } }, "description": "A successful response." } }, + "summary": "Dry run for forms: errors, warnings and normalized values.", "tags": [ - "ProviderNetworkService" + "DomainContactService" ] } }, - "/v1/provider/onboarding/checklist": { - "get": { - "operationId": "ProviderOnboardingService_GetProviderOnboardingChecklist", + "/v1/registrar/contacts/{id}": { + "delete": { + "operationId": "DomainContactService_DeleteDomainContact", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetProviderOnboardingChecklistResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -30746,19 +35859,27 @@ } }, "tags": [ - "ProviderOnboardingService" + "DomainContactService" ] - } - }, - "/v1/provider/payout-configuration": { + }, "get": { - "operationId": "PayoutConfigurationService_GetPayoutConfiguration", + "operationId": "DomainContactService_GetDomainContact", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPayoutConfigurationResponse" + "$ref": "#/components/schemas/v1DomainContact" } } }, @@ -30766,16 +35887,26 @@ } }, "tags": [ - "PayoutConfigurationService" + "DomainContactService" ] }, "put": { - "operationId": "PayoutConfigurationService_UpdatePayoutConfiguration", + "operationId": "DomainContactService_UpdateDomainContact", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdatePayoutConfigurationRequest" + "$ref": "#/components/schemas/DomainContactServiceUpdateDomainContactBody" } } }, @@ -30786,7 +35917,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPayoutConfigurationResponse" + "$ref": "#/components/schemas/v1UpdateDomainContactResponse" } } }, @@ -30794,13 +35925,13 @@ } }, "tags": [ - "PayoutConfigurationService" + "DomainContactService" ] } }, - "/v1/provider/payout-invoices": { + "/v1/registrar/domains": { "get": { - "operationId": "PayoutInvoiceService_ListPayoutInvoices", + "operationId": "RegisteredDomainService_ListRegisteredDomains", "parameters": [ { "in": "query", @@ -30821,22 +35952,57 @@ } }, { - "description": "Filter by payout status", + "explode": true, "in": "query", - "name": "status", + "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.", + "in": "query", + "name": "search", "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": { @@ -30844,7 +36010,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPayoutInvoicesResponse" + "$ref": "#/components/schemas/v1ListRegisteredDomainsResponse" } } }, @@ -30852,17 +36018,17 @@ } }, "tags": [ - "PayoutInvoiceService" + "RegisteredDomainService" ] } }, - "/v1/provider/payout-invoices/{id}": { + "/v1/registrar/domains/{name}": { "get": { - "operationId": "PayoutInvoiceService_GetPayoutInvoice", + "operationId": "RegisteredDomainService_GetRegisteredDomain", "parameters": [ { "in": "path", - "name": "id", + "name": "name", "required": true, "schema": { "type": "string" @@ -30874,7 +36040,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPayoutInvoiceResponse" + "$ref": "#/components/schemas/v1RegisteredDomain" } } }, @@ -30882,86 +36048,120 @@ } }, "tags": [ - "PayoutInvoiceService" + "RegisteredDomainService" ] } }, - "/v1/provider/plans/assignable-nodes": { - "get": { - "operationId": "ProviderPlanService_ListAssignableNodesForPlan", + "/v1/registrar/domains/{name}/auth-code": { + "post": { + "operationId": "RegisteredDomainService_GetDomainAuthCode", "parameters": [ { - "description": "Optional: set for create-from-template. Empty when plan_id is used.", - "in": "query", - "name": "templatePlanId", - "required": false, + "in": "path", + "name": "name", + "required": true, "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" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisteredDomainServiceGetDomainAuthCodeBody" + } } }, + "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": "query", - "name": "regionId", - "required": false, + "in": "path", + "name": "name", + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisteredDomainServiceResetDomainAuthCodeBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListAssignableNodesForPlanResponse" + "$ref": "#/components/schemas/v1GetDomainAuthCodeResponse" } } }, "description": "A successful response." } }, - "summary": "Nodes the provider may assign to a plan (catalog-eligible for tier/category).", "tags": [ - "ProviderPlanService" + "RegisteredDomainService" ] } }, - "/v1/provider/plans/{planId}/live-validation": { - "delete": { - "operationId": "LiveValidationService_DeletePlanLiveValidation", + "/v1/registrar/domains/{name}/auto-renew": { + "put": { + "operationId": "RegisteredDomainService_SetDomainAutoRenew", "parameters": [ { "in": "path", - "name": "planId", + "name": "name", "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "nodeId", - "required": false, - "schema": { - "type": "string" - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisteredDomainServiceSetDomainAutoRenewBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1RegisteredDomain" } } }, @@ -30969,51 +36169,99 @@ } }, "tags": [ - "LiveValidationService" + "RegisteredDomainService" ] - }, - "get": { - "operationId": "LiveValidationService_GetPlanLiveValidation", + } + }, + "/v1/registrar/domains/{name}/contacts": { + "put": { + "operationId": "RegisteredDomainService_UpdateDomainContacts", "parameters": [ { "in": "path", - "name": "planId", + "name": "name", "required": true, "schema": { "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisteredDomainServiceUpdateDomainContactsBody" + } + } }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1UpdateDomainContactsResponse" + } + } + }, + "description": "A successful response." + } + }, + "summary": "May start the change-of-registrant flow.", + "tags": [ + "RegisteredDomainService" + ] + } + }, + "/v1/registrar/domains/{name}/delete": { + "post": { + "operationId": "RegisteredDomainService_DeleteRegisteredDomain", + "parameters": [ { - "in": "query", - "name": "nodeId", - "required": false, + "in": "path", + "name": "name", + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisteredDomainServiceDeleteRegisteredDomainBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPlanLiveValidationResponse" + "$ref": "#/components/schemas/v1DeleteRegisteredDomainResponse" } } }, "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": [ - "LiveValidationService" + "RegisteredDomainService" ] - }, - "post": { - "operationId": "LiveValidationService_StartPlanLiveValidation", + } + }, + "/v1/registrar/domains/{name}/dnssec": { + "put": { + "operationId": "RegisteredDomainService_SetDomainDnssec", "parameters": [ { "in": "path", - "name": "planId", + "name": "name", "required": true, "schema": { "type": "string" @@ -31024,7 +36272,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LiveValidationServiceStartPlanLiveValidationBody" + "$ref": "#/components/schemas/RegisteredDomainServiceSetDomainDnssecBody" } } }, @@ -31035,25 +36283,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1StartPlanLiveValidationResponse" + "$ref": "#/components/schemas/v1RegisteredDomain" } } }, "description": "A successful response." } }, + "summary": "Mode + custom keys.", "tags": [ - "LiveValidationService" + "RegisteredDomainService" ] } }, - "/v1/provider/plans/{planId}/live-validation/benchmarks": { + "/v1/registrar/domains/{name}/events": { "get": { - "operationId": "LiveValidationService_ListPlanLiveValidationBenchmarks", + "operationId": "RegisteredDomainService_ListDomainEvents", "parameters": [ { "in": "path", - "name": "planId", + "name": "name", "required": true, "schema": { "type": "string" @@ -31061,15 +36310,16 @@ }, { "in": "query", - "name": "nodeId", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { "in": "query", - "name": "page", + "name": "pageSize", "required": false, "schema": { "format": "int32", @@ -31077,12 +36327,48 @@ } }, { + "explode": true, "in": "query", - "name": "pageSize", + "name": "kinds", "required": false, "schema": { - "format": "int32", - "type": "integer" + "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" } } ], @@ -31091,7 +36377,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPlanLiveValidationBenchmarksResponse" + "$ref": "#/components/schemas/v1ListDomainEventsResponse" } } }, @@ -31099,17 +36385,17 @@ } }, "tags": [ - "LiveValidationService" + "RegisteredDomainService" ] } }, - "/v1/provider/plans/{planId}/live-validation/nodes": { + "/v1/registrar/domains/{name}/glue": { "get": { - "operationId": "LiveValidationService_ListEligibleNodesForPlan", + "operationId": "RegisteredDomainService_ListDomainGlueRecords", "parameters": [ { "in": "path", - "name": "planId", + "name": "name", "required": true, "schema": { "type": "string" @@ -31121,7 +36407,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListEligibleNodesForPlanResponse" + "$ref": "#/components/schemas/v1ListDomainGlueRecordsResponse" } } }, @@ -31129,55 +36415,29 @@ } }, "tags": [ - "LiveValidationService" + "RegisteredDomainService" ] } }, - "/v1/provider/preflight-checks": { - "get": { - "operationId": "PreflightService_ListPreflightChecks", + "/v1/registrar/domains/{name}/glue/{host}": { + "delete": { + "operationId": "RegisteredDomainService_DeleteDomainGlueRecord", "parameters": [ { - "in": "query", - "name": "planCode", - "required": false, + "in": "path", + "name": "name", + "required": true, "schema": { "type": "string" } }, { - "in": "query", - "name": "planId", - "required": false, + "in": "path", + "name": "host", + "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "issuesOnly", - "required": false, - "schema": { - "type": "boolean" - } - }, - { - "in": "query", - "name": "page", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } - }, - { - "in": "query", - "name": "pageSize", - "required": false, - "schema": { - "format": "int32", - "type": "integer" - } } ], "responses": { @@ -31185,7 +36445,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPreflightChecksResponse" + "$ref": "#/components/schemas/v1SuccessResponse" } } }, @@ -31193,59 +36453,84 @@ } }, "tags": [ - "PreflightService" + "RegisteredDomainService" ] - } - }, - "/v1/provider/revenue": { - "get": { - "operationId": "PayoutInvoiceService_GetProviderRevenue", + }, + "put": { + "operationId": "RegisteredDomainService_UpsertDomainGlueRecord", "parameters": [ { - "description": "Start date for revenue calculation (inclusive)", - "in": "query", - "name": "startDate", - "required": false, + "in": "path", + "name": "name", + "required": true, "schema": { - "format": "date-time", "type": "string" } }, { - "description": "End date for revenue calculation (inclusive)", - "in": "query", - "name": "endDate", - "required": false, + "in": "path", + "name": "host", + "required": true, "schema": { - "format": "date-time", "type": "string" } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisteredDomainServiceUpsertDomainGlueRecordBody" + } + } }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/v1DomainGlueRecord" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "RegisteredDomainService" + ] + } + }, + "/v1/registrar/domains/{name}/invoices": { + "get": { + "operationId": "RegisteredDomainService_ListDomainInvoices", + "parameters": [ { - "description": "Filter by plan ID (optional)", - "in": "query", - "name": "planId", - "required": false, + "in": "path", + "name": "name", + "required": true, "schema": { "type": "string" } }, { - "description": "Filter by client organization ID (optional)", "in": "query", - "name": "clientOrganizationId", + "name": "page", "required": false, "schema": { - "type": "string" + "format": "int32", + "type": "integer" } }, { - "description": "Include pending/processing payouts in calculations (default: true)", "in": "query", - "name": "includePending", + "name": "pageSize", "required": false, "schema": { - "type": "boolean" + "format": "int32", + "type": "integer" } } ], @@ -31254,44 +36539,78 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetProviderRevenueResponse" + "$ref": "#/components/schemas/v1ListDomainInvoicesResponse" } } }, "description": "A successful response." } }, + "summary": "Billing tab: paid invoices covering the domain (checkout orders and\nautomatic renewals, which have no order). Newest first.", "tags": [ - "PayoutInvoiceService" + "RegisteredDomainService" ] } }, - "/v1/provider/storefront": { - "get": { - "operationId": "ProviderStorefrontService_GetMyStorefront", + "/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 + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetMyStorefrontResponse" + "$ref": "#/components/schemas/v1RegisteredDomain" } } }, "description": "A successful response." } }, + "summary": "Unlocking requires a step-up reauth_token.", "tags": [ - "ProviderStorefrontService" + "RegisteredDomainService" ] - }, - "patch": { - "operationId": "ProviderStorefrontService_UpdateMyStorefront", + } + }, + "/v1/registrar/domains/{name}/nameservers": { + "put": { + "operationId": "RegisteredDomainService_SetDomainNameservers", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateMyStorefrontRequest" + "$ref": "#/components/schemas/RegisteredDomainServiceSetDomainNameserversBody" } } }, @@ -31302,7 +36621,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetMyStorefrontResponse" + "$ref": "#/components/schemas/v1RegisteredDomain" } } }, @@ -31310,88 +36629,162 @@ } }, "tags": [ - "ProviderStorefrontService" + "RegisteredDomainService" ] } }, - "/v1/provider/storefront/opt-in": { - "post": { - "operationId": "ProviderStorefrontService_OptInStorefront", + "/v1/registrar/domains/{name}/privacy": { + "put": { + "operationId": "RegisteredDomainService_SetDomainPrivacy", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { - "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisteredDomainServiceSetDomainPrivacyBody" + } + } + }, + "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetMyStorefrontResponse" + "$ref": "#/components/schemas/v1SetDomainPrivacyResponse" } } }, "description": "A successful response." } }, + "summary": "Enabling may create a privacy order to pay (order_id in the response).", "tags": [ - "ProviderStorefrontService" + "RegisteredDomainService" ] } }, - "/v1/provider/storefront/opt-out": { + "/v1/registrar/domains/{name}/renew": { "post": { - "operationId": "ProviderStorefrontService_OptOutStorefront", + "operationId": "RegisteredDomainService_RenewDomain", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { - "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisteredDomainServiceRenewDomainBody" + } + } + }, + "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetMyStorefrontResponse" + "$ref": "#/components/schemas/v1DomainOrder" } } }, "description": "A successful response." } }, + "summary": "Creates a renew order (checkout path, 3-D Secure possible).", "tags": [ - "ProviderStorefrontService" + "RegisteredDomainService" ] } }, - "/v1/provider/storefront/preview": { - "get": { - "operationId": "ProviderStorefrontService_PreviewMyStorefront", + "/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 + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1PreviewMyStorefrontResponse" + "$ref": "#/components/schemas/v1DomainOrder" } } }, "description": "A successful response." } }, + "summary": "Creates a restore order.", "tags": [ - "ProviderStorefrontService" + "RegisteredDomainService" ] } }, - "/v1/provider/storefront/submit": { + "/v1/registrar/domains/{name}/transfer-out/approve": { "post": { - "operationId": "ProviderStorefrontService_SubmitMyStorefront", + "operationId": "RegisteredDomainService_ApproveOutgoingTransfer", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { - "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisteredDomainServiceApproveOutgoingTransferBody" + } + } + }, + "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetMyStorefrontResponse" + "$ref": "#/components/schemas/v1RegisteredDomain" } } }, @@ -31399,36 +36792,28 @@ } }, "tags": [ - "ProviderStorefrontService" + "RegisteredDomainService" ] } }, - "/v1/provider/ticket-notification-policy": { - "get": { - "operationId": "ProviderTicketNotificationService_GetProviderTicketNotificationPolicy", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/v1GetProviderTicketNotificationPolicyResponse" - } - } - }, - "description": "A successful response." + "/v1/registrar/domains/{name}/verification/resend": { + "post": { + "operationId": "RegisteredDomainService_ResendRegistrantVerification", + "parameters": [ + { + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } } - }, - "tags": [ - "ProviderTicketNotificationService" - ] - }, - "put": { - "operationId": "ProviderTicketNotificationService_UpdateProviderTicketNotificationPolicy", + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1UpdateProviderTicketNotificationPolicyRequest" + "$ref": "#/components/schemas/RegisteredDomainServiceResendRegistrantVerificationBody" } } }, @@ -31439,7 +36824,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetProviderTicketNotificationPolicyResponse" + "$ref": "#/components/schemas/v1ResendRegistrantVerificationResponse" } } }, @@ -31447,36 +36832,54 @@ } }, "tags": [ - "ProviderTicketNotificationService" + "RegisteredDomainService" ] } }, - "/v1/provider/ticket-notification-policy:send-test": { + "/v1/registrar/order-items/{orderItemId}/retry-transfer": { "post": { - "operationId": "ProviderTicketNotificationService_SendProviderTicketNotificationTest", + "operationId": "RegisteredDomainService_RetryDomainTransfer", + "parameters": [ + { + "in": "path", + "name": "orderItemId", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { - "$ref": "#/components/requestBodies/ProviderConnectService_CreateConnectTaxSessionBody" + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisteredDomainServiceRetryDomainTransferBody" + } + } + }, + "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1DomainOrder" } } }, "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": [ - "ProviderTicketNotificationService" + "RegisteredDomainService" ] } }, - "/v1/public/storefronts": { + "/v1/registrar/orders": { "get": { - "operationId": "MarketplaceService_ListPublicStorefronts", + "operationId": "DomainOrderService_ListDomainOrders", "parameters": [ { "in": "query", @@ -31497,19 +36900,29 @@ } }, { + "explode": true, "in": "query", - "name": "search", - "required": false, - "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "filterCountry", + "name": "states", "required": false, "schema": { - "type": "string" + "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" } } ], @@ -31518,7 +36931,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListPublicStorefrontsResponse" + "$ref": "#/components/schemas/v1ListDomainOrdersResponse" } } }, @@ -31526,17 +36939,45 @@ } }, "tags": [ - "MarketplaceService" + "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" + } + } + }, + "description": "A successful response." + } + }, + "tags": [ + "DomainOrderService" ] } }, - "/v1/public/storefronts/by-id/{providerId}": { + "/v1/registrar/orders/{id}": { "get": { - "operationId": "MarketplaceService_GetPublicStorefrontByID", + "operationId": "DomainOrderService_GetDomainOrder", "parameters": [ { "in": "path", - "name": "providerId", + "name": "id", "required": true, "schema": { "type": "string" @@ -31548,7 +36989,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetPublicStorefrontResponse" + "$ref": "#/components/schemas/v1DomainOrder" } } }, @@ -31556,207 +36997,262 @@ } }, "tags": [ - "MarketplaceService" + "DomainOrderService" ] - } - }, - "/v1/public/storefronts/{slug}": { - "get": { - "operationId": "MarketplaceService_GetPublicStorefront", + }, + "patch": { + "operationId": "DomainOrderService_UpdateDomainOrder", "parameters": [ { "in": "path", - "name": "slug", + "name": "id", "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/v1GetPublicStorefrontResponse" + "$ref": "#/components/schemas/v1DomainOrder" } } }, "description": "A successful response." } }, + "summary": "Items, years, privacy, auto-renew, contact and DNS choices.", "tags": [ - "MarketplaceService" + "DomainOrderService" ] } }, - "/v1/refunds": { - "get": { - "operationId": "RefundService_ListRefunds", + "/v1/registrar/orders/{id}/cancel": { + "post": { + "operationId": "DomainOrderService_CancelDomainOrder", "parameters": [ { - "in": "query", - "name": "paymentId", - "required": false, + "in": "path", + "name": "id", + "required": true, "schema": { "type": "string" } - }, - { - "in": "query", - "name": "invoiceId", - "required": false, - "schema": { - "type": "string" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainOrderServiceCancelDomainOrderBody" + } } }, + "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": "query", - "name": "status", - "required": false, + "in": "path", + "name": "id", + "required": true, "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" } - }, - { - "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/DomainOrderServiceCheckoutDomainOrderBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListRefundsResponse" + "$ref": "#/components/schemas/v1CheckoutDomainOrderResponse" } } }, "description": "A successful response." } }, - "summary": "ListRefunds lists refunds for a payment, invoice, or organization", + "summary": "Authorize payment and start processing. May return requires_action + client_secret.", "tags": [ - "RefundService" + "DomainOrderService" ] } }, - "/v1/refunds/{refundId}": { - "get": { - "operationId": "RefundService_GetRefund", + "/v1/registrar/orders/{id}/confirm": { + "post": { + "operationId": "DomainOrderService_ConfirmDomainOrder", "parameters": [ { "in": "path", - "name": "refundId", + "name": "id", "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DomainOrderServiceConfirmDomainOrderBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1GetRefundResponse" + "$ref": "#/components/schemas/v1DomainOrder" } } }, "description": "A successful response." } }, - "summary": "GetRefund retrieves a single refund with payment and invoice details", + "summary": "After 3-D Secure: re-reads the PaymentIntent from Stripe and continues.", "tags": [ - "RefundService" + "DomainOrderService" ] } }, - "/v1/regions": { - "get": { - "operationId": "RegionService_ListRegions", + "/v1/registrar/orders/{id}/price": { + "post": { + "operationId": "DomainOrderService_PriceDomainOrder", "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": "id", + "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" + } + } + }, + "description": "A successful response." + } + }, + "summary": "Re-quote with live prices and tax (Stripe Tax).", + "tags": [ + "DomainOrderService" + ] + } + }, + "/v1/registrar/registrant-changes/{token}": { + "post": { + "operationId": "RegisteredDomainService_ConfirmRegistrantChange", + "parameters": [ { - "in": "query", - "name": "platformId", - "required": false, + "description": "Signed token from the approval email.", + "in": "path", + "name": "token", + "required": true, "schema": { "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisteredDomainServiceConfirmRegistrantChangeBody" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1ListRegionsResponse" + "$ref": "#/components/schemas/v1ConfirmRegistrantChangeResponse" } } }, "description": "A successful response." } }, + "summary": "Anonymous via the signed token from the approval email.", "tags": [ - "RegionService" + "RegisteredDomainService" ] - }, + } + }, + "/v1/registrar/search": { "post": { - "operationId": "RegionService_CreateRegion", + "operationId": "DomainSearchService_SearchDomains", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1CreateRegionRequest" + "$ref": "#/components/schemas/v1SearchDomainsRequest" } } }, @@ -31767,29 +37263,71 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1Region" + "$ref": "#/components/schemas/v1SearchDomainsResponse" } } }, "description": "A successful response." } }, + "summary": "Anonymous. Search a name, label or keywords; exact match first, then featured TLDs, then suggestions.", "tags": [ - "RegionService" + "DomainSearchService" ] } }, - "/v1/regions/{id}": { - "delete": { - "operationId": "RegionService_DeleteRegion", + "/v1/registrar/tlds": { + "get": { + "operationId": "DomainSearchService_ListTldPrices", "parameters": [ { - "in": "path", - "name": "id", - "required": true, + "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, "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": { @@ -31797,27 +37335,45 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1SuccessResponse" + "$ref": "#/components/schemas/v1ListTldPricesResponse" } } }, "description": "A successful response." } }, + "summary": "Anonymous. Public TLD price list (registration, renewal, transfer, restore, privacy).", "tags": [ - "RegionService" + "DomainSearchService" ] - }, + } + }, + "/v1/registrar/tlds/{tld}/requirements": { "get": { - "operationId": "RegionService_GetRegion", + "operationId": "DomainSearchService_GetTldRequirements", "parameters": [ { "in": "path", - "name": "id", + "name": "tld", "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": { @@ -31825,15 +37381,47 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/v1Region" + "$ref": "#/components/schemas/v1GetTldRequirementsResponse" } } }, "description": "A successful response." } }, + "summary": "Contact fields a TLD needs for an operation (dynamic extension fields).", "tags": [ - "RegionService" + "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" + } + } + }, + "description": "A successful response." + } + }, + "summary": "Whether names can be transferred in, with price and warnings.", + "tags": [ + "DomainSearchService" ] } }, @@ -35930,6 +41518,9 @@ { "name": "MonitoringService" }, + { + "name": "BlogSubscriptionService" + }, { "name": "VirtualMachineService" }, @@ -36068,6 +41659,21 @@ { "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 15f72ca..0437678 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 AsyncNodeRings, NodeRings, WaitTimeoutError +from ._client import DOMAIN_ORDER_FINAL_STATES, AsyncNodeRings, NodeRings, WaitTimeoutError from ._errors import ( APIConnectionError, APIError, @@ -37,6 +37,7 @@ __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 772c7d3..3140154 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__ = ["AsyncNodeRings", "NodeRings", "WaitTimeoutError"] +__all__ = ["DOMAIN_ORDER_FINAL_STATES", "AsyncNodeRings", "NodeRings", "WaitTimeoutError"] class WaitTimeoutError(TimeoutError): @@ -29,6 +29,27 @@ 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. @@ -136,6 +157,33 @@ 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:: @@ -215,3 +263,30 @@ 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 79227a7..db6f64c 100644 --- a/src/noderings/_services.py +++ b/src/noderings/_services.py @@ -18,6 +18,8 @@ "AsyncAgentService", "BackupService", "AsyncBackupService", + "BlogSubscriptionService", + "AsyncBlogSubscriptionService", "BusinessMonitoringService", "AsyncBusinessMonitoringService", "ChatService", @@ -40,6 +42,12 @@ "AsyncDNSZoneService", "DNSSECService", "AsyncDNSSECService", + "DomainContactService", + "AsyncDomainContactService", + "DomainOrderService", + "AsyncDomainOrderService", + "DomainSearchService", + "AsyncDomainSearchService", "DomainService", "AsyncDomainService", "EnvironmentVariableService", @@ -126,6 +134,10 @@ "AsyncRefundService", "RegionService", "AsyncRegionService", + "RegisteredDomainService", + "AsyncRegisteredDomainService", + "RegistrarAdminService", + "AsyncRegistrarAdminService", "RoadmapService", "AsyncRoadmapService", "RoleService", @@ -840,6 +852,102 @@ 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.""" @@ -3033,42 +3141,46 @@ def get_dnssec( ) -class DomainService(_Service): - """The NodeRings DomainService API.""" +class DomainContactService(_Service): + """The NodeRings DomainContactService API.""" - def create_domain( + def create_domain_contact( self, *, - name: str | None = None, - verification_type: m.VerificationType | str | None = None, + 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.SuccessResponse: - """Call ``POST /v1/domain``.""" + ) -> 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. + """ return self._client._call( "POST", - "/v1/domain", - m.SuccessResponse, + "/v1/registrar/contacts", + m.DomainContact, query=_query(extra_query), - body=_body( - m.CreateDomainRequest, extra_body, False, ("name", name), ("verification_type", verification_type) - ), + body=_body(m.CreateDomainContactRequest, extra_body, False, ("contact", contact), ("tlds", tlds)), idempotent=False, timeout=timeout, ) - def delete_domain( + def delete_domain_contact( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/domain/{id}``.""" + """Call ``DELETE /v1/registrar/contacts/{id}``.""" return self._client._call( "DELETE", - f"/v1/domain/{_path(id)}", + f"/v1/registrar/contacts/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -3076,132 +3188,82 @@ def delete_domain( 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( + def get_contact_schema( self, - id: str, *, + country: str | None = None, + tlds: list[str] | None = None, 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.""" + ) -> m.GetContactSchemaResponse: + """ + Per-country rules and base field specs for the client-side (zod) schema. - 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, - ) + It calls ``GET /v1/registrar/contact-schema``. - 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}``.""" + Args: + country: Limit country rules to one country (ISO alpha-2); empty = all. + tlds: Include extension field specs for these TLDs. + """ return self._client._call( - "DELETE", - f"/v1/environment-variables/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), + "GET", + "/v1/registrar/contact-schema", + m.GetContactSchemaResponse, + query=_query(extra_query, ("country", country), ("tlds", tlds)), body=None, idempotent=False, timeout=timeout, ) - def get_environment_variable( + def get_domain_contact( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetEnvironmentVariableResponse: - """Call ``GET /v1/environment-variables/{id}``.""" + ) -> m.DomainContact: + """Call ``GET /v1/registrar/contacts/{id}``.""" return self._client._call( "GET", - f"/v1/environment-variables/{_path(id)}", - m.GetEnvironmentVariableResponse, + f"/v1/registrar/contacts/{_path(id)}", + m.DomainContact, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_environment_variables( + def list_domain_contacts( self, *, page: int | None = None, page_size: int | None = None, - filter_key: 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.ListDomainContactsResponse: + """Call ``GET /v1/registrar/contacts``.""" return self._client._call( "GET", - "/v1/environment-variables", - m.ListEnvironmentVariablesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterKey", filter_key)), + "/v1/registrar/contacts", + m.ListDomainContactsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("search", search)), body=None, idempotent=False, timeout=timeout, ) - def list_environment_variables_all( + def list_domain_contacts_all( self, *, page: int | None = None, page_size: int | None = None, - filter_key: str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.EnvironmentVariable]: + ) -> Iterator[m.DomainContact]: """ - Every result of :meth:`list_environment_variables`, reading page after page. + 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). """ @@ -3209,14 +3271,14 @@ 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_domain_contacts( page=page, page_size=size, - filter_key=filter_key, + search=search, extra_query=extra_query, timeout=timeout, ) - items = res.environment_variables + items = res.contacts for item in items: yield item seen += len(items) @@ -3224,417 +3286,468 @@ def list_environment_variables_all( return page += 1 - def update_environment_variable( + def update_domain_contact( self, id: str, *, - value: str | None = None, + 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.SuccessResponse: - """Call ``PATCH /v1/environment-variables/{id}``.""" + ) -> m.UpdateDomainContactResponse: + """ + Call ``PUT /v1/registrar/contacts/{id}``. + + Args: + contact: Writable contact fields. ASCII only in v1; the server normalizes and validates. + """ return self._client._call( - "PATCH", - f"/v1/environment-variables/{_path(id)}", - m.SuccessResponse, + "PUT", + f"/v1/registrar/contacts/{_path(id)}", + m.UpdateDomainContactResponse, query=_query(extra_query), - body=_body(m.UpdateEnvironmentVariableBody, extra_body, False, ("value", value)), + body=_body(m.UpdateDomainContactBody, extra_body, False, ("contact", contact), ("tlds", tlds)), idempotent=False, timeout=timeout, ) - -class ExchangeRateService(_Service): - """The NodeRings ExchangeRateService API.""" - - def convert_currency( + def validate_domain_contact( self, *, - target_currency: str | None = None, - usd_amount: str | None = None, + 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.ConvertCurrencyResponse: + ) -> m.ValidateDomainContactResponse: """ - Convert an amount from USD to a target currency + Dry run for forms: errors, warnings and normalized values. - It calls ``POST /v1/exchange-rate/convert``. + It calls ``POST /v1/registrar/contacts/validate``. Args: - target_currency: Target currency code (e.g., "EUR", "GBP", "JPY") - usd_amount: Amount in USD to convert + contact: Writable contact fields. ASCII only in v1; the server normalizes and validates. """ return self._client._call( "POST", - "/v1/exchange-rate/convert", - m.ConvertCurrencyResponse, + "/v1/registrar/contacts/validate", + m.ValidateDomainContactResponse, query=_query(extra_query), - body=_body( - m.ConvertCurrencyRequest, - extra_body, - False, - ("target_currency", target_currency), - ("usd_amount", usd_amount), - ), + body=_body(m.ValidateDomainContactRequest, extra_body, False, ("contact", contact), ("tlds", tlds)), idempotent=False, timeout=timeout, ) - def get_all_exchange_rates( + +class DomainOrderService(_Service): + """The NodeRings DomainOrderService API.""" + + def cancel_domain_order( 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.GetAllExchangeRatesResponse: - """ - Get all exchange rates at once (returns map of currency codes to rates) - - It calls ``GET /v1/exchange-rate/rates``. - """ + ) -> m.DomainOrder: + """Call ``POST /v1/registrar/orders/{id}/cancel``.""" return self._client._call( - "GET", - "/v1/exchange-rate/rates", - m.GetAllExchangeRatesResponse, + "POST", + f"/v1/registrar/orders/{_path(id)}/cancel", + m.DomainOrder, query=_query(extra_query), - body=None, + body=_body(m.CancelDomainOrderBody, extra_body, False, ("reason", reason)), idempotent=False, timeout=timeout, ) - def get_exchange_rate( + def checkout_domain_order( self, - currency_code: str, + 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, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetExchangeRateResponse: + ) -> m.CheckoutDomainOrderResponse: """ - Get the current exchange rate for a specific currency (from USD) + Authorize payment and start processing. May return requires_action + client_secret. - It calls ``GET /v1/exchange-rate/rate/{currencyCode}``. + 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. """ return self._client._call( - "GET", - f"/v1/exchange-rate/rate/{_path(currency_code)}", - m.GetExchangeRateResponse, + "POST", + f"/v1/registrar/orders/{_path(id)}/checkout", + m.CheckoutDomainOrderResponse, query=_query(extra_query), - body=None, - idempotent=False, + 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, timeout=timeout, ) - def list_supported_currencies( + def confirm_domain_order( 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.ListSupportedCurrenciesResponse: + ) -> m.DomainOrder: """ - List all supported currency codes + After 3-D Secure: re-reads the PaymentIntent from Stripe and continues. - It calls ``GET /v1/exchange-rate/currencies``. - """ - return self._client._call( - "GET", - "/v1/exchange-rate/currencies", - m.ListSupportedCurrenciesResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - -class FirewallService(_Service): - """The NodeRings FirewallService API.""" - - def create_firewall_address_group( - self, - *, - 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.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). + It calls ``POST /v1/registrar/orders/{id}/confirm``. """ return self._client._call( "POST", - "/v1/firewall/address-groups", - m.CreateFirewallAddressGroupResponse, + f"/v1/registrar/orders/{_path(id)}/confirm", + m.DomainOrder, query=_query(extra_query), - body=_body(m.CreateFirewallAddressGroupRequest, extra_body, False, ("group", group)), + body=_body(m.ConfirmDomainOrderBody, extra_body, False, ("payment_intent_id", payment_intent_id)), idempotent=False, timeout=timeout, ) - def create_firewall_rule( + def create_domain_order( self, - ruleset_id: str, *, - rule: m.FirewallRuleInput | dict[str, Any] | None = None, + 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, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateFirewallRuleResponse: + ) -> m.DomainOrder: """ - Call ``POST /v1/firewall/rulesets/{rulesetId}/rules``. + Call ``POST /v1/registrar/orders``. A retry of the same call cannot create a second + resource: the SDK sends an idempotency key. Args: - rule: FirewallRuleInput is the client-provided rule payload for create/update. Clients must not provide id/ruleset_id/timestamps (those are server-controlled). + 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. """ return self._client._call( "POST", - f"/v1/firewall/rulesets/{_path(ruleset_id)}/rules", - m.CreateFirewallRuleResponse, + "/v1/registrar/orders", + m.DomainOrder, query=_query(extra_query), - body=_body(m.CreateFirewallRuleBody, extra_body, False, ("rule", rule)), - idempotent=False, + 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, timeout=timeout, ) - def create_firewall_rule_set( + def get_domain_order( 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.CreateFirewallRuleSetResponse: - """Call ``POST /v1/firewall/rulesets``.""" + ) -> m.DomainOrder: + """Call ``GET /v1/registrar/orders/{id}``.""" return self._client._call( - "POST", - "/v1/firewall/rulesets", - m.CreateFirewallRuleSetResponse, + "GET", + f"/v1/registrar/orders/{_path(id)}", + m.DomainOrder, query=_query(extra_query), - body=_body(m.CreateFirewallRuleSetRequest, extra_body, False, ("ruleset", ruleset)), + body=None, idempotent=False, timeout=timeout, ) - def delete_firewall_address_group( + def list_domain_orders( 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, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/firewall/address-groups/{id}``.""" + ) -> m.ListDomainOrdersResponse: + """Call ``GET /v1/registrar/orders``.""" return self._client._call( - "DELETE", - f"/v1/firewall/address-groups/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), + "GET", + "/v1/registrar/orders", + m.ListDomainOrdersResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("states", states)), body=None, idempotent=False, timeout=timeout, ) - def delete_firewall_rule( + def list_domain_orders_all( 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, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/firewall/rules/{id}``.""" - return self._client._call( - "DELETE", - f"/v1/firewall/rules/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> Iterator[m.DomainOrder]: + """ + Every result of :meth:`list_domain_orders`, reading page after page. - def delete_firewall_rule_set( + ``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 + + def price_domain_order( self, id: str, *, - force: bool | None = None, + 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.SuccessResponse: - """Call ``DELETE /v1/firewall/rulesets/{id}``.""" + ) -> 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. + """ return self._client._call( - "DELETE", - f"/v1/firewall/rulesets/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query, ("force", force)), - body=None, + "POST", + f"/v1/registrar/orders/{_path(id)}/price", + m.DomainOrderQuote, + 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), + ), idempotent=False, timeout=timeout, ) - def get_firewall_address_group( + def update_domain_order( 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, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallAddressGroup: - """Call ``GET /v1/firewall/address-groups/{id}``.""" + ) -> 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. + """ return self._client._call( - "GET", - f"/v1/firewall/address-groups/{_path(id)}", - m.FirewallAddressGroup, + "PATCH", + f"/v1/registrar/orders/{_path(id)}", + m.DomainOrder, query=_query(extra_query), - body=None, + 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), + ), idempotent=False, timeout=timeout, ) - def get_firewall_rule( + +class DomainSearchService(_Service): + """The NodeRings DomainSearchService API.""" + + def check_domains( self, - id: str, *, - direction: m.FirewallDirection | str | None = None, + names: list[str] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallRuleResource: + ) -> m.CheckDomainsResponse: """ - Call ``GET /v1/firewall/rules/{id}``. + Live, uncached availability (add-to-cart and checkout). Login required. - Args: - direction: Optional: Filter by direction. If not specified, returns the rule regardless of direction. + It calls ``POST /v1/registrar/check``. """ return self._client._call( - "GET", - f"/v1/firewall/rules/{_path(id)}", - m.FirewallRuleResource, - query=_query(extra_query, ("direction", direction)), - body=None, + "POST", + "/v1/registrar/check", + m.CheckDomainsResponse, + query=_query(extra_query), + body=_body(m.CheckDomainsRequest, extra_body, False, ("names", names)), idempotent=False, timeout=timeout, ) - def get_firewall_rule_set( + def check_transfer( 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.FirewallRuleSet: - """Call ``GET /v1/firewall/rulesets/{id}``.""" + ) -> m.CheckTransferResponse: + """ + Whether names can be transferred in, with price and warnings. + + It calls ``POST /v1/registrar/transfer-check``. + """ return self._client._call( - "GET", - f"/v1/firewall/rulesets/{_path(id)}", - m.FirewallRuleSet, + "POST", + "/v1/registrar/transfer-check", + m.CheckTransferResponse, query=_query(extra_query), - body=None, + body=_body(m.CheckTransferRequest, extra_body, False, ("names", names)), idempotent=False, timeout=timeout, ) - def list_firewall_address_groups( + def get_tld_requirements( self, + tld: str, *, - page: int | None = None, - page_size: int | None = None, - name: str | None = None, + operation: m.DomainOperation | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListFirewallAddressGroupsResponse: + ) -> m.GetTldRequirementsResponse: """ - Call ``GET /v1/firewall/address-groups``. + Contact fields a TLD needs for an operation (dynamic extension fields). - Args: - name: Note: family filter removed as address groups can now contain mixed IPv4/IPv6 + It calls ``GET /v1/registrar/tlds/{tld}/requirements``. """ return self._client._call( "GET", - "/v1/firewall/address-groups", - m.ListFirewallAddressGroupsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("name", name)), + f"/v1/registrar/tlds/{_path(tld)}/requirements", + m.GetTldRequirementsResponse, + query=_query(extra_query, ("operation", operation)), body=None, idempotent=False, timeout=timeout, ) - def list_firewall_address_groups_all( + def list_tld_prices( 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.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). + ) -> m.ListTldPricesResponse: """ - 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 + Anonymous. Public TLD price list (registration, renewal, transfer, restore, privacy). - def list_firewall_rule_sets( - 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, - ) -> m.ListFirewallRuleSetsResponse: - """ - Call ``GET /v1/firewall/rulesets``. + It calls ``GET /v1/registrar/tlds``. 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 + category: Only TLDs of this category (unspecified = all enabled TLDs). """ return self._client._call( "GET", - "/v1/firewall/rulesets", - m.ListFirewallRuleSetsResponse, + "/v1/registrar/tlds", + m.ListTldPricesResponse, query=_query( extra_query, + ("featuredOnly", featured_only), + ("category", category), ("page", page), ("pageSize", page_size), - ("name", name), - ("filterAttachment", filter_attachment), ), body=None, idempotent=False, timeout=timeout, ) - def list_firewall_rule_sets_all( + 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, - 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]: + ) -> Iterator[m.TldPrice]: """ - Every result of :meth:`list_firewall_rule_sets`, reading page after page. + 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). """ @@ -3642,15 +3755,15 @@ def list_firewall_rule_sets_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_firewall_rule_sets( + res = self.list_tld_prices( page=page, page_size=size, - name=name, - filter_attachment=filter_attachment, + featured_only=featured_only, + category=category, extra_query=extra_query, timeout=timeout, ) - items = res.rulesets + items = res.tlds for item in items: yield item seen += len(items) @@ -3658,539 +3771,450 @@ def list_firewall_rule_sets_all( return page += 1 - def list_firewall_rules( + def search_domains( self, - ruleset_id: str, *, - page: int | None = None, - page_size: int | None = None, - direction: m.FirewallDirection | str | None = None, + 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, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListFirewallRulesResponse: + ) -> m.SearchDomainsResponse: """ - Call ``GET /v1/firewall/rulesets/{rulesetId}/rules``. + Anonymous. Search a name, label or keywords; exact match first, then featured TLDs, then + suggestions. + + It calls ``POST /v1/registrar/search``. Args: - direction: Optional: Filter by direction. If not specified, returns all rules regardless of direction. + 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. """ 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)), - body=None, + "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), + ), idempotent=False, timeout=timeout, ) - def list_firewall_rules_all( - self, - ruleset_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 +class DomainService(_Service): + """The NodeRings DomainService API.""" - def move_firewall_rule( + def create_domain( self, - id: str, *, - position: m.FirewallRulePosition | str | None = None, - target_rule_id: 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.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/domain``.""" return self._client._call( "POST", - f"/v1/firewall/rules/{_path(id)}/move", - m.FirewallRuleResource, + "/v1/domain", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.MoveFirewallRuleBody, extra_body, False, ("position", position), ("target_rule_id", target_rule_id) + m.CreateDomainRequest, extra_body, False, ("name", name), ("verification_type", verification_type) ), idempotent=False, timeout=timeout, ) - def update_firewall_address_group( + def delete_domain( 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/domain/{id}``.""" return self._client._call( - "PATCH", - f"/v1/firewall/address-groups/{_path(id)}", - m.FirewallAddressGroup, + "DELETE", + f"/v1/domain/{_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 get_domain( self, - 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.GetDomainResponse: + """Call ``GET /v1/domain``.""" return self._client._call( - "PATCH", - f"/v1/firewall/rules/{_path(id)}", - m.FirewallRuleResource, + "GET", + "/v1/domain", + m.GetDomainResponse, 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 verify_domain( 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.FirewallRuleSet: - """Call ``PATCH /v1/firewall/rulesets/{id}``.""" + ) -> m.SuccessResponse: + """Call ``GET /v1/domain/verify/{id}``.""" return self._client._call( - "PATCH", - f"/v1/firewall/rulesets/{_path(id)}", - m.FirewallRuleSet, + "GET", + f"/v1/domain/verify/{_path(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.""" +class EnvironmentVariableService(_Service): + """The NodeRings EnvironmentVariableService API.""" - def archive_files( + def create_environment_variable( self, - id: str, *, - files: list[str] | None = None, - root: 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.ArchiveFilesResponse: - """Call ``POST /v1/game-servers/{id}/files:archive``.""" + ) -> m.CreateEnvironmentVariableResponse: + """Call ``POST /v1/environment-variables``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/files:archive", - m.ArchiveFilesResponse, + "/v1/environment-variables", + m.CreateEnvironmentVariableResponse, query=_query(extra_query), - body=_body(m.ArchiveFilesBody, extra_body, False, ("files", files), ("root", root)), + body=_body(m.CreateEnvironmentVariableRequest, extra_body, False, ("key", key), ("value", value)), idempotent=False, timeout=timeout, ) - def change_game_server_game( + def delete_environment_variable( self, 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 ``DELETE /v1/environment-variables/{id}``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}:changeGame", - m.GameServer, + "DELETE", + f"/v1/environment-variables/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.ChangeGameServerGameBody, - extra_body, - False, - ("accept_eula", accept_eula), - ("environment", environment), - ("template_id", template_id), - ), + body=None, idempotent=False, timeout=timeout, ) - def copy_file( + def get_environment_variable( 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.GetEnvironmentVariableResponse: + """Call ``GET /v1/environment-variables/{id}``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:copy", - m.SuccessResponse, + "GET", + f"/v1/environment-variables/{_path(id)}", + m.GetEnvironmentVariableResponse, query=_query(extra_query), - body=_body(m.CopyFileBody, extra_body, False, ("location", location)), + body=None, idempotent=False, timeout=timeout, ) - def create_allocation( + def list_environment_variables( self, - id: str, *, - extra_body: dict[str, Any] | None = None, + 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.GameServerAllocation: - """Call ``POST /v1/game-servers/{id}/allocations``.""" + ) -> m.ListEnvironmentVariablesResponse: + """Call ``GET /v1/environment-variables``.""" return 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", + "/v1/environment-variables", + m.ListEnvironmentVariablesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterKey", filter_key)), + body=None, idempotent=False, timeout=timeout, ) - def create_backup( + def list_environment_variables_all( self, - id: str, *, - name: str | None = None, - extra_body: dict[str, Any] | None = None, + 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.GameServerBackup: - """Call ``POST /v1/game-servers/{id}/backups``.""" - return 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, - ) + ) -> Iterator[m.EnvironmentVariable]: + """ + Every result of :meth:`list_environment_variables`, reading page after page. - def create_database( + ``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_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 + + def update_environment_variable( 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``.""" - return 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, - ) - - def create_folder( - self, - id: str, - *, - name: str | None = None, - root: 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 ``POST /v1/game-servers/{id}/files:folder``.""" + """Call ``PATCH /v1/environment-variables/{id}``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:folder", + "PATCH", + f"/v1/environment-variables/{_path(id)}", m.SuccessResponse, query=_query(extra_query), - body=_body(m.CreateFolderBody, extra_body, False, ("name", name), ("root", root)), + body=_body(m.UpdateEnvironmentVariableBody, extra_body, False, ("value", value)), idempotent=False, timeout=timeout, ) - def create_game_server( + +class ExchangeRateService(_Service): + """The NodeRings ExchangeRateService API.""" + + def convert_currency( 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, + 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.GameServer: + ) -> m.ConvertCurrencyResponse: """ - Call ``POST /v1/game-servers``. A retry of the same call cannot create a second resource: - the SDK sends an idempotency key. + Convert an amount from USD to a target currency + + It calls ``POST /v1/exchange-rate/convert``. 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. + target_currency: Target currency code (e.g., "EUR", "GBP", "JPY") + usd_amount: Amount in USD to convert """ return self._client._call( "POST", - "/v1/game-servers", - m.GameServer, + "/v1/exchange-rate/convert", + m.ConvertCurrencyResponse, query=_query(extra_query), body=_body( - m.CreateGameServerRequest, + m.ConvertCurrencyRequest, 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, + ("target_currency", target_currency), + ("usd_amount", usd_amount), ), - idempotent=True, + idempotent=False, timeout=timeout, ) - def create_schedule( + def get_all_exchange_rates( 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.GameServerSchedule: + ) -> m.GetAllExchangeRatesResponse: """ - Call ``POST /v1/game-servers/{id}/schedules``. + Get all exchange rates at once (returns map of currency codes to rates) - Args: - is_active: Omitted means the schedule is created enabled. + It calls ``GET /v1/exchange-rate/rates``. """ return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/schedules", - m.GameServerSchedule, + "GET", + "/v1/exchange-rate/rates", + m.GetAllExchangeRatesResponse, 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), - ), + body=None, idempotent=False, timeout=timeout, ) - def create_schedule_task( + def get_exchange_rate( self, - id: str, - schedule_id: str, + currency_code: 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``.""" + ) -> m.GetExchangeRateResponse: + """ + Get the current exchange rate for a specific currency (from USD) + + It calls ``GET /v1/exchange-rate/rate/{currencyCode}``. + """ return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks", - m.SuccessResponse, + "GET", + f"/v1/exchange-rate/rate/{_path(currency_code)}", + m.GetExchangeRateResponse, 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, ) - def delete_allocation( + def list_supported_currencies( 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.ListSupportedCurrenciesResponse: + """ + List all supported currency codes + + It calls ``GET /v1/exchange-rate/currencies``. + """ return self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}", - m.SuccessResponse, + "GET", + "/v1/exchange-rate/currencies", + m.ListSupportedCurrenciesResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def delete_backup( + +class FirewallService(_Service): + """The NodeRings FirewallService API.""" + + def create_firewall_address_group( self, - id: str, - backup_uuid: str, *, - truncate: 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.SuccessResponse: + ) -> m.CreateFirewallAddressGroupResponse: """ - Call ``DELETE /v1/game-servers/{id}/backups/{backupUuid}``. + Call ``POST /v1/firewall/address-groups``. Args: - truncate: Restore only. When true, the panel deletes every file before extracting the backup. + group: FirewallAddressGroupInput is the client-provided payload for create/update. Clients must not provide id/timestamps (those are server-controlled). """ return self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}", - m.SuccessResponse, - query=_query(extra_query, ("truncate", truncate)), - body=None, + "POST", + "/v1/firewall/address-groups", + m.CreateFirewallAddressGroupResponse, + query=_query(extra_query), + body=_body(m.CreateFirewallAddressGroupRequest, extra_body, False, ("group", group)), idempotent=False, timeout=timeout, ) - def delete_database( + def create_firewall_rule( self, - id: str, - database_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.SuccessResponse: - """Call ``DELETE /v1/game-servers/{id}/databases/{databaseId}``.""" + ) -> 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( - "DELETE", - f"/v1/game-servers/{_path(id)}/databases/{_path(database_id)}", - m.SuccessResponse, + "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 delete_files( + def create_firewall_rule_set( self, - id: str, *, - files: list[str] | None = None, - root: 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.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/files:delete``.""" + ) -> m.CreateFirewallRuleSetResponse: + """Call ``POST /v1/firewall/rulesets``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/files:delete", - m.SuccessResponse, + "/v1/firewall/rulesets", + m.CreateFirewallRuleSetResponse, query=_query(extra_query), - body=_body(m.DeleteFilesBody, extra_body, False, ("files", files), ("root", root)), + body=_body(m.CreateFirewallRuleSetRequest, extra_body, False, ("ruleset", ruleset)), idempotent=False, timeout=timeout, ) - def delete_game_server( + def delete_firewall_address_group( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/game-servers/{id}``.""" + """Call ``DELETE /v1/firewall/address-groups/{id}``.""" return self._client._call( "DELETE", - f"/v1/game-servers/{_path(id)}", + f"/v1/firewall/address-groups/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -4198,18 +4222,17 @@ def delete_game_server( timeout=timeout, ) - def delete_schedule( + def delete_firewall_rule( self, id: str, - schedule_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/game-servers/{id}/schedules/{scheduleId}``.""" + """Call ``DELETE /v1/firewall/rules/{id}``.""" return self._client._call( "DELETE", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}", + f"/v1/firewall/rules/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -4217,502 +4240,575 @@ def delete_schedule( timeout=timeout, ) - def delete_schedule_task( + def delete_firewall_rule_set( self, id: str, - schedule_id: str, - task_id: str, *, + force: bool | 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 ``DELETE /v1/firewall/rulesets/{id}``.""" return self._client._call( "DELETE", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks/{_path(task_id)}", + f"/v1/firewall/rulesets/{_path(id)}", m.SuccessResponse, - query=_query(extra_query), + query=_query(extra_query, ("force", force)), body=None, idempotent=False, timeout=timeout, ) - def download_file( + def get_firewall_address_group( self, id: str, *, - path: 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.FirewallAddressGroup: + """Call ``GET /v1/firewall/address-groups/{id}``.""" return self._client._call( "GET", - f"/v1/game-servers/{_path(id)}/files/download", - m.DownloadFileResponse, - query=_query(extra_query, ("path", path)), + f"/v1/firewall/address-groups/{_path(id)}", + m.FirewallAddressGroup, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def execute_schedule( + def get_firewall_rule( self, id: str, - schedule_id: str, *, - 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.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}:execute``.""" - return 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, - ) + ) -> m.FirewallRuleResource: + """ + Call ``GET /v1/firewall/rules/{id}``. - 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}``.""" + Args: + direction: Optional: Filter by direction. If not specified, returns the rule regardless of direction. + """ return self._client._call( "GET", - f"/v1/game-servers/{_path(id)}", - m.GameServer, - query=_query(extra_query), + f"/v1/firewall/rules/{_path(id)}", + m.FirewallRuleResource, + query=_query(extra_query, ("direction", direction)), body=None, idempotent=False, timeout=timeout, ) - def get_game_server_resources( + def get_firewall_rule_set( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerResources: - """Call ``GET /v1/game-servers/{id}/resources``.""" + ) -> m.FirewallRuleSet: + """Call ``GET /v1/firewall/rulesets/{id}``.""" return self._client._call( "GET", - f"/v1/game-servers/{_path(id)}/resources", - m.GameServerResources, + f"/v1/firewall/rulesets/{_path(id)}", + m.FirewallRuleSet, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_startup( + def list_firewall_address_groups( self, - 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.GetStartupResponse: - """Call ``GET /v1/game-servers/{id}/startup``.""" - return self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/startup", - m.GetStartupResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> m.ListFirewallAddressGroupsResponse: + """ + Call ``GET /v1/firewall/address-groups``. - def list_allocations( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListGameServerAllocationsResponse: - """Call ``GET /v1/game-servers/{id}/allocations``.""" + Args: + name: Note: family filter removed as address groups can now contain mixed IPv4/IPv6 + """ return self._client._call( "GET", - f"/v1/game-servers/{_path(id)}/allocations", - m.ListGameServerAllocationsResponse, - query=_query(extra_query), + "/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_backups( + def list_firewall_address_groups_all( self, - 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.ListGameServerBackupsResponse: - """Call ``GET /v1/game-servers/{id}/backups``.""" - return self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/backups", - m.ListGameServerBackupsResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> Iterator[m.FirewallAddressGroup]: + """ + Every result of :meth:`list_firewall_address_groups`, reading page after page. - def list_databases( + ``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( self, - 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.ListDatabasesResponse: - """Call ``GET /v1/game-servers/{id}/databases``.""" + ) -> 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 + """ return self._client._call( "GET", - f"/v1/game-servers/{_path(id)}/databases", - m.ListDatabasesResponse, - query=_query(extra_query), + "/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, ) - def list_files( + def list_firewall_rule_sets_all( self, - id: str, *, - directory: str | 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.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, - ) + ) -> Iterator[m.FirewallRuleSet]: + """ + Every result of :meth:`list_firewall_rule_sets`, reading page after page. - 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 = 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( self, + ruleset_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, - ) -> m.ListGameServersResponse: - """Call ``GET /v1/game-servers``.""" + ) -> 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/game-servers", - m.ListGameServersResponse, - query=_query(extra_query, ("pageSize", page_size)), + 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_order_games( + def list_firewall_rules_all( self, + ruleset_id: str, *, - plan_id: str | 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.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, - ) + ) -> Iterator[m.FirewallRuleResource]: + """ + Every result of :meth:`list_firewall_rules`, reading page after page. - 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 = 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 + + def move_firewall_rule( self, 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.ListSchedulesResponse: - """Call ``GET /v1/game-servers/{id}/schedules``.""" + ) -> m.FirewallRuleResource: + """ + Call ``POST /v1/firewall/rules/{id}/move``. + + Args: + target_rule_id: ID of the target rule to move relative to + """ return self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/schedules", - m.ListSchedulesResponse, + "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, ) - def lock_backup( + def update_firewall_address_group( self, id: str, - backup_uuid: str, *, - truncate: 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.SuccessResponse: + ) -> m.FirewallAddressGroup: """ - Call ``POST /v1/game-servers/{id}/backups/{backupUuid}:lock``. + Call ``PATCH /v1/firewall/address-groups/{id}``. Args: - truncate: Restore only. When true, the panel deletes every file before extracting the backup. + 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", - f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}:lock", - m.SuccessResponse, + "PATCH", + f"/v1/firewall/address-groups/{_path(id)}", + m.FirewallAddressGroup, query=_query(extra_query), - body=_body(m.LockBackupBody, extra_body, False, ("truncate", truncate)), + body=_body(m.UpdateFirewallAddressGroupBody, extra_body, False, ("group", group)), idempotent=False, timeout=timeout, ) - def open_console( + def update_firewall_rule( self, 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.OpenConsoleResponse: - """Call ``POST /v1/game-servers/{id}:console``.""" + ) -> 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). + """ return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}:console", - m.OpenConsoleResponse, + "PATCH", + f"/v1/firewall/rules/{_path(id)}", + m.FirewallRuleResource, query=_query(extra_query), - body=_body(m.OpenConsoleBody, extra_body, False), + body=_body(m.UpdateFirewallRuleBody, extra_body, False, ("rule", rule)), idempotent=False, timeout=timeout, ) - def power_game_server( + def update_firewall_rule_set( self, id: str, *, - signal: 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.GameServer: - """Call ``POST /v1/game-servers/{id}:power``.""" + ) -> m.FirewallRuleSet: + """Call ``PATCH /v1/firewall/rulesets/{id}``.""" return self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}:power", - m.GameServer, + "PATCH", + f"/v1/firewall/rulesets/{_path(id)}", + m.FirewallRuleSet, query=_query(extra_query), - body=_body(m.PowerGameServerBody, extra_body, False, ("signal", signal)), + body=_body(m.UpdateFirewallRuleSetBody, extra_body, False, ("ruleset", ruleset)), idempotent=False, timeout=timeout, ) - def read_file( + +class GameServerService(_Service): + """The NodeRings GameServerService API.""" + + def archive_files( self, id: str, *, - path: 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.ReadFileResponse: - """Call ``GET /v1/game-servers/{id}/files/content``.""" + ) -> m.ArchiveFilesResponse: + """Call ``POST /v1/game-servers/{id}/files:archive``.""" return self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/files/content", - m.ReadFileResponse, - query=_query(extra_query, ("path", path)), - body=None, + "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)), idempotent=False, timeout=timeout, ) - def reinstall_game_server( + def change_game_server_game( self, 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}:reinstall``.""" + """Call ``POST /v1/game-servers/{id}:changeGame``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}:reinstall", + f"/v1/game-servers/{_path(id)}:changeGame", m.GameServer, query=_query(extra_query), - body=_body(m.ReinstallGameServerBody, extra_body, False), + body=_body( + m.ChangeGameServerGameBody, + extra_body, + False, + ("accept_eula", accept_eula), + ("environment", environment), + ("template_id", template_id), + ), idempotent=False, timeout=timeout, ) - def rename_file( + def copy_file( self, id: str, *, - dest: str | None = None, - root: str | None = None, - source: 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, ) -> m.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/files:rename``.""" + """Call ``POST /v1/game-servers/{id}/files:copy``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/files:rename", + f"/v1/game-servers/{_path(id)}/files:copy", m.SuccessResponse, query=_query(extra_query), - body=_body(m.RenameFileBody, extra_body, False, ("dest", dest), ("root", root), ("source", source)), + body=_body(m.CopyFileBody, extra_body, False, ("location", location)), idempotent=False, timeout=timeout, ) - def rename_game_server( + def create_allocation( 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.GameServer: - """Call ``POST /v1/game-servers/{id}:rename``.""" + ) -> m.GameServerAllocation: + """Call ``POST /v1/game-servers/{id}/allocations``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}:rename", - m.GameServer, + f"/v1/game-servers/{_path(id)}/allocations", + m.GameServerAllocation, query=_query(extra_query), - body=_body(m.RenameGameServerBody, extra_body, False, ("name", name)), + body=_body(m.CreateAllocationBody, extra_body, False), idempotent=False, timeout=timeout, ) - def restore_backup( + def create_backup( self, id: str, - backup_uuid: str, *, - truncate: 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.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. - """ + ) -> m.GameServerBackup: + """Call ``POST /v1/game-servers/{id}/backups``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}:restore", - m.SuccessResponse, + f"/v1/game-servers/{_path(id)}/backups", + m.GameServerBackup, query=_query(extra_query), - body=_body(m.GameServerRestoreBackupBody, extra_body, False, ("truncate", truncate)), + body=_body(m.CreateBackupBody, extra_body, False, ("name", name)), idempotent=False, timeout=timeout, ) - def rotate_database_password( + def create_database( self, id: str, - database_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/{databaseId}:rotate``.""" + """Call ``POST /v1/game-servers/{id}/databases``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/databases/{_path(database_id)}:rotate", + f"/v1/game-servers/{_path(id)}/databases", m.GameServerDatabase, query=_query(extra_query), - body=_body(m.RotateDatabasePasswordBody, extra_body, False), + body=_body(m.CreateDatabaseBody, extra_body, False, ("database", database), ("remote", remote)), idempotent=False, timeout=timeout, ) - def set_primary_allocation( + def create_folder( self, id: str, - allocation_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}/allocations/{allocationId}:primary``.""" + """Call ``POST /v1/game-servers/{id}/files:folder``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}:primary", + f"/v1/game-servers/{_path(id)}/files:folder", m.SuccessResponse, query=_query(extra_query), - body=_body(m.SetPrimaryAllocationBody, extra_body, False), + body=_body(m.CreateFolderBody, extra_body, False, ("name", name), ("root", root)), idempotent=False, timeout=timeout, ) - def update_allocation( + def create_game_server( self, - id: str, - allocation_id: str, *, - notes: 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.GameServerAllocation: - """Call ``POST /v1/game-servers/{id}/allocations/{allocationId}``.""" + ) -> 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 self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}", - m.GameServerAllocation, + "/v1/game-servers", + m.GameServer, query=_query(extra_query), - body=_body(m.UpdateAllocationBody, extra_body, False, ("notes", notes)), - idempotent=False, - timeout=timeout, - ) - - 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 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, + 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 update_schedule( + def create_schedule( self, id: str, - schedule_id: str, *, day_of_month: str | None = None, day_of_week: str | None = None, @@ -4726,14 +4822,19 @@ def update_schedule( extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.GameServerSchedule: - """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}``.""" + """ + Call ``POST /v1/game-servers/{id}/schedules``. + + Args: + is_active: Omitted means the schedule is created enabled. + """ return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}", + f"/v1/game-servers/{_path(id)}/schedules", m.GameServerSchedule, query=_query(extra_query), body=_body( - m.UpdateScheduleBody, + m.CreateScheduleBody, extra_body, False, ("day_of_month", day_of_month), @@ -4749,1367 +4850,1105 @@ def update_schedule( timeout=timeout, ) - def update_schedule_task( + def create_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. - """ + """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}/tasks``.""" return self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks/{_path(task_id)}", + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks", m.SuccessResponse, query=_query(extra_query), body=_body( - m.UpdateScheduleTaskBody, + m.CreateScheduleTaskBody, 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 update_startup_variable( + def delete_allocation( self, id: str, + allocation_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``.""" + """Call ``DELETE /v1/game-servers/{id}/allocations/{allocationId}``.""" return self._client._call( - "PUT", - f"/v1/game-servers/{_path(id)}/startup", + "DELETE", + f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}", m.SuccessResponse, query=_query(extra_query), - body=_body(m.UpdateStartupVariableBody, extra_body, False, ("key", key), ("value", value)), + body=None, idempotent=False, timeout=timeout, ) - def upload_file( + def delete_backup( self, id: str, + backup_uuid: str, *, - content: bytes | None = None, - directory: str | None = None, - filename: str | None = None, - extra_body: dict[str, Any] | None = None, + truncate: bool | 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/game-servers/{id}/backups/{backupUuid}``. + + 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)}/files:upload", + "DELETE", + f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}", m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.UploadFileBody, - extra_body, - False, - ("content", content), - ("directory", directory), - ("filename", filename), - ), + query=_query(extra_query, ("truncate", truncate)), + body=None, idempotent=False, timeout=timeout, ) - def write_file( + def delete_database( self, id: str, + database_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``.""" + """Call ``DELETE /v1/game-servers/{id}/databases/{databaseId}``.""" return self._client._call( - "PUT", - f"/v1/game-servers/{_path(id)}/files", + "DELETE", + f"/v1/game-servers/{_path(id)}/databases/{_path(database_id)}", m.SuccessResponse, query=_query(extra_query), - body=_body(m.WriteFileBody, extra_body, False, ("content", content), ("path", path)), + body=None, idempotent=False, timeout=timeout, ) - -class GameServerTemplateService(_Service): - """The NodeRings GameServerTemplateService API.""" - - def duplicate_game_server_template( + def delete_files( self, id: str, *, - name: 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.GameServerTemplate: - """Call ``POST /v1/game-server-templates/{id}:duplicate``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/files:delete``.""" return self._client._call( "POST", - f"/v1/game-server-templates/{_path(id)}:duplicate", - m.GameServerTemplate, + f"/v1/game-servers/{_path(id)}/files:delete", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.DuplicateGameServerTemplateBody, extra_body, False, ("name", name)), + body=_body(m.DeleteFilesBody, extra_body, False, ("files", files), ("root", root)), idempotent=False, timeout=timeout, ) - def import_game_server_template( + def delete_game_server( self, + id: str, *, - 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``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}``.""" return self._client._call( - "POST", - "/v1/game-server-templates:import", - m.GameServerTemplate, + "DELETE", + f"/v1/game-servers/{_path(id)}", + m.SuccessResponse, 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), - ), + body=None, idempotent=False, timeout=timeout, ) - def list_game_server_templates( + def delete_schedule( self, + id: str, + schedule_id: str, *, - platform_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListGameServerTemplatesResponse: - """Call ``GET /v1/game-server-templates``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}/schedules/{scheduleId}``.""" return self._client._call( - "GET", - "/v1/game-server-templates", - m.ListGameServerTemplatesResponse, - query=_query(extra_query, ("platformId", platform_id)), + "DELETE", + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def set_game_nest_ordering( + def delete_schedule_task( self, + id: str, + schedule_id: str, + task_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.SuccessResponse: - """Call ``POST /v1/game-server-templates:nest-ordering``.""" + """Call ``DELETE /v1/game-servers/{id}/schedules/{scheduleId}/tasks/{taskId}``.""" return self._client._call( - "POST", - "/v1/game-server-templates:nest-ordering", + "DELETE", + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks/{_path(task_id)}", 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, ) - def update_game_server_template( + def download_file( 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, + path: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerTemplate: - """Call ``PATCH /v1/game-server-templates/{id}``.""" + ) -> m.DownloadFileResponse: + """Call ``GET /v1/game-servers/{id}/files/download``.""" return 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), - ), + "GET", + f"/v1/game-servers/{_path(id)}/files/download", + m.DownloadFileResponse, + query=_query(extra_query, ("path", path)), + body=None, idempotent=False, timeout=timeout, ) - -class GroupService(_Service): - """The NodeRings GroupService API.""" - - def add_service_account_to_group( + def execute_schedule( self, + id: str, + schedule_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/game-servers/{id}/schedules/{scheduleId}:execute``.""" return self._client._call( "POST", - "/v1/groups/add-service-account", + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}:execute", 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.ExecuteScheduleBody, extra_body, False), idempotent=False, timeout=timeout, ) - def add_user_to_group( + def get_game_server( 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 ``POST /v1/groups/add-user``.""" + ) -> m.GameServer: + """Call ``GET /v1/game-servers/{id}``.""" return self._client._call( - "POST", - "/v1/groups/add-user", - m.SuccessResponse, + "GET", + f"/v1/game-servers/{_path(id)}", + m.GameServer, query=_query(extra_query), - body=_body(m.AddUserToGroupRequest, extra_body, False, ("group_id", group_id), ("user_ids", user_ids)), + body=None, idempotent=False, timeout=timeout, ) - def create_group( + def get_game_server_resources( 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.CreateGroupResponse: - """Call ``POST /v1/groups``.""" + ) -> m.GameServerResources: + """Call ``GET /v1/game-servers/{id}/resources``.""" return self._client._call( - "POST", - "/v1/groups", - m.CreateGroupResponse, + "GET", + f"/v1/game-servers/{_path(id)}/resources", + m.GameServerResources, query=_query(extra_query), - body=_body( - m.CreateGroupRequest, - extra_body, - False, - ("description", description), - ("group_roles", group_roles), - ("name", name), - ), + body=None, idempotent=False, timeout=timeout, ) - def delete_group( + def get_startup( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/groups/{id}``.""" + ) -> m.GetStartupResponse: + """Call ``GET /v1/game-servers/{id}/startup``.""" return self._client._call( - "DELETE", - f"/v1/groups/{_path(id)}", - m.SuccessResponse, + "GET", + f"/v1/game-servers/{_path(id)}/startup", + m.GetStartupResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_group( + def list_allocations( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetGroupResponse: - """Call ``GET /v1/groups/{id}``.""" + ) -> m.ListGameServerAllocationsResponse: + """Call ``GET /v1/game-servers/{id}/allocations``.""" return self._client._call( "GET", - f"/v1/groups/{_path(id)}", - m.GetGroupResponse, + f"/v1/game-servers/{_path(id)}/allocations", + m.ListGameServerAllocationsResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_groups( + def list_backups( 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.ListGameServerBackupsResponse: + """Call ``GET /v1/game-servers/{id}/backups``.""" 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/game-servers/{_path(id)}/backups", + m.ListGameServerBackupsResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_groups_all( + def list_databases( 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, - ) -> 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.ListDatabasesResponse: + """Call ``GET /v1/game-servers/{id}/databases``.""" + return self._client._call( + "GET", + f"/v1/game-servers/{_path(id)}/databases", + m.ListDatabasesResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - def remove_service_account_from_group( + def list_files( self, + id: str, *, - group_id: str | None = None, - service_account_ids: list[str] | None = None, + directory: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/groups/remove-service-account``.""" + ) -> m.ListFilesResponse: + """Call ``GET /v1/game-servers/{id}/files``.""" 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/game-servers/{_path(id)}/files", + m.ListFilesResponse, + query=_query(extra_query, ("directory", directory)), body=None, idempotent=False, timeout=timeout, ) - def remove_user_from_group( + def list_game_servers( self, *, - group_id: str | None = None, - user_ids: list[str] | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/groups/remove-user``.""" + ) -> m.ListGameServersResponse: + """Call ``GET /v1/game-servers``.""" return self._client._call( - "DELETE", - "/v1/groups/remove-user", - m.SuccessResponse, - query=_query(extra_query, ("groupId", group_id), ("userIds", user_ids)), + "GET", + "/v1/game-servers", + m.ListGameServersResponse, + query=_query(extra_query, ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def update_group( + def list_order_games( self, - id: str, *, - description: str | None = None, - group_roles: list[str] | None = None, - name: str | None = None, - extra_body: dict[str, Any] | None = None, + plan_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateGroupResponse: - """Call ``PATCH /v1/groups/{id}``.""" + ) -> m.ListOrderGamesResponse: + """Call ``GET /v1/game-servers:order-games``.""" 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/game-servers:order-games", + m.ListOrderGamesResponse, + query=_query(extra_query, ("planId", plan_id)), + body=None, idempotent=False, timeout=timeout, ) - -class HookScriptService(_Service): - """The NodeRings HookScriptService API.""" - - def delete_hook_script( + def list_schedules( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/hook-scripts/{id}``.""" + ) -> m.ListSchedulesResponse: + """Call ``GET /v1/game-servers/{id}/schedules``.""" return self._client._call( - "DELETE", - f"/v1/hook-scripts/{_path(id)}", - m.SuccessResponse, + "GET", + f"/v1/game-servers/{_path(id)}/schedules", + m.ListSchedulesResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_hook_scripts( + def lock_backup( self, + id: str, + backup_uuid: str, *, - page: int | None = None, - page_size: int | None = None, - subject: m.HookSubject | 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.ListHookScriptsResponse: + ) -> m.SuccessResponse: """ - Call ``GET /v1/hook-scripts``. + Call ``POST /v1/game-servers/{id}/backups/{backupUuid}:lock``. Args: - subject: Unspecified lists VM scripts, which is the previous behavior. + truncate: Restore only. When true, the panel deletes every file before extracting the backup. """ return self._client._call( - "GET", - "/v1/hook-scripts", - m.ListHookScriptsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("subject", subject)), - body=None, + "POST", + f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}:lock", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.LockBackupBody, extra_body, False, ("truncate", truncate)), idempotent=False, timeout=timeout, ) - def list_hook_scripts_all( + def open_console( self, + id: 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, - ) -> Iterator[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 = 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, - *, - 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.OpenConsoleResponse: + """Call ``POST /v1/game-servers/{id}:console``.""" return self._client._call( - "PUT", - "/v1/hook-scripts", - m.HookScript, + "POST", + f"/v1/game-servers/{_path(id)}:console", + m.OpenConsoleResponse, query=_query(extra_query), - body=_body( - m.UpsertHookScriptRequest, - extra_body, - False, - ("enabled", enabled), - ("hook", hook), - ("script", script), - ("subject", subject), - ), + body=_body(m.OpenConsoleBody, extra_body, False), idempotent=False, timeout=timeout, ) - -class IPAMService(_Service): - """The NodeRings IPAMService API.""" - - def add_reserved_ip( + def power_game_server( self, - prefix_id: str, + id: str, *, - ip_address: 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: - """ - 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 - """ + ) -> m.GameServer: + """Call ``POST /v1/game-servers/{id}:power``.""" return self._client._call( "POST", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips", - m.SuccessResponse, + f"/v1/game-servers/{_path(id)}:power", + m.GameServer, query=_query(extra_query), - body=_body(m.AddReservedIPBody, extra_body, False, ("ip_address", ip_address)), + body=_body(m.PowerGameServerBody, extra_body, False, ("signal", signal)), idempotent=False, timeout=timeout, ) - def add_reserved_prefix( + def read_file( self, - prefix_id: str, + id: str, *, - cidr: 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.SuccessResponse: - """ - Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-prefixes``. - - Args: - cidr: Must match prefix vm_assignment_prefix_length exactly - """ + ) -> m.ReadFileResponse: + """Call ``GET /v1/game-servers/{id}/files/content``.""" return 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)), + "GET", + f"/v1/game-servers/{_path(id)}/files/content", + m.ReadFileResponse, + query=_query(extra_query, ("path", path)), + body=None, idempotent=False, timeout=timeout, ) - def assign_network_to_node( + def reinstall_game_server( self, - network_id: str, + 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 - """ + ) -> m.GameServer: + """Call ``POST /v1/game-servers/{id}:reinstall``.""" return self._client._call( "POST", - f"/v1/ipam/networks/{_path(network_id)}/assign-node", - m.SuccessResponse, + f"/v1/game-servers/{_path(id)}:reinstall", + m.GameServer, query=_query(extra_query), - body=_body(m.AssignNetworkToNodeBody, extra_body, False, ("node_ids", node_ids)), + body=_body(m.ReinstallGameServerBody, extra_body, False), idempotent=False, timeout=timeout, ) - def clear_all_prefix_reserved_i_ps( + def rename_file( self, - prefix_id: str, + 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/ipam/prefixes/{prefixId}/reserved-ips/clear-all``.""" + """Call ``POST /v1/game-servers/{id}/files:rename``.""" return self._client._call( "POST", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/clear-all", + f"/v1/game-servers/{_path(id)}/files:rename", m.SuccessResponse, query=_query(extra_query), - body=_body(m.ClearAllPrefixReservedIPsBody, extra_body, False), + body=_body(m.RenameFileBody, extra_body, False, ("dest", dest), ("root", root), ("source", source)), idempotent=False, timeout=timeout, ) - def create_network( + def rename_game_server( 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.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. - """ + ) -> m.GameServer: + """Call ``POST /v1/game-servers/{id}:rename``.""" return self._client._call( "POST", - "/v1/ipam/networks", - m.SuccessResponse, + f"/v1/game-servers/{_path(id)}:rename", + m.GameServer, 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), - ), + body=_body(m.RenameGameServerBody, extra_body, False, ("name", name)), idempotent=False, timeout=timeout, ) - def create_prefix( + def restore_backup( self, + id: str, + backup_uuid: 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, + truncate: bool | 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``. + Call ``POST /v1/game-servers/{id}/backups/{backupUuid}:restore``. 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 + truncate: Restore only. When true, the panel deletes every file before extracting the backup. """ return self._client._call( "POST", - "/v1/ipam/prefixes", + f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}:restore", 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), - ), + body=_body(m.GameServerRestoreBackupBody, extra_body, False, ("truncate", truncate)), idempotent=False, timeout=timeout, ) - def delete_network( + 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.SuccessResponse: - """Call ``DELETE /v1/ipam/networks/{id}``.""" + ) -> m.GameServerDatabase: + """Call ``POST /v1/game-servers/{id}/databases/{databaseId}:rotate``.""" return self._client._call( - "DELETE", - f"/v1/ipam/networks/{_path(id)}", - m.SuccessResponse, + "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 delete_prefix( + 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.SuccessResponse: - """Call ``DELETE /v1/ipam/prefixes/{id}``.""" + """Call ``POST /v1/game-servers/{id}/allocations/{allocationId}:primary``.""" return self._client._call( - "DELETE", - f"/v1/ipam/prefixes/{_path(id)}", + "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_network( + 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.GetNetworkResponse: - """Call ``GET /v1/ipam/networks/{id}``.""" + ) -> m.GameServerAllocation: + """Call ``POST /v1/game-servers/{id}/allocations/{allocationId}``.""" return self._client._call( - "GET", - f"/v1/ipam/networks/{_path(id)}", - m.GetNetworkResponse, + "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 get_node_network( + def update_docker_image( self, - node_id: str, + 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.GetNodeNetworkResponse: - """Call ``GET /v1/ipam/nodes/{nodeId}/network``.""" + ) -> m.SuccessResponse: + """Call ``PUT /v1/game-servers/{id}/docker-image``.""" return self._client._call( - "GET", - f"/v1/ipam/nodes/{_path(node_id)}/network", - m.GetNodeNetworkResponse, + "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 get_prefix( + 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.GetPrefixResponse: - """Call ``GET /v1/ipam/prefixes/{id}``.""" + ) -> m.GameServerSchedule: + """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}``.""" return self._client._call( - "GET", - f"/v1/ipam/prefixes/{_path(id)}", - m.GetPrefixResponse, + "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 get_prefix_utilization( + def update_schedule_task( self, - prefix_id: str, + 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.GetPrefixUtilizationResponse: + ) -> m.SuccessResponse: """ - Utility + Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}/tasks/{taskId}``. - It calls ``GET /v1/ipam/prefixes/{prefixId}/utilization``. + 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/ipam/prefixes/{_path(prefix_id)}/utilization", - m.GetPrefixUtilizationResponse, + "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_allocations( + def update_startup_variable( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - prefix_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.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) - """ + ) -> m.SuccessResponse: + """Call ``PUT /v1/game-servers/{id}/startup``.""" return self._client._call( - "GET", - "/v1/ipam/allocations", - m.ListAllocationsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("prefixId", prefix_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_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. - - ``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 list_available_i_ps( + def upload_file( self, - prefix_id: str, + id: str, *, - limit: int | 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.ListAvailableIPsResponse: - """ - Call ``GET /v1/ipam/prefixes/{prefixId}/available-ips``. - - Args: - limit: Limit number of IPs returned (default: 100) - """ + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/files:upload``.""" return self._client._call( - "GET", - f"/v1/ipam/prefixes/{_path(prefix_id)}/available-ips", - m.ListAvailableIPsResponse, - query=_query(extra_query, ("limit", limit)), - body=None, + "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, ) - def list_network_nodes( + def write_file( self, - network_id: str, + 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.ListNetworkNodesResponse: - """Call ``GET /v1/ipam/networks/{networkId}/nodes``.""" + ) -> m.SuccessResponse: + """Call ``PUT /v1/game-servers/{id}/files``.""" return self._client._call( - "GET", - f"/v1/ipam/networks/{_path(network_id)}/nodes", - m.ListNetworkNodesResponse, + "PUT", + f"/v1/game-servers/{_path(id)}/files", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.WriteFileBody, extra_body, False, ("content", content), ("path", path)), idempotent=False, timeout=timeout, ) - def list_networks( + +class GameServerTemplateService(_Service): + """The NodeRings GameServerTemplateService API.""" + + def duplicate_game_server_template( 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, - ) -> m.ListNetworksResponse: - """Call ``GET /v1/ipam/networks``.""" + ) -> m.GameServerTemplate: + """Call ``POST /v1/game-server-templates/{id}:duplicate``.""" return self._client._call( - "GET", - "/v1/ipam/networks", - m.ListNetworksResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), - body=None, + "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, ) - def list_networks_all( + def import_game_server_template( self, *, - page: int | None = None, - page_size: int | 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, - ) -> Iterator[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 = 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 + ) -> m.GameServerTemplate: + """Call ``POST /v1/game-server-templates:import``.""" + return 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, + ) - def list_prefixes( + def list_game_server_templates( self, *, - page: int | None = None, - page_size: int | None = None, - filter_network_id: str | None = None, + platform_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPrefixesResponse: - """Call ``GET /v1/ipam/prefixes``.""" + ) -> m.ListGameServerTemplatesResponse: + """Call ``GET /v1/game-server-templates``.""" return self._client._call( "GET", - "/v1/ipam/prefixes", - m.ListPrefixesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterNetworkId", filter_network_id)), + "/v1/game-server-templates", + m.ListGameServerTemplatesResponse, + query=_query(extra_query, ("platformId", platform_id)), body=None, idempotent=False, timeout=timeout, ) - 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, - ) -> Iterator[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 = 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 - - def remove_reserved_ip( + def set_game_nest_ordering( self, - prefix_id: str, - ip_address: 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.SuccessResponse: - """Call ``DELETE /v1/ipam/prefixes/{prefixId}/reserved-ips/{ipAddress}``.""" + """Call ``POST /v1/game-server-templates:nest-ordering``.""" return self._client._call( - "DELETE", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/{_path(ip_address)}", + "POST", + "/v1/game-server-templates:nest-ordering", m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body( + m.SetGameNestOrderingRequest, + extra_body, + False, + ("catalog_key", catalog_key), + ("ordering_enabled", ordering_enabled), + ("platform_id", platform_id), + ), idempotent=False, timeout=timeout, ) - def remove_reserved_prefix( + def update_game_server_template( self, - prefix_id: str, + id: str, *, - cidr: 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.SuccessResponse: - """Call ``DELETE /v1/ipam/prefixes/{prefixId}/reserved-prefixes``.""" + ) -> m.GameServerTemplate: + """Call ``PATCH /v1/game-server-templates/{id}``.""" return self._client._call( - "DELETE", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-prefixes", - m.SuccessResponse, - query=_query(extra_query, ("cidr", cidr)), - body=None, + "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, ) - def reserve_all_prefix_i_ps( + +class GroupService(_Service): + """The NodeRings GroupService API.""" + + def add_service_account_to_group( 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/ipam/prefixes/{prefixId}/reserved-ips/reserve-all``.""" + """Call ``POST /v1/groups/add-service-account``.""" return self._client._call( "POST", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/reserve-all", + "/v1/groups/add-service-account", m.SuccessResponse, query=_query(extra_query), - body=_body(m.ReserveAllPrefixIPsBody, extra_body, False), + body=_body( + m.AddServiceAccountToGroupRequest, + extra_body, + False, + ("group_id", group_id), + ("service_account_ids", service_account_ids), + ), idempotent=False, timeout=timeout, ) - def unassign_network_from_node( + def add_user_to_group( self, - node_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 ``POST /v1/ipam/nodes/{nodeId}/unassign-network``.""" + """Call ``POST /v1/groups/add-user``.""" return self._client._call( "POST", - f"/v1/ipam/nodes/{_path(node_id)}/unassign-network", + "/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, ) - def update_network( + def create_group( self, - id: str, *, description: str | None = None, - dns_servers: list[str] | None = None, - mac_address_prefix: 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.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. - """ + ) -> m.CreateGroupResponse: + """Call ``POST /v1/groups``.""" return self._client._call( - "PATCH", - f"/v1/ipam/networks/{_path(id)}", - m.UpdateNetworkResponse, + "POST", + "/v1/groups", + m.CreateGroupResponse, query=_query(extra_query), body=_body( - m.UpdateNetworkBody, + m.CreateGroupRequest, extra_body, False, ("description", description), - ("dns_servers", dns_servers), - ("mac_address_prefix", mac_address_prefix), + ("group_roles", group_roles), ("name", name), ), idempotent=False, timeout=timeout, ) - def update_prefix( + def delete_group( 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}``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/groups/{id}``.""" return self._client._call( - "PATCH", - f"/v1/ipam/prefixes/{_path(id)}", - m.UpdatePrefixResponse, + "DELETE", + f"/v1/groups/{_path(id)}", + m.SuccessResponse, 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), - ), + body=None, idempotent=False, timeout=timeout, ) - -class InstantAppService(_Service): - """The NodeRings InstantAppService API.""" - - def get_instant_app( + def get_group( 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}``.""" + ) -> m.GetGroupResponse: + """Call ``GET /v1/groups/{id}``.""" return self._client._call( "GET", - f"/v1/instantapps/{_path(id)}", - m.InstantApp, - query=_query(extra_query, ("slug", slug)), + f"/v1/groups/{_path(id)}", + m.GetGroupResponse, + query=_query(extra_query), 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( + def list_groups( 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, + 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.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 - """ + ) -> m.ListGroupsResponse: + """Call ``GET /v1/groups``.""" return self._client._call( "GET", - "/v1/instantapps", - m.ListInstantAppsResponse, + "/v1/groups", + m.ListGroupsResponse, query=_query( extra_query, ("page", page), ("pageSize", page_size), - ("query", query), - ("categories", categories), - ("distro", distro), + ("filterName", filter_name), + ("filterStatus", filter_status), + ("search", search), ), body=None, idempotent=False, timeout=timeout, ) - def list_instant_apps_all( + def list_groups_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, + 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.InstantApp]: + ) -> Iterator[m.Group]: """ - Every result of :meth:`list_instant_apps`, 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). """ @@ -6117,16 +5956,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_groups( page=page, page_size=size, - query=query, - categories=categories, - distro=distro, + filter_name=filter_name, + filter_status=filter_status, + search=search, extra_query=extra_query, timeout=timeout, ) - items = res.instant_apps + items = res.groups for item in items: yield item seen += len(items) @@ -6134,85 +5973,88 @@ def list_instant_apps_all( return page += 1 - -class InviteService(_Service): - """The NodeRings InviteService API.""" - - def accept_invite( + def remove_service_account_from_group( self, *, - invite_id: str | 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 ``GET /v1/invites/accept``.""" + """Call ``DELETE /v1/groups/remove-service-account``.""" return self._client._call( - "GET", - "/v1/invites/accept", + "DELETE", + "/v1/groups/remove-service-account", m.SuccessResponse, - query=_query(extra_query, ("inviteId", invite_id)), + query=_query(extra_query, ("groupId", group_id), ("serviceAccountIds", service_account_ids)), body=None, idempotent=False, timeout=timeout, ) - def create_invite( + def remove_user_from_group( self, *, group_id: str | None = None, - invitee_emails: list[str] | None = None, - role_id: str | None = None, - extra_body: dict[str, Any] | None = None, + user_ids: list[str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/invites``.""" + """Call ``DELETE /v1/groups/remove-user``.""" return self._client._call( - "POST", - "/v1/invites", + "DELETE", + "/v1/groups/remove-user", 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, ("groupId", group_id), ("userIds", user_ids)), + body=None, idempotent=False, timeout=timeout, ) - def decline_invite( + def update_group( self, + id: str, *, - invite_id: 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 ``GET /v1/invites/decline``.""" + ) -> m.UpdateGroupResponse: + """Call ``PATCH /v1/groups/{id}``.""" return self._client._call( - "GET", - "/v1/invites/decline", - m.SuccessResponse, - query=_query(extra_query, ("inviteId", invite_id)), - body=None, + "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, ) - def delete_invite( + +class HookScriptService(_Service): + """The NodeRings HookScriptService API.""" + + def delete_hook_script( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/invites/{id}``.""" + """Call ``DELETE /v1/hook-scripts/{id}``.""" return self._client._call( "DELETE", - f"/v1/invites/{_path(id)}", + f"/v1/hook-scripts/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -6220,41 +6062,42 @@ def delete_invite( timeout=timeout, ) - def list_invites( + def list_hook_scripts( self, *, page: int | None = None, page_size: int | None = None, - filter_email: str | None = None, - search: str | None = None, + subject: m.HookSubject | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListInvitesResponse: - """Call ``GET /v1/invites``.""" + ) -> m.ListHookScriptsResponse: + """ + Call ``GET /v1/hook-scripts``. + + Args: + subject: Unspecified lists VM scripts, which is the previous behavior. + """ return self._client._call( "GET", - "/v1/invites", - m.ListInvitesResponse, - query=_query( - extra_query, ("page", page), ("pageSize", page_size), ("filterEmail", filter_email), ("search", search) - ), + "/v1/hook-scripts", + m.ListHookScriptsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("subject", subject)), body=None, idempotent=False, timeout=timeout, ) - def list_invites_all( + def list_hook_scripts_all( self, *, page: int | None = None, page_size: int | None = None, - filter_email: str | None = None, - search: str | None = None, + subject: m.HookSubject | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Invite]: + ) -> Iterator[m.HookScript]: """ - Every result of :meth:`list_invites`, reading page after page. + 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). """ @@ -6262,15 +6105,14 @@ 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_hook_scripts( page=page, page_size=size, - filter_email=filter_email, - search=search, + subject=subject, extra_query=extra_query, timeout=timeout, ) - items = res.invites + items = res.hook_scripts for item in items: yield item seen += len(items) @@ -6278,366 +6120,379 @@ def list_invites_all( return page += 1 - def list_my_invites( + def upsert_hook_script( self, *, - page: int | None = None, - page_size: int | 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.ListMyInvitesResponse: - """Call ``GET /v1/invites/me``.""" + ) -> 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( - "GET", - "/v1/invites/me", - m.ListMyInvitesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), - body=None, + "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, ) - def list_my_invites_all( + +class IPAMService(_Service): + """The NodeRings IPAMService API.""" + + def add_reserved_ip( self, + prefix_id: str, *, - page: int | None = None, - page_size: int | 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, - ) -> Iterator[m.Invite]: + ) -> m.SuccessResponse: """ - Every result of :meth:`list_my_invites`, reading page after page. + IP Reservation (manage reserved_ips array in prefix) - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + It calls ``POST /v1/ipam/prefixes/{prefixId}/reserved-ips``. + + Args: + ip_address: Must be within prefix CIDR """ - page = page or 0 - 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 - 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 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 self._client._call( "POST", - f"/v1/invites/resend/{_path(invite_id)}", + f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips", m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.AddReservedIPBody, extra_body, False, ("ip_address", ip_address)), idempotent=False, timeout=timeout, ) - def update_invite( + def add_reserved_prefix( self, + prefix_id: str, *, - group_id: str | None = None, - invite_id: str | None = None, - role_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 ``PATCH /v1/invites``.""" + """ + Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-prefixes``. + + Args: + cidr: Must match prefix vm_assignment_prefix_length exactly + """ return self._client._call( - "PATCH", - "/v1/invites", + "POST", + f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-prefixes", 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), - ), + body=_body(m.AddReservedPrefixBody, extra_body, False, ("cidr", cidr)), idempotent=False, timeout=timeout, ) - -class InvoiceService(_Service): - """The NodeRings InvoiceService API.""" - - def get_invoice( + def assign_network_to_node( self, - invoice_id: str, + 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.GetInvoiceResponse: + ) -> m.SuccessResponse: """ - GetInvoice retrieves a single invoice with line items + Node-Network assignment - It calls ``GET /v1/invoices/{invoiceId}``. + 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( - "GET", - f"/v1/invoices/{_path(invoice_id)}", - m.GetInvoiceResponse, + "POST", + f"/v1/ipam/networks/{_path(network_id)}/assign-node", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.AssignNetworkToNodeBody, extra_body, False, ("node_ids", node_ids)), idempotent=False, timeout=timeout, ) - def list_invoices( + def clear_all_prefix_reserved_i_ps( self, + prefix_id: str, *, - 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_body: dict[str, Any] | 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.SuccessResponse: + """Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-ips/clear-all``.""" 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), - ), - body=None, + "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, ) - def list_invoices_all( + def create_network( 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, + 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, - ) -> Iterator[m.Invoice]: + ) -> m.SuccessResponse: """ - Every result of :meth:`list_invoices`, reading page after page. + IPAM Network management - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + 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. """ - 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 + return 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, + ) - def pay_invoice( + def create_prefix( self, - invoice_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.PayInvoiceResponse: + ) -> m.SuccessResponse: """ - 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. + Prefix management - It calls ``POST /v1/invoices/{invoiceId}:pay``. + 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", - f"/v1/invoices/{_path(invoice_id)}:pay", - m.PayInvoiceResponse, + "/v1/ipam/prefixes", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.PayInvoiceBody, extra_body, False), + 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, ) - -class LiveValidationService(_Service): - """The NodeRings LiveValidationService API.""" - - def delete_plan_live_validation( + def delete_network( self, - plan_id: str, + 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``.""" + """Call ``DELETE /v1/ipam/networks/{id}``.""" return self._client._call( "DELETE", - f"/v1/provider/plans/{_path(plan_id)}/live-validation", + f"/v1/ipam/networks/{_path(id)}", m.SuccessResponse, - query=_query(extra_query, ("nodeId", node_id)), + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_plan_live_validation( + def delete_prefix( self, - plan_id: str, + 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``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/ipam/prefixes/{id}``.""" return self._client._call( - "GET", - f"/v1/provider/plans/{_path(plan_id)}/live-validation", - m.GetPlanLiveValidationResponse, - query=_query(extra_query, ("nodeId", node_id)), + "DELETE", + f"/v1/ipam/prefixes/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_eligible_nodes_for_plan( + def get_network( self, - plan_id: str, + 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.GetNetworkResponse: + """Call ``GET /v1/ipam/networks/{id}``.""" return self._client._call( "GET", - f"/v1/provider/plans/{_path(plan_id)}/live-validation/nodes", - m.ListEligibleNodesForPlanResponse, + f"/v1/ipam/networks/{_path(id)}", + m.GetNetworkResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_plan_live_validation_benchmarks( + def get_node_network( self, - plan_id: str, + node_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``.""" + ) -> m.GetNodeNetworkResponse: + """Call ``GET /v1/ipam/nodes/{nodeId}/network``.""" 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)), + f"/v1/ipam/nodes/{_path(node_id)}/network", + m.GetNodeNetworkResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_plan_live_validation_benchmarks_all( + def get_prefix( self, - plan_id: str, + 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, - ) -> Iterator[m.PlanLiveValidationBenchmarkView]: + ) -> m.GetPrefixResponse: + """Call ``GET /v1/ipam/prefixes/{id}``.""" + return self._client._call( + "GET", + f"/v1/ipam/prefixes/{_path(id)}", + m.GetPrefixResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + def get_prefix_utilization( + self, + prefix_id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetPrefixUtilizationResponse: """ - Every result of :meth:`list_plan_live_validation_benchmarks`, reading page after page. + Utility - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + It calls ``GET /v1/ipam/prefixes/{prefixId}/utilization``. """ - page = page or 0 - 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, - 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 + return self._client._call( + "GET", + f"/v1/ipam/prefixes/{_path(prefix_id)}/utilization", + m.GetPrefixUtilizationResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - def list_plan_live_validations( + def list_allocations( self, *, - plan_id: str | None = None, - search: str | 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.ListPlanLiveValidationsResponse: - """Call ``GET /v1/provider/live-validations``.""" + ) -> 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( "GET", - "/v1/provider/live-validations", - m.ListPlanLiveValidationsResponse, - query=_query(extra_query, ("planId", plan_id), ("search", search), ("page", page), ("pageSize", page_size)), + "/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_plan_live_validations_all( + def list_allocations_all( self, *, - plan_id: str | None = None, - search: str | 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, - ) -> Iterator[m.PlanLiveValidationView]: + ) -> Iterator[m.IPAllocation]: """ - Every result of :meth:`list_plan_live_validations`, 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). """ @@ -6645,394 +6500,402 @@ 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_allocations( page=page, page_size=size, - plan_id=plan_id, - search=search, + prefix_id=prefix_id, extra_query=extra_query, timeout=timeout, ) - items = res.validations + 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 - 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 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 ManualPayoutService(_Service): - """The NodeRings ManualPayoutService API.""" - - def create_manual_payout( + def list_available_i_ps( self, + prefix_id: str, *, - 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, + limit: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateManualPayoutResponse: + ) -> m.ListAvailableIPsResponse: """ - Call ``POST /v1/provider/manual-payout``. + Call ``GET /v1/ipam/prefixes/{prefixId}/available-ips``. 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) + limit: Limit number of IPs returned (default: 100) """ 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", + f"/v1/ipam/prefixes/{_path(prefix_id)}/available-ips", + m.ListAvailableIPsResponse, + query=_query(extra_query, ("limit", limit)), + body=None, idempotent=False, timeout=timeout, ) - def delete_manual_payout( + def list_network_nodes( self, + network_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/provider/manual-payout``.""" + ) -> m.ListNetworkNodesResponse: + """Call ``GET /v1/ipam/networks/{networkId}/nodes``.""" return self._client._call( - "DELETE", - "/v1/provider/manual-payout", - m.SuccessResponse, + "GET", + f"/v1/ipam/networks/{_path(network_id)}/nodes", + m.ListNetworkNodesResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_manual_payout( + 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.GetManualPayoutResponse: - """Call ``GET /v1/provider/manual-payout``.""" + ) -> m.ListNetworksResponse: + """Call ``GET /v1/ipam/networks``.""" return self._client._call( "GET", - "/v1/provider/manual-payout", - m.GetManualPayoutResponse, - query=_query(extra_query), + "/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]: + """ + Every result of :meth:`list_networks`, reading page after page. -class MarketplaceService(_Service): - """The NodeRings MarketplaceService 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_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 get_marketplace_plan( + def list_prefixes( self, - plan_id: str, *, + 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.GetMarketplacePlanResponse: - """Call ``GET /v1/marketplace/plans/{planId}``.""" + ) -> m.ListPrefixesResponse: + """Call ``GET /v1/ipam/prefixes``.""" return self._client._call( "GET", - f"/v1/marketplace/plans/{_path(plan_id)}", - m.GetMarketplacePlanResponse, - query=_query(extra_query), + "/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 get_provider( + def list_prefixes_all( self, - provider_id: str, *, + 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.GetProviderResponse: - """Call ``GET /v1/marketplace/providers/{providerId}``.""" + ) -> Iterator[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 = 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 + + 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 self._client._call( - "GET", - f"/v1/marketplace/providers/{_path(provider_id)}", - m.GetProviderResponse, + "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, ) - def get_public_storefront( + def remove_reserved_prefix( self, - slug: str, + prefix_id: str, *, + cidr: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPublicStorefrontResponse: - """Call ``GET /v1/public/storefronts/{slug}``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/ipam/prefixes/{prefixId}/reserved-prefixes``.""" return self._client._call( - "GET", - f"/v1/public/storefronts/{_path(slug)}", - m.GetPublicStorefrontResponse, - query=_query(extra_query), + "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 get_public_storefront_by_id( + def reserve_all_prefix_i_ps( self, - provider_id: str, + prefix_id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPublicStorefrontResponse: - """Call ``GET /v1/public/storefronts/by-id/{providerId}``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-ips/reserve-all``.""" return self._client._call( - "GET", - f"/v1/public/storefronts/by-id/{_path(provider_id)}", - m.GetPublicStorefrontResponse, + "POST", + f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/reserve-all", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.ReserveAllPrefixIPsBody, extra_body, False), idempotent=False, timeout=timeout, ) - def list_available_addons( + def unassign_network_from_node( self, + node_id: str, *, - 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) - """ + ) -> m.SuccessResponse: + """Call ``POST /v1/ipam/nodes/{nodeId}/unassign-network``.""" 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), - ), + "POST", + f"/v1/ipam/nodes/{_path(node_id)}/unassign-network", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_available_addons_all( + def update_network( self, + id: str, *, - 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, + 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, - ) -> Iterator[m.Addon]: + ) -> m.UpdateNetworkResponse: """ - Every result of :meth:`list_available_addons`, reading page after page. + Call ``PATCH /v1/ipam/networks/{id}``. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + Args: + mac_address_prefix: First 3 octets for MAC allocation within this network. Empty = leave unchanged 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_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 + 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), + ), + idempotent=False, + timeout=timeout, + ) - def list_available_plans( + def update_prefix( self, + id: str, *, - 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, + 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.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) - """ + ) -> m.UpdatePrefixResponse: + """Call ``PATCH /v1/ipam/prefixes/{id}``.""" 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), + "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), ), - body=None, idempotent=False, timeout=timeout, ) - def list_available_regions( + +class InstantAppService(_Service): + """The NodeRings InstantAppService API.""" + + def get_instant_app( self, + id: str, *, - filter_asset_type: m.AssetType | str | None = None, + slug: 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). - """ + ) -> m.InstantApp: + """Call ``GET /v1/instantapps/{id}``.""" return self._client._call( "GET", - "/v1/marketplace/regions", - m.ListAvailableRegionsResponse, - query=_query(extra_query, ("filterAssetType", filter_asset_type)), + f"/v1/instantapps/{_path(id)}", + m.InstantApp, + query=_query(extra_query, ("slug", slug)), body=None, idempotent=False, timeout=timeout, ) - def list_marketplace_provider_directory( + 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, - search: str | None = None, - filter_asset_type: m.AssetType | 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.ListMarketplaceProviderDirectoryResponse: - """Call ``GET /v1/marketplace/provider-directory``.""" + ) -> 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/marketplace/provider-directory", - m.ListMarketplaceProviderDirectoryResponse, + "/v1/instantapps", + m.ListInstantAppsResponse, query=_query( extra_query, ("page", page), ("pageSize", page_size), - ("search", search), - ("filterAssetType", filter_asset_type), + ("query", query), + ("categories", categories), + ("distro", distro), ), body=None, idempotent=False, timeout=timeout, ) - def list_marketplace_provider_directory_all( + def list_instant_apps_all( self, *, page: int | None = None, page_size: int | None = None, - search: str | None = None, - filter_asset_type: m.AssetType | 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.ProviderInfo]: + ) -> Iterator[m.InstantApp]: """ - Every result of :meth:`list_marketplace_provider_directory`, 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). """ @@ -7040,15 +6903,16 @@ 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_instant_apps( page=page, page_size=size, - search=search, - filter_asset_type=filter_asset_type, + query=query, + categories=categories, + distro=distro, extra_query=extra_query, timeout=timeout, ) - items = res.providers + items = res.instant_apps for item in items: yield item seen += len(items) @@ -7056,78 +6920,127 @@ def list_marketplace_provider_directory_all( return page += 1 - def list_providers( + +class InviteService(_Service): + """The NodeRings InviteService API.""" + + 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 self._client._call( + "GET", + "/v1/invites/accept", + m.SuccessResponse, + query=_query(extra_query, ("inviteId", invite_id)), + body=None, + idempotent=False, + timeout=timeout, + ) + + 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 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", + "/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_invites( 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, + filter_email: 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. - """ + ) -> m.ListInvitesResponse: + """Call ``GET /v1/invites``.""" return self._client._call( "GET", - "/v1/marketplace/providers", - m.ListProvidersResponse, + "/v1/invites", + m.ListInvitesResponse, 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), + extra_query, ("page", page), ("pageSize", page_size), ("filterEmail", filter_email), ("search", search) ), body=None, idempotent=False, timeout=timeout, ) - def list_providers_all( + def list_invites_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, + filter_email: 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]: + ) -> Iterator[m.Invite]: """ - Every result of :meth:`list_providers`, 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). """ @@ -7135,22 +7048,15 @@ def list_providers_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_providers( + res = self.list_invites( 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, + filter_email=filter_email, 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 + items = res.invites for item in items: yield item seen += len(items) @@ -7158,45 +7064,35 @@ def list_providers_all( return page += 1 - def list_public_storefronts( + def list_my_invites( 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``.""" + ) -> m.ListMyInvitesResponse: + """Call ``GET /v1/invites/me``.""" return self._client._call( "GET", - "/v1/public/storefronts", - m.ListPublicStorefrontsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("search", search), - ("filterCountry", filter_country), - ), + "/v1/invites/me", + m.ListMyInvitesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def list_public_storefronts_all( + def list_my_invites_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]: + ) -> Iterator[m.Invite]: """ - Every result of :meth:`list_public_storefronts`, 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). """ @@ -7204,15 +7100,8 @@ def list_public_storefronts_all( 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 + 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) @@ -7220,188 +7109,124 @@ def list_public_storefronts_all( return page += 1 - def search_marketplace( + def resend_invite( self, + invite_id: str, *, - 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). - """ + ) -> m.SuccessResponse: + """Call ``POST /v1/invites/resend/{inviteId}``.""" return 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 MetadataService(_Service): - """The NodeRings MetadataService API.""" - - 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 self._client._call( - "GET", - "/v1/platform-versions", - m.PlatformVersions, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def get_version( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.Metadata: - """Call ``GET /v1/version``.""" - return self._client._call( - "GET", - "/v1/version", - m.Metadata, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def health_check( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.HealthCheckResponse: - """Call ``GET /v1/healthz``.""" - return self._client._call( - "GET", - "/v1/healthz", - m.HealthCheckResponse, + f"/v1/invites/resend/{_path(invite_id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_distros( + 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.ListDistrosResponse: - """ - ListDistros returns the guest OS catalog used by the virtual machine image picker. - - It calls ``GET /v1/distros``. - """ + ) -> m.SuccessResponse: + """Call ``PATCH /v1/invites``.""" return self._client._call( - "GET", - "/v1/distros", - m.ListDistrosResponse, + "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, ) -class MetricService(_Service): - """The NodeRings MetricService API.""" +class InvoiceService(_Service): + """The NodeRings InvoiceService API.""" - def get_metric( + def get_invoice( self, - id: str, + invoice_id: str, *, - code: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetMetricResponse: + ) -> m.GetInvoiceResponse: """ - Get a specific metric by ID or code - - It calls ``GET /v1/metrics/{id}``. + GetInvoice retrieves a single invoice with line items - Args: - code: Alternative to id + It calls ``GET /v1/invoices/{invoiceId}``. """ return self._client._call( "GET", - f"/v1/metrics/{_path(id)}", - m.GetMetricResponse, - query=_query(extra_query, ("code", code)), + f"/v1/invoices/{_path(invoice_id)}", + m.GetInvoiceResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_metrics( + def list_invoices( self, *, + subscription_id: str | None = None, + status: m.InvoiceStatus | str | None = None, page: int | None = None, page_size: int | None = None, - billable_only: bool | None = None, + order_by: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListMetricsResponse: + ) -> m.ListInvoicesResponse: """ - List all available metrics + ListInvoices lists invoices for a subscription or organization - It calls ``GET /v1/metrics``. + It calls ``GET /v1/invoices``. """ return self._client._call( "GET", - "/v1/metrics", - m.ListMetricsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("billableOnly", billable_only)), + "/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 list_metrics_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, - billable_only: bool | None = None, + order_by: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Metric]: + ) -> Iterator[m.Invoice]: """ - Every result of :meth:`list_metrics`, 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). """ @@ -7409,14 +7234,16 @@ def list_metrics_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_metrics( + res = self.list_invoices( page=page, page_size=size, - billable_only=billable_only, + subscription_id=subscription_id, + status=status, + order_by=order_by, extra_query=extra_query, timeout=timeout, ) - items = res.metrics + items = res.invoices for item in items: yield item seen += len(items) @@ -7424,89 +7251,123 @@ def list_metrics_all( return page += 1 - -class MetricsCredentialService(_Service): - """The NodeRings MetricsCredentialService API.""" - - def create_metrics_write_credential( + def pay_invoice( self, + invoice_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.PayInvoiceResponse: """ - Call ``POST /v1/metrics-write-credentials``. + 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. - 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 ``POST /v1/invoices/{invoiceId}:pay``. """ return self._client._call( "POST", - "/v1/metrics-write-credentials", - m.CreateMetricsWriteCredentialResponse, + f"/v1/invoices/{_path(invoice_id)}:pay", + m.PayInvoiceResponse, query=_query(extra_query), - body=_body( - m.CreateMetricsWriteCredentialRequest, - extra_body, - False, - ("agent_id", agent_id), - ("expires_at", expires_at), - ("name", name), - ), + body=_body(m.PayInvoiceBody, extra_body, False), idempotent=False, timeout=timeout, ) - def list_metrics_write_credentials( + +class LiveValidationService(_Service): + """The NodeRings LiveValidationService API.""" + + def delete_plan_live_validation( self, + plan_id: str, *, - agent_id: str | None = None, - include_revoked: bool | None = None, - page: int | None = None, - page_size: int | None = None, + node_id: str | 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. - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/provider/plans/{planId}/live-validation``.""" return 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), - ), + "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, ) - def list_metrics_write_credentials_all( + def get_plan_live_validation( self, + plan_id: str, *, - agent_id: str | None = None, - include_revoked: bool | None = None, + 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 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, + ) + + 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 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, + ) + + 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, - ) -> Iterator[m.MetricsWriteCredential]: + ) -> m.ListPlanLiveValidationBenchmarksResponse: + """Call ``GET /v1/provider/plans/{planId}/live-validation/benchmarks``.""" + 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)), + body=None, + idempotent=False, + timeout=timeout, + ) + + 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, + ) -> Iterator[m.PlanLiveValidationBenchmarkView]: """ - Every result of :meth:`list_metrics_write_credentials`, 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). """ @@ -7514,357 +7375,345 @@ 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_plan_live_validation_benchmarks( + plan_id, page=page, page_size=size, - agent_id=agent_id, - include_revoked=include_revoked, + node_id=node_id, extra_query=extra_query, timeout=timeout, ) - items = res.credentials + 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 revoke_metrics_write_credential( + def list_plan_live_validations( self, - id: str, *, - extra_body: dict[str, Any] | None = None, + 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.SuccessResponse: - """Call ``POST /v1/metrics-write-credentials/{id}:revoke``.""" + ) -> m.ListPlanLiveValidationsResponse: + """Call ``GET /v1/provider/live-validations``.""" return 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), + "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, ) - def rotate_metrics_write_credential( + def list_plan_live_validations_all( self, - id: str, *, + 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.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 = 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 + + 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.CreateMetricsWriteCredentialResponse: - """Call ``POST /v1/metrics-write-credentials/{id}:rotate``.""" + ) -> m.StartPlanLiveValidationResponse: + """Call ``POST /v1/provider/plans/{planId}/live-validation``.""" return self._client._call( "POST", - f"/v1/metrics-write-credentials/{_path(id)}:rotate", - m.CreateMetricsWriteCredentialResponse, + f"/v1/provider/plans/{_path(plan_id)}/live-validation", + m.StartPlanLiveValidationResponse, query=_query(extra_query), - body=_body(m.RotateMetricsWriteCredentialBody, extra_body, False), + body=_body( + m.StartPlanLiveValidationBody, + extra_body, + False, + ("include_benchmarking", include_benchmarking), + ("node_id", node_id), + ), idempotent=False, timeout=timeout, ) -class MonitoringService(_Service): - """The NodeRings MonitoringService API.""" +class ManualPayoutService(_Service): + """The NodeRings ManualPayoutService API.""" - def create_monitoring_launch( + def create_manual_payout( self, *, - next: str | None = None, - resource_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.CreateMonitoringLaunchResponse: + ) -> m.CreateManualPayoutResponse: """ - 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``. + Call ``POST /v1/provider/manual-payout``. 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. + 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( "POST", - "/v1/monitoring/launch", - m.CreateMonitoringLaunchResponse, + "/v1/provider/manual-payout", + m.CreateManualPayoutResponse, query=_query(extra_query), body=_body( - m.CreateMonitoringLaunchRequest, extra_body, False, ("next", next), ("resource_id", resource_id) + 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, ) - def rotate_monitoring_datasource_token( + def delete_manual_payout( 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``. - """ + """Call ``DELETE /v1/provider/manual-payout``.""" return self._client._call( - "POST", - "/v1/monitoring/datasource-token:rotate", + "DELETE", + "/v1/provider/manual-payout", 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 get_manual_payout( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetNodePlacementPolicyResponse: - """Call ``GET /v1/node-placement-policy``.""" + ) -> m.GetManualPayoutResponse: + """Call ``GET /v1/provider/manual-payout``.""" return self._client._call( "GET", - "/v1/node-placement-policy", - m.GetNodePlacementPolicyResponse, + "/v1/provider/manual-payout", + m.GetManualPayoutResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def update_node_placement_policy( + +class MarketplaceService(_Service): + """The NodeRings MarketplaceService API.""" + + def get_marketplace_plan( self, + plan_id: str, *, - 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``.""" + ) -> m.GetMarketplacePlanResponse: + """Call ``GET /v1/marketplace/plans/{planId}``.""" return self._client._call( - "PUT", - "/v1/node-placement-policy", - m.UpdateNodePlacementPolicyResponse, + "GET", + f"/v1/marketplace/plans/{_path(plan_id)}", + m.GetMarketplacePlanResponse, query=_query(extra_query), - body=_body( - m.UpdateNodePlacementPolicyRequest, - extra_body, - False, - ("default_strategy", default_strategy), - ("region_overrides", region_overrides), - ), + body=None, idempotent=False, timeout=timeout, ) - -class NodeService(_Service): - """The NodeRings NodeService API.""" - - def create_node( + def get_provider( self, + provider_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.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. - """ + ) -> m.GetProviderResponse: + """Call ``GET /v1/marketplace/providers/{providerId}``.""" return self._client._call( - "POST", - "/v1/node", - m.SuccessResponse, + "GET", + f"/v1/marketplace/providers/{_path(provider_id)}", + m.GetProviderResponse, 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), - ), + body=None, idempotent=False, timeout=timeout, ) - def delete_node( + def get_public_platform_stats( self, - id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/node/{id}``.""" + ) -> 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 self._client._call( - "DELETE", - f"/v1/node/{_path(id)}", - m.SuccessResponse, + "GET", + "/v1/public/stats", + m.GetPublicPlatformStatsResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_node( + def get_public_storefront( self, - id: str, + slug: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetNodeResponse: - """Call ``GET /v1/node/{id}``.""" + ) -> m.GetPublicStorefrontResponse: + """Call ``GET /v1/public/storefronts/{slug}``.""" return self._client._call( "GET", - f"/v1/node/{_path(id)}", - m.GetNodeResponse, + f"/v1/public/storefronts/{_path(slug)}", + m.GetPublicStorefrontResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_node_cpu_map( + def get_public_storefront_by_id( self, - id: str, + provider_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.GetPublicStorefrontResponse: + """Call ``GET /v1/public/storefronts/by-id/{providerId}``.""" return self._client._call( "GET", - f"/v1/node/{_path(id)}/cpu-map", - m.GetNodeCPUMapResponse, + f"/v1/public/storefronts/by-id/{_path(provider_id)}", + m.GetPublicStorefrontResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_nodes( + 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, - 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: + ) -> m.ListAvailableAddonsResponse: """ - Call ``GET /v1/nodes``. + Call ``GET /v1/marketplace/addons``. Args: - platform_id: Optional filter; UUID format validated in ListNodes when set. + filter_billing_type: - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) """ return self._client._call( "GET", - "/v1/nodes", - m.ListNodesResponse, + "/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), - ("platformId", platform_id), - ("serviceStatus", service_status), - ("expand", expand), - ("search", search), - ("regionId", region_id), ), body=None, idempotent=False, timeout=timeout, ) - def list_nodes_all( + 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, - 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.Addon]: """ - Every result of :meth:`list_nodes`, 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). """ @@ -7872,18 +7721,18 @@ def list_nodes_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_nodes( + res = self.list_available_addons( page=page, page_size=size, - platform_id=platform_id, - service_status=service_status, - expand=expand, + filter_provider_id=filter_provider_id, + vm_id=vm_id, + filter_addon_type=filter_addon_type, + filter_billing_type=filter_billing_type, search=search, - region_id=region_id, extra_query=extra_query, timeout=timeout, ) - items = res.nodes + items = res.addons for item in items: yield item seen += len(items) @@ -7891,250 +7740,203 @@ def list_nodes_all( return page += 1 - def update_node( + def list_available_plans( 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, + 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.UpdateNodeResponse: + ) -> m.ListAvailablePlansResponse: """ - Call ``PATCH /v1/node/{id}``. + Call ``GET /v1/marketplace/plans``. 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. + 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( - "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), + "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 validate_node_topology( + 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 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 OAuth2Service(_Service): - """The NodeRings OAuth2Service API.""" - - def authorize( + 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 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, ) - 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/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, - ) - - def delete_client( + def list_marketplace_provider_directory_all( self, - client_id: str, *, + 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.SuccessResponse: + ) -> Iterator[m.ProviderInfo]: """ - DeleteClient deletes an OAuth2 client + Every result of :meth:`list_marketplace_provider_directory`, reading page after page. - It calls ``DELETE /v1/oauth2/clients/{clientId}``. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - return self._client._call( - "DELETE", - f"/v1/oauth2/clients/{_path(client_id)}", - m.SuccessResponse, - 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_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 - def list_clients( + 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.ListOAuth2ClientsResponse: + ) -> m.ListProvidersResponse: """ - ListClients lists OAuth2 clients for the organization + Call ``GET /v1/marketplace/providers``. - It calls ``GET /v1/oauth2/clients``. + 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( "GET", - "/v1/oauth2/clients", - m.ListOAuth2ClientsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "/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, ) - def list_clients_all( + 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, - ) -> Iterator[m.OAuth2Client]: + ) -> Iterator[m.ProviderInfo]: """ - Every result of :meth:`list_clients`, reading page after page. + 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). """ @@ -8142,8 +7944,22 @@ 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_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) @@ -8151,409 +7967,335 @@ def list_clients_all( return page += 1 - def refresh_token( + def list_public_storefronts( self, *, - client_id: str | None = None, - client_secret: str | None = None, - refresh_token: str | None = None, - extra_body: dict[str, Any] | None = None, + 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.TokenResponse: - """ - RefreshToken exchanges refresh token for new access token - - It calls ``POST /v1/oauth2/refresh``. - - Args: - client_secret: Optional for public clients - """ + ) -> m.ListPublicStorefrontsResponse: + """Call ``GET /v1/public/storefronts``.""" 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), + "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 revoke_token( + def list_public_storefronts_all( self, *, - client_id: str | None = None, - token: str | None = None, - token_type_hint: str | None = None, - extra_body: dict[str, Any] | None = None, + 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: + ) -> Iterator[m.PublicStorefrontCard]: """ - RevokeToken revokes an access or refresh token - - It calls ``POST /v1/oauth2/revoke``. + Every result of :meth:`list_public_storefronts`, reading page after page. - Args: - token_type_hint: "access_token" or "refresh_token" + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - return self._client._call( - "POST", - "/v1/oauth2/revoke", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.RevokeTokenRequest, - extra_body, - False, - ("client_id", client_id), - ("token", token), - ("token_type_hint", token_type_hint), - ), - 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_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 token( + def search_marketplace( 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, + 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: """ - Token exchanges authorization code for access token - - It calls ``POST /v1/oauth2/token``. + Call ``POST /v1/marketplace/search``. 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 + turnstile_token: Cloudflare Turnstile token (required for anonymous callers when auth.turnstile.requireOnAnonymousMarketplaceSearch). """ return self._client._call( "POST", - "/v1/oauth2/token", - m.TokenResponse, + "/v1/marketplace/search", + m.SearchMarketplaceResponse, query=_query(extra_query), body=_body( - m.TokenRequest, + m.SearchMarketplaceRequest, 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), + ("filter_billing_type", filter_billing_type), + ("page", page), + ("page_size", page_size), + ("query", query), + ("turnstile_token", turnstile_token), ), idempotent=False, timeout=timeout, ) -class OrganizationService(_Service): - """The NodeRings OrganizationService API.""" +class MetadataService(_Service): + """The NodeRings MetadataService API.""" - def create_organization( + def get_platform_versions( 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: + ) -> m.PlatformVersions: """ - Call ``POST /v1/organizations``. + GetPlatformVersions returns pinned versions for k3s, k3d, calico, liqo, liqoctl, and helm. - 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). + It calls ``GET /v1/platform-versions``. """ return self._client._call( - "POST", - "/v1/organizations", - m.SuccessResponse, + "GET", + "/v1/platform-versions", + m.PlatformVersions, 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, ) - def delete_organization( + def get_version( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/organizations``.""" + ) -> m.Metadata: + """Call ``GET /v1/version``.""" return self._client._call( - "DELETE", - "/v1/organizations", - m.SuccessResponse, + "GET", + "/v1/version", + m.Metadata, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_organization( + def health_check( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetOrganizationResponse: - """Call ``GET /v1/organization``.""" + ) -> m.HealthCheckResponse: + """Call ``GET /v1/healthz``.""" return self._client._call( "GET", - "/v1/organization", - m.GetOrganizationResponse, + "/v1/healthz", + m.HealthCheckResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_organizations( + def list_distros( 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.ListDistrosResponse: + """ + ListDistros returns the guest OS catalog used by the virtual machine image picker. + + It calls ``GET /v1/distros``. + """ return self._client._call( "GET", - "/v1/organizations", - m.ListOrganizationsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "/v1/distros", + m.ListDistrosResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_organizations_all( + +class MetricService(_Service): + """The NodeRings MetricService API.""" + + def get_metric( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, + code: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Organization]: + ) -> m.GetMetricResponse: """ - Every result of :meth:`list_organizations`, reading page after page. + Get a specific metric by ID or code - ``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_organizations(page=page, page_size=size, extra_query=extra_query, timeout=timeout) - items = res.organizations - 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 + It calls ``GET /v1/metrics/{id}``. - 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, + Args: + code: Alternative to id + """ + return self._client._call( + "GET", + f"/v1/metrics/{_path(id)}", + m.GetMetricResponse, + query=_query(extra_query, ("code", code)), + body=None, + idempotent=False, + timeout=timeout, + ) + + 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.UpdateOrganizationResponse: + ) -> m.ListMetricsResponse: """ - Call ``PATCH /v1/organizations``. + List all available metrics - 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). + It calls ``GET /v1/metrics``. """ 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/metrics", + m.ListMetricsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("billableOnly", billable_only)), + 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 PaymentMethodService(_Service): - """The NodeRings PaymentMethodService API.""" +class MetricsCredentialService(_Service): + """The NodeRings MetricsCredentialService API.""" - def attach_payment_method( + 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 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, ) - def list_payment_methods( + 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 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), ), @@ -8562,18 +8304,18 @@ def list_payment_methods( timeout=timeout, ) - def list_payment_methods_all( + 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, - ) -> Iterator[m.PaymentMethod]: + ) -> Iterator[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). """ @@ -8581,15 +8323,15 @@ 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_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) @@ -8597,297 +8339,341 @@ def list_payment_methods_all( return page += 1 - def remove_payment_method( + 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.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 ``POST /v1/metrics-write-credentials/{id}:revoke``.""" return self._client._call( - "DELETE", - f"/v1/payment-methods/{_path(payment_method_id)}", - m.RemovePaymentMethodResponse, + "POST", + f"/v1/metrics-write-credentials/{_path(id)}:revoke", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.RevokeMetricsWriteCredentialBody, extra_body, False), idempotent=False, timeout=timeout, ) - def set_default_payment_method( + def rotate_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.CreateMetricsWriteCredentialResponse: + """Call ``POST /v1/metrics-write-credentials/{id}:rotate``.""" 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), + 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 PaymentService(_Service): - """The NodeRings PaymentService API.""" +class MonitoringService(_Service): + """The NodeRings MonitoringService API.""" - def get_payment( + def create_monitoring_launch( self, - payment_id: str, *, + 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.GetPaymentResponse: + ) -> m.CreateMonitoringLaunchResponse: """ - GetPayment retrieves a single payment with refunds + 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/{paymentId}``. + 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 self._client._call( - "GET", - f"/v1/payments/{_path(payment_id)}", - m.GetPaymentResponse, + "POST", + "/v1/monitoring/launch", + m.CreateMonitoringLaunchResponse, query=_query(extra_query), - body=None, + body=_body( + m.CreateMonitoringLaunchRequest, extra_body, False, ("next", next), ("resource_id", resource_id) + ), idempotent=False, timeout=timeout, ) - def list_payments( + 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, - ) -> m.ListPaymentsResponse: + ) -> m.SuccessResponse: """ - ListPayments lists payments for an invoice or organization + RotateMonitoringDatasourceToken replaces the organization's Grafana datasource token. - It calls ``GET /v1/payments``. + It calls ``POST /v1/monitoring/datasource-token:rotate``. """ return self._client._call( - "GET", - "/v1/payments", - m.ListPaymentsResponse, - query=_query( - extra_query, ("invoiceId", invoice_id), ("status", status), ("page", page), ("pageSize", page_size) - ), - body=None, + "POST", + "/v1/monitoring/datasource-token:rotate", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.RotateMonitoringDatasourceTokenRequest, extra_body, False), idempotent=False, timeout=timeout, ) - def list_payments_all( + +class NodePlacementService(_Service): + """The NodeRings NodePlacementService API.""" + + def get_node_placement_policy( 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.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 = 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 PayoutConfigurationService(_Service): - """The NodeRings PayoutConfigurationService API.""" + ) -> m.GetNodePlacementPolicyResponse: + """Call ``GET /v1/node-placement-policy``.""" + return self._client._call( + "GET", + "/v1/node-placement-policy", + m.GetNodePlacementPolicyResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - def get_payout_configuration( + 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.GetPayoutConfigurationResponse: - """Call ``GET /v1/provider/payout-configuration``.""" + ) -> m.UpdateNodePlacementPolicyResponse: + """Call ``PUT /v1/node-placement-policy``.""" return self._client._call( - "GET", - "/v1/provider/payout-configuration", - m.GetPayoutConfigurationResponse, + "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 update_payout_configuration( + +class NodeService(_Service): + """The NodeRings NodeService API.""" + + def create_node( self, *, - enabled: bool | None = None, - schedule_time: str | None = None, - schedule_timezone: str | None = None, - schedule_type: m.PayoutScheduleType | 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, + 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.GetPayoutConfigurationResponse: + ) -> m.SuccessResponse: """ - Call ``PUT /v1/provider/payout-configuration``. + Call ``POST /v1/node``. 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 + 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( - "PUT", - "/v1/provider/payout-configuration", - m.GetPayoutConfigurationResponse, + "POST", + "/v1/node", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.UpdatePayoutConfigurationRequest, + m.CreateNodeRequest, extra_body, False, - ("enabled", enabled), - ("schedule_time", schedule_time), - ("schedule_timezone", schedule_timezone), - ("schedule_type", schedule_type), + ("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, ) + 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 self._client._call( + "DELETE", + f"/v1/node/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) -class PayoutInvoiceService(_Service): - """The NodeRings PayoutInvoiceService API.""" - - def get_payout_invoice( + def get_node( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPayoutInvoiceResponse: - """Call ``GET /v1/provider/payout-invoices/{id}``.""" + ) -> m.GetNodeResponse: + """Call ``GET /v1/node/{id}``.""" return self._client._call( "GET", - f"/v1/provider/payout-invoices/{_path(id)}", - m.GetPayoutInvoiceResponse, + f"/v1/node/{_path(id)}", + m.GetNodeResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_provider_revenue( + def get_node_cpu_map( 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: + ) -> m.GetNodeCPUMapResponse: """ - Call ``GET /v1/provider/revenue``. + Dedicated CPU cores: full topology + per-CPU occupancy for the node topology board + (docs/README-DEDICATED-CPU-CORES.md §6.3/§8.3). - 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) + It calls ``GET /v1/node/{id}/cpu-map``. """ 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/node/{_path(id)}/cpu-map", + m.GetNodeCPUMapResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_held_payouts( + 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.ListHeldPayoutsResponse: + ) -> m.ListNodesResponse: """ - Paid client invoices whose payout to this provider is on hold, soonest release first. + Call ``GET /v1/nodes``. - It calls ``GET /v1/provider/held-payouts``. + Args: + platform_id: Optional filter; UUID format validated in ListNodes when set. """ return self._client._call( "GET", - "/v1/provider/held-payouts", - m.ListHeldPayoutsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "/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, ) - def list_held_payouts_all( + 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, - ) -> Iterator[m.HeldPayout]: + ) -> Iterator[m.NodeWithExpandedRegion]: """ - Every result of :meth:`list_held_payouts`, 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). """ @@ -8895,8 +8681,18 @@ def list_held_payouts_all( 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 + 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 for item in items: yield item seen += len(items) @@ -8904,253 +8700,250 @@ def list_held_payouts_all( return page += 1 - def list_payout_invoices( + def update_node( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - status: m.PayoutStatus | 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.ListPayoutInvoicesResponse: + ) -> m.UpdateNodeResponse: """ - Call ``GET /v1/provider/payout-invoices``. + Call ``PATCH /v1/node/{id}``. Args: - status: Filter by payout status + 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( - "GET", - "/v1/provider/payout-invoices", - m.ListPayoutInvoicesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("status", status)), - body=None, + "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), + ), idempotent=False, timeout=timeout, ) - def list_payout_invoices_all( + def validate_node_topology( self, *, - page: int | None = None, - page_size: int | None = None, - status: m.PayoutStatus | 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, - ) -> Iterator[m.PayoutInvoice]: - """ - Every result of :meth:`list_payout_invoices`, reading page after page. - - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + ) -> m.ValidateNodeTopologyResponse: """ - 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 - + Dedicated CPU cores: parse-preview of a topology paste without persisting. -class PermissionService(_Service): - """The NodeRings PermissionService API.""" + It calls ``POST /v1/node/topology/validate``. - 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``.""" + 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", - "/v1/permissions/assign-to-role", - m.SuccessResponse, + "/v1/node/topology/validate", + m.ValidateNodeTopologyResponse, query=_query(extra_query), body=_body( - m.AssignPermissionToRoleRequest, + m.ValidateNodeTopologyRequest, extra_body, False, - ("permission_ids", permission_ids), - ("role_id", role_id), + ("node_id", node_id), + ("topology_paste", topology_paste), ), idempotent=False, timeout=timeout, ) - def list_effective_permissions( + +class OAuth2Service(_Service): + """The NodeRings OAuth2Service API.""" + + def authorize( self, *, - user_ids: list[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.ListEffectivePermissionsResponse: - """Call ``GET /v1/permissions/effective``.""" + ) -> 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 self._client._call( "GET", - "/v1/permissions/effective", - m.ListEffectivePermissionsResponse, - query=_query(extra_query, ("userIds", user_ids)), + "/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 list_permissions( + def create_client( self, *, - 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``.""" + 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( - "GET", - "/v1/permissions", - m.ListPermissionsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterName", filter_name)), - body=None, + "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, ) - def list_permissions_all( + def delete_client( self, + client_id: str, *, - 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]: + ) -> m.SuccessResponse: """ - Every result of :meth:`list_permissions`, reading page after page. + DeleteClient deletes an OAuth2 client - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + It calls ``DELETE /v1/oauth2/clients/{clientId}``. """ - page = page or 0 - size = page_size if page_size and page_size > 0 else 100 - seen = 0 - while True: - res = 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 - - 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 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 PlanService(_Service): - """The NodeRings PlanService API.""" - - def list_plans( + 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 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, ) - def list_plans_all( + 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, - ) -> Iterator[m.Plan]: + ) -> Iterator[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). """ @@ -9158,20 +8951,8 @@ def list_plans_all( 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 + 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) @@ -9179,109 +8960,182 @@ def list_plans_all( return page += 1 - def subscribe( + 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 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 PlatformService(_Service): - """The NodeRings PlatformService API.""" - - def assign_agent( + 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 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, ) - def create_platform( + 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.SuccessResponse: + ) -> m.TokenResponse: """ - Call ``POST /v1/platform``. + Token exchanges authorization code for access token + + It calls ``POST /v1/oauth2/token``. 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. + 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( "POST", - "/v1/platform", - m.SuccessResponse, + "/v1/oauth2/token", + m.TokenResponse, query=_query(extra_query), body=_body( - m.CreatePlatformRequest, + m.TokenRequest, extra_body, False, - ("agent_id", agent_id), - ("assign_customer_ipv6", assign_customer_ipv6), - ("driver", driver), - ("endpoint_url", endpoint_url), + ("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=_body( + m.CreateOrganizationRequest, + extra_body, + False, + ("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, ) - def delete_platform( + 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 self._client._call( "DELETE", - f"/v1/platform/{_path(id)}", + "/v1/organizations", m.SuccessResponse, query=_query(extra_query), body=None, @@ -9289,63 +9143,52 @@ def delete_platform( timeout=timeout, ) - def get_platform( + 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 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, ) - def list_platforms( + 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 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, ) - def list_platforms_all( + 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, - ) -> Iterator[m.Platform]: + ) -> Iterator[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). """ @@ -9353,15 +9196,8 @@ def list_platforms_all( 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 + 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) @@ -9369,86 +9205,164 @@ def list_platforms_all( return page += 1 - def unassign_agent( + 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 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, ) - def update_platform( + +class PaymentMethodService(_Service): + """The NodeRings PaymentMethodService API.""" + + 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 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 PreflightService(_Service): - """The NodeRings PreflightService API.""" - - def list_preflight_checks( + 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``.""" - return self._client._call( - "GET", - "/v1/provider/preflight-checks", - m.ListPreflightChecksResponse, - query=_query( + ) -> 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 self._client._call( + "GET", + "/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), ), @@ -9457,19 +9371,18 @@ def list_preflight_checks( timeout=timeout, ) - def list_preflight_checks_all( + 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, - ) -> Iterator[m.PlanPreflightView]: + ) -> Iterator[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). """ @@ -9477,16 +9390,15 @@ 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_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) @@ -9494,488 +9406,560 @@ def list_preflight_checks_all( return page += 1 - -class ProviderConnectService(_Service): - """The NodeRings ProviderConnectService API.""" - - def complete_connect_oauth( + 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 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, ) - def create_connect_account( + 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 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, ) - def create_connect_tax_registration( + +class PaymentService(_Service): + """The NodeRings PaymentService API.""" + + 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 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, ) - def create_connect_tax_session( + 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 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, ) - def disconnect_connect_account( + 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, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/provider/connect/account``.""" + ) -> Iterator[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 = 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 PayoutConfigurationService(_Service): + """The NodeRings PayoutConfigurationService API.""" + + def get_payout_configuration( + self, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetPayoutConfigurationResponse: + """Call ``GET /v1/provider/payout-configuration``.""" return 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, ) - def expire_connect_tax_registration( + 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 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, ) - def get_connect_account( + +class PayoutInvoiceService(_Service): + """The NodeRings PayoutInvoiceService API.""" + + 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 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, ) - def get_connect_tax_settings( + 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 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, ) - def list_connect_tax_registrations( + 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 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, ) - def start_connect_oauth( + 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: + ) -> Iterator[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 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 = 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 update_connect_tax_settings( + 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 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, ) + def list_payout_invoices_all( + 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, + ) -> Iterator[m.PayoutInvoice]: + """ + Every result of :meth:`list_payout_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_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 ProviderCustomerService(_Service): - """The NodeRings ProviderCustomerService API.""" +class PermissionService(_Service): + """The NodeRings PermissionService API.""" - def block_provider_customer_purchases( + def assign_permission_to_role( self, - client_organization_id: str, *, - message: str | None = None, - reason: m.ComplianceReason | str | None = None, + 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/provider/customers/{clientOrganizationId}:block-purchases``. - - Args: - reason: Why a VM or purchase was seized/blocked. - """ + """Call ``POST /v1/permissions/assign-to-role``.""" return self._client._call( "POST", - f"/v1/provider/customers/{_path(client_organization_id)}:block-purchases", + "/v1/permissions/assign-to-role", m.SuccessResponse, query=_query(extra_query), body=_body( - m.BlockProviderCustomerPurchasesBody, extra_body, False, ("message", message), ("reason", reason) + m.AssignPermissionToRoleRequest, + extra_body, + False, + ("permission_ids", permission_ids), + ("role_id", role_id), ), idempotent=False, timeout=timeout, ) - def get_provider_customer( + def list_effective_permissions( self, - client_organization_id: str, *, + user_ids: list[str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderCustomerResponse: - """Call ``GET /v1/provider/customers/{clientOrganizationId}``.""" + ) -> m.ListEffectivePermissionsResponse: + """Call ``GET /v1/permissions/effective``.""" return self._client._call( "GET", - f"/v1/provider/customers/{_path(client_organization_id)}", - m.GetProviderCustomerResponse, - query=_query(extra_query), + "/v1/permissions/effective", + m.ListEffectivePermissionsResponse, + query=_query(extra_query, ("userIds", user_ids)), body=None, idempotent=False, timeout=timeout, ) - def get_provider_customer_billing( + def list_permissions( self, - client_organization_id: str, *, + 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.GetProviderCustomerBillingResponse: - """Call ``GET /v1/provider/customers/{clientOrganizationId}/billing``.""" + ) -> m.ListPermissionsResponse: + """Call ``GET /v1/permissions``.""" return self._client._call( "GET", - f"/v1/provider/customers/{_path(client_organization_id)}/billing", - m.GetProviderCustomerBillingResponse, - query=_query(extra_query), + "/v1/permissions", + m.ListPermissionsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterName", filter_name)), body=None, idempotent=False, timeout=timeout, ) - def get_provider_customer_stats( + def list_permissions_all( self, *, + 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.GetProviderCustomerStatsResponse: + ) -> Iterator[m.Permission]: """ - 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_permissions`, 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_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 - def list_provider_customer_assets( + def remove_permission_from_role( 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, + permission_ids: list[str] | None = None, + role_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.SuccessResponse: + """Call ``DELETE /v1/permissions/remove-from-role``.""" return 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), - ), + "DELETE", + "/v1/permissions/remove-from-role", + m.SuccessResponse, + query=_query(extra_query, ("permissionIds", permission_ids), ("roleId", role_id)), body=None, idempotent=False, timeout=timeout, ) - def list_provider_customer_assets_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, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.ProviderCustomerAssetRow]: - """ - 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). - """ - page = page or 0 - 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, - 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 +class PlanService(_Service): + """The NodeRings PlanService API.""" - def list_provider_customers( + 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 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, ) - def list_provider_customers_all( + 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, - ) -> Iterator[m.ProviderCustomerRow]: + ) -> Iterator[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). """ @@ -9983,15 +9967,20 @@ 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_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) @@ -9999,281 +9988,276 @@ def list_provider_customers_all( return page += 1 - def restart_provider_customer_virtual_machine( + 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}:restart``. + ) -> m.SubscribeResponse: """ - 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), - idempotent=False, - timeout=timeout, - ) + Call ``POST /v1/plans/{planId}:subscribe``. - 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.VirtualMachine: - """ - Call ``POST - /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:start``. + 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/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), + f"/v1/plans/{_path(plan_id)}:subscribe", + m.SubscribeResponse, + query=_query(extra_query, ("billingPeriod", billing_period)), + body=None, idempotent=False, timeout=timeout, ) - def stop_provider_customer_virtual_machine( + +class PlatformService(_Service): + """The NodeRings PlatformService API.""" + + def assign_agent( self, - client_organization_id: str, - virtual_machine_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.VirtualMachine: - """ - Call ``POST - /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:stop``. - """ + ) -> m.SuccessResponse: + """Call ``POST /v1/platforms/{platformId}:AssignAgent``.""" return self._client._call( "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:stop", - m.VirtualMachine, + f"/v1/platforms/{_path(platform_id)}:AssignAgent", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.StopProviderCustomerVirtualMachineBody, extra_body, False), + body=_body(m.AssignAgentBody, extra_body, False, ("agent_id", agent_id)), idempotent=False, timeout=timeout, ) - def suspend_provider_customer_virtual_machine( + def create_platform( self, - client_organization_id: str, - virtual_machine_id: str, *, - message: str | None = None, - reason: m.ComplianceReason | 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.VirtualMachine: + ) -> m.SuccessResponse: """ - Call ``POST - /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:suspend``. + Call ``POST /v1/platform``. Args: - reason: Why a VM or purchase was seized/blocked. + 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( "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:suspend", - m.VirtualMachine, + "/v1/platform", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.SuspendProviderCustomerVirtualMachineBody, extra_body, False, ("message", message), ("reason", reason) + 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), ), idempotent=False, timeout=timeout, ) - def unblock_provider_customer_purchases( + def delete_platform( self, - client_organization_id: str, + 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/provider/customers/{clientOrganizationId}:unblock-purchases``.""" + """Call ``DELETE /v1/platform/{id}``.""" return self._client._call( - "POST", - f"/v1/provider/customers/{_path(client_organization_id)}:unblock-purchases", + "DELETE", + f"/v1/platform/{_path(id)}", m.SuccessResponse, query=_query(extra_query), - body=_body(m.UnblockProviderCustomerPurchasesBody, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - 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``. - """ - return 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 ProviderDashboardPlansTabService(_Service): - """The NodeRings ProviderDashboardPlansTabService API.""" - - def get_dashboard_plans_tab_stats( + def get_platform( self, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ProviderDashboardPlansTabStats: - """Call ``GET /v1/provider/dashboard/plans-tab-stats``.""" + ) -> m.GetPlatformResponse: + """Call ``GET /v1/platform/{id}``.""" return self._client._call( "GET", - "/v1/provider/dashboard/plans-tab-stats", - m.ProviderDashboardPlansTabStats, + f"/v1/platform/{_path(id)}", + m.GetPlatformResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - -class ProviderDashboardService(_Service): - """The NodeRings ProviderDashboardService API.""" - - def get_dashboard_asset_sales_timeseries( + def list_platforms( self, *, - range_days: int | 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.GetDashboardAssetSalesTimeseriesResponse: - """Call ``GET /v1/provider/dashboard/asset-sales-timeseries``.""" + ) -> m.ListPlatformsResponse: + """Call ``GET /v1/platforms``.""" return self._client._call( "GET", - "/v1/provider/dashboard/asset-sales-timeseries", - m.GetDashboardAssetSalesTimeseriesResponse, - query=_query(extra_query, ("rangeDays", range_days)), + "/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 get_dashboard_billing_sales( + def list_platforms_all( 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, + 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.GetDashboardBillingSalesResponse: + ) -> Iterator[m.Platform]: """ - Call ``GET /v1/provider/dashboard/billing-sales``. + Every result of :meth:`list_platforms`, reading page after page. - 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. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - 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), - ), - 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_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 get_dashboard_customer_acquisition_timeseries( + def unassign_agent( self, + platform_id: str, *, - range_days: 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.GetDashboardCustomerAcquisitionTimeseriesResponse: - """Call ``GET /v1/provider/dashboard/customer-acquisition-timeseries``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/platforms/{platformId}:UnassignAgent``.""" return self._client._call( - "GET", - "/v1/provider/dashboard/customer-acquisition-timeseries", - m.GetDashboardCustomerAcquisitionTimeseriesResponse, - query=_query(extra_query, ("rangeDays", range_days)), - 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, ) - def get_dashboard_summary( + def update_platform( 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, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetDashboardSummaryResponse: - """Call ``GET /v1/provider/dashboard/summary``.""" + ) -> 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/provider/dashboard/summary", - m.GetDashboardSummaryResponse, + "PATCH", + f"/v1/platform/{_path(id)}", + m.UpdatePlatformResponse, query=_query(extra_query), - body=None, + 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_dashboard_addon_catalog_stats( + +class PreflightService(_Service): + """The NodeRings PreflightService API.""" + + def list_preflight_checks( self, *, - addon_search: str | None = None, - addon_type_filter: str | None = None, - addon_billing_type_filter: 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, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDashboardAddonCatalogStatsResponse: - """Call ``GET /v1/provider/dashboard/addon-catalog-stats``.""" + ) -> m.ListPreflightChecksResponse: + """Call ``GET /v1/provider/preflight-checks``.""" return self._client._call( "GET", - "/v1/provider/dashboard/addon-catalog-stats", - m.ListDashboardAddonCatalogStatsResponse, + "/v1/provider/preflight-checks", + m.ListPreflightChecksResponse, query=_query( extra_query, - ("addonSearch", addon_search), - ("addonTypeFilter", addon_type_filter), - ("addonBillingTypeFilter", addon_billing_type_filter), + ("planCode", plan_code), + ("planId", plan_id), + ("issuesOnly", issues_only), ("page", page), ("pageSize", page_size), ), @@ -10282,19 +10266,19 @@ def list_dashboard_addon_catalog_stats( timeout=timeout, ) - def list_dashboard_addon_catalog_stats_all( + def list_preflight_checks_all( self, *, - addon_search: str | None = None, - addon_type_filter: str | None = None, - addon_billing_type_filter: 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, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.ProviderDashboardAddonCatalogRow]: + ) -> Iterator[m.PlanPreflightView]: """ - Every result of :meth:`list_dashboard_addon_catalog_stats`, 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). """ @@ -10302,945 +10286,803 @@ def list_dashboard_addon_catalog_stats_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_dashboard_addon_catalog_stats( + res = self.list_preflight_checks( page=page, page_size=size, - addon_search=addon_search, - addon_type_filter=addon_type_filter, - addon_billing_type_filter=addon_billing_type_filter, + plan_code=plan_code, + plan_id=plan_id, + issues_only=issues_only, extra_query=extra_query, timeout=timeout, ) - items = res.addon_catalog + items = res.plans 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_dashboard_infrastructure( + +class ProviderConnectService(_Service): + """The NodeRings ProviderConnectService API.""" + + def complete_connect_oauth( self, *, - platform_id: str | None = None, - region_id: str | None = None, - page: int | None = None, - 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.ListDashboardInfrastructureResponse: - """Call ``GET /v1/provider/dashboard/infrastructure``.""" + ) -> 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( - "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", + "/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, ) - def list_dashboard_infrastructure_all( + def create_connect_account( self, *, - platform_id: str | None = None, - region_id: str | None = None, - page: int | None = None, - page_size: int | 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, - ) -> Iterator[m.ProviderDashboardNodeRollup]: + ) -> m.CreateConnectAccountResponse: """ - Every result of :meth:`list_dashboard_infrastructure`, reading page after page. + Call ``POST /v1/provider/connect/account``. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + 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 = 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( - 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), + "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_dashboard_ipam_assignments( + def create_connect_tax_registration( 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, + 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.ListDashboardIPAMAssignmentsResponse: - """Call ``GET /v1/provider/dashboard/ipam/assignments``.""" + ) -> m.CreateConnectTaxRegistrationResponse: + """ + Call ``POST /v1/provider/connect/tax-registrations``. + + Args: + registration_type: optional; defaults per country + state: required for US + """ 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), + "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, ) - def list_dashboard_ipam_assignments_all( + def create_connect_tax_session( 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]: + ) -> m.CreateConnectTaxSessionResponse: """ - Every result of :meth:`list_dashboard_ipam_assignments`, reading page after page. + Creates a Stripe AccountSession client secret for Connect tax_settings / tax_registrations + embedded components (legacy; prefer native tax RPCs). - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + It calls ``POST /v1/provider/connect/tax-session``. """ - 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 + return self._client._call( + "POST", + "/v1/provider/connect/tax-session", + m.CreateConnectTaxSessionResponse, + query=_query(extra_query), + body=dict(extra_body or {}), + idempotent=False, + timeout=timeout, + ) - def list_dashboard_plan_subscription_stats( + def disconnect_connect_account( 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.SuccessResponse: + """Call ``DELETE /v1/provider/connect/account``.""" 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), - ), + "DELETE", + "/v1/provider/connect/account", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_dashboard_ticket_statistics( + def expire_connect_tax_registration( self, + id: str, *, - 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.ExpireConnectTaxRegistrationResponse: + """Call ``POST /v1/provider/connect/tax-registrations/{id}/expire``.""" 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", + 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, ) - def list_dashboard_virtual_machines( + def get_connect_account( 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``.""" + ) -> m.GetConnectAccountResponse: + """Call ``GET /v1/provider/connect/account``.""" 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), - ), + "/v1/provider/connect/account", + m.GetConnectAccountResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - -class ProviderNetworkService(_Service): - """The NodeRings ProviderNetworkService API.""" - - def get_smtp_outbound_provider_policy( + def get_connect_tax_settings( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetSMTPOutboundProviderPolicyResponse: - """Call ``GET /v1/provider/network/smtp-outbound-policy``.""" + ) -> m.GetConnectTaxSettingsResponse: + """Call ``GET /v1/provider/connect/tax-settings``.""" return self._client._call( "GET", - "/v1/provider/network/smtp-outbound-policy", - m.GetSMTPOutboundProviderPolicyResponse, + "/v1/provider/connect/tax-settings", + m.GetConnectTaxSettingsResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_virtual_machine_smtp_outbound_policies( + def list_connect_tax_registrations( 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.ListConnectTaxRegistrationsResponse: + """Call ``GET /v1/provider/connect/tax-registrations``.""" return self._client._call( "GET", - "/v1/provider/network/smtp-outbound-policies", - m.ListVirtualMachineSMTPOutboundPoliciesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("search", search)), + "/v1/provider/connect/tax-registrations", + m.ListConnectTaxRegistrationsResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_virtual_machine_smtp_outbound_policies_all( + def start_connect_oauth( 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, - ) -> Iterator[m.VirtualMachineSMTPOutboundPolicyView]: + ) -> m.StartConnectOAuthResponse: """ - Every result of :meth:`list_virtual_machine_smtp_outbound_policies`, 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_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 + return 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, + ) - def update_smtp_outbound_provider_policy( + def update_connect_tax_settings( self, *, - block_by_default: bool | 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.GetSMTPOutboundProviderPolicyResponse: + ) -> m.UpdateConnectTaxSettingsResponse: """ - Call ``PUT /v1/provider/network/smtp-outbound-policy``. + Call ``PUT /v1/provider/connect/tax-settings``. 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`. + head_office: Structured address for Connect tax head office. """ return self._client._call( "PUT", - "/v1/provider/network/smtp-outbound-policy", - m.GetSMTPOutboundProviderPolicyResponse, + "/v1/provider/connect/tax-settings", + m.UpdateConnectTaxSettingsResponse, query=_query(extra_query), body=_body( - m.UpdateSMTPOutboundProviderPolicyRequest, extra_body, False, ("block_by_default", block_by_default) + m.UpdateConnectTaxSettingsRequest, + extra_body, + False, + ("default_tax_behavior", default_tax_behavior), + ("default_tax_code", default_tax_code), + ("head_office", head_office), ), idempotent=False, timeout=timeout, ) - def update_virtual_machine_smtp_outbound_policy( + +class ProviderCustomerService(_Service): + """The NodeRings ProviderCustomerService API.""" + + def block_provider_customer_purchases( self, - virtual_machine_id: str, + client_organization_id: str, *, - action: m.SMTPOutboundVMAction | 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.VirtualMachineSMTPOutboundPolicyView: - """Call ``PUT /v1/provider/network/smtp-outbound-policies/{virtualMachineId}``.""" + ) -> m.SuccessResponse: + """ + Call ``POST /v1/provider/customers/{clientOrganizationId}:block-purchases``. + + Args: + reason: Why a VM or purchase was seized/blocked. + """ return self._client._call( - "PUT", - f"/v1/provider/network/smtp-outbound-policies/{_path(virtual_machine_id)}", - m.VirtualMachineSMTPOutboundPolicyView, + "POST", + f"/v1/provider/customers/{_path(client_organization_id)}:block-purchases", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.UpdateVirtualMachineSMTPOutboundPolicyBody, extra_body, False, ("action", action)), + body=_body( + m.BlockProviderCustomerPurchasesBody, extra_body, False, ("message", message), ("reason", reason) + ), idempotent=False, timeout=timeout, ) - -class ProviderOnboardingService(_Service): - """The NodeRings ProviderOnboardingService API.""" - - def get_provider_onboarding_checklist( + def get_provider_customer( self, + client_organization_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderOnboardingChecklistResponse: - """Call ``GET /v1/provider/onboarding/checklist``.""" + ) -> m.GetProviderCustomerResponse: + """Call ``GET /v1/provider/customers/{clientOrganizationId}``.""" return self._client._call( "GET", - "/v1/provider/onboarding/checklist", - m.GetProviderOnboardingChecklistResponse, + f"/v1/provider/customers/{_path(client_organization_id)}", + m.GetProviderCustomerResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - -class ProviderPlanService(_Service): - """The NodeRings ProviderPlanService API.""" - - def calculate_plan_pricing( + def get_provider_customer_billing( self, + client_organization_id: str, *, - 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.CalculatePlanPricingResponse: - """ - Call ``POST /v1/plans:calculate``. - - Args: - instances: Resource instances to calculate pricing for - """ + ) -> m.GetProviderCustomerBillingResponse: + """Call ``GET /v1/provider/customers/{clientOrganizationId}/billing``.""" return self._client._call( - "POST", - "/v1/plans:calculate", - m.CalculatePlanPricingResponse, + "GET", + f"/v1/provider/customers/{_path(client_organization_id)}/billing", + m.GetProviderCustomerBillingResponse, 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 create_plan( + def get_provider_customer_stats( 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, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> m.GetProviderCustomerStatsResponse: """ - Call ``POST /v1/plans``. + Path must not be `/customers/stats`: some gateways match + `/customers/{client_organization_id}` first and treat "stats" as a UUID field (validation + error). - 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). + It calls ``GET /v1/provider/customer-stats``. """ 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, - ) - - def delete_plan( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/plans/{id}``.""" - return self._client._call( - "DELETE", - f"/v1/plans/{_path(id)}", - m.SuccessResponse, + "GET", + "/v1/provider/customer-stats", + m.GetProviderCustomerStatsResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_assignable_nodes_for_plan( + def list_provider_customer_assets( self, + client_organization_id: str, *, - template_plan_id: str | None = None, - plan_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.ListAssignableNodesForPlanResponse: + ) -> m.ListProviderCustomerAssetsResponse: """ - Nodes the provider may assign to a plan (catalog-eligible for tier/category). - - It calls ``GET /v1/provider/plans/assignable-nodes``. + Call ``GET /v1/provider/customers/{clientOrganizationId}/assets``. 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_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/plans/assignable-nodes", - m.ListAssignableNodesForPlanResponse, + f"/v1/provider/customers/{_path(client_organization_id)}/assets", + m.ListProviderCustomerAssetsResponse, query=_query( - extra_query, ("templatePlanId", template_plan_id), ("planId", plan_id), ("regionId", region_id) + extra_query, + ("page", page), + ("pageSize", page_size), + ("search", search), + ("assetType", asset_type), + ("activityStatus", activity_status), + ("regionId", region_id), ), body=None, idempotent=False, timeout=timeout, ) - def update_plan( + def list_provider_customer_assets_all( self, - id: str, + client_organization_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, + 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_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> Iterator[m.ProviderCustomerAssetRow]: """ - Call ``PATCH /v1/plans/{id}``. + Every result of :meth:`list_provider_customer_assets`, 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, - ) - - -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, - ) + page = page or 0 + 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, + 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 - def list_provider_reviews( + 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 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, ) - def update_provider_review_reply( + def list_provider_customers_all( self, - review_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, + activity_filter: m.ProviderCustomerActivityFilter | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> 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, - ) - + ) -> Iterator[m.ProviderCustomerRow]: + """ + Every result of :meth:`list_provider_customers`, reading page after page. -class ProviderStorefrontService(_Service): - """The NodeRings ProviderStorefrontService 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_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 get_my_storefront( + 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.GetMyStorefrontResponse: - """Call ``GET /v1/provider/storefront``.""" + ) -> m.VirtualMachine: + """ + Call ``POST + /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:restart``. + """ return self._client._call( - "GET", - "/v1/provider/storefront", - m.GetMyStorefrontResponse, + "POST", + f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:restart", + m.VirtualMachine, query=_query(extra_query), - body=None, + body=_body(m.RestartProviderCustomerVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) - def opt_in_storefront( + 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 ``POST /v1/provider/storefront/opt-in``.""" + ) -> m.VirtualMachine: + """ + Call ``POST + /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:start``. + """ return 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)}:start", + m.VirtualMachine, query=_query(extra_query), - body=dict(extra_body or {}), + body=_body(m.StartProviderCustomerVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) - def opt_out_storefront( + 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-out``.""" + ) -> m.VirtualMachine: + """ + Call ``POST + /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:stop``. + """ return 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)}:stop", + m.VirtualMachine, query=_query(extra_query), - body=dict(extra_body or {}), + body=_body(m.StopProviderCustomerVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) - def preview_my_storefront( + 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.PreviewMyStorefrontResponse: - """Call ``GET /v1/provider/storefront/preview``.""" - return self._client._call( - "GET", - "/v1/provider/storefront/preview", - m.PreviewMyStorefrontResponse, + ) -> 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/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:suspend", + m.VirtualMachine, query=_query(extra_query), - body=None, + body=_body( + m.SuspendProviderCustomerVirtualMachineBody, extra_body, False, ("message", message), ("reason", reason) + ), idempotent=False, timeout=timeout, ) - def submit_my_storefront( + 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.GetMyStorefrontResponse: - """Call ``POST /v1/provider/storefront/submit``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/provider/customers/{clientOrganizationId}:unblock-purchases``.""" return self._client._call( "POST", - "/v1/provider/storefront/submit", - m.GetMyStorefrontResponse, + f"/v1/provider/customers/{_path(client_organization_id)}:unblock-purchases", + m.SuccessResponse, query=_query(extra_query), - body=dict(extra_body or {}), + body=_body(m.UnblockProviderCustomerPurchasesBody, extra_body, False), idempotent=False, timeout=timeout, ) - def update_my_storefront( + def unblock_provider_customer_virtual_machine( self, + client_organization_id: str, + virtual_machine_id: str, *, - 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.VirtualMachine: + """ + Call ``POST + /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:unblock``. + """ return self._client._call( - "PATCH", - "/v1/provider/storefront", - m.GetMyStorefrontResponse, + "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.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=_body(m.UnblockProviderCustomerVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) -class ProviderTicketNotificationService(_Service): - """The NodeRings ProviderTicketNotificationService API.""" +class ProviderDashboardPlansTabService(_Service): + """The NodeRings ProviderDashboardPlansTabService API.""" - def get_provider_ticket_notification_policy( + def get_dashboard_plans_tab_stats( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderTicketNotificationPolicyResponse: - """Call ``GET /v1/provider/ticket-notification-policy``.""" + ) -> m.ProviderDashboardPlansTabStats: + """Call ``GET /v1/provider/dashboard/plans-tab-stats``.""" return self._client._call( "GET", - "/v1/provider/ticket-notification-policy", - m.GetProviderTicketNotificationPolicyResponse, + "/v1/provider/dashboard/plans-tab-stats", + m.ProviderDashboardPlansTabStats, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def send_provider_ticket_notification_test( + +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.SuccessResponse: - """Call ``POST /v1/provider/ticket-notification-policy:send-test``.""" + ) -> m.GetDashboardAssetSalesTimeseriesResponse: + """Call ``GET /v1/provider/dashboard/asset-sales-timeseries``.""" return 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/asset-sales-timeseries", + m.GetDashboardAssetSalesTimeseriesResponse, + query=_query(extra_query, ("rangeDays", range_days)), + body=None, idempotent=False, timeout=timeout, ) - def update_provider_ticket_notification_policy( + def get_dashboard_billing_sales( self, *, - policy: m.ProviderTicketNotificationPolicy | 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.GetProviderTicketNotificationPolicyResponse: - """Call ``PUT /v1/provider/ticket-notification-policy``.""" + ) -> 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 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/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 RefundService(_Service): - """The NodeRings RefundService API.""" - - def get_refund( + def get_dashboard_customer_acquisition_timeseries( self, - refund_id: str, *, + range_days: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetRefundResponse: - """ - GetRefund retrieves a single refund with payment and invoice details + ) -> m.GetDashboardCustomerAcquisitionTimeseriesResponse: + """Call ``GET /v1/provider/dashboard/customer-acquisition-timeseries``.""" + return self._client._call( + "GET", + "/v1/provider/dashboard/customer-acquisition-timeseries", + m.GetDashboardCustomerAcquisitionTimeseriesResponse, + query=_query(extra_query, ("rangeDays", range_days)), + body=None, + idempotent=False, + timeout=timeout, + ) - It calls ``GET /v1/refunds/{refundId}``. - """ + def get_dashboard_summary( + self, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetDashboardSummaryResponse: + """Call ``GET /v1/provider/dashboard/summary``.""" return 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, ) - def list_refunds( + 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 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), ), @@ -11249,19 +11091,19 @@ def list_refunds( timeout=timeout, ) - def list_refunds_all( + 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, - ) -> Iterator[m.Refund]: + ) -> Iterator[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). """ @@ -11269,120 +11111,62 @@ 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_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 RegionService(_Service): - """The NodeRings RegionService API.""" - - def create_region( + 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``.""" - return 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), - ), - idempotent=False, - timeout=timeout, - ) - - def delete_region( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/regions/{id}``.""" - return self._client._call( - "DELETE", - f"/v1/regions/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def get_region( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.Region: - """Call ``GET /v1/regions/{id}``.""" - return self._client._call( - "GET", - f"/v1/regions/{_path(id)}", - m.Region, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def list_countries_cities( - 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, - ) -> m.ListCountriesCitiesResponse: - """Call ``GET /v1/countries-cities``.""" + ) -> m.ListDashboardInfrastructureResponse: + """Call ``GET /v1/provider/dashboard/infrastructure``.""" return self._client._call( "GET", - "/v1/countries-cities", - m.ListCountriesCitiesResponse, - query=_query(extra_query, ("query", query), ("page", page), ("pageSize", page_size)), + "/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, ) - def list_countries_cities_all( + def list_dashboard_infrastructure_all( self, *, - query: str | 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, - ) -> Iterator[m.Country]: + ) -> Iterator[m.ProviderDashboardNodeRollup]: """ - Every result of :meth:`list_countries_cities`, 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). """ @@ -11390,109 +11174,92 @@ def list_countries_cities_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_countries_cities( + res = self.list_dashboard_infrastructure( page=page, page_size=size, - query=query, + platform_id=platform_id, + region_id=region_id, extra_query=extra_query, timeout=timeout, ) - items = res.countries + 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_datacenters( + def list_dashboard_ipam( self, *, - query: str | None = None, - page: int | None = None, - page_size: int | None = None, + 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.ListDatacentersResponse: - """Call ``GET /v1/datacenters``.""" + ) -> m.ListDashboardIPAMResponse: + """Call ``GET /v1/provider/dashboard/ipam``.""" return self._client._call( "GET", - "/v1/datacenters", - m.ListDatacentersResponse, - query=_query(extra_query, ("query", query), ("page", page), ("pageSize", page_size)), + "/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_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_dashboard_ipam_assignments( self, *, - page: int | None = None, - page_size: int | 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.ListRegionsResponse: - """Call ``GET /v1/regions``.""" + ) -> m.ListDashboardIPAMAssignmentsResponse: + """Call ``GET /v1/provider/dashboard/ipam/assignments``.""" return self._client._call( "GET", - "/v1/regions", - m.ListRegionsResponse, + "/v1/provider/dashboard/ipam/assignments", + m.ListDashboardIPAMAssignmentsResponse, query=_query( - extra_query, ("page", page), ("pageSize", page_size), ("search", search), ("platformId", platform_id) + extra_query, + ("networkId", network_id), + ("search", search), + ("platformId", platform_id), + ("page", page), + ("pageSize", page_size), + ("ipFamily", ip_family), ), body=None, idempotent=False, timeout=timeout, ) - def list_regions_all( + def list_dashboard_ipam_assignments_all( self, *, - page: int | None = None, - page_size: int | 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, - ) -> Iterator[m.Region]: + ) -> Iterator[m.DashboardIPAMAssignmentRow]: """ - Every result of :meth:`list_regions`, 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). """ @@ -11500,15 +11267,17 @@ def list_regions_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_regions( + 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.regions + items = res.assignments for item in items: yield item seen += len(items) @@ -11516,849 +11285,792 @@ def list_regions_all( return page += 1 - -class RoadmapService(_Service): - """The NodeRings RoadmapService API.""" - - def create_roadmap_feature_request_comment( - self, - slug: 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``.""" - return self._client._call( - "POST", - f"/v1/roadmap/requests/{_path(slug)}/comments", - m.CreateRoadmapFeatureRequestCommentResponse, - query=_query(extra_query), - body=_body(m.CreateRoadmapFeatureRequestCommentBody, extra_body, False, ("body", body)), - idempotent=False, - timeout=timeout, - ) - - def delete_roadmap_feature_request_comment( + def list_dashboard_plan_subscription_stats( self, - comment_id: str, *, + 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.DeleteRoadmapFeatureRequestCommentResponse: - """Call ``DELETE /v1/roadmap/comments/{commentId}``.""" + ) -> m.ListDashboardPlanSubscriptionStatsResponse: + """Call ``GET /v1/provider/dashboard/plan-subscription-stats``.""" return self._client._call( - "DELETE", - f"/v1/roadmap/comments/{_path(comment_id)}", - m.DeleteRoadmapFeatureRequestCommentResponse, - query=_query(extra_query), + "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 get_roadmap_feature_request( + def list_dashboard_ticket_statistics( self, - slug: str, *, + from_time: datetime | None = None, + to_time: datetime | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetRoadmapFeatureRequestResponse: - """Call ``GET /v1/roadmap/requests/{slug}``.""" + ) -> m.ListDashboardTicketStatisticsResponse: + """Call ``GET /v1/provider/dashboard/tickets/statistics``.""" return self._client._call( "GET", - f"/v1/roadmap/requests/{_path(slug)}", - m.GetRoadmapFeatureRequestResponse, - query=_query(extra_query), + "/v1/provider/dashboard/tickets/statistics", + m.ListDashboardTicketStatisticsResponse, + query=_query(extra_query, ("fromTime", from_time), ("toTime", to_time)), body=None, idempotent=False, timeout=timeout, ) - def get_roadmap_stats( + 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.GetRoadmapStatsResponse: - """Call ``GET /v1/roadmap/stats``.""" + ) -> m.ListDashboardVirtualMachinesResponse: + """Call ``GET /v1/provider/dashboard/virtual-machines``.""" return self._client._call( "GET", - "/v1/roadmap/stats", - m.GetRoadmapStatsResponse, - query=_query(extra_query), + "/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 list_roadmap_feature_request_comments( + +class ProviderNetworkService(_Service): + """The NodeRings ProviderNetworkService API.""" + + def get_smtp_outbound_provider_policy( self, - slug: 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.GetSMTPOutboundProviderPolicyResponse: + """Call ``GET /v1/provider/network/smtp-outbound-policy``.""" return self._client._call( "GET", - f"/v1/roadmap/requests/{_path(slug)}/comments", - m.ListRoadmapFeatureRequestCommentsResponse, - query=_query(extra_query, ("page", page), ("limit", limit)), + "/v1/provider/network/smtp-outbound-policy", + m.GetSMTPOutboundProviderPolicyResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_roadmap_feature_requests( + def list_virtual_machine_smtp_outbound_policies( self, *, - 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, + page_size: int | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListRoadmapFeatureRequestsResponse: - """Call ``GET /v1/roadmap/requests``.""" - 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), - ), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> m.ListVirtualMachineSMTPOutboundPoliciesResponse: + """ + Call ``GET /v1/provider/network/smtp-outbound-policies``. - def list_roadmap_product_categories( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListRoadmapProductCategoriesResponse: - """Call ``GET /v1/roadmap/products``.""" + Args: + search: Case-insensitive substring match on hostname, customer contact email, or exact virtual machine UUID. + """ return self._client._call( "GET", - "/v1/roadmap/products", - m.ListRoadmapProductCategoriesResponse, - query=_query(extra_query), + "/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 remove_roadmap_feature_request_vote( + def list_virtual_machine_smtp_outbound_policies_all( self, - slug: 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.VoteRoadmapFeatureRequestResponse: - """Call ``DELETE /v1/roadmap/requests/{slug}/vote``.""" - return self._client._call( - "DELETE", - f"/v1/roadmap/requests/{_path(slug)}/vote", - m.VoteRoadmapFeatureRequestResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> Iterator[m.VirtualMachineSMTPOutboundPolicyView]: + """ + Every result of :meth:`list_virtual_machine_smtp_outbound_policies`, reading page after + page. - def submit_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_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, *, - description: str | None = None, - product_slug: str | None = None, - title: str | None = None, + 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.SubmitRoadmapFeatureRequestResponse: - """Call ``POST /v1/roadmap/submit``.""" + ) -> 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 self._client._call( - "POST", - "/v1/roadmap/submit", - m.SubmitRoadmapFeatureRequestResponse, + "PUT", + "/v1/provider/network/smtp-outbound-policy", + m.GetSMTPOutboundProviderPolicyResponse, query=_query(extra_query), body=_body( - m.SubmitRoadmapFeatureRequestRequest, - extra_body, - False, - ("description", description), - ("product_slug", product_slug), - ("title", title), + m.UpdateSMTPOutboundProviderPolicyRequest, extra_body, False, ("block_by_default", block_by_default) ), idempotent=False, timeout=timeout, ) - def update_roadmap_feature_request_comment( + def update_virtual_machine_smtp_outbound_policy( self, - comment_id: str, + virtual_machine_id: str, *, - body: str | 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.UpdateRoadmapFeatureRequestCommentResponse: - """Call ``PATCH /v1/roadmap/comments/{commentId}``.""" + ) -> m.VirtualMachineSMTPOutboundPolicyView: + """Call ``PUT /v1/provider/network/smtp-outbound-policies/{virtualMachineId}``.""" return self._client._call( - "PATCH", - f"/v1/roadmap/comments/{_path(comment_id)}", - m.UpdateRoadmapFeatureRequestCommentResponse, + "PUT", + f"/v1/provider/network/smtp-outbound-policies/{_path(virtual_machine_id)}", + m.VirtualMachineSMTPOutboundPolicyView, query=_query(extra_query), - body=_body(m.UpdateRoadmapFeatureRequestCommentBody, extra_body, False, ("body", body)), + body=_body(m.UpdateVirtualMachineSMTPOutboundPolicyBody, extra_body, False, ("action", action)), idempotent=False, timeout=timeout, ) - def vote_roadmap_feature_request( + +class ProviderOnboardingService(_Service): + """The NodeRings ProviderOnboardingService API.""" + + def get_provider_onboarding_checklist( 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.VoteRoadmapFeatureRequestResponse: - """Call ``POST /v1/roadmap/requests/{slug}/vote``.""" + ) -> m.GetProviderOnboardingChecklistResponse: + """Call ``GET /v1/provider/onboarding/checklist``.""" return self._client._call( - "POST", - f"/v1/roadmap/requests/{_path(slug)}/vote", - m.VoteRoadmapFeatureRequestResponse, + "GET", + "/v1/provider/onboarding/checklist", + m.GetProviderOnboardingChecklistResponse, query=_query(extra_query), - body=_body(m.VoteRoadmapFeatureRequestBody, extra_body, False, ("type", type)), + body=None, idempotent=False, timeout=timeout, ) -class RoleService(_Service): - """The NodeRings RoleService API.""" +class ProviderPlanService(_Service): + """The NodeRings ProviderPlanService API.""" - def create_role( + def calculate_plan_pricing( self, *, - description: str | None = None, - group_ids: list[str] | None = None, - name: str | None = None, - permissions: list[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.CreateRoleResponse: - """Call ``POST /v1/roles``.""" + ) -> m.CalculatePlanPricingResponse: + """ + Call ``POST /v1/plans:calculate``. + + Args: + instances: Resource instances to calculate pricing for + """ return self._client._call( "POST", - "/v1/roles", - m.CreateRoleResponse, + "/v1/plans:calculate", + m.CalculatePlanPricingResponse, query=_query(extra_query), body=_body( - m.CreateRoleRequest, + m.CalculatePlanPricingRequest, extra_body, False, - ("description", description), - ("group_ids", group_ids), - ("name", name), - ("permissions", permissions), + ("calc_config", calc_config), + ("instances", instances), + ("plan_config", plan_config), ), idempotent=False, timeout=timeout, ) - def delete_role( + def create_plan( self, - 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, + 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}``.""" - return self._client._call( - "DELETE", - f"/v1/roles/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) + """ + Call ``POST /v1/plans``. - def list_roles( - 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, - ) -> m.ListRolesResponse: - """Call ``GET /v1/roles``.""" - 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, - idempotent=False, - timeout=timeout, - ) - - def list_roles_all( - 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). + 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 = 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", + "POST", + "/v1/plans", m.SuccessResponse, query=_query(extra_query), - body=_body(m.ReplaceRoleForGroupRequest, extra_body, False, ("group_id", group_id), ("role_id", role_id)), + 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 replace_role_for_service_account( + def delete_plan( self, + id: str, *, - 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``.""" + """Call ``DELETE /v1/plans/{id}``.""" return self._client._call( - "PUT", - "/v1/roles/replace-for-service-account", + "DELETE", + f"/v1/plans/{_path(id)}", m.SuccessResponse, query=_query(extra_query), - body=_body( - m.ReplaceRoleForServiceAccountRequest, - extra_body, - False, - ("role_id", role_id), - ("service_account_id", service_account_id), - ), + body=None, idempotent=False, timeout=timeout, ) - def replace_role_for_user( + def list_assignable_nodes_for_plan( self, *, - role_id: str | None = None, - user_id: str | None = None, - extra_body: dict[str, Any] | 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.SuccessResponse: - """Call ``PUT /v1/roles/replace-for-user``.""" + ) -> 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( - "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)), + "GET", + "/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, ) - def update_role( + def update_plan( self, id: str, *, - description: str | None = None, - group_ids: list[str] | None = None, - name: str | None = None, - permissions: list[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, - ) -> m.UpdateRoleResponse: - """Call ``PATCH /v1/roles/{id}``.""" + ) -> m.SuccessResponse: + """ + Call ``PATCH /v1/plans/{id}``. + + 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). + """ return self._client._call( "PATCH", - f"/v1/roles/{_path(id)}", - m.UpdateRoleResponse, + f"/v1/plans/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.UpdateRoleBody, + m.UpdatePlanBody, extra_body, False, - ("description", description), - ("group_ids", group_ids), - ("name", name), - ("permissions", permissions), + ("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 SSHKeyService(_Service): - """The NodeRings SSHKeyService API.""" +class ProviderReviewService(_Service): + """The NodeRings ProviderReviewService API.""" - def create_ssh_key( + def create_provider_review_reply( self, + review_id: str, *, - name: str | None = None, - public_key: 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.CreateSSHKeyResponse: - """Call ``POST /v1/ssh-keys``.""" + ) -> m.CreateProviderReviewReplyResponse: + """Call ``POST /v1/provider-reviews/{reviewId}/reply``.""" return self._client._call( "POST", - "/v1/ssh-keys", - m.CreateSSHKeyResponse, + f"/v1/provider-reviews/{_path(review_id)}/reply", + m.CreateProviderReviewReplyResponse, query=_query(extra_query), - body=_body(m.CreateSSHKeyRequest, extra_body, False, ("name", name), ("public_key", public_key)), + body=_body(m.CreateProviderReviewReplyBody, extra_body, False, ("reply_message", reply_message)), idempotent=False, timeout=timeout, ) - def delete_ssh_key( + def delete_provider_review_reply( self, - id: str, + review_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/ssh-keys/{id}``.""" + ) -> m.DeleteProviderReviewReplyResponse: + """Call ``DELETE /v1/provider-reviews/{reviewId}/reply``.""" return self._client._call( "DELETE", - f"/v1/ssh-keys/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def get_ssh_key( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetSSHKeyResponse: - """Call ``GET /v1/ssh-keys/{id}``.""" - return self._client._call( - "GET", - f"/v1/ssh-keys/{_path(id)}", - m.GetSSHKeyResponse, + f"/v1/provider-reviews/{_path(review_id)}/reply", + m.DeleteProviderReviewReplyResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_ssh_keys( + def list_provider_reviews( 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, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListSSHKeysResponse: - """Call ``GET /v1/ssh-keys``.""" + ) -> 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/ssh-keys", - m.ListSSHKeysResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "/v1/provider-reviews", + m.ListProviderReviewsResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("starRatings", star_ratings), + ("search", search), + ("replyFilter", reply_filter), + ), body=None, idempotent=False, timeout=timeout, ) - def list_ssh_keys_all( + def update_provider_review_reply( self, + review_id: str, *, - 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.SSHKey]: - """ - 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). - """ - page = page or 0 - 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 + ) -> 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, + ) -class SecretService(_Service): - """The NodeRings SecretService API.""" +class ProviderStorefrontService(_Service): + """The NodeRings ProviderStorefrontService API.""" - def create_secret( + def get_my_storefront( 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.CreateSecretResponse: - """Call ``POST /v1/secrets``.""" + ) -> m.GetMyStorefrontResponse: + """Call ``GET /v1/provider/storefront``.""" return self._client._call( - "POST", - "/v1/secrets", - m.CreateSecretResponse, + "GET", + "/v1/provider/storefront", + m.GetMyStorefrontResponse, query=_query(extra_query), - body=_body(m.CreateSecretRequest, extra_body, False, ("key", key), ("value", value)), + body=None, idempotent=False, timeout=timeout, ) - def delete_secret( + def opt_in_storefront( 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/secrets/{id}``.""" + ) -> m.GetMyStorefrontResponse: + """Call ``POST /v1/provider/storefront/opt-in``.""" return self._client._call( - "DELETE", - f"/v1/secrets/{_path(id)}", - m.SuccessResponse, + "POST", + "/v1/provider/storefront/opt-in", + m.GetMyStorefrontResponse, query=_query(extra_query), - body=None, + body=dict(extra_body or {}), idempotent=False, timeout=timeout, ) - def get_secret( + def opt_out_storefront( self, - id: str, *, + 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.GetMyStorefrontResponse: + """Call ``POST /v1/provider/storefront/opt-out``.""" return self._client._call( - "GET", - f"/v1/secrets/{_path(id)}", - m.GetSecretResponse, + "POST", + "/v1/provider/storefront/opt-out", + m.GetMyStorefrontResponse, query=_query(extra_query), - body=None, + body=dict(extra_body or {}), idempotent=False, timeout=timeout, ) - def list_secrets( + def preview_my_storefront( self, *, - 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.PreviewMyStorefrontResponse: + """Call ``GET /v1/provider/storefront/preview``.""" return self._client._call( "GET", - "/v1/secrets", - m.ListSecretsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "/v1/provider/storefront/preview", + m.PreviewMyStorefrontResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_secrets_all( - self, - *, - page: int | None = None, - page_size: int | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Secret]: - """ - Every result of :meth:`list_secrets`, 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_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( + def submit_my_storefront( 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.GetMyStorefrontResponse: + """Call ``POST /v1/provider/storefront/submit``.""" return self._client._call( - "PATCH", - f"/v1/secrets/{_path(id)}", - m.SuccessResponse, + "POST", + "/v1/provider/storefront/submit", + m.GetMyStorefrontResponse, query=_query(extra_query), - body=_body(m.UpdateSecretBody, extra_body, False, ("value", value)), + body=dict(extra_body or {}), idempotent=False, timeout=timeout, ) - -class ServiceAccountService(_Service): - """The NodeRings ServiceAccountService API.""" - - def create_service_account( + def update_my_storefront( self, *, - allowed_ips: list[str] | None = None, - description: str | None = None, - name: 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.ServiceAccountResponse: - """Call ``POST /v1/service-accounts``.""" + ) -> m.GetMyStorefrontResponse: + """Call ``PATCH /v1/provider/storefront``.""" return self._client._call( - "POST", - "/v1/service-accounts", - m.ServiceAccountResponse, + "PATCH", + "/v1/provider/storefront", + m.GetMyStorefrontResponse, query=_query(extra_query), body=_body( - m.CreateServiceAccountRequest, + m.UpdateMyStorefrontRequest, extra_body, False, - ("allowed_ips", allowed_ips), - ("description", description), - ("name", name), + ("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, ) - def delete_service_account( + +class ProviderTicketNotificationService(_Service): + """The NodeRings ProviderTicketNotificationService API.""" + + def get_provider_ticket_notification_policy( self, - id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/service-accounts/{id}``.""" + ) -> m.GetProviderTicketNotificationPolicyResponse: + """Call ``GET /v1/provider/ticket-notification-policy``.""" return self._client._call( - "DELETE", - f"/v1/service-accounts/{_path(id)}", - m.SuccessResponse, + "GET", + "/v1/provider/ticket-notification-policy", + m.GetProviderTicketNotificationPolicyResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def generate_token( + def send_provider_ticket_notification_test( 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.SuccessResponse: + """Call ``POST /v1/provider/ticket-notification-policy:send-test``.""" return self._client._call( "POST", - f"/v1/service-accounts/{_path(service_account_id)}/tokens", - m.GenerateServiceAccountTokenResponse, + "/v1/provider/ticket-notification-policy:send-test", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.GenerateTokenBody, extra_body, False, ("expires_in_days", expires_in_days), ("name", name)), + body=dict(extra_body or {}), idempotent=False, timeout=timeout, ) - def get_service_account( + def update_provider_ticket_notification_policy( self, - id: str, *, + 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.ServiceAccountResponse: - """Call ``GET /v1/service-accounts/{id}``.""" + ) -> m.GetProviderTicketNotificationPolicyResponse: + """Call ``PUT /v1/provider/ticket-notification-policy``.""" return self._client._call( - "GET", - f"/v1/service-accounts/{_path(id)}", - m.ServiceAccountResponse, + "PUT", + "/v1/provider/ticket-notification-policy", + m.GetProviderTicketNotificationPolicyResponse, query=_query(extra_query), - body=None, + body=_body(m.UpdateProviderTicketNotificationPolicyRequest, extra_body, False, ("policy", policy)), idempotent=False, timeout=timeout, ) - def list_service_accounts( + +class RefundService(_Service): + """The NodeRings RefundService API.""" + + def get_refund( self, + refund_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.GetRefundResponse: + """ + GetRefund retrieves a single refund with payment and invoice details + + It calls ``GET /v1/refunds/{refundId}``. + """ return self._client._call( "GET", - "/v1/service-accounts", - m.ListServiceAccountsResponse, - query=_query(extra_query, ("includeInactive", include_inactive), ("page", page), ("pageSize", page_size)), + f"/v1/refunds/{_path(refund_id)}", + m.GetRefundResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_service_accounts_all( + def list_refunds( self, *, - include_inactive: bool | 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, - ) -> Iterator[m.ServiceAccountResponse]: + ) -> m.ListRefundsResponse: """ - Every result of :meth:`list_service_accounts`, reading page after page. + ListRefunds lists refunds for a payment, invoice, or organization - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + It calls ``GET /v1/refunds``. """ - 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 - - def list_tokens( - self, - service_account_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.ListServiceAccountTokensResponse: - """Call ``GET /v1/service-accounts/{serviceAccountId}/tokens``.""" 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/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_tokens_all( + def list_refunds_all( self, - service_account_id: str, *, - include_inactive: bool | 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, - ) -> Iterator[m.ServiceAccountTokenInfo]: + ) -> Iterator[m.Refund]: """ - Every result of :meth:`list_tokens`, reading page after page. + 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). """ @@ -12366,15 +12078,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_refunds( page=page, page_size=size, - include_inactive=include_inactive, + payment_id=payment_id, + invoice_id=invoice_id, + status=status, extra_query=extra_query, timeout=timeout, ) - items = res.tokens + items = res.refunds for item in items: yield item seen += len(items) @@ -12382,91 +12095,47 @@ 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( +class RegionService(_Service): + """The NodeRings RegionService API.""" + + def create_region( self, - id: str, *, - allowed_ips: list[str] | None = None, - description: str | None = None, - is_active: bool | None = None, - name: 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.ServiceAccountResponse: - """Call ``PATCH /v1/service-accounts/{id}``.""" + ) -> m.Region: + """Call ``POST /v1/regions``.""" return self._client._call( - "PATCH", - f"/v1/service-accounts/{_path(id)}", - m.ServiceAccountResponse, + "POST", + "/v1/regions", + m.Region, query=_query(extra_query), body=_body( - m.UpdateServiceAccountBody, + m.CreateRegionRequest, extra_body, False, - ("allowed_ips", allowed_ips), - ("description", description), - ("is_active", is_active), - ("name", name), + ("city_country_id", city_country_id), + ("datacenter_id", datacenter_id), ), idempotent=False, timeout=timeout, ) - -class SnapshotService(_Service): - """The NodeRings SnapshotService API.""" - - def create_snapshot( - self, - vm_id: str, - *, - description: 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``.""" - return self._client._call( - "POST", - f"/v1/virtual-machines/{_path(vm_id)}/snapshots", - m.CreateSnapshotResponse, - query=_query(extra_query), - body=_body(m.CreateSnapshotBody, extra_body, False, ("description", description)), - idempotent=False, - timeout=timeout, - ) - - def delete_snapshot( + def delete_region( self, - vm_id: str, - snapshot_id: str, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/virtual-machines/{vmId}/snapshots/{snapshotId}``.""" + """Call ``DELETE /v1/regions/{id}``.""" return self._client._call( "DELETE", - f"/v1/virtual-machines/{_path(vm_id)}/snapshots/{_path(snapshot_id)}", + f"/v1/regions/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -12474,58 +12143,55 @@ def delete_snapshot( timeout=timeout, ) - def get_snapshot( + def get_region( self, - vm_id: str, - snapshot_id: str, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetSnapshotResponse: - """Call ``GET /v1/virtual-machines/{vmId}/snapshots/{snapshotId}``.""" + ) -> m.Region: + """Call ``GET /v1/regions/{id}``.""" return self._client._call( "GET", - f"/v1/virtual-machines/{_path(vm_id)}/snapshots/{_path(snapshot_id)}", - m.GetSnapshotResponse, + f"/v1/regions/{_path(id)}", + m.Region, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_snapshots( + def list_countries_cities( self, - vm_id: str, *, - status: m.SnapshotStatus | 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.ListSnapshotsResponse: - """Call ``GET /v1/virtual-machines/{vmId}/snapshots``.""" + ) -> m.ListCountriesCitiesResponse: + """Call ``GET /v1/countries-cities``.""" 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)), + "/v1/countries-cities", + m.ListCountriesCitiesResponse, + query=_query(extra_query, ("query", query), ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def list_snapshots_all( + def list_countries_cities_all( self, - vm_id: str, *, - status: m.SnapshotStatus | 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, - ) -> Iterator[m.Snapshot]: + ) -> Iterator[m.Country]: """ - Every result of :meth:`list_snapshots`, 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). """ @@ -12533,15 +12199,14 @@ def list_snapshots_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_snapshots( - vm_id, + res = self.list_countries_cities( page=page, page_size=size, - status=status, + query=query, extra_query=extra_query, timeout=timeout, ) - items = res.snapshots + items = res.countries for item in items: yield item seen += len(items) @@ -12549,123 +12214,94 @@ def list_snapshots_all( return page += 1 - def restore_snapshot( + def list_datacenters( self, - vm_id: str, - snapshot_id: str, *, - snapshot_name: str | None = None, - stop_vm: bool | 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: - """Call ``POST /v1/virtual-machines/{vmId}/snapshots/{snapshotId}/restore``.""" + ) -> m.ListDatacentersResponse: + """Call ``GET /v1/datacenters``.""" return self._client._call( - "POST", - f"/v1/virtual-machines/{_path(vm_id)}/snapshots/{_path(snapshot_id)}/restore", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.RestoreSnapshotBody, extra_body, False, ("snapshot_name", snapshot_name), ("stop_vm", stop_vm) - ), + "GET", + "/v1/datacenters", + m.ListDatacentersResponse, + query=_query(extra_query, ("query", query), ("page", page), ("pageSize", page_size)), + body=None, idempotent=False, timeout=timeout, ) - -class SubscriptionService(_Service): - """The NodeRings SubscriptionService API.""" - - def cancel( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.CancelResponse: - """Call ``POST /v1/subscriptions:cancel``.""" - return self._client._call( - "POST", - "/v1/subscriptions:cancel", - m.CancelResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def cancel_renewal( + def list_datacenters_all( self, *, - subscription_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.CancelResponse: + ) -> Iterator[m.DatacenterInfo]: """ - 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). + Every result of :meth:`list_datacenters`, reading page after page. - It calls ``POST /v1/subscriptions:cancel-renewal``. + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - return self._client._call( - "POST", - "/v1/subscriptions:cancel-renewal", - m.CancelResponse, - query=_query(extra_query), - body=_body(m.CancelRenewalRequest, extra_body, False, ("subscription_id", subscription_id)), - idempotent=False, - timeout=timeout, - ) - - def get_subscription_status( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetSubscriptionStatusResponse: - """Call ``GET /v1/subscriptions:status``.""" - return self._client._call( - "GET", - "/v1/subscriptions:status", - m.GetSubscriptionStatusResponse, - 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_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_subscriptions( + def list_regions( self, *, page: int | None = None, page_size: int | None = None, - only_active: bool | None = None, + search: str | None = None, + platform_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListSubscriptionsResponse: - """Call ``GET /v1/subscriptions``.""" + ) -> m.ListRegionsResponse: + """Call ``GET /v1/regions``.""" return self._client._call( "GET", - "/v1/subscriptions", - m.ListSubscriptionsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("onlyActive", only_active)), + "/v1/regions", + m.ListRegionsResponse, + query=_query( + extra_query, ("page", page), ("pageSize", page_size), ("search", search), ("platformId", platform_id) + ), body=None, idempotent=False, timeout=timeout, ) - def list_subscriptions_all( + def list_regions_all( self, *, page: int | None = None, page_size: int | None = None, - only_active: bool | None = None, + search: str | None = None, + platform_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.Subscription]: + ) -> Iterator[m.Region]: """ - Every result of :meth:`list_subscriptions`, 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). """ @@ -12673,14 +12309,15 @@ def list_subscriptions_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = self.list_subscriptions( + res = self.list_regions( page=page, page_size=size, - only_active=only_active, + search=search, + platform_id=platform_id, extra_query=extra_query, timeout=timeout, ) - items = res.subscriptions + items = res.regions for item in items: yield item seen += len(items) @@ -12688,405 +12325,339 @@ def list_subscriptions_all( return page += 1 - def retry_payment( + +class RegisteredDomainService(_Service): + """The NodeRings RegisteredDomainService API.""" + + def approve_outgoing_transfer( self, + name: str, *, - 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.RetryPaymentResponse: - """ - Call ``POST /v1/subscriptions:retry-payment``. - - 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 - """ + ) -> m.RegisteredDomain: + """Call ``POST /v1/registrar/domains/{name}/transfer-out/approve``.""" return self._client._call( "POST", - "/v1/subscriptions:retry-payment", - m.RetryPaymentResponse, + f"/v1/registrar/domains/{_path(name)}/transfer-out/approve", + m.RegisteredDomain, query=_query(extra_query), - body=_body( - m.RetryPaymentRequest, - extra_body, - False, - ("payment_method_id", payment_method_id), - ("subscription_id", subscription_id), - ), + body=_body(m.ApproveOutgoingTransferBody, extra_body, False), idempotent=False, timeout=timeout, ) - def undo_cancel_renewal( + def confirm_registrant_change( self, + token: str, *, - subscription_id: str | None = None, + approve: bool | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CancelResponse: + ) -> m.ConfirmRegistrantChangeResponse: """ - UndoCancelRenewal clears cancel_at_period_end so the asset subscription renews again. + Anonymous via the signed token from the approval email. - It calls ``POST /v1/subscriptions:undo-cancel-renewal``. + It calls ``POST /v1/registrar/registrant-changes/{token}``. """ return self._client._call( "POST", - "/v1/subscriptions:undo-cancel-renewal", - m.CancelResponse, - query=_query(extra_query), - body=_body(m.UndoCancelRenewalRequest, extra_body, False, ("subscription_id", subscription_id)), - idempotent=False, - timeout=timeout, - ) - - -class TicketService(_Service): - """The NodeRings TicketService API.""" - - def add_internal_comment( - self, - ticket_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``.""" - return self._client._call( - "POST", - f"/v1/tickets/{_path(ticket_id)}:internal-comment", - m.AddInternalCommentResponse, + f"/v1/registrar/registrant-changes/{_path(token)}", + m.ConfirmRegistrantChangeResponse, query=_query(extra_query), - body=_body(m.AddInternalCommentBody, extra_body, False, ("comment", comment)), + body=_body(m.ConfirmRegistrantChangeBody, extra_body, False, ("approve", approve)), idempotent=False, timeout=timeout, ) - def add_reply_to_ticket( + def delete_domain_glue_record( self, - ticket_id: str, + name: str, + host: 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.SuccessResponse: - """Call ``POST /v1/tickets/{ticketId}:add-reply``.""" + """Call ``DELETE /v1/registrar/domains/{name}/glue/{host}``.""" return self._client._call( - "POST", - f"/v1/tickets/{_path(ticket_id)}:add-reply", + "DELETE", + f"/v1/registrar/domains/{_path(name)}/glue/{_path(host)}", m.SuccessResponse, query=_query(extra_query), - body=_body(m.AddReplyToTicketBody, extra_body, False, ("reply_message", reply_message)), + body=None, idempotent=False, timeout=timeout, ) - def confirm_ticket_attachment_upload( + def delete_registered_domain( self, + name: str, *, - upload_token: str | None = None, + confirm_name: str | None = None, + confirmation_code: str | 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.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, - ) + ) -> 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. - def create_ticket( - self, - *, - 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.CreateTicketResponse: - """Call ``POST /v1/tickets``.""" + 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. + """ return self._client._call( "POST", - "/v1/tickets", - m.CreateTicketResponse, + f"/v1/registrar/domains/{_path(name)}/delete", + m.DeleteRegisteredDomainResponse, query=_query(extra_query), body=_body( - m.CreateTicketRequest, + m.DeleteRegisteredDomainBody, extra_body, False, - ("template_id", template_id), - ("template_variables", template_variables), - ("ticket", ticket), + ("confirm_name", confirm_name), + ("confirmation_code", confirmation_code), + ("reauth_token", reauth_token), ), idempotent=False, timeout=timeout, ) - def create_ticket_attachment_upload( + def get_domain_auth_code( self, - ticket_id: str, + name: str, *, - file_name: str | None = None, - file_size: int | None = None, - mime_type: str | 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.CreateTicketAttachmentUploadResponse: - """Call ``POST /v1/tickets/{ticketId}/attachments:upload``.""" + ) -> m.GetDomainAuthCodeResponse: + """ + POST so the reauth token travels in the body. Sensitive response. + + It calls ``POST /v1/registrar/domains/{name}/auth-code``. + + Args: + reauth_token: Step-up token from ReauthenticateUser (10 minutes). + """ return self._client._call( "POST", - f"/v1/tickets/{_path(ticket_id)}/attachments:upload", - m.CreateTicketAttachmentUploadResponse, + f"/v1/registrar/domains/{_path(name)}/auth-code", + m.GetDomainAuthCodeResponse, 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.GetDomainAuthCodeBody, extra_body, False, ("reauth_token", reauth_token)), idempotent=False, timeout=timeout, ) - def create_ticket_template( + def get_registered_domain( 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.TicketTemplate: - """Call ``POST /v1/ticket-templates``.""" + ) -> m.RegisteredDomain: + """Call ``GET /v1/registrar/domains/{name}``.""" return self._client._call( - "POST", - "/v1/ticket-templates", - m.TicketTemplate, + "GET", + f"/v1/registrar/domains/{_path(name)}", + m.RegisteredDomain, query=_query(extra_query), - body=_body(m.CreateTicketTemplateRequest, extra_body, False, ("ticket_template", ticket_template)), + body=None, idempotent=False, timeout=timeout, ) - def delete_ticket( + def list_domain_events( self, - id: str, + name: 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.SuccessResponse: - """Call ``DELETE /v1/tickets/{id}``.""" + ) -> m.ListDomainEventsResponse: + """Call ``GET /v1/registrar/domains/{name}/events``.""" return self._client._call( - "DELETE", - f"/v1/tickets/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), + "GET", + f"/v1/registrar/domains/{_path(name)}/events", + m.ListDomainEventsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("kinds", kinds)), body=None, idempotent=False, timeout=timeout, ) - def delete_ticket_attachment( + def list_domain_events_all( self, - attachment_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/tickets/attachments/{attachmentId}``.""" - return self._client._call( - "DELETE", - f"/v1/tickets/attachments/{_path(attachment_id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - def delete_ticket_template( - self, - id: str, - *, - 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, - ) - - def download_ticket_attachment( - self, - attachment_id: str, + name: 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.DownloadTicketAttachmentResponse: - """Call ``GET /v1/tickets/attachments/{attachmentId}:download``.""" - return self._client._call( - "GET", - f"/v1/tickets/attachments/{_path(attachment_id)}:download", - m.DownloadTicketAttachmentResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> Iterator[m.DomainEvent]: + """ + Every result of :meth:`list_domain_events`, reading page after page. - def get_ticket( - self, - id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetTicketResponse: - """Call ``GET /v1/tickets/{id}``.""" - return self._client._call( - "GET", - f"/v1/tickets/{_path(id)}", - m.GetTicketResponse, - 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_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 - def get_ticket_template( + def list_domain_glue_records( self, - id: str, + name: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.TicketTemplate: - """Call ``GET /v1/ticket-templates/{id}``.""" + ) -> m.ListDomainGlueRecordsResponse: + """Call ``GET /v1/registrar/domains/{name}/glue``.""" return self._client._call( "GET", - f"/v1/ticket-templates/{_path(id)}", - m.TicketTemplate, + f"/v1/registrar/domains/{_path(name)}/glue", + m.ListDomainGlueRecordsResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_internal_comments( + def list_domain_invoices( self, - ticket_id: str, + name: str, *, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListInternalCommentsResponse: - """Call ``GET /v1/tickets/{ticketId}/internal-comments``.""" - return self._client._call( - "GET", - f"/v1/tickets/{_path(ticket_id)}/internal-comments", - m.ListInternalCommentsResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> m.ListDomainInvoicesResponse: + """ + Billing tab: paid invoices covering the domain (checkout orders and automatic renewals, + which have no order). Newest first. - def list_ticket_attachments( - self, - ticket_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.ListTicketAttachmentsResponse: - """Call ``GET /v1/tickets/{ticketId}/attachments``.""" + It calls ``GET /v1/registrar/domains/{name}/invoices``. + """ return self._client._call( "GET", - f"/v1/tickets/{_path(ticket_id)}/attachments", - m.ListTicketAttachmentsResponse, - query=_query(extra_query), + f"/v1/registrar/domains/{_path(name)}/invoices", + m.ListDomainInvoicesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def list_ticket_templates( + 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, - ) -> m.ListTicketTemplatesResponse: - """Call ``GET /v1/ticket-templates``.""" - return self._client._call( - "GET", - "/v1/ticket-templates", - m.ListTicketTemplatesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> Iterator[m.DomainInvoice]: + """ + Every result of :meth:`list_domain_invoices`, reading page after page. - def list_tickets( + ``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_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 + + def list_registered_domains( 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, + 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.ListTicketsResponse: - """Call ``GET /v1/tickets``.""" + ) -> 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. + """ return self._client._call( "GET", - "/v1/tickets", - m.ListTicketsResponse, + "/v1/registrar/domains", + m.ListRegisteredDomainsResponse, query=_query( extra_query, ("page", page), ("pageSize", page_size), - ("filterTicketStatus", filter_ticket_status), - ("filterCaseType", filter_case_type), - ("filterPriority", filter_priority), + ("states", states), + ("search", search), + ("expiringSoon", expiring_soon), + ("needsAttention", needs_attention), ), body=None, idempotent=False, timeout=timeout, ) - def list_tickets_all( + def list_registered_domains_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, + 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.Ticket]: + ) -> Iterator[m.RegisteredDomain]: """ - Every result of :meth:`list_tickets`, reading page after page. + 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). """ @@ -13094,16 +12665,17 @@ 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_registered_domains( page=page, page_size=size, - filter_ticket_status=filter_ticket_status, - filter_case_type=filter_case_type, - filter_priority=filter_priority, + states=states, + search=search, + expiring_soon=expiring_soon, + needs_attention=needs_attention, extra_query=extra_query, timeout=timeout, ) - items = res.tickets + items = res.domains for item in items: yield item seen += len(items) @@ -13111,618 +12683,575 @@ def list_tickets_all( return page += 1 - def search_tickets( + def renew_domain( self, + name: str, *, - 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, + 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.SearchTicketsResponse: - """Call ``POST /v1/tickets:search``.""" + ) -> 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. + """ return self._client._call( "POST", - "/v1/tickets:search", - m.SearchTicketsResponse, + f"/v1/registrar/domains/{_path(name)}/renew", + m.DomainOrder, query=_query(extra_query), - 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, + body=_body(m.RenewDomainBody, extra_body, True, ("idempotency_key", idempotency_key), ("years", years)), + idempotent=True, timeout=timeout, ) - def set_ticket_priority( + def resend_registrant_verification( self, - ticket_id: str, + name: 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.ResendRegistrantVerificationResponse: + """Call ``POST /v1/registrar/domains/{name}/verification/resend``.""" return self._client._call( "POST", - f"/v1/tickets/{_path(ticket_id)}:set-priority", - m.SuccessResponse, + f"/v1/registrar/domains/{_path(name)}/verification/resend", + m.ResendRegistrantVerificationResponse, query=_query(extra_query), - body=_body(m.SetTicketPriorityBody, extra_body, False, ("priority", priority)), + body=_body(m.ResendRegistrantVerificationBody, extra_body, False), idempotent=False, timeout=timeout, ) - def set_ticket_status( + def reset_domain_auth_code( self, - ticket_id: str, + name: str, *, - ticket_status: m.TicketStatus | str | 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.SuccessResponse: - """Call ``POST /v1/tickets/{ticketId}:set-status``.""" + ) -> m.GetDomainAuthCodeResponse: + """Call ``POST /v1/registrar/domains/{name}/auth-code/reset``.""" return self._client._call( "POST", - f"/v1/tickets/{_path(ticket_id)}:set-status", - m.SuccessResponse, + f"/v1/registrar/domains/{_path(name)}/auth-code/reset", + m.GetDomainAuthCodeResponse, query=_query(extra_query), - body=_body(m.SetTicketStatusBody, extra_body, False, ("ticket_status", ticket_status)), + body=_body(m.ResetDomainAuthCodeBody, extra_body, False, ("reauth_token", reauth_token)), idempotent=False, timeout=timeout, ) - def update_ticket_template( + def restore_domain( self, - id: str, + name: str, *, - ticket_template: m.TicketTemplateInput | dict[str, Any] | None = None, + idempotency_key: str | 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.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( - "PATCH", - f"/v1/ticket-templates/{_path(id)}", - m.TicketTemplate, + "POST", + f"/v1/registrar/domains/{_path(name)}/restore", + m.DomainOrder, query=_query(extra_query), - body=_body(m.UpdateTicketTemplateBody, extra_body, False, ("ticket_template", ticket_template)), - idempotent=False, + body=_body(m.RestoreDomainBody, extra_body, True, ("idempotency_key", idempotency_key)), + idempotent=True, timeout=timeout, ) - def upload_ticket_attachment_content( + def retry_domain_transfer( self, + order_item_id: str, *, - file_content: bytes | None = None, - upload_token: str | None = None, + auth_code: 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.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``. + """ return self._client._call( "POST", - "/v1/tickets/attachments:upload-content", - m.TicketAttachment, + f"/v1/registrar/order-items/{_path(order_item_id)}/retry-transfer", + m.DomainOrder, query=_query(extra_query), - body=_body( - m.UploadTicketAttachmentContentRequest, - extra_body, - False, - ("file_content", file_content), - ("upload_token", upload_token), - ), + body=_body(m.RetryDomainTransferBody, extra_body, False, ("auth_code", auth_code)), idempotent=False, timeout=timeout, ) - -class UsageReportService(_Service): - """The NodeRings UsageReportService API.""" - - def batch_record_usage( + def set_domain_auto_renew( self, + name: str, *, - records: list[m.RecordUsageRequest | dict[str, Any]] | None = None, + 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.BatchRecordUsageResponse: + ) -> m.RegisteredDomain: """ - Batch record multiple usage events (for bulk ingestion) + Call ``PUT /v1/registrar/domains/{name}/auto-renew``. - It calls ``POST /v1/usage/record:batch``. + Args: + mit_consent: Required when turning auto-renew on. + payment_method_id: Card for this domain's renewals (empty = org default card). """ return self._client._call( - "POST", - "/v1/usage/record:batch", - m.BatchRecordUsageResponse, + "PUT", + f"/v1/registrar/domains/{_path(name)}/auto-renew", + m.RegisteredDomain, query=_query(extra_query), - body=_body(m.BatchRecordUsageRequest, extra_body, False, ("records", records)), + 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), + ), idempotent=False, timeout=timeout, ) - def get_usage_record( + def set_domain_dnssec( self, - id: str, + 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.GetUsageRecordResponse: + ) -> m.RegisteredDomain: """ - Get a specific usage record by ID + Mode + custom keys. - It calls ``GET /v1/usage/records/{id}``. + 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). """ return self._client._call( - "GET", - f"/v1/usage/records/{_path(id)}", - m.GetUsageRecordResponse, + "PUT", + f"/v1/registrar/domains/{_path(name)}/dnssec", + m.RegisteredDomain, query=_query(extra_query), - body=None, + body=_body( + m.SetDomainDNSSECBody, + extra_body, + False, + ("dnskeys", dnskeys), + ("ds_records", ds_records), + ("mode", mode), + ), idempotent=False, timeout=timeout, ) - def get_usage_report( + def set_domain_nameservers( self, + name: 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, + 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.GetUsageReportResponse: + ) -> m.RegisteredDomain: """ - Get aggregated usage report for a billing period - - It calls ``GET /v1/usage/report``. + Call ``PUT /v1/registrar/domains/{name}/nameservers``. 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 + 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. """ return 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), + "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) ), - body=None, idempotent=False, timeout=timeout, ) - def list_usage_records( + def set_domain_privacy( self, + name: 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, + enabled: bool | None = None, + idempotency_key: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListUsageRecordsResponse: + ) -> m.SetDomainPrivacyResponse: """ - List usage records with filters + Enabling may create a privacy order to pay (order_id in the response). - It calls ``GET /v1/usage/records``. + 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: - subscription_id: Filters - start_time: Time range - page: Pagination + 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", - "/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), + "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) ), - body=None, - idempotent=False, + idempotent=True, timeout=timeout, ) - 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.UsageRecord]: - """ - 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). - """ - 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( - 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 record_usage( + def set_domain_transfer_lock( self, + name: 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, + 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.RecordUsageResponse: + ) -> m.RegisteredDomain: """ - Record a single usage event (from Prometheus or other monitoring systems) + Unlocking requires a step-up reauth_token. - It calls ``POST /v1/usage/record``. + It calls ``PUT /v1/registrar/domains/{name}/lock``. 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 + reauth_token: Step-up token from ReauthenticateUser; required to unlock. """ return self._client._call( - "POST", - "/v1/usage/record", - m.RecordUsageResponse, + "PUT", + f"/v1/registrar/domains/{_path(name)}/lock", + m.RegisteredDomain, 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), + m.SetDomainTransferLockBody, extra_body, False, ("locked", locked), ("reauth_token", reauth_token) ), idempotent=False, timeout=timeout, ) - -class UserService(_Service): - """The NodeRings UserService API.""" - - def change_password( + def update_domain_contacts( self, + name: str, *, - new_password: str | None = None, - old_password: str | None = None, + 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.SuccessResponse: - """Call ``POST /v1/auth/change-password``.""" + ) -> 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( - "POST", - "/v1/auth/change-password", - m.SuccessResponse, + "PUT", + f"/v1/registrar/domains/{_path(name)}/contacts", + m.UpdateDomainContactsResponse, query=_query(extra_query), body=_body( - m.ChangePasswordRequest, + m.UpdateDomainContactsBody, extra_body, False, - ("new_password", new_password), - ("old_password", old_password), + ("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, ) - def complete_sso_link( + def upsert_domain_glue_record( self, + name: str, + host: str, *, - password: str | None = None, - ticket: str | None = None, + 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.LoginResponse: - """Call ``POST /v1/auth/sso/link``.""" + ) -> m.DomainGlueRecord: + """Call ``PUT /v1/registrar/domains/{name}/glue/{host}``.""" return self._client._call( - "POST", - "/v1/auth/sso/link", - m.LoginResponse, + "PUT", + f"/v1/registrar/domains/{_path(name)}/glue/{_path(host)}", + m.DomainGlueRecord, query=_query(extra_query), - body=_body(m.CompleteSSOLinkRequest, extra_body, False, ("password", password), ("ticket", ticket)), + body=_body(m.UpsertDomainGlueRecordBody, extra_body, False, ("ipv4", ipv4), ("ipv6", ipv6)), idempotent=False, timeout=timeout, ) - def delete_user( + +class RegistrarAdminService(_Service): + """The NodeRings RegistrarAdminService API.""" + + def add_domain_hold( self, - id: str, + 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.SuccessResponse: - """Call ``DELETE /v1/users/{id}``.""" + ) -> m.AdminRegisteredDomain: + """ + Call ``POST /v1/registrar/admin/domains/{name}/holds``. + + Args: + hold: Holds sit beside the state; any hold blocks risky mutations. + """ return self._client._call( - "DELETE", - f"/v1/users/{_path(id)}", - m.SuccessResponse, + "POST", + f"/v1/registrar/admin/domains/{_path(name)}/holds", + m.AdminRegisteredDomain, query=_query(extra_query), - body=None, + body=_body(m.AddDomainHoldBody, extra_body, False, ("hold", hold), ("reason", reason)), idempotent=False, timeout=timeout, ) - def disable_mfa( + def get_registrar_balance( self, *, - code: str | None = None, - password: str | None = None, - extra_body: dict[str, Any] | None = None, + provider: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> m.GetRegistrarBalanceResponse: """ - Call ``POST /v1/auth/mfa/disable``. + Call ``GET /v1/registrar/admin/balance``. Args: - code: Current TOTP or an unused recovery code. - password: Required when the user has a local password. + provider: Empty = configured default provider. """ 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)), + "GET", + "/v1/registrar/admin/balance", + m.GetRegistrarBalanceResponse, + query=_query(extra_query, ("provider", provider)), + body=None, idempotent=False, timeout=timeout, ) - def enroll_mfa_totp( + def list_all_domain_orders( self, *, - extra_body: dict[str, Any] | 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.EnrollMFATOTPResponse: - """Call ``POST /v1/auth/mfa/enroll``.""" - return self._client._call( - "POST", - "/v1/auth/mfa/enroll", - m.EnrollMFATOTPResponse, - query=_query(extra_query), - body=_body(m.EnrollMFATOTPRequest, 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``.""" + ) -> m.ListAllDomainOrdersResponse: + """Call ``GET /v1/registrar/admin/orders``.""" return self._client._call( - "POST", - "/v1/auth/sso/exchange", - m.LoginResponse, - query=_query(extra_query), - body=_body(m.ExchangeSSOCodeRequest, extra_body, False, ("code", code)), + "GET", + "/v1/registrar/admin/orders", + m.ListAllDomainOrdersResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("states", states), + ("organizationId", organization_id), + ), + body=None, idempotent=False, timeout=timeout, ) - def forgot_password( + def list_all_domain_orders_all( self, *, - email: str | None = None, - turnstile_token: str | None = None, - extra_body: dict[str, Any] | 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.SuccessResponse: + ) -> Iterator[m.AdminDomainOrder]: """ - Call ``POST /v1/auth/forgot-password``. + Every result of :meth:`list_all_domain_orders`, 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( - "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, - ) + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = self.list_all_domain_orders( + page=page, + page_size=size, + states=states, + organization_id=organization_id, + 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 - def get_mfa_status( + def list_all_domains( 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, - ) -> m.GetMFAStatusResponse: - """Call ``GET /v1/auth/mfa/status``.""" + ) -> m.ListAllDomainsResponse: + """Call ``GET /v1/registrar/admin/domains``.""" return self._client._call( "GET", - "/v1/auth/mfa/status", - m.GetMFAStatusResponse, - query=_query(extra_query), + "/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, ) - def get_user( + def list_all_domains_all( self, - id: str, *, + 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.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, - ) + ) -> Iterator[m.AdminRegisteredDomain]: + """ + Every result of :meth:`list_all_domains`, reading page after page. - 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( - "GET", - "/v1/auth/identities", - m.ListLinkedIdentitiesResponse, - 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_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_users( + def list_tld_offerings( self, *, page: int | None = None, page_size: int | None = None, - filter_email: str | None = None, - filter_status: m.Protov1Status | str | None = None, + provider: str | None = None, search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListUsersResponse: - """Call ``GET /v1/users``.""" + ) -> m.ListTldOfferingsResponse: + """Call ``GET /v1/registrar/admin/tlds``.""" return self._client._call( "GET", - "/v1/users", - m.ListUsersResponse, + "/v1/registrar/admin/tlds", + m.ListTldOfferingsResponse, query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("filterEmail", filter_email), - ("filterStatus", filter_status), - ("search", search), + extra_query, ("page", page), ("pageSize", page_size), ("provider", provider), ("search", search) ), body=None, idempotent=False, timeout=timeout, ) - def list_users_all( + def list_tld_offerings_all( self, *, page: int | None = None, page_size: int | None = None, - filter_email: str | None = None, - filter_status: m.Protov1Status | str | None = None, + provider: str | None = None, search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> Iterator[m.User]: + ) -> Iterator[m.TldOffering]: """ - Every result of :meth:`list_users`, reading page after page. + 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). """ @@ -13730,16 +13259,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 = self.list_tld_offerings( page=page, page_size=size, - filter_email=filter_email, - filter_status=filter_status, + provider=provider, search=search, extra_query=extra_query, timeout=timeout, ) - items = res.users + items = res.offerings for item in items: yield item seen += len(items) @@ -13747,600 +13275,531 @@ def list_users_all( return page += 1 - def login( + def move_domain_to_organization( self, + name: str, *, - email: str | None = None, - password: str | None = None, - turnstile_token: str | None = None, + 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.LoginResponse: + ) -> m.AdminRegisteredDomain: """ - Call ``POST /v1/auth/login``. + Call ``POST /v1/registrar/admin/domains/{name}/move``. Args: - turnstile_token: Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled). + reason: Reference to both owners' written consent. """ return self._client._call( "POST", - "/v1/auth/login", - m.LoginResponse, + f"/v1/registrar/admin/domains/{_path(name)}/move", + m.AdminRegisteredDomain, query=_query(extra_query), body=_body( - m.LoginRequest, + m.MoveDomainToOrganizationBody, extra_body, False, - ("email", email), - ("password", password), - ("turnstile_token", turnstile_token), + ("reason", reason), + ("target_organization_id", target_organization_id), ), idempotent=False, timeout=timeout, ) - def login_mfa_verify( + def remove_domain_hold( self, + name: str, *, - code: str | None = None, - login_session_id: str | None = None, + 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.LoginResponse: + ) -> m.AdminRegisteredDomain: """ - Call ``POST /v1/auth/login/mfa``. + Call ``POST /v1/registrar/admin/domains/{name}/holds/remove``. Args: - code: Authenticator TOTP code or a one-time recovery code. + hold: Holds sit beside the state; any hold blocks risky mutations. """ return self._client._call( "POST", - "/v1/auth/login/mfa", - m.LoginResponse, + f"/v1/registrar/admin/domains/{_path(name)}/holds/remove", + m.AdminRegisteredDomain, query=_query(extra_query), - body=_body( - m.LoginMFAVerifyRequest, extra_body, False, ("code", code), ("login_session_id", login_session_id) - ), + body=_body(m.RemoveDomainHoldBody, extra_body, False, ("hold", hold), ("reason", reason)), idempotent=False, timeout=timeout, ) - def logout( + def retry_registrar_operation( self, *, - invalidate_all: bool | None = None, + 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/auth/logout``.""" + """ + Call ``POST /v1/registrar/admin/operations/retry``. + + Args: + order_item_id: Exactly one of order_item_id / renewal_id. + """ return self._client._call( "POST", - "/v1/auth/logout", + "/v1/registrar/admin/operations/retry", m.SuccessResponse, query=_query(extra_query), - body=_body(m.LogoutRequest, extra_body, False, ("invalidate_all", invalidate_all)), + body=_body( + m.RetryRegistrarOperationRequest, + extra_body, + False, + ("order_item_id", order_item_id), + ("reason", reason), + ("renewal_id", renewal_id), + ), idempotent=False, timeout=timeout, ) - def regenerate_mfa_backup_codes( + def review_domain_order( self, + id: str, *, - code: str | None = None, + 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.RegenerateMFABackupCodesResponse: - """Call ``POST /v1/auth/mfa/backup-codes/regenerate``.""" + ) -> m.AdminDomainOrder: + """ + Approve or decline an order in in_review. + + It calls ``POST /v1/registrar/admin/orders/{id}/review``. + """ return self._client._call( "POST", - "/v1/auth/mfa/backup-codes/regenerate", - m.RegenerateMFABackupCodesResponse, + f"/v1/registrar/admin/orders/{_path(id)}/review", + m.AdminDomainOrder, query=_query(extra_query), - body=_body(m.RegenerateMFABackupCodesRequest, extra_body, False, ("code", code)), + body=_body(m.ReviewDomainOrderBody, extra_body, False, ("approve", approve), ("reason", reason)), idempotent=False, timeout=timeout, ) - def register_user( + def set_client_hold( self, + name: str, *, - email: str | None = None, - first_name: str | None = None, - last_name: str | None = None, - password: str | None = None, - turnstile_token: str | None = None, + 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.SuccessResponse: + ) -> m.AdminRegisteredDomain: """ - Call ``POST /v1/auth/register``. + Registry clientHold (suspends resolution). - Args: - turnstile_token: Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled). + It calls ``PUT /v1/registrar/admin/domains/{name}/client-hold``. """ return self._client._call( - "POST", - "/v1/auth/register", - m.SuccessResponse, + "PUT", + f"/v1/registrar/admin/domains/{_path(name)}/client-hold", + m.AdminRegisteredDomain, 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.SetClientHoldBody, extra_body, False, ("enabled", enabled), ("reason", reason)), idempotent=False, timeout=timeout, ) - def resend_verification_email( + def set_tld_offering( self, + tld: str, *, - email: str | None = None, - turnstile_token: str | None = None, + 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.SuccessResponse: + ) -> m.TldOffering: """ - Call ``POST /v1/auth/resend-verification-email``. + Enable/disable, feature, block, override price. + + It calls ``PUT /v1/registrar/admin/tlds/{tld}``. Args: - turnstile_token: Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled). + 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 self._client._call( - "POST", - "/v1/auth/resend-verification-email", - m.SuccessResponse, + "PUT", + f"/v1/registrar/admin/tlds/{_path(tld)}", + m.TldOffering, query=_query(extra_query), body=_body( - m.ResendVerificationEmailRequest, + m.SetTldOfferingBody, extra_body, False, - ("email", email), - ("turnstile_token", turnstile_token), + ("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, ) - def reset_password( + def sync_domain( self, + name: str, *, - 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``.""" + ) -> m.AdminRegisteredDomain: + """Call ``POST /v1/registrar/admin/domains/{name}/sync``.""" return self._client._call( "POST", - "/v1/auth/reset-password", - m.SuccessResponse, + f"/v1/registrar/admin/domains/{_path(name)}/sync", + m.AdminRegisteredDomain, query=_query(extra_query), - body=_body( - m.ResetPasswordRequest, - extra_body, - False, - ("email", email), - ("new_password", new_password), - ("reset_token", reset_token), - ), + body=_body(m.SyncDomainBody, extra_body, False), idempotent=False, timeout=timeout, ) - def set_password( + def sync_tld_catalog( self, *, - new_password: str | None = None, + 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.SuccessResponse: - """Call ``POST /v1/auth/set-password``.""" + ) -> 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 self._client._call( "POST", - "/v1/auth/set-password", - m.SuccessResponse, + "/v1/registrar/admin/tlds/sync", + m.SyncTldCatalogResponse, query=_query(extra_query), - body=_body(m.SetPasswordRequest, extra_body, False, ("new_password", new_password)), + body=_body(m.SyncTldCatalogRequest, extra_body, False, ("provider", provider), ("reason", reason)), idempotent=False, timeout=timeout, ) - def unlink_identity( + +class RoadmapService(_Service): + """The NodeRings RoadmapService API.""" + + def create_roadmap_feature_request_comment( self, - provider: str, + slug: str, *, + body: 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}``.""" + ) -> m.CreateRoadmapFeatureRequestCommentResponse: + """Call ``POST /v1/roadmap/requests/{slug}/comments``.""" return self._client._call( - "DELETE", - f"/v1/auth/identities/{_path(provider)}", - m.SuccessResponse, + "POST", + f"/v1/roadmap/requests/{_path(slug)}/comments", + m.CreateRoadmapFeatureRequestCommentResponse, query=_query(extra_query), - body=None, + body=_body(m.CreateRoadmapFeatureRequestCommentBody, extra_body, False, ("body", body)), idempotent=False, timeout=timeout, ) - def update_user( + def delete_roadmap_feature_request_comment( self, - id: str, + comment_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}``.""" + ) -> m.DeleteRoadmapFeatureRequestCommentResponse: + """Call ``DELETE /v1/roadmap/comments/{commentId}``.""" return self._client._call( - "PATCH", - f"/v1/users/{_path(id)}", - m.UpdateUserResponse, + "DELETE", + f"/v1/roadmap/comments/{_path(comment_id)}", + m.DeleteRoadmapFeatureRequestCommentResponse, 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( + def get_roadmap_feature_request( self, + slug: 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``.""" + ) -> m.GetRoadmapFeatureRequestResponse: + """Call ``GET /v1/roadmap/requests/{slug}``.""" return self._client._call( "GET", - "/v1/auth/verify-email", - m.SuccessResponse, - query=_query(extra_query, ("userId", user_id), ("code", code)), + f"/v1/roadmap/requests/{_path(slug)}", + m.GetRoadmapFeatureRequestResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def verify_mfa_enrollment( + def get_roadmap_stats( 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``.""" + ) -> m.GetRoadmapStatsResponse: + """Call ``GET /v1/roadmap/stats``.""" return self._client._call( - "POST", - "/v1/auth/mfa/verify-enrollment", - m.VerifyMFAEnrollmentResponse, + "GET", + "/v1/roadmap/stats", + m.GetRoadmapStatsResponse, query=_query(extra_query), - body=_body(m.VerifyMFAEnrollmentRequest, extra_body, False, ("code", code)), + body=None, idempotent=False, timeout=timeout, ) - -class VMTemplateService(_Service): - """The NodeRings VMTemplateService API.""" - - def create_vm_template( + def list_roadmap_feature_request_comments( self, + slug: 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, - extra_body: dict[str, Any] | None = None, + page: int | None = None, + limit: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """ - Call ``POST /v1/vmtemplate``. - - 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. - """ + ) -> m.ListRoadmapFeatureRequestCommentsResponse: + """Call ``GET /v1/roadmap/requests/{slug}/comments``.""" return self._client._call( - "POST", - "/v1/vmtemplate", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.CreateVMTemplateRequest, - 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), - ), + "GET", + f"/v1/roadmap/requests/{_path(slug)}/comments", + m.ListRoadmapFeatureRequestCommentsResponse, + query=_query(extra_query, ("page", page), ("limit", limit)), + body=None, idempotent=False, timeout=timeout, ) - def delete_vm_template( + def list_roadmap_feature_requests( self, - 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.SuccessResponse: - """Call ``DELETE /v1/vmtemplate/{id}``.""" + ) -> m.ListRoadmapFeatureRequestsResponse: + """Call ``GET /v1/roadmap/requests``.""" return self._client._call( - "DELETE", - f"/v1/vmtemplate/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), + "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 get_vm_template( + def list_roadmap_product_categories( self, - id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetVMTemplateResponse: - """Call ``GET /v1/vmtemplate/{id}``.""" + ) -> m.ListRoadmapProductCategoriesResponse: + """Call ``GET /v1/roadmap/products``.""" return self._client._call( "GET", - f"/v1/vmtemplate/{_path(id)}", - m.GetVMTemplateResponse, + "/v1/roadmap/products", + m.ListRoadmapProductCategoriesResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_vm_templates( + def remove_roadmap_feature_request_vote( self, + slug: str, *, - 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``.""" + ) -> m.VoteRoadmapFeatureRequestResponse: + """Call ``DELETE /v1/roadmap/requests/{slug}/vote``.""" return 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), - ), + "DELETE", + f"/v1/roadmap/requests/{_path(slug)}/vote", + m.VoteRoadmapFeatureRequestResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_vm_templates_all( + def submit_roadmap_feature_request( 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, + 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, - ) -> Iterator[m.VMTemplate]: - """ - Every result of :meth:`list_vm_templates`, 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_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 + ) -> m.SubmitRoadmapFeatureRequestResponse: + """Call ``POST /v1/roadmap/submit``.""" + 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), + ), + idempotent=False, + timeout=timeout, + ) - def update_vm_template( + def update_roadmap_feature_request_comment( self, - id: str, + comment_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, + body: str | 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. - """ + ) -> m.UpdateRoadmapFeatureRequestCommentResponse: + """Call ``PATCH /v1/roadmap/comments/{commentId}``.""" return self._client._call( "PATCH", - f"/v1/vmtemplate/{_path(id)}", - m.UpdateVMTemplateResponse, + f"/v1/roadmap/comments/{_path(comment_id)}", + m.UpdateRoadmapFeatureRequestCommentResponse, 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.UpdateRoadmapFeatureRequestCommentBody, extra_body, False, ("body", body)), idempotent=False, timeout=timeout, ) - -class VirtualMachineService(_Service): - """The NodeRings VirtualMachineService API.""" - - def attach_vm_firewall( + def vote_roadmap_feature_request( self, - id: str, + slug: str, *, - ruleset_id: str | None = None, + 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/virtual-machines/{id}:attach-firewall``.""" + ) -> m.VoteRoadmapFeatureRequestResponse: + """Call ``POST /v1/roadmap/requests/{slug}/vote``.""" return self._client._call( "POST", - f"/v1/virtual-machines/{_path(id)}:attach-firewall", - m.SuccessResponse, + f"/v1/roadmap/requests/{_path(slug)}/vote", + m.VoteRoadmapFeatureRequestResponse, query=_query(extra_query), - body=_body(m.AttachVMFirewallBody, extra_body, False, ("ruleset_id", ruleset_id)), + body=_body(m.VoteRoadmapFeatureRequestBody, extra_body, False, ("type", type)), idempotent=False, timeout=timeout, ) - def create_virtual_machine( + +class RoleService(_Service): + """The NodeRings RoleService API.""" + + def create_role( 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, + 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.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. - """ + ) -> m.CreateRoleResponse: + """Call ``POST /v1/roles``.""" return self._client._call( "POST", - "/v1/virtual-machines", - m.CreateVirtualMachineResponse, + "/v1/roles", + m.CreateRoleResponse, query=_query(extra_query), body=_body( - m.CreateVirtualMachineRequest, + m.CreateRoleRequest, 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), + False, + ("description", description), + ("group_ids", group_ids), + ("name", name), + ("permissions", permissions), ), - idempotent=True, + idempotent=False, timeout=timeout, ) - def delete_virtual_machine( + def delete_role( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/virtual-machines/{id}``.""" + """Call ``DELETE /v1/roles/{id}``.""" return self._client._call( "DELETE", - f"/v1/virtual-machines/{_path(id)}", + f"/v1/roles/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -14348,212 +13807,250 @@ def delete_virtual_machine( timeout=timeout, ) - def detach_vm_firewall( + def list_roles( self, - id: str, *, - ruleset_id: str | None = None, - extra_body: dict[str, Any] | 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.SuccessResponse: - """Call ``POST /v1/virtual-machines/{id}:detach-firewall``.""" + ) -> m.ListRolesResponse: + """Call ``GET /v1/roles``.""" return self._client._call( - "POST", - f"/v1/virtual-machines/{_path(id)}:detach-firewall", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.DetachVMFirewallBody, extra_body, False, ("ruleset_id", ruleset_id)), + "GET", + "/v1/roles", + m.ListRolesResponse, + query=_query( + extra_query, ("page", page), ("pageSize", page_size), ("filterName", filter_name), ("search", search) + ), + body=None, idempotent=False, timeout=timeout, ) - def disable_additional_ip( + def list_roles_all( 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_name: str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> Iterator[m.Role]: """ - DisableAdditionalIP releases one additional IPv4 and updates ADDITIONAL-IP addon quantity. - - It calls ``POST /v1/virtual-machines/{vmId}:disable-additional-ip``. + Every result of :meth:`list_roles`, reading page after page. - Args: - ip_address: Specific additional IPv4 to release. When empty, the most recently added address is removed. + ``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-additional-ip", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.DisableAdditionalIPBody, - extra_body, - False, - ("cancel_immediately", cancel_immediately), - ("ip_address", ip_address), - ), - 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_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 disable_backup( + def replace_role_for_group( self, - vm_id: str, *, - addon_id: str | None = None, - cancel_immediately: bool | None = None, + 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: - """ - DisableBackup disables backup addon for a virtual machine + """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, + ) - It calls ``POST /v1/virtual-machines/{vmId}:disable-backup``. - """ + 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( - "POST", - f"/v1/virtual-machines/{_path(vm_id)}:disable-backup", + "PUT", + "/v1/roles/replace-for-service-account", m.SuccessResponse, query=_query(extra_query), body=_body( - m.DisableBackupBody, + m.ReplaceRoleForServiceAccountRequest, extra_body, False, - ("addon_id", addon_id), - ("cancel_immediately", cancel_immediately), + ("role_id", role_id), + ("service_account_id", service_account_id), ), idempotent=False, timeout=timeout, ) - def enable_additional_ip( + def replace_role_for_user( self, - vm_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.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``. - """ + ) -> m.SuccessResponse: + """Call ``PUT /v1/roles/replace-for-user``.""" return self._client._call( - "POST", - f"/v1/virtual-machines/{_path(vm_id)}:enable-additional-ip", - m.EnableAdditionalIPResponse, + "PUT", + "/v1/roles/replace-for-user", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.EnableAdditionalIPBody, extra_body, False), + body=_body(m.ReplaceRoleForUserRequest, extra_body, False, ("role_id", role_id), ("user_id", user_id)), idempotent=False, timeout=timeout, ) - def enable_backup( + def update_role( self, - vm_id: str, + id: str, *, - addon_id: str | 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.SuccessResponse: - """ - EnableBackup enables backup addon for a virtual machine + ) -> m.UpdateRoleResponse: + """Call ``PATCH /v1/roles/{id}``.""" + return self._client._call( + "PATCH", + f"/v1/roles/{_path(id)}", + m.UpdateRoleResponse, + query=_query(extra_query), + body=_body( + m.UpdateRoleBody, + extra_body, + False, + ("description", description), + ("group_ids", group_ids), + ("name", name), + ("permissions", permissions), + ), + idempotent=False, + timeout=timeout, + ) - It calls ``POST /v1/virtual-machines/{vmId}:enable-backup``. - """ + +class SSHKeyService(_Service): + """The NodeRings SSHKeyService API.""" + + def create_ssh_key( + self, + *, + 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.CreateSSHKeyResponse: + """Call ``POST /v1/ssh-keys``.""" return self._client._call( "POST", - f"/v1/virtual-machines/{_path(vm_id)}:enable-backup", - m.SuccessResponse, + "/v1/ssh-keys", + m.CreateSSHKeyResponse, query=_query(extra_query), - body=_body(m.EnableBackupBody, extra_body, False, ("addon_id", addon_id)), + body=_body(m.CreateSSHKeyRequest, extra_body, False, ("name", name), ("public_key", public_key)), idempotent=False, timeout=timeout, ) - def get_virtual_machine( + def delete_ssh_key( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.VirtualMachine: - """Call ``GET /v1/virtual-machines/{id}``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/ssh-keys/{id}``.""" return self._client._call( - "GET", - f"/v1/virtual-machines/{_path(id)}", - m.VirtualMachine, + "DELETE", + f"/v1/ssh-keys/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def get_vnc_console( + def get_ssh_key( self, id: str, *, 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``. - """ + ) -> m.GetSSHKeyResponse: + """Call ``GET /v1/ssh-keys/{id}``.""" return self._client._call( "GET", - f"/v1/virtual-machines/{_path(id)}/console", - m.GetVNCConsoleResponse, + f"/v1/ssh-keys/{_path(id)}", + m.GetSSHKeyResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - def list_virtual_machines( + def list_ssh_keys( 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``.""" + ) -> m.ListSSHKeysResponse: + """Call ``GET /v1/ssh-keys``.""" return self._client._call( "GET", - "/v1/virtual-machines", - m.ListVirtualMachinesResponse, - query=_query( - extra_query, ("page", page), ("pageSize", page_size), ("filterOperationStatus", filter_operation_status) - ), + "/v1/ssh-keys", + m.ListSSHKeysResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - def list_virtual_machines_all( + def list_ssh_keys_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]: + ) -> Iterator[m.SSHKey]: """ - Every result of :meth:`list_virtual_machines`, 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). """ @@ -14561,14 +14058,8 @@ 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( - page=page, - page_size=size, - filter_operation_status=filter_operation_status, - extra_query=extra_query, - timeout=timeout, - ) - items = res.virtual_machines + 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) @@ -14576,374 +14067,306 @@ def list_virtual_machines_all( return page += 1 - def list_vm_tags( + +class SecretService(_Service): + """The NodeRings SecretService API.""" + + def create_secret( 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.ListVMTagsResponse: - """ - ListVMTags returns all unique tags from virtual machines belonging to the organization - - It calls ``GET /v1/virtual-machines/tags``. - """ + ) -> m.CreateSecretResponse: + """Call ``POST /v1/secrets``.""" return self._client._call( - "GET", - "/v1/virtual-machines/tags", - m.ListVMTagsResponse, + "POST", + "/v1/secrets", + m.CreateSecretResponse, query=_query(extra_query), - body=None, + body=_body(m.CreateSecretRequest, extra_body, False, ("key", key), ("value", value)), idempotent=False, timeout=timeout, ) - def reinstall_virtual_machine( + def delete_secret( 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.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). - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/secrets/{id}``.""" return self._client._call( - "POST", - f"/v1/virtual-machines/{_path(id)}:reinstall", - m.VirtualMachine, + "DELETE", + f"/v1/secrets/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.ReinstallVirtualMachineBody, - 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), - ), + body=None, idempotent=False, timeout=timeout, ) - def restart_virtual_machine( + def get_secret( 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}:restart``.""" + ) -> m.GetSecretResponse: + """Call ``GET /v1/secrets/{id}``.""" return self._client._call( - "POST", - f"/v1/virtual-machines/{_path(id)}:restart", - m.VirtualMachine, + "GET", + f"/v1/secrets/{_path(id)}", + m.GetSecretResponse, query=_query(extra_query), - body=_body(m.RestartVirtualMachineBody, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - def start_virtual_machine( + def list_secrets( self, - id: str, *, - 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.VirtualMachine: - """Call ``POST /v1/virtual-machines/{id}:start``.""" + ) -> m.ListSecretsResponse: + """Call ``GET /v1/secrets``.""" return self._client._call( - "POST", - f"/v1/virtual-machines/{_path(id)}:start", - m.VirtualMachine, - query=_query(extra_query), - body=_body(m.StartVirtualMachineBody, extra_body, False), + "GET", + "/v1/secrets", + m.ListSecretsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), + body=None, idempotent=False, timeout=timeout, ) - def stop_virtual_machine( + def list_secrets_all( self, - id: str, *, - 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.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), - idempotent=False, - timeout=timeout, - ) + ) -> Iterator[m.Secret]: + """ + Every result of :meth:`list_secrets`, reading page after page. - def update_virtual_machine( + ``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, *, - add_tags: list[str] | None = None, - remove_tags: 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.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 - """ + ) -> m.SuccessResponse: + """Call ``PATCH /v1/secrets/{id}``.""" return self._client._call( "PATCH", - f"/v1/virtual-machines/{_path(id)}", - m.VirtualMachine, + f"/v1/secrets/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.UpdateVirtualMachineBody, extra_body, False, ("add_tags", add_tags), ("remove_tags", remove_tags) - ), + body=_body(m.UpdateSecretBody, extra_body, False, ("value", value)), idempotent=False, timeout=timeout, ) -class AsyncAddonService(_ServiceAsync): - """The NodeRings AddonService API.""" +class ServiceAccountService(_Service): + """The NodeRings ServiceAccountService API.""" - async def add_addon_to_subscription( + def create_service_account( self, - subscription_id: str, *, - addon_id: str | None = None, - addon_price_id: str | None = None, - quantity: int | None = None, + 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.AddAddonToSubscriptionResponse: - """ - Add an addon to a subscription - - It calls ``POST /v1/subscriptions/{subscriptionId}/addons``. - """ - return await self._client._call( + ) -> m.ServiceAccountResponse: + """Call ``POST /v1/service-accounts``.""" + return self._client._call( "POST", - f"/v1/subscriptions/{_path(subscription_id)}/addons", - m.AddAddonToSubscriptionResponse, + "/v1/service-accounts", + m.ServiceAccountResponse, query=_query(extra_query), body=_body( - m.AddAddonToSubscriptionBody, + m.CreateServiceAccountRequest, extra_body, False, - ("addon_id", addon_id), - ("addon_price_id", addon_price_id), - ("quantity", quantity), + ("allowed_ips", allowed_ips), + ("description", description), + ("name", name), ), idempotent=False, timeout=timeout, ) - async def create_addon( + def delete_service_account( 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 - """ - return await self._client._call( - "POST", - "/v1/addons", + """Call ``DELETE /v1/service-accounts/{id}``.""" + return self._client._call( + "DELETE", + f"/v1/service-accounts/{_path(id)}", m.SuccessResponse, 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( + def generate_token( self, - id: str, + 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.SuccessResponse: - """ - Delete an addon (soft delete) - - It calls ``DELETE /v1/addons/{id}``. - """ - return await self._client._call( - "DELETE", - f"/v1/addons/{_path(id)}", - m.SuccessResponse, + ) -> 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=None, + body=_body(m.GenerateTokenBody, extra_body, False, ("expires_in_days", expires_in_days), ("name", name)), idempotent=False, timeout=timeout, ) - async def get_addon( + def get_service_account( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetAddonResponse: - """ - Get a specific addon with its prices - - It calls ``GET /v1/addons/{id}``. - """ - return await self._client._call( + ) -> m.ServiceAccountResponse: + """Call ``GET /v1/service-accounts/{id}``.""" + return self._client._call( "GET", - f"/v1/addons/{_path(id)}", - m.GetAddonResponse, + f"/v1/service-accounts/{_path(id)}", + m.ServiceAccountResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_addon_subscriptions( + def list_service_accounts( self, - subscription_id: str, *, - addon_status: m.AddonStatus | str | None = None, + 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.ListAddonSubscriptionsResponse: - """ - List addon subscriptions for a subscription - - It calls ``GET /v1/subscriptions/{subscriptionId}/addons``. - - Args: - addon_status: Filter by status - """ - return await self._client._call( + ) -> m.ListServiceAccountsResponse: + """Call ``GET /v1/service-accounts``.""" + return self._client._call( "GET", - f"/v1/subscriptions/{_path(subscription_id)}/addons", - m.ListAddonSubscriptionsResponse, - query=_query(extra_query, ("addonStatus", addon_status)), + "/v1/service-accounts", + m.ListServiceAccountsResponse, + query=_query(extra_query, ("includeInactive", include_inactive), ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - async def list_addons( + def list_service_accounts_all( self, *, + include_inactive: bool | 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, - ) -> m.ListAddonsResponse: + ) -> Iterator[m.ServiceAccountResponse]: """ - List available addons - - It calls ``GET /v1/addons``. + Every result of :meth:`list_service_accounts`, reading page after page. - 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 + ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ - 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, + 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 + + def list_tokens( + self, + service_account_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.ListServiceAccountTokensResponse: + """Call ``GET /v1/service-accounts/{serviceAccountId}/tokens``.""" + 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)), + body=None, + idempotent=False, + timeout=timeout, ) - async def list_addons_all( + def list_tokens_all( self, + service_account_id: str, *, + include_inactive: bool | 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, - ) -> AsyncIterator[m.Addon]: + ) -> Iterator[m.ServiceAccountTokenInfo]: """ - Every result of :meth:`list_addons`, 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). """ @@ -14951,18 +14374,15 @@ 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 = self.list_tokens( + service_account_id, page=page, page_size=size, - subscription_id=subscription_id, - addon_type=addon_type, - is_template=is_template, - billing_type=billing_type, - search=search, + include_inactive=include_inactive, extra_query=extra_query, timeout=timeout, ) - items = res.addons + items = res.tokens for item in items: yield item seen += len(items) @@ -14970,149 +14390,91 @@ async def list_addons_all( return page += 1 - async def remove_addon( + def revoke_token( self, - addon_subscription_id: str, + token_id: str, *, - cancel_immediately: bool | 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 - """ - return await self._client._call( + ) -> m.SuccessResponse: + """Call ``DELETE /v1/service-accounts/tokens/{tokenId}``.""" + return 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. - - 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, + f"/v1/service-accounts/tokens/{_path(token_id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.UndoCancelAddonBody, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - async def update_addon( + def update_service_account( self, id: str, *, - currency: str | None = None, - percentage_value: float | None = None, - unit_amount: str | None = None, - zero_base_fallback_amount: str | None = None, + 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.SuccessResponse: - """ - 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( + ) -> m.ServiceAccountResponse: + """Call ``PATCH /v1/service-accounts/{id}``.""" + return self._client._call( "PATCH", - f"/v1/addons/{_path(id)}", - m.SuccessResponse, + f"/v1/service-accounts/{_path(id)}", + m.ServiceAccountResponse, query=_query(extra_query), body=_body( - m.UpdateAddonBody, + m.UpdateServiceAccountBody, extra_body, False, - ("currency", currency), - ("percentage_value", percentage_value), - ("unit_amount", unit_amount), - ("zero_base_fallback_amount", zero_base_fallback_amount), + ("allowed_ips", allowed_ips), + ("description", description), + ("is_active", is_active), + ("name", name), ), idempotent=False, timeout=timeout, ) -class AsyncAgentService(_ServiceAsync): - """The NodeRings AgentService API.""" +class SnapshotService(_Service): + """The NodeRings SnapshotService API.""" - async def create_agent( + def create_snapshot( self, + vm_id: str, *, - 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.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( + ) -> m.CreateSnapshotResponse: + """Call ``POST /v1/virtual-machines/{vmId}/snapshots``.""" + return self._client._call( "POST", - "/v1/agents", - m.GetAgentResponse, + f"/v1/virtual-machines/{_path(vm_id)}/snapshots", + m.CreateSnapshotResponse, 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), - ), + body=_body(m.CreateSnapshotBody, extra_body, False, ("description", description)), idempotent=False, timeout=timeout, ) - async def delete_agent( + def delete_snapshot( self, - id: str, + vm_id: str, + snapshot_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/agents/{id}``.""" - return await self._client._call( + """Call ``DELETE /v1/virtual-machines/{vmId}/snapshots/{snapshotId}``.""" + return self._client._call( "DELETE", - f"/v1/agents/{_path(id)}", + f"/v1/virtual-machines/{_path(vm_id)}/snapshots/{_path(snapshot_id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -15120,101 +14482,58 @@ async def delete_agent( timeout=timeout, ) - async def generate_install_command( + def get_snapshot( self, - id: str, + vm_id: str, + snapshot_id: str, *, - extra_body: dict[str, Any] | 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, + ) -> m.GetSnapshotResponse: + """Call ``GET /v1/virtual-machines/{vmId}/snapshots/{snapshotId}``.""" + return self._client._call( + "GET", + f"/v1/virtual-machines/{_path(vm_id)}/snapshots/{_path(snapshot_id)}", + m.GetSnapshotResponse, query=_query(extra_query), - body=_body(m.GenerateInstallCommandBody, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - async def generate_peering_config( + def list_snapshots( self, - id: str, + vm_id: str, *, - 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.GeneratePeeringConfigResponse: - """Call ``POST /v1/agents/{id}:generatePeeringConfig``.""" - return await self._client._call( - "POST", - f"/v1/agents/{_path(id)}:generatePeeringConfig", - m.GeneratePeeringConfigResponse, - query=_query(extra_query), - body=_body(m.GeneratePeeringConfigBody, extra_body, False), + ) -> m.ListSnapshotsResponse: + """Call ``GET /v1/virtual-machines/{vmId}/snapshots``.""" + 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, idempotent=False, timeout=timeout, ) - async def get_agent( + def list_snapshots_all( self, - id: str, + 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, - ) -> m.GetAgentResponse: - """Call ``GET /v1/agents/{id}``.""" - return await self._client._call( - "GET", - f"/v1/agents/{_path(id)}", - m.GetAgentResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_agents( - self, - *, - 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``.""" - return await self._client._call( - "GET", - "/v1/agents", - m.ListAgentsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("gatewayRegion", gateway_region), - ("search", search), - ), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_agents_all( - self, - *, - 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, - ) -> AsyncIterator[m.GetAgentResponse]: + ) -> Iterator[m.Snapshot]: """ - Every result of :meth:`list_agents`, reading page after page. + Every result of :meth:`list_snapshots`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -15222,15 +14541,15 @@ async def list_agents_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_agents( + res = self.list_snapshots( + vm_id, page=page, page_size=size, - gateway_region=gateway_region, - search=search, + status=status, extra_query=extra_query, timeout=timeout, ) - items = res.agents + items = res.snapshots for item in items: yield item seen += len(items) @@ -15238,140 +14557,123 @@ async def list_agents_all( return page += 1 - async def update_agent( + def restore_snapshot( self, - id: str, + vm_id: str, + snapshot_id: str, *, - description: str | None = None, - hypervisor_driver: m.PlatformDriver | str | None = None, - name: 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.UpdateAgentResponse: - """ - Call ``PATCH /v1/agents/{id}``. - - Args: - hypervisor_driver: - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver. - """ - return await self._client._call( - "PATCH", - f"/v1/agents/{_path(id)}", - m.UpdateAgentResponse, + ) -> m.SuccessResponse: + """Call ``POST /v1/virtual-machines/{vmId}/snapshots/{snapshotId}/restore``.""" + return self._client._call( + "POST", + f"/v1/virtual-machines/{_path(vm_id)}/snapshots/{_path(snapshot_id)}/restore", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.UpdateAgentBody, - extra_body, - False, - ("description", description), - ("hypervisor_driver", hypervisor_driver), - ("name", name), + m.RestoreSnapshotBody, extra_body, False, ("snapshot_name", snapshot_name), ("stop_vm", stop_vm) ), idempotent=False, timeout=timeout, ) - async def upload_inbound_peering_config( + +class SubscriptionService(_Service): + """The NodeRings SubscriptionService API.""" + + def cancel( self, - id: str, *, - kubeconfig: str | 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. - """ - return await self._client._call( + ) -> m.CancelResponse: + """Call ``POST /v1/subscriptions:cancel``.""" + return self._client._call( "POST", - f"/v1/agents/{_path(id)}:uploadInboundPeeringConfig", - m.UploadInboundPeeringConfigResponse, + "/v1/subscriptions:cancel", + m.CancelResponse, query=_query(extra_query), - body=_body(m.UploadInboundPeeringConfigBody, extra_body, False, ("kubeconfig", kubeconfig)), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncBackupService(_ServiceAsync): - """The NodeRings BackupService API.""" - - async def delete_backup( + def cancel_renewal( self, - vm_id: str, - backup_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.SuccessResponse: - """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, + ) -> 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``. + """ + return self._client._call( + "POST", + "/v1/subscriptions:cancel-renewal", + m.CancelResponse, query=_query(extra_query), - body=None, + body=_body(m.CancelRenewalRequest, extra_body, False, ("subscription_id", subscription_id)), idempotent=False, timeout=timeout, ) - async def get_backup( + def get_subscription_status( self, - vm_id: str, - backup_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetBackupResponse: - """Call ``GET /v1/virtual-machines/{vmId}/backups/{backupId}``.""" - return await self._client._call( + ) -> m.GetSubscriptionStatusResponse: + """Call ``GET /v1/subscriptions:status``.""" + return self._client._call( "GET", - f"/v1/virtual-machines/{_path(vm_id)}/backups/{_path(backup_id)}", - m.GetBackupResponse, + "/v1/subscriptions:status", + m.GetSubscriptionStatusResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_backups( + def list_subscriptions( self, - vm_id: str, *, - status: m.BackupStatus | str | None = None, page: int | None = None, page_size: int | None = None, + only_active: bool | 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( + ) -> m.ListSubscriptionsResponse: + """Call ``GET /v1/subscriptions``.""" + return 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)), + "/v1/subscriptions", + m.ListSubscriptionsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("onlyActive", only_active)), body=None, idempotent=False, timeout=timeout, ) - async def list_backups_all( + def list_subscriptions_all( self, - vm_id: str, *, - status: m.BackupStatus | str | None = None, page: int | None = None, page_size: int | None = None, + only_active: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Backup]: + ) -> Iterator[m.Subscription]: """ - Every result of :meth:`list_backups`, 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). """ @@ -15379,15 +14681,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 = self.list_subscriptions( page=page, page_size=size, - status=status, + only_active=only_active, extra_query=extra_query, timeout=timeout, ) - items = res.backups + items = res.subscriptions for item in items: yield item seen += len(items) @@ -15395,498 +14696,405 @@ async def list_backups_all( return page += 1 - async def restore_backup( + def retry_payment( self, - vm_id: str, - backup_id: str, *, - start_after_restore: bool | 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.SuccessResponse: - """Call ``POST /v1/virtual-machines/{vmId}/backups/{backupId}/restore``.""" - return await self._client._call( + ) -> m.RetryPaymentResponse: + """ + Call ``POST /v1/subscriptions:retry-payment``. + + 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 + """ + return self._client._call( "POST", - f"/v1/virtual-machines/{_path(vm_id)}/backups/{_path(backup_id)}/restore", - m.SuccessResponse, + "/v1/subscriptions:retry-payment", + m.RetryPaymentResponse, query=_query(extra_query), - body=_body(m.BackupRestoreBackupBody, extra_body, False, ("start_after_restore", start_after_restore)), + body=_body( + m.RetryPaymentRequest, + extra_body, + False, + ("payment_method_id", payment_method_id), + ("subscription_id", subscription_id), + ), idempotent=False, timeout=timeout, ) - -class AsyncBusinessMonitoringService(_ServiceAsync): - """The NodeRings BusinessMonitoringService API.""" - - async def create_business_monitoring_launch( + def undo_cancel_renewal( self, *, - next: str | None = None, - resource_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.CreateMonitoringLaunchResponse: + ) -> m.CancelResponse: """ - Call ``POST /v1/monitoring/business/launch``. + UndoCancelRenewal clears cancel_at_period_end so the asset subscription renews again. - 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. + It calls ``POST /v1/subscriptions:undo-cancel-renewal``. """ - return await self._client._call( + return self._client._call( "POST", - "/v1/monitoring/business/launch", - m.CreateMonitoringLaunchResponse, + "/v1/subscriptions:undo-cancel-renewal", + m.CancelResponse, query=_query(extra_query), - body=_body( - m.CreateMonitoringLaunchRequest, extra_body, False, ("next", next), ("resource_id", resource_id) - ), + body=_body(m.UndoCancelRenewalRequest, extra_body, False, ("subscription_id", subscription_id)), idempotent=False, timeout=timeout, ) - async def rotate_business_monitoring_datasource_token( + +class TicketService(_Service): + """The NodeRings TicketService API.""" + + def add_internal_comment( self, + ticket_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.SuccessResponse: - """Call ``POST /v1/monitoring/business/datasource-token:rotate``.""" - return await self._client._call( + ) -> m.AddInternalCommentResponse: + """Call ``POST /v1/tickets/{ticketId}:internal-comment``.""" + return self._client._call( "POST", - "/v1/monitoring/business/datasource-token:rotate", - m.SuccessResponse, + f"/v1/tickets/{_path(ticket_id)}:internal-comment", + m.AddInternalCommentResponse, query=_query(extra_query), - body=_body(m.RotateMonitoringDatasourceTokenRequest, extra_body, False), + body=_body(m.AddInternalCommentBody, extra_body, False, ("comment", comment)), idempotent=False, timeout=timeout, ) - -class AsyncChatService(_ServiceAsync): - """The NodeRings ChatService API.""" - - async def chat( + def add_reply_to_ticket( self, + ticket_id: str, *, - conversation_id: str | None = None, - message: 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.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( + ) -> m.SuccessResponse: + """Call ``POST /v1/tickets/{ticketId}:add-reply``.""" + return self._client._call( "POST", - "/v1/chat", - m.ChatResponse, + f"/v1/tickets/{_path(ticket_id)}:add-reply", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.ChatRequest, extra_body, False, ("conversation_id", conversation_id), ("message", message)), + body=_body(m.AddReplyToTicketBody, extra_body, False, ("reply_message", reply_message)), idempotent=False, timeout=timeout, ) - async def chat_anonymous( + def confirm_ticket_attachment_upload( self, *, - conversation_id: str | None = None, - message: 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.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( + ) -> m.TicketAttachment: + """Call ``POST /v1/tickets/attachments:confirm-upload``.""" + return self._client._call( "POST", - "/v1/chat/anonymous", - m.ChatResponse, + "/v1/tickets/attachments:confirm-upload", + m.TicketAttachment, query=_query(extra_query), - body=_body(m.ChatRequest, extra_body, False, ("conversation_id", conversation_id), ("message", message)), + body=_body(m.ConfirmTicketAttachmentUploadRequest, extra_body, False, ("upload_token", upload_token)), idempotent=False, timeout=timeout, ) - async def delete_conversation( + def create_ticket( self, - conversation_id: str, *, + 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.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, + ) -> m.CreateTicketResponse: + """Call ``POST /v1/tickets``.""" + return self._client._call( + "POST", + "/v1/tickets", + m.CreateTicketResponse, query=_query(extra_query), - body=None, + body=_body( + m.CreateTicketRequest, + extra_body, + False, + ("template_id", template_id), + ("template_variables", template_variables), + ("ticket", ticket), + ), idempotent=False, timeout=timeout, ) - async def get_conversation_history( + def create_ticket_attachment_upload( self, - conversation_id: str, + ticket_id: str, *, + 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.GetConversationHistoryResponse: - """ - GetConversationHistory returns the full message history for a conversation - - It calls ``GET /v1/chat/conversations/{conversationId}/history``. - """ - return await self._client._call( - "GET", - f"/v1/chat/conversations/{_path(conversation_id)}/history", - m.GetConversationHistoryResponse, + ) -> m.CreateTicketAttachmentUploadResponse: + """Call ``POST /v1/tickets/{ticketId}/attachments:upload``.""" + return self._client._call( + "POST", + f"/v1/tickets/{_path(ticket_id)}/attachments:upload", + m.CreateTicketAttachmentUploadResponse, query=_query(extra_query), - body=None, + body=_body( + m.CreateTicketAttachmentUploadBody, + extra_body, + False, + ("file_name", file_name), + ("file_size", file_size), + ("mime_type", mime_type), + ), idempotent=False, timeout=timeout, ) - async def list_conversations( + def create_ticket_template( self, *, + 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.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, + ) -> m.TicketTemplate: + """Call ``POST /v1/ticket-templates``.""" + return self._client._call( + "POST", + "/v1/ticket-templates", + m.TicketTemplate, query=_query(extra_query), - body=None, + body=_body(m.CreateTicketTemplateRequest, extra_body, False, ("ticket_template", ticket_template)), idempotent=False, timeout=timeout, ) - -class AsyncClientDashboardService(_ServiceAsync): - """The NodeRings ClientDashboardService API.""" - - async def get_client_dashboard_billing( + def delete_ticket( self, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetClientDashboardBillingResponse: - """Call ``GET /v1/client/dashboard/billing``.""" - return await self._client._call( - "GET", - "/v1/client/dashboard/billing", - m.GetClientDashboardBillingResponse, + ) -> m.SuccessResponse: + """Call ``DELETE /v1/tickets/{id}``.""" + return self._client._call( + "DELETE", + f"/v1/tickets/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_client_dashboard_summary( + def delete_ticket_attachment( self, + attachment_id: str, *, 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, + ) -> m.SuccessResponse: + """Call ``DELETE /v1/tickets/attachments/{attachmentId}``.""" + return self._client._call( + "DELETE", + f"/v1/tickets/attachments/{_path(attachment_id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - -class AsyncClientProviderReviewService(_ServiceAsync): - """The NodeRings ClientProviderReviewService API.""" - - async def create_client_review( + def delete_ticket_template( 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``.""" - return await self._client._call( - "POST", - "/v1/provider-reviews", - m.CreateClientReviewResponse, + ) -> 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=_body( - m.CreateClientReviewRequest, - extra_body, - False, - ("comment", comment), - ("star_rating", star_rating), - ("virtual_machine_id", virtual_machine_id), - ), + body=None, idempotent=False, timeout=timeout, ) - async def delete_client_review( + def download_ticket_attachment( self, - review_id: str, + attachment_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/provider-reviews/{reviewId}``.""" - return await self._client._call( - "DELETE", - f"/v1/provider-reviews/{_path(review_id)}", - m.SuccessResponse, + ) -> m.DownloadTicketAttachmentResponse: + """Call ``GET /v1/tickets/attachments/{attachmentId}:download``.""" + return self._client._call( + "GET", + f"/v1/tickets/attachments/{_path(attachment_id)}:download", + m.DownloadTicketAttachmentResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_client_review_for_virtual_machine( + def get_ticket( self, - virtual_machine_id: str, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetClientReviewForVirtualMachineResponse: - """Call ``GET /v1/provider-reviews/virtual-machines/{virtualMachineId}``.""" - return await self._client._call( + ) -> m.GetTicketResponse: + """Call ``GET /v1/tickets/{id}``.""" + return self._client._call( "GET", - f"/v1/provider-reviews/virtual-machines/{_path(virtual_machine_id)}", - m.GetClientReviewForVirtualMachineResponse, + f"/v1/tickets/{_path(id)}", + m.GetTicketResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_client_provider_review_assets( + def get_ticket_template( 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. - """ - return await self._client._call( + ) -> m.TicketTemplate: + """Call ``GET /v1/ticket-templates/{id}``.""" + return self._client._call( "GET", - "/v1/client/provider-review-assets", - m.ListClientProviderReviewAssetsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("search", search)), - body=None, - idempotent=False, - timeout=timeout, - ) - - async def list_client_provider_review_assets_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, - ) -> 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 - - async def update_client_review( - self, - review_id: str, - *, - 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.UpdateClientReviewResponse: - """Call ``PATCH /v1/provider-reviews/{reviewId}``.""" - return await self._client._call( - "PATCH", - f"/v1/provider-reviews/{_path(review_id)}", - m.UpdateClientReviewResponse, + f"/v1/ticket-templates/{_path(id)}", + m.TicketTemplate, query=_query(extra_query), - body=_body(m.UpdateClientReviewBody, extra_body, False, ("comment", comment), ("star_rating", star_rating)), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncCloudInitTemplateService(_ServiceAsync): - """The NodeRings CloudInitTemplateService API.""" - - async def create_cloud_init_template( + def list_internal_comments( self, + ticket_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.SuccessResponse: - """Call ``POST /v1/cloudinittemplate``.""" - return await self._client._call( - "POST", - "/v1/cloudinittemplate", - m.SuccessResponse, + ) -> m.ListInternalCommentsResponse: + """Call ``GET /v1/tickets/{ticketId}/internal-comments``.""" + return self._client._call( + "GET", + f"/v1/tickets/{_path(ticket_id)}/internal-comments", + m.ListInternalCommentsResponse, 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), - ), + body=None, idempotent=False, timeout=timeout, ) - async def delete_cloud_init_template( + def list_ticket_attachments( self, - id: str, + ticket_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)}", - m.SuccessResponse, + ) -> m.ListTicketAttachmentsResponse: + """Call ``GET /v1/tickets/{ticketId}/attachments``.""" + return self._client._call( + "GET", + f"/v1/tickets/{_path(ticket_id)}/attachments", + m.ListTicketAttachmentsResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_cloud_init_template( + def list_ticket_templates( self, - id: str, *, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetCloudInitTemplateResponse: - """Call ``GET /v1/cloudinittemplate/{id}``.""" - return await self._client._call( + ) -> m.ListTicketTemplatesResponse: + """Call ``GET /v1/ticket-templates``.""" + return self._client._call( "GET", - f"/v1/cloudinittemplate/{_path(id)}", - m.GetCloudInitTemplateResponse, - query=_query(extra_query), + "/v1/ticket-templates", + m.ListTicketTemplatesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - async def list_cloud_init_templates( + def list_tickets( self, *, page: int | None = None, page_size: int | None = None, - filter_is_template: bool | 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.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. - """ - return await self._client._call( + ) -> m.ListTicketsResponse: + """Call ``GET /v1/tickets``.""" + return self._client._call( "GET", - "/v1/cloudinittemplates", - m.ListCloudInitTemplatesResponse, + "/v1/tickets", + m.ListTicketsResponse, query=_query( - extra_query, ("page", page), ("pageSize", page_size), ("filterIsTemplate", filter_is_template) + extra_query, + ("page", page), + ("pageSize", page_size), + ("filterTicketStatus", filter_ticket_status), + ("filterCaseType", filter_case_type), + ("filterPriority", filter_priority), ), body=None, idempotent=False, timeout=timeout, ) - async def list_cloud_init_templates_all( + def list_tickets_all( self, *, page: int | None = None, page_size: int | None = None, - filter_is_template: bool | 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, - ) -> AsyncIterator[m.CloudInitTemplate]: + ) -> Iterator[m.Ticket]: """ - Every result of :meth:`list_cloud_init_templates`, reading page after page. + Every result of :meth:`list_tickets`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -15894,14 +15102,16 @@ 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 = self.list_tickets( page=page, page_size=size, - filter_is_template=filter_is_template, + filter_ticket_status=filter_ticket_status, + filter_case_type=filter_case_type, + filter_priority=filter_priority, extra_query=extra_query, timeout=timeout, ) - items = res.cloud_init_templates + items = res.tickets for item in items: yield item seen += len(items) @@ -15909,136 +15119,273 @@ async def list_cloud_init_templates_all( return page += 1 - async def update_cloud_init_template( + def search_tickets( 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, + 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.UpdateCloudInitTemplateResponse: - """Call ``PATCH /v1/cloudinittemplate/{id}``.""" - return await self._client._call( - "PATCH", - f"/v1/cloudinittemplate/{_path(id)}", - m.UpdateCloudInitTemplateResponse, + ) -> m.SearchTicketsResponse: + """Call ``POST /v1/tickets:search``.""" + return self._client._call( + "POST", + "/v1/tickets:search", + m.SearchTicketsResponse, query=_query(extra_query), body=_body( - m.UpdateCloudInitTemplateBody, + m.SearchTicketsRequest, extra_body, False, - ("name", name), - ("network_data", network_data), - ("storage", storage), - ("user_data", user_data), - ("vendor_data", vendor_data), + ("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 AsyncCloudInitUserDataService(_ServiceAsync): - """The NodeRings CloudInitUserDataService API.""" - - async def create_cloud_init_user_data( + def set_ticket_priority( self, + ticket_id: str, *, - description: str | None = None, - name: str | None = None, - user_data: 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.CloudInitUserData: - """Call ``POST /v1/cloudinituserdata``.""" - return await self._client._call( + ) -> m.SuccessResponse: + """Call ``POST /v1/tickets/{ticketId}:set-priority``.""" + return self._client._call( "POST", - "/v1/cloudinituserdata", - m.CloudInitUserData, + f"/v1/tickets/{_path(ticket_id)}:set-priority", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.CreateCloudInitUserDataRequest, - extra_body, - False, - ("description", description), - ("name", name), - ("user_data", user_data), - ), + body=_body(m.SetTicketPriorityBody, extra_body, False, ("priority", priority)), idempotent=False, timeout=timeout, ) - async def delete_cloud_init_user_data( + 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/cloudinituserdata/{id}``.""" - return await self._client._call( - "DELETE", - f"/v1/cloudinituserdata/{_path(id)}", + """Call ``POST /v1/tickets/{ticketId}:set-status``.""" + return self._client._call( + "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, ) - async def get_cloud_init_user_data( + def update_ticket_template( 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.CloudInitUserData: - """Call ``GET /v1/cloudinituserdata/{id}``.""" - return await self._client._call( + ) -> m.TicketTemplate: + """Call ``PATCH /v1/ticket-templates/{id}``.""" + return self._client._call( + "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 upload_ticket_attachment_content( + self, + *, + 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.TicketAttachment: + """Call ``POST /v1/tickets/attachments:upload-content``.""" + return self._client._call( + "POST", + "/v1/tickets/attachments:upload-content", + m.TicketAttachment, + query=_query(extra_query), + body=_body( + m.UploadTicketAttachmentContentRequest, + extra_body, + False, + ("file_content", file_content), + ("upload_token", upload_token), + ), + idempotent=False, + timeout=timeout, + ) + + +class UsageReportService(_Service): + """The NodeRings UsageReportService API.""" + + def batch_record_usage( + self, + *, + 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.BatchRecordUsageResponse: + """ + Batch record multiple usage events (for bulk ingestion) + + It calls ``POST /v1/usage/record:batch``. + """ + return self._client._call( + "POST", + "/v1/usage/record:batch", + m.BatchRecordUsageResponse, + query=_query(extra_query), + body=_body(m.BatchRecordUsageRequest, extra_body, False, ("records", records)), + idempotent=False, + timeout=timeout, + ) + + def get_usage_record( + self, + id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetUsageRecordResponse: + """ + Get a specific usage record by ID + + It calls ``GET /v1/usage/records/{id}``. + """ + return self._client._call( "GET", - f"/v1/cloudinituserdata/{_path(id)}", - m.CloudInitUserData, + f"/v1/usage/records/{_path(id)}", + m.GetUsageRecordResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_cloud_init_user_data( + def get_usage_report( + self, + *, + 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: + """ + 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", + "/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_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.ListCloudInitUserDataResponse: - """Call ``GET /v1/cloudinituserdata``.""" - return await self._client._call( + ) -> 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/cloudinituserdata", - m.ListCloudInitUserDataResponse, - 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, ) - async def list_cloud_init_user_data_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, - ) -> AsyncIterator[m.CloudInitUserData]: + ) -> Iterator[m.UsageRecord]: """ - Every result of :meth:`list_cloud_init_user_data`, 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). """ @@ -16046,13 +15393,18 @@ async def list_cloud_init_user_data_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_cloud_init_user_data( + 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.profiles + items = res.usage_records for item in items: yield item seen += len(items) @@ -16060,374 +15412,325 @@ async def list_cloud_init_user_data_all( return page += 1 - async def update_cloud_init_user_data( + def record_usage( self, - id: str, *, - description: str | None = None, - name: str | None = None, - user_data: 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.CloudInitUserData: - """Call ``PATCH /v1/cloudinituserdata/{id}``.""" - return await self._client._call( - "PATCH", - f"/v1/cloudinituserdata/{_path(id)}", - m.CloudInitUserData, + ) -> 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/usage/record", + m.RecordUsageResponse, query=_query(extra_query), body=_body( - m.UpdateCloudInitUserDataBody, + m.RecordUsageRequest, extra_body, False, - ("description", description), - ("name", name), - ("user_data", user_data), + ("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, ) -class AsyncCouponService(_ServiceAsync): - """The NodeRings CouponService API.""" - - async def create_coupon( +class UserService(_Service): + """The NodeRings UserService API.""" + + def change_password( 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, + 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.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. - """ - return await self._client._call( + ) -> m.SuccessResponse: + """Call ``POST /v1/auth/change-password``.""" + return self._client._call( "POST", - "/v1/coupons", - m.CreateCouponResponse, + "/v1/auth/change-password", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.CreateCouponRequest, + m.ChangePasswordRequest, 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), + ("new_password", new_password), + ("old_password", old_password), ), idempotent=False, timeout=timeout, ) - async def create_coupon_code( + def complete_sso_link( + self, + *, + 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.LoginResponse: + """Call ``POST /v1/auth/sso/link``.""" + return self._client._call( + "POST", + "/v1/auth/sso/link", + m.LoginResponse, + query=_query(extra_query), + body=_body(m.CompleteSSOLinkRequest, extra_body, False, ("password", password), ("ticket", ticket)), + idempotent=False, + timeout=timeout, + ) + + def delete_user( + 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( + "DELETE", + f"/v1/users/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + def disable_mfa( self, - 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, + password: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CouponCode: + ) -> m.SuccessResponse: """ - Call ``POST /v1/coupons/{couponId}/codes``. + Call ``POST /v1/auth/mfa/disable``. Args: - code: Leave empty to generate a random code. + code: Current TOTP or an unused recovery code. + password: Required when the user has a local password. """ - return await self._client._call( + return self._client._call( "POST", - f"/v1/coupons/{_path(coupon_id)}/codes", - m.CouponCode, + "/v1/auth/mfa/disable", + 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=_body(m.DisableMFARequest, extra_body, False, ("code", code), ("password", password)), idempotent=False, timeout=timeout, ) - async def deactivate_coupon( + def enroll_mfa_totp( self, - id: str, *, 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``. - """ - return await self._client._call( + ) -> m.EnrollMFATOTPResponse: + """Call ``POST /v1/auth/mfa/enroll``.""" + return self._client._call( "POST", - f"/v1/coupons/{_path(id)}:deactivate", - m.Coupon, + "/v1/auth/mfa/enroll", + m.EnrollMFATOTPResponse, query=_query(extra_query), - body=_body(m.DeactivateCouponBody, extra_body, False), + body=_body(m.EnrollMFATOTPRequest, extra_body, False), idempotent=False, timeout=timeout, ) - async def export_coupon_codes( + def exchange_sso_code( self, - coupon_id: str, *, - batch_id: 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.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, + ) -> 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, ) - async def generate_coupon_codes( + def forgot_password( self, - coupon_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, + 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.GenerateCouponCodesResponse: + ) -> m.SuccessResponse: """ - Call ``POST /v1/coupons/{couponId}/codes:generate``. + Call ``POST /v1/auth/forgot-password``. Args: - max_redemptions: Uses per code. Defaults to 1 (single-use). - prefix: Optional letters or digits put before each code as PREFIX-XXXXXXXXXX. + turnstile_token: Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled). """ - return await self._client._call( + return self._client._call( "POST", - f"/v1/coupons/{_path(coupon_id)}/codes:generate", - m.GenerateCouponCodesResponse, + "/v1/auth/forgot-password", + m.SuccessResponse, 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), + m.ForgotPasswordRequest, extra_body, False, ("email", email), ("turnstile_token", turnstile_token) ), idempotent=False, timeout=timeout, ) - async def get_coupon( + def get_active_sessions( self, - id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.Coupon: - """Call ``GET /v1/coupons/{id}``.""" - return await self._client._call( + ) -> m.GetActiveSessionsResponse: + """Call ``GET /v1/auth/sessions``.""" + return self._client._call( "GET", - f"/v1/coupons/{_path(id)}", - m.Coupon, + "/v1/auth/sessions", + m.GetActiveSessionsResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_coupon_code_batch( + def get_mfa_status( self, - coupon_id: str, - batch_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CouponCodeBatch: - """Call ``GET /v1/coupons/{couponId}/code-batches/{batchId}``.""" - return await self._client._call( + ) -> m.GetMFAStatusResponse: + """Call ``GET /v1/auth/mfa/status``.""" + return self._client._call( "GET", - f"/v1/coupons/{_path(coupon_id)}/code-batches/{_path(batch_id)}", - m.CouponCodeBatch, + "/v1/auth/mfa/status", + m.GetMFAStatusResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_coupon_report( + def get_user( self, - coupon_id: str, + 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.GetCouponReportResponse: - """ - Attribution and ROI figures, grouped by code, campaign, channel, or asset type. - - 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( + ) -> m.GetUserResponse: + """Call ``GET /v1/users/{id}``.""" + return 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), - ), + f"/v1/users/{_path(id)}", + m.GetUserResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_subscription_coupon( + def list_linked_identities( self, - subscription_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetSubscriptionCouponResponse: - """Call ``GET /v1/subscriptions/{subscriptionId}/coupon``.""" - return await self._client._call( + ) -> m.ListLinkedIdentitiesResponse: + """Call ``GET /v1/auth/identities``.""" + return self._client._call( "GET", - f"/v1/subscriptions/{_path(subscription_id)}/coupon", - m.GetSubscriptionCouponResponse, + "/v1/auth/identities", + m.ListLinkedIdentitiesResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_coupon_code_batches( + def list_users( self, - coupon_id: str, *, 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.ListCouponCodeBatchesResponse: - """Call ``GET /v1/coupons/{couponId}/code-batches``.""" - return await self._client._call( + ) -> m.ListUsersResponse: + """Call ``GET /v1/users``.""" + return self._client._call( "GET", - f"/v1/coupons/{_path(coupon_id)}/code-batches", - m.ListCouponCodeBatchesResponse, - query=_query(extra_query, ("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, ) - async def list_coupon_code_batches_all( + def list_users_all( self, - coupon_id: str, *, 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, - ) -> AsyncIterator[m.CouponCodeBatch]: + ) -> Iterator[m.User]: """ - Every result of :meth:`list_coupon_code_batches`, 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). """ @@ -16435,14 +15738,16 @@ async def list_coupon_code_batches_all( 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, + res = self.list_users( page=page, page_size=size, + filter_email=filter_email, + filter_status=filter_status, + search=search, extra_query=extra_query, timeout=timeout, ) - items = res.batches + items = res.users for item in items: yield item seen += len(items) @@ -16450,499 +15755,465 @@ async def list_coupon_code_batches_all( return page += 1 - async def list_coupon_codes( + def login( 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, + 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.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), + ) -> 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( + "POST", + "/v1/auth/login", + m.LoginResponse, + query=_query(extra_query), + body=_body( + m.LoginRequest, + extra_body, + False, + ("email", email), + ("password", password), + ("turnstile_token", turnstile_token), ), - body=None, idempotent=False, timeout=timeout, ) - async def list_coupon_codes_all( + def login_mfa_verify( 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, + 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, - ) -> AsyncIterator[m.CouponCode]: + ) -> m.LoginResponse: """ - Every result of :meth:`list_coupon_codes`, reading page after page. + Call ``POST /v1/auth/login/mfa``. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + Args: + code: Authenticator TOTP code or a one-time recovery code. """ - 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 self._client._call( + "POST", + "/v1/auth/login/mfa", + m.LoginResponse, + query=_query(extra_query), + body=_body( + m.LoginMFAVerifyRequest, extra_body, False, ("code", code), ("login_session_id", login_session_id) + ), + idempotent=False, + timeout=timeout, + ) - async def list_coupon_redemptions( + def logout( self, - coupon_id: str, *, - page: int | None = None, - page_size: int | None = None, - asset_type: str | None = None, + invalidate_all: bool | 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``.""" - 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)), - body=None, + ) -> m.SuccessResponse: + """Call ``POST /v1/auth/logout``.""" + return self._client._call( + "POST", + "/v1/auth/logout", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.LogoutRequest, extra_body, False, ("invalidate_all", invalidate_all)), idempotent=False, timeout=timeout, ) - async def list_coupon_redemptions_all( + def reauthenticate_user( self, - coupon_id: str, *, - page: int | None = None, - page_size: int | None = None, - asset_type: str | 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, - ) -> AsyncIterator[m.CouponRedemption]: + ) -> m.ReauthenticateUserResponse: """ - Every result of :meth:`list_coupon_redemptions`, reading page after page. + 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. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + 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. """ - 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 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 list_coupons( + def regenerate_mfa_backup_codes( self, *, - page: int | None = None, - page_size: int | None = None, - asset_type: str | None = None, - expiring_soon: bool | None = None, - search: 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.ListCouponsResponse: - """ - Call ``GET /v1/coupons``. - - Args: - expiring_soon: Only coupons whose validity ends within 14 days. - """ - 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), - ), - body=None, + ) -> 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, ) - async def list_coupons_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, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Coupon]: - """ - Every result of :meth:`list_coupons`, 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_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 list_high_risk_coupons( + def register_user( self, *, - page: int | None = None, - page_size: int | None = None, - provider_organization_id: str | None = None, - include_inactive: bool | 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.ListHighRiskCouponsResponse: + ) -> m.SuccessResponse: """ - Platform admins only: high-risk coupons across all providers, most redeemed first. - - It calls ``GET /v1/admin/coupons/high-risk``. + Call ``POST /v1/auth/register``. Args: - include_inactive: Also list inactive and banned coupons. + turnstile_token: Cloudflare Turnstile token from the client widget (optional unless auth.turnstile is enabled). """ - return await self._client._call( - "GET", - "/v1/admin/coupons/high-risk", - m.ListHighRiskCouponsResponse, - query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("providerOrganizationId", provider_organization_id), - ("includeInactive", include_inactive), + return self._client._call( + "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), ), - body=None, idempotent=False, timeout=timeout, ) - async def list_high_risk_coupons_all( + def resend_verification_email( self, *, - page: int | None = None, - page_size: int | None = None, - provider_organization_id: str | None = None, - include_inactive: bool | None = None, + 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, - ) -> AsyncIterator[m.HighRiskCoupon]: + ) -> m.SuccessResponse: """ - Every result of :meth:`list_high_risk_coupons`, 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 = 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 + 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, + ) - async def preview_coupon( + def reset_password( self, *, - billing_period: m.BillingPeriod | str | None = None, - code: str | None = None, - plan_id: str | None = None, - quantity: int | 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.PreviewCouponResponse: - """ - Checks a code against a plan without attaching it. - - It calls ``POST /v1/coupons:preview``. - """ - return await self._client._call( + ) -> m.SuccessResponse: + """Call ``POST /v1/auth/reset-password``.""" + return self._client._call( "POST", - "/v1/coupons:preview", - m.PreviewCouponResponse, + "/v1/auth/reset-password", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.PreviewCouponRequest, + m.ResetPasswordRequest, extra_body, False, - ("billing_period", billing_period), - ("code", code), - ("plan_id", plan_id), - ("quantity", quantity), + ("email", email), + ("new_password", new_password), + ("reset_token", reset_token), ), idempotent=False, timeout=timeout, ) - async def redeem_coupon( + def set_password( self, - subscription_id: str, *, - code: str | None = None, + new_password: str | None = None, extra_body: dict[str, Any] | 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( + ) -> m.SuccessResponse: + """Call ``POST /v1/auth/set-password``.""" + return self._client._call( "POST", - f"/v1/subscriptions/{_path(subscription_id)}/coupon", - m.SubscriptionCoupon, + "/v1/auth/set-password", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.RedeemCouponBody, extra_body, False, ("code", code)), + body=_body(m.SetPasswordRequest, extra_body, False, ("new_password", new_password)), idempotent=False, timeout=timeout, ) - async def remove_coupon( + def unlink_identity( self, - subscription_id: str, + provider: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SubscriptionCoupon: - """Call ``DELETE /v1/subscriptions/{subscriptionId}/coupon``.""" - return await self._client._call( + ) -> m.SuccessResponse: + """Call ``DELETE /v1/auth/identities/{provider}``.""" + return self._client._call( "DELETE", - f"/v1/subscriptions/{_path(subscription_id)}/coupon", - m.SubscriptionCoupon, + f"/v1/auth/identities/{_path(provider)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def revoke_coupon( + def update_user( self, id: str, *, - confirm: bool | None = None, + 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.RevokeCouponResponse: - """ - Ends the discount for every customer from their next invoice. - - It calls ``POST /v1/coupons/{id}:revoke``. - - Args: - confirm: Must be true; revoking ends the discount for every customer. - """ - 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, + ) -> m.UpdateUserResponse: + """Call ``PATCH /v1/users/{id}``.""" + return self._client._call( + "PATCH", + f"/v1/users/{_path(id)}", + m.UpdateUserResponse, + 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), + ), + idempotent=False, + timeout=timeout, ) - async def update_coupon( + def verify_email( 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, + 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( + "GET", + "/v1/auth/verify-email", + m.SuccessResponse, + query=_query(extra_query, ("userId", user_id), ("code", code)), + body=None, + idempotent=False, + timeout=timeout, + ) + + def verify_mfa_enrollment( + 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)), + idempotent=False, + timeout=timeout, + ) + + +class VMTemplateService(_Service): + """The NodeRings VMTemplateService API.""" + + def create_vm_template( + self, + *, + cloud_init_template_id: str | None = None, + distro: m.Distro | str | None = None, name: str | None = None, - no_expiry: bool | None = None, - valid_until: datetime | 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.Coupon: + ) -> m.SuccessResponse: """ - Call ``PATCH /v1/coupons/{id}``. + Call ``POST /v1/vmtemplate``. Args: - add_amounts_off: Adds amounts for currencies the coupon does not list yet. Existing amounts are read-only. + 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 await self._client._call( - "PATCH", - f"/v1/coupons/{_path(id)}", - m.Coupon, + return self._client._call( + "POST", + "/v1/vmtemplate", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.UpdateCouponBody, + m.CreateVMTemplateRequest, extra_body, False, - ("acknowledge_high_risk", acknowledge_high_risk), - ("add_amounts_off", add_amounts_off), - ("description", description), - ("max_redemptions", max_redemptions), + ("cloud_init_template_id", cloud_init_template_id), + ("distro", distro), ("name", name), - ("no_expiry", no_expiry), - ("valid_until", valid_until), + ("node_id", node_id), + ("proxmox_cpu_type", proxmox_cpu_type), + ("template_id", template_id), ), idempotent=False, timeout=timeout, ) - async def update_coupon_code( + def delete_vm_template( 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, - 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}``.""" - return await self._client._call( - "PATCH", - f"/v1/coupon-codes/{_path(id)}", - m.CouponCode, + ) -> m.SuccessResponse: + """Call ``DELETE /v1/vmtemplate/{id}``.""" + return self._client._call( + "DELETE", + f"/v1/vmtemplate/{_path(id)}", + m.SuccessResponse, 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=None, idempotent=False, timeout=timeout, ) - -class AsyncCreditService(_ServiceAsync): - """The NodeRings CreditService API.""" - - async def get_credit_balance( + def get_vm_template( self, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetCreditBalanceResponse: - """Call ``GET /v1/credits/balance``.""" - return await self._client._call( + ) -> m.GetVMTemplateResponse: + """Call ``GET /v1/vmtemplate/{id}``.""" + return self._client._call( "GET", - "/v1/credits/balance", - m.GetCreditBalanceResponse, + f"/v1/vmtemplate/{_path(id)}", + m.GetVMTemplateResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_credit_ledger_entries( + def list_vm_templates( self, *, page: int | None = None, page_size: int | None = None, - entry_type: m.CreditLedgerEntryType | str | 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.ListCreditLedgerEntriesResponse: - """Call ``GET /v1/credits/ledger``.""" - return await self._client._call( + ) -> m.ListVMTemplatesResponse: + """Call ``GET /v1/vmtemplates``.""" + return self._client._call( "GET", - "/v1/credits/ledger", - m.ListCreditLedgerEntriesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("entryType", entry_type)), + "/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, ) - async def list_credit_ledger_entries_all( + def list_vm_templates_all( self, *, page: int | None = None, page_size: int | None = None, - entry_type: m.CreditLedgerEntryType | str | 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, - ) -> AsyncIterator[m.CreditLedgerEntryProto]: + ) -> Iterator[m.VMTemplate]: """ - Every result of :meth:`list_credit_ledger_entries`, reading page after page. + Every result of :meth:`list_vm_templates`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -16950,14 +16221,17 @@ async def list_credit_ledger_entries_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_credit_ledger_entries( + res = self.list_vm_templates( page=page, page_size=size, - entry_type=entry_type, + search=search, + node_id=node_id, + platform_id=platform_id, + distro=distro, extra_query=extra_query, timeout=timeout, ) - items = res.entries + items = res.vm_templates for item in items: yield item seen += len(items) @@ -16965,280 +16239,359 @@ async def list_credit_ledger_entries_all( return page += 1 - async def list_promo_credit_grants( + def update_vm_template( self, + id: str, *, - page: int | None = None, - page_size: int | 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.ListPromoCreditGrantsResponse: - """Call ``GET /v1/credits/promo``.""" - return await self._client._call( - "GET", - "/v1/credits/promo", - m.ListPromoCreditGrantsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), - body=None, + ) -> 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( + "PATCH", + f"/v1/vmtemplate/{_path(id)}", + m.UpdateVMTemplateResponse, + 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), + ), idempotent=False, timeout=timeout, ) - async def list_promo_credit_grants_all( + +class VirtualMachineService(_Service): + """The NodeRings VirtualMachineService API.""" + + def attach_vm_firewall( self, + id: str, *, - page: int | None = None, - page_size: int | 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, - ) -> 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.SuccessResponse: + """Call ``POST /v1/virtual-machines/{id}:attach-firewall``.""" + return self._client._call( + "POST", + f"/v1/virtual-machines/{_path(id)}:attach-firewall", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.AttachVMFirewallBody, extra_body, False, ("ruleset_id", ruleset_id)), + idempotent=False, + timeout=timeout, + ) - async def purchase_credits( + def create_virtual_machine( self, *, - amount: str | None = None, - payment_method_id: str | 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.PurchaseCreditsResponse: + ) -> m.CreateVirtualMachineResponse: """ - Call ``POST /v1/credits:purchase``. + Call ``POST /v1/virtual-machines``. A retry of the same call cannot create a second + resource: the SDK sends an idempotency key. 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. + 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 await self._client._call( + return self._client._call( "POST", - "/v1/credits:purchase", - m.PurchaseCreditsResponse, + "/v1/virtual-machines", + m.CreateVirtualMachineResponse, query=_query(extra_query), body=_body( - m.PurchaseCreditsRequest, + m.CreateVirtualMachineRequest, extra_body, - False, - ("amount", amount), - ("payment_method_id", payment_method_id), + 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=False, + idempotent=True, timeout=timeout, ) - async def redeem_promo_code( + def delete_virtual_machine( self, + 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.RedeemPromoCodeResponse: - """Call ``POST /v1/credits:redeemPromoCode``.""" - return await self._client._call( - "POST", - "/v1/credits:redeemPromoCode", - m.RedeemPromoCodeResponse, + ) -> m.SuccessResponse: + """Call ``DELETE /v1/virtual-machines/{id}``.""" + return self._client._call( + "DELETE", + f"/v1/virtual-machines/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.RedeemPromoCodeRequest, extra_body, False, ("code", code)), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncDNSRecordService(_ServiceAsync): - """The NodeRings DnsRecordService API.""" - - async def check_dns_geo_record( + def detach_vm_firewall( self, - zone_id: str, + id: str, *, - continent: str | None = None, - country: str | None = None, - name: str | None = None, - region: str | None = None, - 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.CheckDNSGeoRecordResponse: - """Call ``POST /v1/dns/zones/{zoneId}/geo-records:check``.""" - return await self._client._call( + ) -> m.SuccessResponse: + """Call ``POST /v1/virtual-machines/{id}:detach-firewall``.""" + return self._client._call( "POST", - f"/v1/dns/zones/{_path(zone_id)}/geo-records:check", - m.CheckDNSGeoRecordResponse, + f"/v1/virtual-machines/{_path(id)}:detach-firewall", + m.SuccessResponse, query=_query(extra_query), - body=_body( - m.CheckDNSGeoRecordBody, - extra_body, - False, - ("continent", continent), - ("country", country), - ("name", name), - ("region", region), - ("type", type), - ), + body=_body(m.DetachVMFirewallBody, extra_body, False, ("ruleset_id", ruleset_id)), idempotent=False, timeout=timeout, ) - async def delete_dns_geo_record( + def disable_additional_ip( self, - zone_id: str, + vm_id: str, *, - name: str | None = None, - type: str | None = None, + 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/dns/zones/{zoneId}/geo-records``.""" - return await self._client._call( - "DELETE", - f"/v1/dns/zones/{_path(zone_id)}/geo-records", + """ + DisableAdditionalIP releases one additional IPv4 and updates ADDITIONAL-IP addon quantity. + + 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( + "POST", + f"/v1/virtual-machines/{_path(vm_id)}:disable-additional-ip", m.SuccessResponse, - query=_query(extra_query, ("name", name), ("type", type)), - body=None, + query=_query(extra_query), + body=_body( + m.DisableAdditionalIPBody, + extra_body, + False, + ("cancel_immediately", cancel_immediately), + ("ip_address", ip_address), + ), idempotent=False, timeout=timeout, ) - async def delete_dns_record( + def disable_backup( self, - zone_id: str, + vm_id: str, *, - name: str | None = None, - type: str | None = None, + 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.SuccessResponse: - """Call ``DELETE /v1/dns/zones/{zoneId}/records``.""" - return await self._client._call( - "DELETE", - f"/v1/dns/zones/{_path(zone_id)}/records", + """ + DisableBackup disables backup addon for a virtual machine + + It calls ``POST /v1/virtual-machines/{vmId}:disable-backup``. + """ + return self._client._call( + "POST", + f"/v1/virtual-machines/{_path(vm_id)}:disable-backup", m.SuccessResponse, - query=_query(extra_query, ("name", name), ("type", type)), - body=None, + query=_query(extra_query), + body=_body( + m.DisableBackupBody, + extra_body, + False, + ("addon_id", addon_id), + ("cancel_immediately", cancel_immediately), + ), idempotent=False, timeout=timeout, ) - async def get_dns_geo_record( + def enable_additional_ip( self, - zone_id: str, + vm_id: str, *, - name: 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.DNSGeoRecord: - """Call ``GET /v1/dns/zones/{zoneId}/geo-records:get``.""" - 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)), - body=None, + ) -> 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( + "POST", + f"/v1/virtual-machines/{_path(vm_id)}:enable-additional-ip", + m.EnableAdditionalIPResponse, + query=_query(extra_query), + body=_body(m.EnableAdditionalIPBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def list_dns_geo_locations( + def enable_backup( self, + vm_id: str, *, - kind: str | None = None, + addon_id: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDNSGeoLocationsResponse: + ) -> m.SuccessResponse: """ - Call ``GET /v1/dns/geo-locations``. + EnableBackup enables backup addon for a virtual machine - Args: - kind: Optional filter: continent, country, region, or group. + It calls ``POST /v1/virtual-machines/{vmId}:enable-backup``. """ - return await self._client._call( + return self._client._call( + "POST", + f"/v1/virtual-machines/{_path(vm_id)}:enable-backup", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.EnableBackupBody, extra_body, False, ("addon_id", addon_id)), + idempotent=False, + timeout=timeout, + ) + + def get_virtual_machine( + 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( "GET", - "/v1/dns/geo-locations", - m.ListDNSGeoLocationsResponse, - query=_query(extra_query, ("kind", kind)), + f"/v1/virtual-machines/{_path(id)}", + m.VirtualMachine, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_dns_geo_records( + def get_vnc_console( self, - zone_id: str, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListDNSGeoRecordsResponse: - """Call ``GET /v1/dns/zones/{zoneId}/geo-records``.""" - return await self._client._call( + ) -> m.GetVNCConsoleResponse: + """ + GetVNCConsole returns WebSocket URL for VNC console access. + + It calls ``GET /v1/virtual-machines/{id}/console``. + """ + return self._client._call( "GET", - f"/v1/dns/zones/{_path(zone_id)}/geo-records", - m.ListDNSGeoRecordsResponse, + f"/v1/virtual-machines/{_path(id)}/console", + m.GetVNCConsoleResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_dns_records( + def list_virtual_machines( self, - zone_id: str, *, - name: str | None = None, - type: str | None = None, 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.ListDNSRecordsResponse: - """Call ``GET /v1/dns/zones/{zoneId}/records``.""" - return await self._client._call( + ) -> m.ListVirtualMachinesResponse: + """Call ``GET /v1/virtual-machines``.""" + return 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)), + "/v1/virtual-machines", + m.ListVirtualMachinesResponse, + query=_query( + extra_query, ("page", page), ("pageSize", page_size), ("filterOperationStatus", filter_operation_status) + ), body=None, idempotent=False, timeout=timeout, ) - async def list_dns_records_all( + def list_virtual_machines_all( self, - zone_id: str, *, - name: str | None = None, - type: str | None = None, 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, - ) -> AsyncIterator[m.DNSRecord]: + ) -> Iterator[m.VirtualMachine]: """ - Every result of :meth:`list_dns_records`, 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). """ @@ -17246,16 +16599,14 @@ async def list_dns_records_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_dns_records( - zone_id, + res = self.list_virtual_machines( page=page, page_size=size, - name=name, - type=type, + filter_operation_status=filter_operation_status, extra_query=extra_query, timeout=timeout, ) - items = res.records + items = res.virtual_machines for item in items: yield item seen += len(items) @@ -17263,218 +16614,374 @@ async def list_dns_records_all( return page += 1 - async def upsert_dns_geo_record( + def list_vm_tags( 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.DNSGeoRecord: - """Call ``PUT /v1/dns/zones/{zoneId}/geo-records``.""" - return await self._client._call( - "PUT", - f"/v1/dns/zones/{_path(zone_id)}/geo-records", - m.DNSGeoRecord, + ) -> 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=_body(m.UpsertDNSGeoRecordBody, extra_body, False, ("record", record)), + body=None, idempotent=False, timeout=timeout, ) - async def upsert_dns_record( + def reinstall_virtual_machine( self, - zone_id: str, + id: str, *, - record: m.DNSRecord | dict[str, Any] | None = None, + 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.DNSRecord: - """Call ``PUT /v1/dns/zones/{zoneId}/records``.""" - return await self._client._call( - "PUT", - f"/v1/dns/zones/{_path(zone_id)}/records", - m.DNSRecord, + ) -> 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", + f"/v1/virtual-machines/{_path(id)}:reinstall", + m.VirtualMachine, query=_query(extra_query), - body=_body(m.UpsertDNSRecordBody, extra_body, False, ("record", record)), + body=_body( + m.ReinstallVirtualMachineBody, + 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), + ), idempotent=False, timeout=timeout, ) - -class AsyncDNSZoneService(_ServiceAsync): - """The NodeRings DnsZoneService API.""" - - async def check_dns_zone_delegation( + def restart_virtual_machine( self, 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``.""" - return await self._client._call( + ) -> m.VirtualMachine: + """Call ``POST /v1/virtual-machines/{id}:restart``.""" + return self._client._call( "POST", - f"/v1/dns/zones/{_path(id)}/check-delegation", - m.GetDNSZoneResponse, + f"/v1/virtual-machines/{_path(id)}:restart", + m.VirtualMachine, query=_query(extra_query), - body=_body(m.CheckDNSZoneDelegationBody, extra_body, False), + body=_body(m.RestartVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def create_dns_zone( + def start_virtual_machine( self, + 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.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( + ) -> m.VirtualMachine: + """Call ``POST /v1/virtual-machines/{id}:start``.""" + return self._client._call( "POST", - "/v1/dns/zones", - m.CreateDNSZoneResponse, + f"/v1/virtual-machines/{_path(id)}:start", + m.VirtualMachine, query=_query(extra_query), - body=_body(m.CreateDNSZoneRequest, extra_body, False, ("name", name), ("records", records)), + body=_body(m.StartVirtualMachineBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def delete_dns_zone( + def stop_virtual_machine( self, 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}``.""" - return await self._client._call( - "DELETE", - f"/v1/dns/zones/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query, ("force", force)), - body=None, + ) -> 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), idempotent=False, timeout=timeout, ) - async def export_dns_zone( + def update_virtual_machine( self, id: str, *, + 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.ExportDNSZoneResponse: - """Call ``GET /v1/dns/zones/{id}/export``.""" - return await self._client._call( - "GET", - f"/v1/dns/zones/{_path(id)}/export", - m.ExportDNSZoneResponse, + ) -> 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=None, + body=_body( + m.UpdateVirtualMachineBody, extra_body, False, ("add_tags", add_tags), ("remove_tags", remove_tags) + ), idempotent=False, timeout=timeout, ) - async def get_dns_zone( + +class AsyncAddonService(_ServiceAsync): + """The NodeRings AddonService API.""" + + async def add_addon_to_subscription( self, - id: str, + 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.GetDNSZoneResponse: - """Call ``GET /v1/dns/zones/{id}``.""" - return await self._client._call( - "GET", - f"/v1/dns/zones/{_path(id)}", - m.GetDNSZoneResponse, + ) -> m.AddAddonToSubscriptionResponse: + """ + Add an addon to a subscription + + It calls ``POST /v1/subscriptions/{subscriptionId}/addons``. + """ + return await self._client._call( + "POST", + f"/v1/subscriptions/{_path(subscription_id)}/addons", + m.AddAddonToSubscriptionResponse, query=_query(extra_query), - body=None, + body=_body( + m.AddAddonToSubscriptionBody, + extra_body, + False, + ("addon_id", addon_id), + ("addon_price_id", addon_price_id), + ("quantity", quantity), + ), idempotent=False, timeout=timeout, ) - async def import_dns_records( + async def create_addon( self, - zone_id: str, *, - records: list[m.DNSRecord | 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.SuccessResponse: - """Call ``POST /v1/dns/zones/{zoneId}/records:import``.""" + """ + 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 + """ return await self._client._call( "POST", - f"/v1/dns/zones/{_path(zone_id)}/records:import", + "/v1/addons", m.SuccessResponse, query=_query(extra_query), - body=_body(m.ImportDNSRecordsBody, 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, ) - async def import_dns_zone( + async def delete_addon( 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``.""" + """ + Delete an addon (soft delete) + + It calls ``DELETE /v1/addons/{id}``. + """ return await self._client._call( - "POST", - f"/v1/dns/zones/{_path(id)}/import", + "DELETE", + f"/v1/addons/{_path(id)}", m.SuccessResponse, 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 get_addon( + self, + id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetAddonResponse: + """ + Get a specific addon with its prices + + It calls ``GET /v1/addons/{id}``. + """ + return await self._client._call( + "GET", + f"/v1/addons/{_path(id)}", + m.GetAddonResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def list_addon_subscriptions( + 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 + """ + return await self._client._call( + "GET", + f"/v1/subscriptions/{_path(subscription_id)}/addons", + m.ListAddonSubscriptionsResponse, + query=_query(extra_query, ("addonStatus", addon_status)), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def list_addons( 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, - ) -> m.ListDNSZonesResponse: - """Call ``GET /v1/dns/zones``.""" + ) -> 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 + """ return await self._client._call( "GET", - "/v1/dns/zones", - m.ListDNSZonesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "/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_dns_zones_all( + 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.DNSZone]: + ) -> AsyncIterator[m.Addon]: """ - Every result of :meth:`list_dns_zones`, reading page after page. + 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). """ @@ -17482,13 +16989,18 @@ async def list_dns_zones_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_dns_zones( + res = await self.list_addons( 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.zones + items = res.addons for item in items: yield item seen += len(items) @@ -17496,161 +17008,149 @@ async def list_dns_zones_all( return page += 1 - async def scan_dns_zone_records( + async def remove_addon( self, + addon_subscription_id: str, *, - name: str | None = None, - zone_id: str | None = None, + cancel_immediately: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ScanDNSZoneRecordsResponse: - """Call ``GET /v1/dns/scan``.""" - return await self._client._call( - "GET", - "/v1/dns/scan", - m.ScanDNSZoneRecordsResponse, - query=_query(extra_query, ("name", name), ("zoneId", zone_id)), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> 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. - 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``.""" + It calls ``DELETE /v1/addon-subscriptions/{addonSubscriptionId}``. + + Args: + cancel_immediately: If false, cancels at period end + """ return await self._client._call( - "GET", - f"/v1/dns/zones/{_path(zone_id)}/scan", - m.ScanDNSZoneRecordsResponse, - query=_query(extra_query, ("name", name)), + "DELETE", + f"/v1/addon-subscriptions/{_path(addon_subscription_id)}", + m.RemoveAddonResponse, + query=_query(extra_query, ("cancelImmediately", cancel_immediately)), body=None, idempotent=False, timeout=timeout, ) - -class AsyncDNSSECService(_ServiceAsync): - """The NodeRings DnssecService API.""" - - async def check_dnssec_ds( + async def undo_cancel_addon( self, - zone_id: str, + addon_subscription_id: str, *, 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/check-ds``.""" + ) -> m.RemoveAddonResponse: + """ + UndoCancelAddon clears cancel_at_period_end so the add-on renews with the VM. + + It calls ``POST /v1/addon-subscriptions/{addonSubscriptionId}:undo-cancel``. + """ return await self._client._call( "POST", - f"/v1/dns/zones/{_path(zone_id)}/dnssec/check-ds", - m.DNSSECInfo, + f"/v1/addon-subscriptions/{_path(addon_subscription_id)}:undo-cancel", + m.RemoveAddonResponse, query=_query(extra_query), - body=_body(m.CheckDNSSECDSBody, extra_body, False), + body=_body(m.UndoCancelAddonBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def disable_dnssec( + async def update_addon( self, - zone_id: str, + id: str, *, - force: bool | 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.DNSSECInfo: - """Call ``POST /v1/dns/zones/{zoneId}/dnssec/disable``.""" - return await self._client._call( - "POST", - f"/v1/dns/zones/{_path(zone_id)}/dnssec/disable", - m.DNSSECInfo, - query=_query(extra_query), - body=_body(m.DisableDNSSECBody, extra_body, False, ("force", force)), - idempotent=False, - timeout=timeout, - ) + ) -> m.SuccessResponse: + """ + Update an addon (allows changing price and currency) - async def enable_dnssec( - self, - zone_id: str, - *, - 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``.""" - return await self._client._call( - "POST", - f"/v1/dns/zones/{_path(zone_id)}/dnssec/enable", - m.DNSSECInfo, - query=_query(extra_query), - body=_body(m.EnableDNSSECBody, extra_body, False), - idempotent=False, - timeout=timeout, - ) + It calls ``PATCH /v1/addons/{id}``. - async def get_dnssec( - self, - zone_id: str, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.DNSSECInfo: - """Call ``GET /v1/dns/zones/{zoneId}/dnssec``.""" + 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( - "GET", - f"/v1/dns/zones/{_path(zone_id)}/dnssec", - m.DNSSECInfo, + "PATCH", + f"/v1/addons/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=None, + 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), + ), idempotent=False, timeout=timeout, ) -class AsyncDomainService(_ServiceAsync): - """The NodeRings DomainService API.""" +class AsyncAgentService(_ServiceAsync): + """The NodeRings AgentService API.""" - async def create_domain( + async def create_agent( 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, - 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.SuccessResponse: - """Call ``POST /v1/domain``.""" + ) -> 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/domain", - m.SuccessResponse, + "/v1/agents", + m.GetAgentResponse, query=_query(extra_query), body=_body( - m.CreateDomainRequest, extra_body, False, ("name", name), ("verification_type", verification_type) + 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, ) - async def delete_domain( + async def delete_agent( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``DELETE /v1/domain/{id}``.""" + """Call ``DELETE /v1/agents/{id}``.""" return await self._client._call( "DELETE", - f"/v1/domain/{_path(id)}", + f"/v1/agents/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -17658,132 +17158,101 @@ async def delete_domain( 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 generate_install_command( self, id: str, *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``GET /v1/domain/verify/{id}``.""" - return await self._client._call( - "GET", - f"/v1/domain/verify/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) - - -class AsyncEnvironmentVariableService(_ServiceAsync): - """The NodeRings EnvironmentVariableService API.""" - - async 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``.""" + ) -> m.GenerateInstallCommandResponse: + """Call ``POST /v1/agents/{id}:generateInstallCommand``.""" return await self._client._call( "POST", - "/v1/environment-variables", - m.CreateEnvironmentVariableResponse, + f"/v1/agents/{_path(id)}:generateInstallCommand", + m.GenerateInstallCommandResponse, query=_query(extra_query), - body=_body(m.CreateEnvironmentVariableRequest, extra_body, False, ("key", key), ("value", value)), + body=_body(m.GenerateInstallCommandBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def delete_environment_variable( + 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.SuccessResponse: - """Call ``DELETE /v1/environment-variables/{id}``.""" + ) -> m.GeneratePeeringConfigResponse: + """Call ``POST /v1/agents/{id}:generatePeeringConfig``.""" return await self._client._call( - "DELETE", - f"/v1/environment-variables/{_path(id)}", - m.SuccessResponse, + "POST", + f"/v1/agents/{_path(id)}:generatePeeringConfig", + m.GeneratePeeringConfigResponse, query=_query(extra_query), - body=None, + body=_body(m.GeneratePeeringConfigBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def get_environment_variable( + async def get_agent( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetEnvironmentVariableResponse: - """Call ``GET /v1/environment-variables/{id}``.""" + ) -> m.GetAgentResponse: + """Call ``GET /v1/agents/{id}``.""" return await self._client._call( "GET", - f"/v1/environment-variables/{_path(id)}", - m.GetEnvironmentVariableResponse, + f"/v1/agents/{_path(id)}", + m.GetAgentResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_environment_variables( + async def list_agents( self, *, page: int | None = None, page_size: int | None = None, - filter_key: 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.ListEnvironmentVariablesResponse: - """Call ``GET /v1/environment-variables``.""" + ) -> m.ListAgentsResponse: + """Call ``GET /v1/agents``.""" return await self._client._call( "GET", - "/v1/environment-variables", - m.ListEnvironmentVariablesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterKey", filter_key)), + "/v1/agents", + m.ListAgentsResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("gatewayRegion", gateway_region), + ("search", search), + ), body=None, idempotent=False, timeout=timeout, ) - async def list_environment_variables_all( + async def list_agents_all( self, *, page: int | None = None, page_size: int | None = None, - filter_key: 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, - ) -> AsyncIterator[m.EnvironmentVariable]: + ) -> AsyncIterator[m.GetAgentResponse]: """ - Every result of :meth:`list_environment_variables`, 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). """ @@ -17791,14 +17260,15 @@ 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_agents( page=page, page_size=size, - filter_key=filter_key, + gateway_region=gateway_region, + search=search, extra_query=extra_query, timeout=timeout, ) - items = res.environment_variables + items = res.agents for item in items: yield item seen += len(items) @@ -17806,417 +17276,598 @@ async def list_environment_variables_all( return page += 1 - async def update_environment_variable( + async def update_agent( self, id: str, *, - value: 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.SuccessResponse: - """Call ``PATCH /v1/environment-variables/{id}``.""" + ) -> m.UpdateAgentResponse: + """ + Call ``PATCH /v1/agents/{id}``. + + Args: + hypervisor_driver: - PLATFORM_DRIVER_PTERODACTYL: Game-server platform. Not a value of the organization hypervisor driver. + """ return await self._client._call( "PATCH", - f"/v1/environment-variables/{_path(id)}", - m.SuccessResponse, + f"/v1/agents/{_path(id)}", + m.UpdateAgentResponse, query=_query(extra_query), - body=_body(m.UpdateEnvironmentVariableBody, extra_body, False, ("value", value)), + body=_body( + m.UpdateAgentBody, + extra_body, + False, + ("description", description), + ("hypervisor_driver", hypervisor_driver), + ("name", name), + ), idempotent=False, timeout=timeout, ) - -class AsyncExchangeRateService(_ServiceAsync): - """The NodeRings ExchangeRateService API.""" - - async def convert_currency( + async def upload_inbound_peering_config( self, + id: str, *, - target_currency: str | None = None, - usd_amount: 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.ConvertCurrencyResponse: + ) -> m.UploadInboundPeeringConfigResponse: """ - Convert an amount from USD to a target currency - - It calls ``POST /v1/exchange-rate/convert``. + Call ``POST /v1/agents/{id}:uploadInboundPeeringConfig``. Args: - target_currency: Target currency code (e.g., "EUR", "GBP", "JPY") - usd_amount: Amount in USD to convert + kubeconfig: Provider-generated peering-user kubeconfig YAML for neo as consumer. """ return await self._client._call( "POST", - "/v1/exchange-rate/convert", - m.ConvertCurrencyResponse, + f"/v1/agents/{_path(id)}:uploadInboundPeeringConfig", + m.UploadInboundPeeringConfigResponse, query=_query(extra_query), - body=_body( - m.ConvertCurrencyRequest, - extra_body, - False, - ("target_currency", target_currency), - ("usd_amount", usd_amount), - ), + body=_body(m.UploadInboundPeeringConfigBody, extra_body, False, ("kubeconfig", kubeconfig)), idempotent=False, timeout=timeout, ) - async def get_all_exchange_rates( + +class AsyncBackupService(_ServiceAsync): + """The NodeRings BackupService API.""" + + async def delete_backup( self, + vm_id: str, + backup_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) + ) -> m.SuccessResponse: + """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=None, + idempotent=False, + timeout=timeout, + ) - It calls ``GET /v1/exchange-rate/rates``. - """ + async def get_backup( + self, + vm_id: str, + backup_id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetBackupResponse: + """Call ``GET /v1/virtual-machines/{vmId}/backups/{backupId}``.""" return await self._client._call( "GET", - "/v1/exchange-rate/rates", - m.GetAllExchangeRatesResponse, + f"/v1/virtual-machines/{_path(vm_id)}/backups/{_path(backup_id)}", + m.GetBackupResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_exchange_rate( + async def list_backups( self, - currency_code: str, + 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, - ) -> m.GetExchangeRateResponse: - """ - Get the current exchange rate for a specific currency (from USD) - - It calls ``GET /v1/exchange-rate/rate/{currencyCode}``. - """ + ) -> m.ListBackupsResponse: + """Call ``GET /v1/virtual-machines/{vmId}/backups``.""" return await self._client._call( "GET", - f"/v1/exchange-rate/rate/{_path(currency_code)}", - m.GetExchangeRateResponse, - query=_query(extra_query), + 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_supported_currencies( + 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, - ) -> m.ListSupportedCurrenciesResponse: + ) -> AsyncIterator[m.Backup]: """ - List all supported currency codes + Every result of :meth:`list_backups`, 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_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( - "GET", - "/v1/exchange-rate/currencies", - m.ListSupportedCurrenciesResponse, + "POST", + f"/v1/virtual-machines/{_path(vm_id)}/backups/{_path(backup_id)}/restore", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.BackupRestoreBackupBody, extra_body, False, ("start_after_restore", start_after_restore)), idempotent=False, timeout=timeout, ) -class AsyncFirewallService(_ServiceAsync): - """The NodeRings FirewallService API.""" +class AsyncBlogSubscriptionService(_ServiceAsync): + """The NodeRings BlogSubscriptionService API.""" - async def create_firewall_address_group( + async def confirm_blog_subscription( self, *, - group: m.FirewallAddressGroupInput | dict[str, Any] | None = None, + token: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.CreateFirewallAddressGroupResponse: + ) -> m.ConfirmBlogSubscriptionResponse: """ - Call ``POST /v1/firewall/address-groups``. + Confirm an address with the token from the confirmation email. + + It calls ``POST /v1/blog/subscriptions/confirm``. Args: - group: FirewallAddressGroupInput is the client-provided payload for create/update. Clients must not provide id/timestamps (those are server-controlled). + token: Token from the confirmation email link. """ return await self._client._call( "POST", - "/v1/firewall/address-groups", - m.CreateFirewallAddressGroupResponse, + "/v1/blog/subscriptions/confirm", + m.ConfirmBlogSubscriptionResponse, query=_query(extra_query), - body=_body(m.CreateFirewallAddressGroupRequest, extra_body, False, ("group", group)), + body=_body(m.ConfirmBlogSubscriptionRequest, extra_body, False, ("token", token)), idempotent=False, timeout=timeout, ) - async def create_firewall_rule( + async def subscribe_to_blog( self, - ruleset_id: str, *, - rule: m.FirewallRuleInput | dict[str, Any] | None = None, + 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.CreateFirewallRuleResponse: + ) -> m.SubscribeToBlogResponse: """ - Call ``POST /v1/firewall/rulesets/{rulesetId}/rules``. + Start a subscription and send the confirmation email. + + It calls ``POST /v1/blog/subscriptions``. Args: - rule: FirewallRuleInput is the client-provided rule payload for create/update. Clients must not provide id/ruleset_id/timestamps (those are server-controlled). + 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 await self._client._call( "POST", - f"/v1/firewall/rulesets/{_path(ruleset_id)}/rules", - m.CreateFirewallRuleResponse, + "/v1/blog/subscriptions", + m.SubscribeToBlogResponse, query=_query(extra_query), - body=_body(m.CreateFirewallRuleBody, extra_body, False, ("rule", rule)), + body=_body( + m.SubscribeToBlogRequest, + extra_body, + False, + ("email", email), + ("source", source), + ("turnstile_token", turnstile_token), + ("website", website), + ), idempotent=False, timeout=timeout, ) - async def create_firewall_rule_set( + async def unsubscribe_from_blog( self, *, - ruleset: m.FirewallRuleSetInput | dict[str, Any] | None = None, + token: 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.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 await self._client._call( "POST", - "/v1/firewall/rulesets", - m.CreateFirewallRuleSetResponse, + "/v1/blog/subscriptions/unsubscribe", + m.UnsubscribeFromBlogResponse, query=_query(extra_query), - body=_body(m.CreateFirewallRuleSetRequest, extra_body, False, ("ruleset", ruleset)), + body=_body(m.UnsubscribeFromBlogRequest, extra_body, False, ("token", token)), idempotent=False, timeout=timeout, ) - async def delete_firewall_address_group( + +class AsyncBusinessMonitoringService(_ServiceAsync): + """The NodeRings BusinessMonitoringService API.""" + + async def create_business_monitoring_launch( self, - id: str, *, + 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: - """Call ``DELETE /v1/firewall/address-groups/{id}``.""" + ) -> 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. + """ return await self._client._call( - "DELETE", - f"/v1/firewall/address-groups/{_path(id)}", - m.SuccessResponse, + "POST", + "/v1/monitoring/business/launch", + m.CreateMonitoringLaunchResponse, query=_query(extra_query), - body=None, + body=_body( + m.CreateMonitoringLaunchRequest, extra_body, False, ("next", next), ("resource_id", resource_id) + ), idempotent=False, timeout=timeout, ) - async def delete_firewall_rule( + async def rotate_business_monitoring_datasource_token( 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/rules/{id}``.""" + """Call ``POST /v1/monitoring/business/datasource-token:rotate``.""" return await self._client._call( - "DELETE", - f"/v1/firewall/rules/{_path(id)}", + "POST", + "/v1/monitoring/business/datasource-token:rotate", m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.RotateMonitoringDatasourceTokenRequest, extra_body, False), idempotent=False, timeout=timeout, ) - async def delete_firewall_rule_set( + +class AsyncChatService(_ServiceAsync): + """The NodeRings ChatService API.""" + + async def chat( self, - id: str, *, - force: bool | 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 ``DELETE /v1/firewall/rulesets/{id}``.""" + ) -> 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( - "DELETE", - f"/v1/firewall/rulesets/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query, ("force", force)), - body=None, + "POST", + "/v1/chat", + m.ChatResponse, + query=_query(extra_query), + body=_body(m.ChatRequest, extra_body, False, ("conversation_id", conversation_id), ("message", message)), idempotent=False, timeout=timeout, ) - async def get_firewall_address_group( + async def chat_anonymous( self, - id: 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.FirewallAddressGroup: - """Call ``GET /v1/firewall/address-groups/{id}``.""" - return await self._client._call( - "GET", - f"/v1/firewall/address-groups/{_path(id)}", - m.FirewallAddressGroup, + ) -> 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, ) - async def get_firewall_rule( + async def delete_conversation( self, - id: str, + conversation_id: str, *, - direction: m.FirewallDirection | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallRuleResource: + ) -> m.SuccessResponse: """ - Call ``GET /v1/firewall/rules/{id}``. + DeleteConversation marks a conversation as deleted (soft delete) - Args: - direction: Optional: Filter by direction. If not specified, returns the rule regardless of direction. + It calls ``DELETE /v1/chat/conversations/{conversationId}``. """ return await self._client._call( - "GET", - f"/v1/firewall/rules/{_path(id)}", - m.FirewallRuleResource, - query=_query(extra_query, ("direction", direction)), + "DELETE", + f"/v1/chat/conversations/{_path(conversation_id)}", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_firewall_rule_set( + async def get_conversation_history( self, - id: str, + conversation_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.FirewallRuleSet: - """Call ``GET /v1/firewall/rulesets/{id}``.""" + ) -> 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", - f"/v1/firewall/rulesets/{_path(id)}", - m.FirewallRuleSet, + f"/v1/chat/conversations/{_path(conversation_id)}/history", + m.GetConversationHistoryResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_firewall_address_groups( + async def list_conversations( 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, - ) -> m.ListFirewallAddressGroupsResponse: + ) -> m.ListConversationsResponse: """ - Call ``GET /v1/firewall/address-groups``. + ListConversations returns all conversation IDs for the authenticated user - Args: - name: Note: family filter removed as address groups can now contain mixed IPv4/IPv6 + It calls ``GET /v1/chat/conversations``. """ return await self._client._call( "GET", - "/v1/firewall/address-groups", - m.ListFirewallAddressGroupsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("name", name)), + "/v1/chat/conversations", + m.ListConversationsResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_firewall_address_groups_all( + +class AsyncClientDashboardService(_ServiceAsync): + """The NodeRings ClientDashboardService API.""" + + async def get_client_dashboard_billing( 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, - ) -> AsyncIterator[m.FirewallAddressGroup]: - """ - Every result of :meth:`list_firewall_address_groups`, reading page after page. + ) -> 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, + ) - ``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_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 + 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, + ) - async def list_firewall_rule_sets( + +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/provider-reviews", + m.CreateClientReviewResponse, + query=_query(extra_query), + body=_body( + m.CreateClientReviewRequest, + extra_body, + False, + ("comment", comment), + ("star_rating", star_rating), + ("virtual_machine_id", virtual_machine_id), + ), + idempotent=False, + timeout=timeout, + ) + + async def delete_client_review( + self, + review_id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``DELETE /v1/provider-reviews/{reviewId}``.""" + return await self._client._call( + "DELETE", + f"/v1/provider-reviews/{_path(review_id)}", + m.SuccessResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def get_client_review_for_virtual_machine( + self, + virtual_machine_id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetClientReviewForVirtualMachineResponse: + """Call ``GET /v1/provider-reviews/virtual-machines/{virtualMachineId}``.""" + return await self._client._call( + "GET", + f"/v1/provider-reviews/virtual-machines/{_path(virtual_machine_id)}", + m.GetClientReviewForVirtualMachineResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def list_client_provider_review_assets( self, *, page: int | None = None, page_size: int | None = None, - name: str | None = None, - filter_attachment: m.FirewallRuleSetAttachmentFilter | str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListFirewallRuleSetsResponse: + ) -> m.ListClientProviderReviewAssetsResponse: """ - Call ``GET /v1/firewall/rulesets``. + Call ``GET /v1/client/provider-review-assets``. 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 + search: Optional filter (hostname / provider name), case-insensitive substring. """ 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), - ), + "/v1/client/provider-review-assets", + m.ListClientProviderReviewAssetsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("search", search)), body=None, idempotent=False, timeout=timeout, ) - async def list_firewall_rule_sets_all( + async def list_client_provider_review_assets_all( self, *, page: int | None = None, page_size: int | None = None, - name: str | None = None, - filter_attachment: m.FirewallRuleSetAttachmentFilter | str | None = None, + search: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.FirewallRuleSet]: + ) -> AsyncIterator[m.ClientProviderReviewAssetItem]: """ - Every result of :meth:`list_firewall_rule_sets`, 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). """ @@ -18224,15 +17875,14 @@ 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_client_provider_review_assets( page=page, page_size=size, - name=name, - filter_attachment=filter_attachment, + search=search, extra_query=extra_query, timeout=timeout, ) - items = res.rulesets + items = res.assets for item in items: yield item seen += len(items) @@ -18240,1511 +17890,1725 @@ async def list_firewall_rule_sets_all( return page += 1 - async def list_firewall_rules( + async def update_client_review( self, - ruleset_id: str, + review_id: str, *, - page: int | None = None, - page_size: int | None = None, - direction: m.FirewallDirection | str | 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.ListFirewallRulesResponse: - """ - Call ``GET /v1/firewall/rulesets/{rulesetId}/rules``. - - Args: - direction: Optional: Filter by direction. If not specified, returns all rules regardless of direction. - """ + ) -> m.UpdateClientReviewResponse: + """Call ``PATCH /v1/provider-reviews/{reviewId}``.""" 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)), - body=None, + "PATCH", + f"/v1/provider-reviews/{_path(review_id)}", + m.UpdateClientReviewResponse, + query=_query(extra_query), + body=_body(m.UpdateClientReviewBody, extra_body, False, ("comment", comment), ("star_rating", star_rating)), idempotent=False, timeout=timeout, ) - async def list_firewall_rules_all( - self, - ruleset_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, - ) -> AsyncIterator[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 = 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 +class AsyncCloudInitTemplateService(_ServiceAsync): + """The NodeRings CloudInitTemplateService API.""" - async def move_firewall_rule( + async def create_cloud_init_template( self, - id: str, *, - position: m.FirewallRulePosition | str | None = None, - target_rule_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.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/cloudinittemplate``.""" return await self._client._call( "POST", - f"/v1/firewall/rules/{_path(id)}/move", - m.FirewallRuleResource, + "/v1/cloudinittemplate", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.MoveFirewallRuleBody, extra_body, False, ("position", position), ("target_rule_id", target_rule_id) + 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 update_firewall_address_group( + async def delete_cloud_init_template( 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/cloudinittemplate/{id}``.""" return await self._client._call( - "PATCH", - f"/v1/firewall/address-groups/{_path(id)}", - m.FirewallAddressGroup, + "DELETE", + f"/v1/cloudinittemplate/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=_body(m.UpdateFirewallAddressGroupBody, extra_body, False, ("group", group)), + body=None, idempotent=False, timeout=timeout, ) - async def update_firewall_rule( + async def get_cloud_init_template( self, 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.GetCloudInitTemplateResponse: + """Call ``GET /v1/cloudinittemplate/{id}``.""" return await self._client._call( - "PATCH", - f"/v1/firewall/rules/{_path(id)}", - m.FirewallRuleResource, + "GET", + f"/v1/cloudinittemplate/{_path(id)}", + m.GetCloudInitTemplateResponse, query=_query(extra_query), - body=_body(m.UpdateFirewallRuleBody, extra_body, False, ("rule", rule)), + body=None, idempotent=False, timeout=timeout, ) - async def update_firewall_rule_set( + async def list_cloud_init_templates( self, - id: str, *, - ruleset: m.FirewallRuleSetInput | dict[str, Any] | 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.FirewallRuleSet: - """Call ``PATCH /v1/firewall/rulesets/{id}``.""" + ) -> 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. + """ return await self._client._call( - "PATCH", - f"/v1/firewall/rulesets/{_path(id)}", - m.FirewallRuleSet, - query=_query(extra_query), - body=_body(m.UpdateFirewallRuleSetBody, extra_body, False, ("ruleset", ruleset)), + "GET", + "/v1/cloudinittemplates", + m.ListCloudInitTemplatesResponse, + query=_query( + extra_query, ("page", page), ("pageSize", page_size), ("filterIsTemplate", filter_is_template) + ), + body=None, idempotent=False, timeout=timeout, ) + async def list_cloud_init_templates_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]: + """ + Every result of :meth:`list_cloud_init_templates`, reading page after page. -class AsyncGameServerService(_ServiceAsync): - """The NodeRings GameServerService 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_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 archive_files( + async def update_cloud_init_template( self, id: str, *, - files: list[str] | None = None, - root: 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.ArchiveFilesResponse: - """Call ``POST /v1/game-servers/{id}/files:archive``.""" + ) -> m.UpdateCloudInitTemplateResponse: + """Call ``PATCH /v1/cloudinittemplate/{id}``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:archive", - m.ArchiveFilesResponse, + "PATCH", + f"/v1/cloudinittemplate/{_path(id)}", + m.UpdateCloudInitTemplateResponse, query=_query(extra_query), - body=_body(m.ArchiveFilesBody, extra_body, False, ("files", files), ("root", root)), + body=_body( + m.UpdateCloudInitTemplateBody, + 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 change_game_server_game( + +class AsyncCloudInitUserDataService(_ServiceAsync): + """The NodeRings CloudInitUserDataService API.""" + + async def create_cloud_init_user_data( self, - id: str, *, - accept_eula: bool | None = None, - environment: dict[str, str] | None = None, - template_id: str | None = None, + 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.GameServer: - """Call ``POST /v1/game-servers/{id}:changeGame``.""" + ) -> m.CloudInitUserData: + """Call ``POST /v1/cloudinituserdata``.""" return await self._client._call( "POST", - f"/v1/game-servers/{_path(id)}:changeGame", - m.GameServer, + "/v1/cloudinituserdata", + m.CloudInitUserData, query=_query(extra_query), body=_body( - m.ChangeGameServerGameBody, + m.CreateCloudInitUserDataRequest, extra_body, False, - ("accept_eula", accept_eula), - ("environment", environment), - ("template_id", template_id), + ("description", description), + ("name", name), + ("user_data", user_data), ), idempotent=False, timeout=timeout, ) - async def copy_file( + async def delete_cloud_init_user_data( 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``.""" + """Call ``DELETE /v1/cloudinituserdata/{id}``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:copy", + "DELETE", + f"/v1/cloudinituserdata/{_path(id)}", m.SuccessResponse, query=_query(extra_query), - body=_body(m.CopyFileBody, extra_body, False, ("location", location)), + body=None, idempotent=False, timeout=timeout, ) - async def create_allocation( + async def get_cloud_init_user_data( 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.CloudInitUserData: + """Call ``GET /v1/cloudinituserdata/{id}``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/allocations", - m.GameServerAllocation, + "GET", + f"/v1/cloudinituserdata/{_path(id)}", + m.CloudInitUserData, query=_query(extra_query), - body=_body(m.CreateAllocationBody, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - async def create_backup( + async def list_cloud_init_user_data( self, - id: str, *, - name: 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.GameServerBackup: - """Call ``POST /v1/game-servers/{id}/backups``.""" + ) -> m.ListCloudInitUserDataResponse: + """Call ``GET /v1/cloudinituserdata``.""" 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/cloudinituserdata", + m.ListCloudInitUserDataResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), + body=None, idempotent=False, timeout=timeout, ) - async def create_database( + async def list_cloud_init_user_data_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, 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.CloudInitUserData]: + """ + Every result of :meth:`list_cloud_init_user_data`, 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_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( self, id: str, *, + description: str | None = None, name: str | None = None, - root: 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.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/files:folder``.""" + ) -> m.CloudInitUserData: + """Call ``PATCH /v1/cloudinituserdata/{id}``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:folder", - m.SuccessResponse, + "PATCH", + f"/v1/cloudinituserdata/{_path(id)}", + m.CloudInitUserData, query=_query(extra_query), - body=_body(m.CreateFolderBody, extra_body, False, ("name", name), ("root", root)), + body=_body( + m.UpdateCloudInitUserDataBody, + extra_body, + False, + ("description", description), + ("name", name), + ("user_data", user_data), + ), idempotent=False, timeout=timeout, ) - async def create_game_server( + +class AsyncCouponService(_ServiceAsync): + """The NodeRings CouponService API.""" + + async def create_coupon( self, *, - accept_eula: bool | None = None, - environment: dict[str, str] | None = None, - idempotency_key: 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, - 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, + 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.GameServer: + ) -> m.CreateCouponResponse: """ - Call ``POST /v1/game-servers``. A retry of the same call cannot create a second resource: - the SDK sends an idempotency key. + Call ``POST /v1/coupons``. 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. + 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 await self._client._call( "POST", - "/v1/game-servers", - m.GameServer, + "/v1/coupons", + m.CreateCouponResponse, query=_query(extra_query), body=_body( - m.CreateGameServerRequest, + m.CreateCouponRequest, extra_body, - True, - ("accept_eula", accept_eula), - ("environment", environment), - ("idempotency_key", idempotency_key), + 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), - ("plan_id", plan_id), - ("provider_organization_id", provider_organization_id), - ("region_id", region_id), - ("template_id", template_id), - ("version_value", version_value), + ("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=True, + idempotent=False, timeout=timeout, ) - async def create_schedule( + async def create_coupon_code( self, - id: str, + coupon_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, + 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.GameServerSchedule: + ) -> m.CouponCode: """ - Call ``POST /v1/game-servers/{id}/schedules``. + Call ``POST /v1/coupons/{couponId}/codes``. Args: - is_active: Omitted means the schedule is created enabled. + code: Leave empty to generate a random code. """ return await self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/schedules", - m.GameServerSchedule, + f"/v1/coupons/{_path(coupon_id)}/codes", + m.CouponCode, query=_query(extra_query), body=_body( - m.CreateScheduleBody, + m.CreateCouponCodeBody, 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), + ("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, ) - async def create_schedule_task( + async def deactivate_coupon( 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``.""" - return await 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), - ), + ) -> 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/coupons/{_path(id)}:deactivate", + m.Coupon, + query=_query(extra_query), + body=_body(m.DeactivateCouponBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def delete_allocation( + async def export_coupon_codes( self, - id: str, - allocation_id: str, + coupon_id: str, *, + batch_id: 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.ExportCouponCodesResponse: + """Call ``GET /v1/coupons/{couponId}/codes:export``.""" return await self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}", - m.SuccessResponse, - query=_query(extra_query), + "GET", + f"/v1/coupons/{_path(coupon_id)}/codes:export", + m.ExportCouponCodesResponse, + query=_query(extra_query, ("batchId", batch_id)), body=None, idempotent=False, timeout=timeout, ) - async def delete_backup( + async def generate_coupon_codes( self, - id: str, - backup_uuid: str, + coupon_id: str, *, - truncate: bool | 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.SuccessResponse: + ) -> m.GenerateCouponCodesResponse: """ - Call ``DELETE /v1/game-servers/{id}/backups/{backupUuid}``. + Call ``POST /v1/coupons/{couponId}/codes:generate``. Args: - truncate: Restore only. When true, the panel deletes every file before extracting the backup. + 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( - "DELETE", - f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}", - m.SuccessResponse, - query=_query(extra_query, ("truncate", truncate)), - body=None, + "POST", + f"/v1/coupons/{_path(coupon_id)}/codes:generate", + m.GenerateCouponCodesResponse, + 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), + ), idempotent=False, timeout=timeout, ) - async def delete_database( + async def get_coupon( self, id: str, - database_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/game-servers/{id}/databases/{databaseId}``.""" + ) -> m.Coupon: + """Call ``GET /v1/coupons/{id}``.""" return await self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}/databases/{_path(database_id)}", - m.SuccessResponse, + "GET", + f"/v1/coupons/{_path(id)}", + m.Coupon, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def delete_files( + async def get_coupon_code_batch( self, - id: str, + coupon_id: str, + batch_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.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/files:delete``.""" + ) -> m.CouponCodeBatch: + """Call ``GET /v1/coupons/{couponId}/code-batches/{batchId}``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:delete", - m.SuccessResponse, + "GET", + f"/v1/coupons/{_path(coupon_id)}/code-batches/{_path(batch_id)}", + m.CouponCodeBatch, query=_query(extra_query), - body=_body(m.DeleteFilesBody, extra_body, False, ("files", files), ("root", root)), + body=None, idempotent=False, timeout=timeout, ) - async def delete_game_server( + 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.SuccessResponse: - """Call ``DELETE /v1/game-servers/{id}``.""" + ) -> m.GetCouponReportResponse: + """ + Attribution and ROI figures, grouped by code, campaign, channel, or asset type. + + 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( - "DELETE", - f"/v1/game-servers/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), + "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), + ), body=None, idempotent=False, timeout=timeout, ) - async def delete_schedule( + async def get_subscription_coupon( self, - id: str, - schedule_id: str, + subscription_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/game-servers/{id}/schedules/{scheduleId}``.""" + ) -> m.GetSubscriptionCouponResponse: + """Call ``GET /v1/subscriptions/{subscriptionId}/coupon``.""" return await self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}", - m.SuccessResponse, + "GET", + f"/v1/subscriptions/{_path(subscription_id)}/coupon", + m.GetSubscriptionCouponResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def delete_schedule_task( + async def list_coupon_code_batches( self, - id: str, - schedule_id: str, - task_id: str, + coupon_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}/schedules/{scheduleId}/tasks/{taskId}``.""" + ) -> m.ListCouponCodeBatchesResponse: + """Call ``GET /v1/coupons/{couponId}/code-batches``.""" return await self._client._call( - "DELETE", - f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks/{_path(task_id)}", - m.SuccessResponse, - query=_query(extra_query), + "GET", + 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 download_file( + async def list_coupon_code_batches_all( self, - id: str, + coupon_id: str, *, - path: str | None = None, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DownloadFileResponse: - """Call ``GET /v1/game-servers/{id}/files/download``.""" + ) -> AsyncIterator[m.CouponCodeBatch]: + """ + 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). + """ + 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/game-servers/{_path(id)}/files/download", - m.DownloadFileResponse, - query=_query(extra_query, ("path", path)), + 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 execute_schedule( + async def list_coupon_codes_all( self, - id: str, - schedule_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.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.CouponCode]: + """ + Every result of :meth:`list_coupon_codes`, reading page after page. - async def get_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_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, - id: str, + 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.GameServer: - """Call ``GET /v1/game-servers/{id}``.""" + ) -> m.ListCouponRedemptionsResponse: + """Call ``GET /v1/coupons/{couponId}/redemptions``.""" return await self._client._call( "GET", - f"/v1/game-servers/{_path(id)}", - m.GameServer, - query=_query(extra_query), + 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 get_game_server_resources( + async def list_coupon_redemptions_all( self, - id: str, + 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.GameServerResources: - """Call ``GET /v1/game-servers/{id}/resources``.""" - return await self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/resources", - m.GameServerResources, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> AsyncIterator[m.CouponRedemption]: + """ + Every result of :meth:`list_coupon_redemptions`, reading page after page. - async def get_startup( + ``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, - id: str, *, + 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.GetStartupResponse: - """Call ``GET /v1/game-servers/{id}/startup``.""" + ) -> m.ListCouponsResponse: + """ + Call ``GET /v1/coupons``. + + Args: + expiring_soon: Only coupons whose validity ends within 14 days. + """ return await self._client._call( "GET", - f"/v1/game-servers/{_path(id)}/startup", - m.GetStartupResponse, - query=_query(extra_query), + "/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, ) - async def list_allocations( + async def list_coupons_all( self, - id: str, *, + 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.ListGameServerAllocationsResponse: - """Call ``GET /v1/game-servers/{id}/allocations``.""" - return await self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/allocations", - m.ListGameServerAllocationsResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> AsyncIterator[m.Coupon]: + """ + Every result of :meth:`list_coupons`, reading page after page. - async def list_backups( + ``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_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 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.ListGameServerBackupsResponse: - """Call ``GET /v1/game-servers/{id}/backups``.""" + ) -> 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( "GET", - f"/v1/game-servers/{_path(id)}/backups", - m.ListGameServerBackupsResponse, - query=_query(extra_query), + "/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 list_databases( + async def list_high_risk_coupons_all( 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.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, - ) + ) -> AsyncIterator[m.HighRiskCoupon]: + """ + Every result of :meth:`list_high_risk_coupons`, reading page after page. - async def list_files( + ``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, *, - directory: str | None = None, + 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.ListFilesResponse: - """Call ``GET /v1/game-servers/{id}/files``.""" + ) -> m.PreviewCouponResponse: + """ + Checks a code against a plan without attaching it. + + It calls ``POST /v1/coupons:preview``. + """ return await self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/files", - m.ListFilesResponse, - query=_query(extra_query, ("directory", directory)), - body=None, + "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), + ), idempotent=False, timeout=timeout, ) - async def list_game_servers( + async def redeem_coupon( self, + subscription_id: str, *, - page_size: int | 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.ListGameServersResponse: - """Call ``GET /v1/game-servers``.""" + ) -> m.SubscriptionCoupon: + """Call ``POST /v1/subscriptions/{subscriptionId}/coupon``.""" return await self._client._call( - "GET", - "/v1/game-servers", - m.ListGameServersResponse, - query=_query(extra_query, ("pageSize", page_size)), - body=None, + "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, ) - async def list_order_games( + async def remove_coupon( self, + subscription_id: str, *, - 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``.""" + ) -> m.SubscriptionCoupon: + """Call ``DELETE /v1/subscriptions/{subscriptionId}/coupon``.""" return await self._client._call( - "GET", - "/v1/game-servers:order-games", - m.ListOrderGamesResponse, - query=_query(extra_query, ("planId", plan_id)), + "DELETE", + f"/v1/subscriptions/{_path(subscription_id)}/coupon", + m.SubscriptionCoupon, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_schedules( + async def revoke_coupon( self, id: str, *, + confirm: bool | 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.RevokeCouponResponse: + """ + Ends the discount for every customer from their next invoice. + + It calls ``POST /v1/coupons/{id}:revoke``. + + Args: + confirm: Must be true; revoking ends the discount for every customer. + """ return await self._client._call( - "GET", - f"/v1/game-servers/{_path(id)}/schedules", - m.ListSchedulesResponse, + "POST", + f"/v1/coupons/{_path(id)}:revoke", + m.RevokeCouponResponse, query=_query(extra_query), - body=None, + body=_body(m.RevokeCouponBody, extra_body, False, ("confirm", confirm)), idempotent=False, timeout=timeout, ) - async def lock_backup( + async def update_coupon( self, id: str, - backup_uuid: str, *, - truncate: bool | None = None, + 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, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> m.Coupon: """ - Call ``POST /v1/game-servers/{id}/backups/{backupUuid}:lock``. + Call ``PATCH /v1/coupons/{id}``. Args: - truncate: Restore only. When true, the panel deletes every file before extracting the backup. + add_amounts_off: Adds amounts for currencies the coupon does not list yet. Existing amounts are read-only. """ return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}:lock", - m.SuccessResponse, + "PATCH", + f"/v1/coupons/{_path(id)}", + m.Coupon, query=_query(extra_query), - body=_body(m.LockBackupBody, extra_body, False, ("truncate", truncate)), + 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), + ), idempotent=False, timeout=timeout, ) - async def open_console( + async def update_coupon_code( 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, 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.CouponCode: + """Call ``PATCH /v1/coupon-codes/{id}``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}:console", - m.OpenConsoleResponse, + "PATCH", + f"/v1/coupon-codes/{_path(id)}", + m.CouponCode, query=_query(extra_query), - body=_body(m.OpenConsoleBody, extra_body, False), + 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, ) - async def power_game_server( + +class AsyncCreditService(_ServiceAsync): + """The NodeRings CreditService API.""" + + async def get_credit_balance( 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.GetCreditBalanceResponse: + """Call ``GET /v1/credits/balance``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}:power", - m.GameServer, + "GET", + "/v1/credits/balance", + m.GetCreditBalanceResponse, query=_query(extra_query), - body=_body(m.PowerGameServerBody, extra_body, False, ("signal", signal)), + body=None, idempotent=False, timeout=timeout, ) - async def read_file( + async def list_credit_ledger_entries( self, - id: str, *, - path: 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.ReadFileResponse: - """Call ``GET /v1/game-servers/{id}/files/content``.""" + ) -> m.ListCreditLedgerEntriesResponse: + """Call ``GET /v1/credits/ledger``.""" return await self._client._call( "GET", - f"/v1/game-servers/{_path(id)}/files/content", - m.ReadFileResponse, - query=_query(extra_query, ("path", path)), + "/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 reinstall_game_server( + async def list_credit_ledger_entries_all( self, - id: str, *, - extra_body: dict[str, Any] | 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.GameServer: - """Call ``POST /v1/game-servers/{id}:reinstall``.""" - return await self._client._call( - "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, - ) + ) -> AsyncIterator[m.CreditLedgerEntryProto]: + """ + Every result of :meth:`list_credit_ledger_entries`, reading page after page. - async def rename_file( + ``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 + + async def list_promo_credit_grants( self, - id: str, *, - dest: str | None = None, - root: str | None = None, - source: 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:rename``.""" + ) -> m.ListPromoCreditGrantsResponse: + """Call ``GET /v1/credits/promo``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:rename", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.RenameFileBody, extra_body, False, ("dest", dest), ("root", root), ("source", source)), + "GET", + "/v1/credits/promo", + m.ListPromoCreditGrantsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), + body=None, idempotent=False, timeout=timeout, ) - async def rename_game_server( + async def list_promo_credit_grants_all( self, - id: str, *, - name: 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.GameServer: - """Call ``POST /v1/game-servers/{id}:rename``.""" - return await self._client._call( - "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, - ) + ) -> AsyncIterator[m.PromoCreditGrant]: + """ + Every result of :meth:`list_promo_credit_grants`, reading page after page. - async def restore_backup( + ``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 + + async def purchase_credits( self, - id: str, - backup_uuid: str, *, - truncate: bool | 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.SuccessResponse: + ) -> m.PurchaseCreditsResponse: """ - Call ``POST /v1/game-servers/{id}/backups/{backupUuid}:restore``. + Call ``POST /v1/credits:purchase``. Args: - truncate: Restore only. When true, the panel deletes every file before extracting the backup. + 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", - f"/v1/game-servers/{_path(id)}/backups/{_path(backup_uuid)}:restore", - m.SuccessResponse, + "/v1/credits:purchase", + m.PurchaseCreditsResponse, query=_query(extra_query), - body=_body(m.GameServerRestoreBackupBody, extra_body, False, ("truncate", truncate)), + body=_body( + m.PurchaseCreditsRequest, + extra_body, + False, + ("amount", amount), + ("payment_method_id", payment_method_id), + ), idempotent=False, timeout=timeout, ) - async def rotate_database_password( + async def redeem_promo_code( self, - id: str, - database_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.GameServerDatabase: - """Call ``POST /v1/game-servers/{id}/databases/{databaseId}:rotate``.""" + ) -> m.RedeemPromoCodeResponse: + """Call ``POST /v1/credits:redeemPromoCode``.""" return await self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/databases/{_path(database_id)}:rotate", - m.GameServerDatabase, + "/v1/credits:redeemPromoCode", + m.RedeemPromoCodeResponse, query=_query(extra_query), - body=_body(m.RotateDatabasePasswordBody, extra_body, False), + body=_body(m.RedeemPromoCodeRequest, extra_body, False, ("code", code)), idempotent=False, timeout=timeout, ) - async def set_primary_allocation( + +class AsyncDNSRecordService(_ServiceAsync): + """The NodeRings DnsRecordService API.""" + + async def check_dns_geo_record( self, - id: str, - allocation_id: str, + zone_id: str, *, + 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.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/allocations/{allocationId}:primary``.""" + ) -> m.CheckDNSGeoRecordResponse: + """Call ``POST /v1/dns/zones/{zoneId}/geo-records:check``.""" return await self._client._call( "POST", - f"/v1/game-servers/{_path(id)}/allocations/{_path(allocation_id)}:primary", - m.SuccessResponse, + f"/v1/dns/zones/{_path(zone_id)}/geo-records:check", + m.CheckDNSGeoRecordResponse, query=_query(extra_query), - body=_body(m.SetPrimaryAllocationBody, extra_body, False), + body=_body( + m.CheckDNSGeoRecordBody, + extra_body, + False, + ("continent", continent), + ("country", country), + ("name", name), + ("region", region), + ("type", type), + ), idempotent=False, timeout=timeout, ) - async def update_allocation( + async def delete_dns_geo_record( self, - id: str, - allocation_id: str, + zone_id: str, *, - notes: 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.GameServerAllocation: - """Call ``POST /v1/game-servers/{id}/allocations/{allocationId}``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/dns/zones/{zoneId}/geo-records``.""" 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)), + "DELETE", + f"/v1/dns/zones/{_path(zone_id)}/geo-records", + m.SuccessResponse, + query=_query(extra_query, ("name", name), ("type", type)), + body=None, idempotent=False, timeout=timeout, ) - async def update_docker_image( + async def delete_dns_record( self, - id: str, + zone_id: str, *, - docker_image: 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.SuccessResponse: - """Call ``PUT /v1/game-servers/{id}/docker-image``.""" + """Call ``DELETE /v1/dns/zones/{zoneId}/records``.""" return await self._client._call( - "PUT", - f"/v1/game-servers/{_path(id)}/docker-image", + "DELETE", + f"/v1/dns/zones/{_path(zone_id)}/records", m.SuccessResponse, - query=_query(extra_query), - body=_body(m.UpdateDockerImageBody, extra_body, False, ("docker_image", docker_image)), + query=_query(extra_query, ("name", name), ("type", type)), + body=None, idempotent=False, timeout=timeout, ) - async def update_schedule( + async def get_dns_geo_record( self, - id: str, - schedule_id: str, + zone_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, + type: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GameServerSchedule: - """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}``.""" + ) -> m.DNSGeoRecord: + """Call ``GET /v1/dns/zones/{zoneId}/geo-records:get``.""" 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), - ), + "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 update_schedule_task( + async def list_dns_geo_locations( 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, + kind: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> m.ListDNSGeoLocationsResponse: """ - Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}/tasks/{taskId}``. + Call ``GET /v1/dns/geo-locations``. Args: - sequence_id: Omitted leaves the task where it is. Set it to move the task in the run order. + kind: Optional filter: continent, country, region, or group. """ 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), - ), + "GET", + "/v1/dns/geo-locations", + m.ListDNSGeoLocationsResponse, + query=_query(extra_query, ("kind", kind)), + body=None, idempotent=False, timeout=timeout, ) - async def update_startup_variable( + async def list_dns_geo_records( self, - id: str, + zone_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``.""" + ) -> m.ListDNSGeoRecordsResponse: + """Call ``GET /v1/dns/zones/{zoneId}/geo-records``.""" return await self._client._call( - "PUT", - f"/v1/game-servers/{_path(id)}/startup", - m.SuccessResponse, + "GET", + f"/v1/dns/zones/{_path(zone_id)}/geo-records", + m.ListDNSGeoRecordsResponse, query=_query(extra_query), - body=_body(m.UpdateStartupVariableBody, extra_body, False, ("key", key), ("value", value)), + body=None, idempotent=False, timeout=timeout, ) - async def upload_file( + async def list_dns_records( self, - id: str, + zone_id: str, *, - content: bytes | None = None, - directory: str | None = None, - filename: str | None = None, + 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.ListDNSRecordsResponse: + """Call ``GET /v1/dns/zones/{zoneId}/records``.""" + 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, + 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( + 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.SuccessResponse: - """Call ``POST /v1/game-servers/{id}/files:upload``.""" + ) -> m.DNSGeoRecord: + """Call ``PUT /v1/dns/zones/{zoneId}/geo-records``.""" return await self._client._call( - "POST", - f"/v1/game-servers/{_path(id)}/files:upload", - m.SuccessResponse, + "PUT", + f"/v1/dns/zones/{_path(zone_id)}/geo-records", + m.DNSGeoRecord, query=_query(extra_query), - body=_body( - m.UploadFileBody, - extra_body, - False, - ("content", content), - ("directory", directory), - ("filename", filename), - ), + body=_body(m.UpsertDNSGeoRecordBody, extra_body, False, ("record", record)), idempotent=False, timeout=timeout, ) - async def write_file( + async def upsert_dns_record( self, - id: str, + zone_id: str, *, - content: bytes | None = None, - path: str | None = None, + 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.SuccessResponse: - """Call ``PUT /v1/game-servers/{id}/files``.""" + ) -> m.DNSRecord: + """Call ``PUT /v1/dns/zones/{zoneId}/records``.""" return await self._client._call( "PUT", - f"/v1/game-servers/{_path(id)}/files", - m.SuccessResponse, + f"/v1/dns/zones/{_path(zone_id)}/records", + m.DNSRecord, query=_query(extra_query), - body=_body(m.WriteFileBody, extra_body, False, ("content", content), ("path", path)), + body=_body(m.UpsertDNSRecordBody, extra_body, False, ("record", record)), idempotent=False, timeout=timeout, ) -class AsyncGameServerTemplateService(_ServiceAsync): - """The NodeRings GameServerTemplateService API.""" +class AsyncDNSZoneService(_ServiceAsync): + """The NodeRings DnsZoneService API.""" - async def duplicate_game_server_template( + async def check_dns_zone_delegation( 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``.""" + ) -> m.GetDNSZoneResponse: + """Call ``POST /v1/dns/zones/{id}/check-delegation``.""" return await self._client._call( "POST", - f"/v1/game-server-templates/{_path(id)}:duplicate", - m.GameServerTemplate, + f"/v1/dns/zones/{_path(id)}/check-delegation", + m.GetDNSZoneResponse, query=_query(extra_query), - body=_body(m.DuplicateGameServerTemplateBody, extra_body, False, ("name", name)), + body=_body(m.CheckDNSZoneDelegationBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def import_game_server_template( + async def create_dns_zone( 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, + 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.GameServerTemplate: - """Call ``POST /v1/game-server-templates:import``.""" + ) -> 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( "POST", - "/v1/game-server-templates:import", - m.GameServerTemplate, + "/v1/dns/zones", + m.CreateDNSZoneResponse, 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), - ), + body=_body(m.CreateDNSZoneRequest, extra_body, False, ("name", name), ("records", records)), idempotent=False, timeout=timeout, ) - async def list_game_server_templates( + async def delete_dns_zone( self, + id: str, *, - platform_id: str | None = None, + force: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListGameServerTemplatesResponse: - """Call ``GET /v1/game-server-templates``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/dns/zones/{id}``.""" return await self._client._call( - "GET", - "/v1/game-server-templates", - m.ListGameServerTemplatesResponse, - query=_query(extra_query, ("platformId", platform_id)), + "DELETE", + f"/v1/dns/zones/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query, ("force", force)), body=None, idempotent=False, timeout=timeout, ) - async def set_game_nest_ordering( + async def export_dns_zone( 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.SuccessResponse: - """Call ``POST /v1/game-server-templates:nest-ordering``.""" + ) -> m.ExportDNSZoneResponse: + """Call ``GET /v1/dns/zones/{id}/export``.""" return await self._client._call( - "POST", - "/v1/game-server-templates:nest-ordering", - m.SuccessResponse, + "GET", + f"/v1/dns/zones/{_path(id)}/export", + m.ExportDNSZoneResponse, 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 update_game_server_template( + async def get_dns_zone( 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}``.""" + ) -> m.GetDNSZoneResponse: + """Call ``GET /v1/dns/zones/{id}``.""" return await self._client._call( - "PATCH", - f"/v1/game-server-templates/{_path(id)}", - m.GameServerTemplate, + "GET", + f"/v1/dns/zones/{_path(id)}", + m.GetDNSZoneResponse, 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=None, idempotent=False, timeout=timeout, ) - -class AsyncGroupService(_ServiceAsync): - """The NodeRings GroupService API.""" - - async def add_service_account_to_group( + async def import_dns_records( self, + zone_id: str, *, - group_id: str | None = None, - service_account_ids: list[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 ``POST /v1/groups/add-service-account``.""" + """Call ``POST /v1/dns/zones/{zoneId}/records:import``.""" return await self._client._call( "POST", - "/v1/groups/add-service-account", + f"/v1/dns/zones/{_path(zone_id)}/records:import", 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.ImportDNSRecordsBody, extra_body, False, ("records", records)), idempotent=False, timeout=timeout, ) - async def add_user_to_group( + async def import_dns_zone( self, + id: str, *, - group_id: str | None = None, - user_ids: list[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/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``.""" + """Call ``POST /v1/dns/zones/{id}/import``.""" 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)}", + f"/v1/dns/zones/{_path(id)}/import", 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, + body=_body(m.ImportDNSZoneBody, extra_body, False, ("zone_text", zone_text)), idempotent=False, timeout=timeout, ) - async def list_groups( + async def list_dns_zones( 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``.""" + ) -> m.ListDNSZonesResponse: + """Call ``GET /v1/dns/zones``.""" 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), - ), + "/v1/dns/zones", + m.ListDNSZonesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - async def list_groups_all( + async def list_dns_zones_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]: + ) -> AsyncIterator[m.DNSZone]: """ - Every result of :meth:`list_groups`, 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). """ @@ -19752,16 +19616,13 @@ async def list_groups_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_groups( + res = await self.list_dns_zones( page=page, page_size=size, - filter_name=filter_name, - filter_status=filter_status, - search=search, extra_query=extra_query, timeout=timeout, ) - items = res.groups + items = res.zones for item in items: yield item seen += len(items) @@ -19769,619 +19630,732 @@ async def list_groups_all( return page += 1 - async def remove_service_account_from_group( + async def scan_dns_zone_records( self, *, - group_id: str | None = None, - service_account_ids: list[str] | None = None, + name: str | None = None, + zone_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/groups/remove-service-account``.""" + ) -> m.ScanDNSZoneRecordsResponse: + """Call ``GET /v1/dns/scan``.""" return await self._client._call( - "DELETE", - "/v1/groups/remove-service-account", - m.SuccessResponse, - query=_query(extra_query, ("groupId", group_id), ("serviceAccountIds", service_account_ids)), + "GET", + "/v1/dns/scan", + m.ScanDNSZoneRecordsResponse, + query=_query(extra_query, ("name", name), ("zoneId", zone_id)), body=None, idempotent=False, timeout=timeout, ) - async def remove_user_from_group( + async def scan_dns_zone_records_2( self, + zone_id: str, *, - group_id: str | None = None, - user_ids: list[str] | None = None, + name: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/groups/remove-user``.""" + ) -> m.ScanDNSZoneRecordsResponse: + """Call ``GET /v1/dns/zones/{zoneId}/scan``.""" return await self._client._call( - "DELETE", - "/v1/groups/remove-user", - m.SuccessResponse, - query=_query(extra_query, ("groupId", group_id), ("userIds", user_ids)), + "GET", + f"/v1/dns/zones/{_path(zone_id)}/scan", + m.ScanDNSZoneRecordsResponse, + query=_query(extra_query, ("name", name)), body=None, idempotent=False, timeout=timeout, ) - async def update_group( + +class AsyncDNSSECService(_ServiceAsync): + """The NodeRings DnssecService API.""" + + async def check_dnssec_ds( self, - id: str, + zone_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}``.""" + ) -> m.DNSSECInfo: + """Call ``POST /v1/dns/zones/{zoneId}/dnssec/check-ds``.""" return await self._client._call( - "PATCH", - f"/v1/groups/{_path(id)}", - m.UpdateGroupResponse, + "POST", + f"/v1/dns/zones/{_path(zone_id)}/dnssec/check-ds", + m.DNSSECInfo, query=_query(extra_query), - body=_body( - m.UpdateGroupBody, - extra_body, - False, - ("description", description), - ("group_roles", group_roles), - ("name", name), - ), + body=_body(m.CheckDNSSECDSBody, extra_body, False), idempotent=False, timeout=timeout, ) + async def disable_dnssec( + self, + 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.DNSSECInfo: + """Call ``POST /v1/dns/zones/{zoneId}/dnssec/disable``.""" + return await self._client._call( + "POST", + f"/v1/dns/zones/{_path(zone_id)}/dnssec/disable", + m.DNSSECInfo, + query=_query(extra_query), + body=_body(m.DisableDNSSECBody, extra_body, False, ("force", force)), + idempotent=False, + timeout=timeout, + ) -class AsyncHookScriptService(_ServiceAsync): - """The NodeRings HookScriptService API.""" + async def enable_dnssec( + self, + zone_id: str, + *, + 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``.""" + return await self._client._call( + "POST", + f"/v1/dns/zones/{_path(zone_id)}/dnssec/enable", + m.DNSSECInfo, + query=_query(extra_query), + body=_body(m.EnableDNSSECBody, extra_body, False), + idempotent=False, + timeout=timeout, + ) - async def delete_hook_script( + async def get_dnssec( self, - id: str, + zone_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/hook-scripts/{id}``.""" + ) -> m.DNSSECInfo: + """Call ``GET /v1/dns/zones/{zoneId}/dnssec``.""" return await self._client._call( - "DELETE", - f"/v1/hook-scripts/{_path(id)}", - m.SuccessResponse, + "GET", + f"/v1/dns/zones/{_path(zone_id)}/dnssec", + m.DNSSECInfo, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_hook_scripts( + +class AsyncDomainContactService(_ServiceAsync): + """The NodeRings DomainContactService API.""" + + async def create_domain_contact( self, *, - page: int | None = None, - page_size: int | None = None, - subject: m.HookSubject | str | None = None, + 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.ListHookScriptsResponse: + ) -> m.DomainContact: """ - Call ``GET /v1/hook-scripts``. + Call ``POST /v1/registrar/contacts``. Args: - subject: Unspecified lists VM scripts, which is the previous behavior. + contact: Writable contact fields. ASCII only in v1; the server normalizes and validates. + tlds: Validate against the requirements of these TLDs too. """ return await self._client._call( - "GET", - "/v1/hook-scripts", - m.ListHookScriptsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("subject", subject)), - body=None, + "POST", + "/v1/registrar/contacts", + m.DomainContact, + query=_query(extra_query), + body=_body(m.CreateDomainContactRequest, extra_body, False, ("contact", contact), ("tlds", tlds)), idempotent=False, timeout=timeout, ) - async def list_hook_scripts_all( + async def delete_domain_contact( self, + id: 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, - ) -> 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 + ) -> m.SuccessResponse: + """Call ``DELETE /v1/registrar/contacts/{id}``.""" + return await self._client._call( + "DELETE", + f"/v1/registrar/contacts/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - async def upsert_hook_script( + async def get_contact_schema( 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, + country: str | None = None, + tlds: list[str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.HookScript: + ) -> m.GetContactSchemaResponse: """ - Call ``PUT /v1/hook-scripts``. + Per-country rules and base field specs for the client-side (zod) schema. + + It calls ``GET /v1/registrar/contact-schema``. Args: - enabled: Omit to keep the stored value; create defaults to true - subject: LifecycleHook is the VM operation that triggers a provider hook script. + country: Limit country rules to one country (ISO alpha-2); empty = all. + tlds: Include extension field specs for these TLDs. """ 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), - ), + "GET", + "/v1/registrar/contact-schema", + m.GetContactSchemaResponse, + query=_query(extra_query, ("country", country), ("tlds", tlds)), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncIPAMService(_ServiceAsync): - """The NodeRings IPAMService API.""" - - async def add_reserved_ip( + async def get_domain_contact( self, - prefix_id: str, + 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 - """ + ) -> m.DomainContact: + """Call ``GET /v1/registrar/contacts/{id}``.""" return await self._client._call( - "POST", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips", - m.SuccessResponse, + "GET", + f"/v1/registrar/contacts/{_path(id)}", + m.DomainContact, query=_query(extra_query), - body=_body(m.AddReservedIPBody, extra_body, False, ("ip_address", ip_address)), + body=None, idempotent=False, timeout=timeout, ) - async def add_reserved_prefix( + async def list_domain_contacts( self, - prefix_id: str, *, - cidr: 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, + ) -> m.ListDomainContactsResponse: + """Call ``GET /v1/registrar/contacts``.""" + return await self._client._call( + "GET", + "/v1/registrar/contacts", + m.ListDomainContactsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("search", search)), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def list_domain_contacts_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, + ) -> 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, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> m.UpdateDomainContactResponse: """ - Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-prefixes``. + Call ``PUT /v1/registrar/contacts/{id}``. Args: - cidr: Must match prefix vm_assignment_prefix_length exactly + contact: Writable contact fields. ASCII only in v1; the server normalizes and validates. """ return await self._client._call( - "POST", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-prefixes", - m.SuccessResponse, + "PUT", + f"/v1/registrar/contacts/{_path(id)}", + m.UpdateDomainContactResponse, query=_query(extra_query), - body=_body(m.AddReservedPrefixBody, extra_body, False, ("cidr", cidr)), + body=_body(m.UpdateDomainContactBody, extra_body, False, ("contact", contact), ("tlds", tlds)), idempotent=False, timeout=timeout, ) - async def assign_network_to_node( + async def validate_domain_contact( self, - network_id: str, *, - node_ids: list[str] | None = None, + 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.SuccessResponse: + ) -> m.ValidateDomainContactResponse: """ - Node-Network assignment + Dry run for forms: errors, warnings and normalized values. - It calls ``POST /v1/ipam/networks/{networkId}/assign-node``. + It calls ``POST /v1/registrar/contacts/validate``. Args: - node_ids: One or more node IDs to assign to this network + contact: Writable contact fields. ASCII only in v1; the server normalizes and validates. """ return await self._client._call( "POST", - f"/v1/ipam/networks/{_path(network_id)}/assign-node", - m.SuccessResponse, + "/v1/registrar/contacts/validate", + m.ValidateDomainContactResponse, query=_query(extra_query), - body=_body(m.AssignNetworkToNodeBody, extra_body, False, ("node_ids", node_ids)), + body=_body(m.ValidateDomainContactRequest, extra_body, False, ("contact", contact), ("tlds", tlds)), idempotent=False, timeout=timeout, ) - async def clear_all_prefix_reserved_i_ps( + +class AsyncDomainOrderService(_ServiceAsync): + """The NodeRings DomainOrderService API.""" + + async def cancel_domain_order( self, - prefix_id: str, + 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.SuccessResponse: - """Call ``POST /v1/ipam/prefixes/{prefixId}/reserved-ips/clear-all``.""" + ) -> m.DomainOrder: + """Call ``POST /v1/registrar/orders/{id}/cancel``.""" return await self._client._call( "POST", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/clear-all", - m.SuccessResponse, + f"/v1/registrar/orders/{_path(id)}/cancel", + m.DomainOrder, query=_query(extra_query), - body=_body(m.ClearAllPrefixReservedIPsBody, extra_body, False), + body=_body(m.CancelDomainOrderBody, extra_body, False, ("reason", reason)), idempotent=False, timeout=timeout, ) - async def create_network( + async def checkout_domain_order( self, + id: str, *, - description: str | None = None, - dns_servers: list[str] | None = None, - mac_address_prefix: str | None = None, - name: str | None = None, + 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.SuccessResponse: + ) -> m.CheckoutDomainOrderResponse: """ - IPAM Network management + Authorize payment and start processing. May return requires_action + client_secret. - It calls ``POST /v1/ipam/networks``. + 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: - 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. + 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. """ return await self._client._call( "POST", - "/v1/ipam/networks", - m.SuccessResponse, + f"/v1/registrar/orders/{_path(id)}/checkout", + m.CheckoutDomainOrderResponse, query=_query(extra_query), body=_body( - m.CreateNetworkRequest, + m.CheckoutDomainOrderBody, extra_body, - False, - ("description", description), - ("dns_servers", dns_servers), - ("mac_address_prefix", mac_address_prefix), - ("name", name), + 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=False, + idempotent=True, timeout=timeout, ) - async def create_prefix( + async def confirm_domain_order( 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, + 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.SuccessResponse: + ) -> m.DomainOrder: """ - Prefix management - - It calls ``POST /v1/ipam/prefixes``. + After 3-D Secure: re-reads the PaymentIntent from Stripe and continues. - 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 + It calls ``POST /v1/registrar/orders/{id}/confirm``. """ return await self._client._call( "POST", - "/v1/ipam/prefixes", - m.SuccessResponse, + f"/v1/registrar/orders/{_path(id)}/confirm", + m.DomainOrder, 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), - ), + body=_body(m.ConfirmDomainOrderBody, extra_body, False, ("payment_intent_id", payment_intent_id)), idempotent=False, timeout=timeout, ) - async def delete_network( + async def create_domain_order( self, - 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, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/ipam/networks/{id}``.""" + ) -> 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. + """ return await self._client._call( - "DELETE", - f"/v1/ipam/networks/{_path(id)}", - m.SuccessResponse, + "POST", + "/v1/registrar/orders", + m.DomainOrder, query=_query(extra_query), - body=None, - idempotent=False, + 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, timeout=timeout, ) - async def delete_prefix( + async def get_domain_order( self, id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/ipam/prefixes/{id}``.""" + ) -> m.DomainOrder: + """Call ``GET /v1/registrar/orders/{id}``.""" return await self._client._call( - "DELETE", - f"/v1/ipam/prefixes/{_path(id)}", - m.SuccessResponse, + "GET", + f"/v1/registrar/orders/{_path(id)}", + m.DomainOrder, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_network( + async def list_domain_orders( 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, - ) -> m.GetNetworkResponse: - """Call ``GET /v1/ipam/networks/{id}``.""" + ) -> m.ListDomainOrdersResponse: + """Call ``GET /v1/registrar/orders``.""" return await self._client._call( "GET", - f"/v1/ipam/networks/{_path(id)}", - m.GetNetworkResponse, - query=_query(extra_query), + "/v1/registrar/orders", + m.ListDomainOrdersResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("states", states)), body=None, idempotent=False, timeout=timeout, ) - async def get_node_network( + async def list_domain_orders_all( self, - node_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, - ) -> 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, - ) + ) -> AsyncIterator[m.DomainOrder]: + """ + Every result of :meth:`list_domain_orders`, reading page after page. - 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, - ) + ``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 get_prefix_utilization( + async def price_domain_order( self, - prefix_id: str, + 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.GetPrefixUtilizationResponse: + ) -> m.DomainOrderQuote: """ - Utility + Re-quote with live prices and tax (Stripe Tax). - It calls ``GET /v1/ipam/prefixes/{prefixId}/utilization``. + 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. """ return await self._client._call( - "GET", - f"/v1/ipam/prefixes/{_path(prefix_id)}/utilization", - m.GetPrefixUtilizationResponse, + "POST", + f"/v1/registrar/orders/{_path(id)}/price", + m.DomainOrderQuote, query=_query(extra_query), - body=None, + body=_body( + m.PriceDomainOrderBody, + extra_body, + False, + ("confirm_billing_country", confirm_billing_country), + ("evidence_country", evidence_country), + ("payment_method_id", payment_method_id), + ), idempotent=False, timeout=timeout, ) - async def list_allocations( + async def update_domain_order( self, + id: str, *, - page: int | None = None, - page_size: int | None = None, - prefix_id: str | None = None, + 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, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListAllocationsResponse: + ) -> m.DomainOrder: """ - IP Allocation (read-only - allocations are managed automatically) + Items, years, privacy, auto-renew, contact and DNS choices. - It calls ``GET /v1/ipam/allocations``. + It calls ``PATCH /v1/registrar/orders/{id}``. Args: - prefix_id: Filter by prefix ID (required for filtering allocations) + 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. """ 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, + "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), + ), idempotent=False, timeout=timeout, ) - async def list_allocations_all( + +class AsyncDomainSearchService(_ServiceAsync): + """The NodeRings DomainSearchService API.""" + + async def check_domains( self, *, - page: int | None = None, - page_size: int | None = None, - prefix_id: str | None = None, + names: list[str] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.IPAllocation]: + ) -> m.CheckDomainsResponse: """ - Every result of :meth:`list_allocations`, reading page after page. + Live, uncached availability (add-to-cart and checkout). Login required. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + It calls ``POST /v1/registrar/check``. """ - 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 + return await self._client._call( + "POST", + "/v1/registrar/check", + m.CheckDomainsResponse, + query=_query(extra_query), + body=_body(m.CheckDomainsRequest, extra_body, False, ("names", names)), + idempotent=False, + timeout=timeout, + ) - async def list_available_i_ps( + async def check_transfer( self, - prefix_id: str, *, - limit: int | None = None, + names: list[str] | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListAvailableIPsResponse: + ) -> m.CheckTransferResponse: """ - Call ``GET /v1/ipam/prefixes/{prefixId}/available-ips``. + Whether names can be transferred in, with price and warnings. - Args: - limit: Limit number of IPs returned (default: 100) + It calls ``POST /v1/registrar/transfer-check``. """ 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, + "POST", + "/v1/registrar/transfer-check", + m.CheckTransferResponse, + query=_query(extra_query), + body=_body(m.CheckTransferRequest, extra_body, False, ("names", names)), idempotent=False, timeout=timeout, ) - async def list_network_nodes( + async def get_tld_requirements( self, - network_id: str, + tld: str, *, + operation: m.DomainOperation | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListNetworkNodesResponse: - """Call ``GET /v1/ipam/networks/{networkId}/nodes``.""" + ) -> m.GetTldRequirementsResponse: + """ + Contact fields a TLD needs for an operation (dynamic extension fields). + + It calls ``GET /v1/registrar/tlds/{tld}/requirements``. + """ return await self._client._call( "GET", - f"/v1/ipam/networks/{_path(network_id)}/nodes", - m.ListNetworkNodesResponse, - query=_query(extra_query), + f"/v1/registrar/tlds/{_path(tld)}/requirements", + m.GetTldRequirementsResponse, + query=_query(extra_query, ("operation", operation)), body=None, idempotent=False, timeout=timeout, ) - async def list_networks( + async def list_tld_prices( 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, - ) -> m.ListNetworksResponse: - """Call ``GET /v1/ipam/networks``.""" + ) -> 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). + """ return await self._client._call( "GET", - "/v1/ipam/networks", - m.ListNetworksResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "/v1/registrar/tlds", + m.ListTldPricesResponse, + query=_query( + extra_query, + ("featuredOnly", featured_only), + ("category", category), + ("page", page), + ("pageSize", page_size), + ), body=None, idempotent=False, timeout=timeout, ) - async def list_networks_all( + 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.Network]: + ) -> AsyncIterator[m.TldPrice]: """ - Every result of :meth:`list_networks`, reading page after page. + 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). """ @@ -20389,141 +20363,141 @@ async def list_networks_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_networks( + 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.networks + items = res.tlds 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_prefixes( + async def search_domains( self, *, - page: int | None = None, - page_size: int | None = None, - filter_network_id: str | None = None, + 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, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPrefixesResponse: - """Call ``GET /v1/ipam/prefixes``.""" + ) -> 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. + """ 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, + "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), + ), 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 +class AsyncDomainService(_ServiceAsync): + """The NodeRings DomainService API.""" - async def remove_reserved_ip( + async def create_domain( self, - prefix_id: str, - ip_address: str, *, + 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.SuccessResponse: - """Call ``DELETE /v1/ipam/prefixes/{prefixId}/reserved-ips/{ipAddress}``.""" + """Call ``POST /v1/domain``.""" return await self._client._call( - "DELETE", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/{_path(ip_address)}", + "POST", + "/v1/domain", m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body( + m.CreateDomainRequest, extra_body, False, ("name", name), ("verification_type", verification_type) + ), idempotent=False, timeout=timeout, ) - async def remove_reserved_prefix( + async def delete_domain( self, - prefix_id: str, + 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``.""" + """Call ``DELETE /v1/domain/{id}``.""" return await self._client._call( "DELETE", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-prefixes", + f"/v1/domain/{_path(id)}", m.SuccessResponse, - query=_query(extra_query, ("cidr", cidr)), + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def reserve_all_prefix_i_ps( + async def get_domain( 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``.""" + ) -> m.GetDomainResponse: + """Call ``GET /v1/domain``.""" return await self._client._call( - "POST", - f"/v1/ipam/prefixes/{_path(prefix_id)}/reserved-ips/reserve-all", - m.SuccessResponse, + "GET", + "/v1/domain", + m.GetDomainResponse, query=_query(extra_query), - body=_body(m.ReserveAllPrefixIPsBody, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - async def unassign_network_from_node( + async def verify_domain( self, - node_id: str, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/ipam/nodes/{nodeId}/unassign-network``.""" + """Call ``GET /v1/domain/verify/{id}``.""" return await self._client._call( - "POST", - f"/v1/ipam/nodes/{_path(node_id)}/unassign-network", + "GET", + f"/v1/domain/verify/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -20531,172 +20505,97 @@ async def unassign_network_from_node( 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, - ) +class AsyncEnvironmentVariableService(_ServiceAsync): + """The NodeRings EnvironmentVariableService API.""" - async def update_prefix( + async def create_environment_variable( 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, + 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.UpdatePrefixResponse: - """Call ``PATCH /v1/ipam/prefixes/{id}``.""" + ) -> m.CreateEnvironmentVariableResponse: + """Call ``POST /v1/environment-variables``.""" return await self._client._call( - "PATCH", - f"/v1/ipam/prefixes/{_path(id)}", - m.UpdatePrefixResponse, + "POST", + "/v1/environment-variables", + m.CreateEnvironmentVariableResponse, 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), - ), + body=_body(m.CreateEnvironmentVariableRequest, extra_body, False, ("key", key), ("value", value)), idempotent=False, timeout=timeout, ) - -class AsyncInstantAppService(_ServiceAsync): - """The NodeRings InstantAppService API.""" - - async def get_instant_app( + async def delete_environment_variable( 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}``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/environment-variables/{id}``.""" return await self._client._call( - "GET", - f"/v1/instantapps/{_path(id)}", - m.InstantApp, - query=_query(extra_query, ("slug", slug)), + "DELETE", + f"/v1/environment-variables/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_instant_app_2( + async def get_environment_variable( self, - slug: str, + id: 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. - """ + ) -> m.GetEnvironmentVariableResponse: + """Call ``GET /v1/environment-variables/{id}``.""" return await self._client._call( "GET", - f"/v1/instantapps/slug/{_path(slug)}", - m.InstantApp, - query=_query(extra_query, ("id", id)), + f"/v1/environment-variables/{_path(id)}", + m.GetEnvironmentVariableResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_instant_apps( + async def list_environment_variables( 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, + filter_key: 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 - """ + ) -> m.ListEnvironmentVariablesResponse: + """Call ``GET /v1/environment-variables``.""" 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), - ), + "/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 list_instant_apps_all( + async def list_environment_variables_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, + filter_key: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.InstantApp]: + ) -> AsyncIterator[m.EnvironmentVariable]: """ - Every result of :meth:`list_instant_apps`, 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). """ @@ -20704,16 +20603,14 @@ async def list_instant_apps_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_instant_apps( + res = await self.list_environment_variables( page=page, page_size=size, - query=query, - categories=categories, - distro=distro, + filter_key=filter_key, extra_query=extra_query, timeout=timeout, ) - items = res.instant_apps + items = res.environment_variables for item in items: yield item seen += len(items) @@ -20721,211 +20618,211 @@ async def list_instant_apps_all( return page += 1 - -class AsyncInviteService(_ServiceAsync): - """The NodeRings InviteService API.""" - - async def accept_invite( + async def update_environment_variable( self, + id: str, *, - invite_id: 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 ``GET /v1/invites/accept``.""" + """Call ``PATCH /v1/environment-variables/{id}``.""" return await self._client._call( - "GET", - "/v1/invites/accept", + "PATCH", + f"/v1/environment-variables/{_path(id)}", m.SuccessResponse, - query=_query(extra_query, ("inviteId", invite_id)), - body=None, + query=_query(extra_query), + body=_body(m.UpdateEnvironmentVariableBody, extra_body, False, ("value", value)), idempotent=False, timeout=timeout, ) - async def create_invite( + +class AsyncExchangeRateService(_ServiceAsync): + """The NodeRings ExchangeRateService API.""" + + async def convert_currency( self, *, - group_id: str | None = None, - invitee_emails: list[str] | None = None, - role_id: 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.SuccessResponse: - """Call ``POST /v1/invites``.""" + ) -> 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 + """ return await self._client._call( "POST", - "/v1/invites", - m.SuccessResponse, + "/v1/exchange-rate/convert", + m.ConvertCurrencyResponse, query=_query(extra_query), body=_body( - m.CreateInviteRequest, + m.ConvertCurrencyRequest, extra_body, False, - ("group_id", group_id), - ("invitee_emails", invitee_emails), - ("role_id", role_id), + ("target_currency", target_currency), + ("usd_amount", usd_amount), ), idempotent=False, timeout=timeout, ) - async def decline_invite( + async def get_all_exchange_rates( self, *, - invite_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``GET /v1/invites/decline``.""" + ) -> 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", - "/v1/invites/decline", - m.SuccessResponse, - query=_query(extra_query, ("inviteId", invite_id)), + "/v1/exchange-rate/rates", + m.GetAllExchangeRatesResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def delete_invite( + async def get_exchange_rate( self, - id: str, + currency_code: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/invites/{id}``.""" + ) -> 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( - "DELETE", - f"/v1/invites/{_path(id)}", - m.SuccessResponse, + "GET", + f"/v1/exchange-rate/rate/{_path(currency_code)}", + m.GetExchangeRateResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_invites( + async def list_supported_currencies( 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``.""" + ) -> m.ListSupportedCurrenciesResponse: + """ + List all supported currency codes + + It calls ``GET /v1/exchange-rate/currencies``. + """ return await self._client._call( "GET", - "/v1/invites", - m.ListInvitesResponse, - query=_query( - extra_query, ("page", page), ("pageSize", page_size), ("filterEmail", filter_email), ("search", search) - ), + "/v1/exchange-rate/currencies", + m.ListSupportedCurrenciesResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_invites_all( + +class AsyncFirewallService(_ServiceAsync): + """The NodeRings FirewallService API.""" + + async def create_firewall_address_group( self, *, - page: int | None = None, - page_size: int | None = None, - filter_email: str | None = None, - search: 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.Invite]: + ) -> m.CreateFirewallAddressGroupResponse: """ - Every result of :meth:`list_invites`, 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_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 + 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_my_invites( + async def create_firewall_rule( self, + ruleset_id: str, *, - page: int | None = None, - page_size: int | 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.ListMyInvitesResponse: - """Call ``GET /v1/invites/me``.""" + ) -> 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( - "GET", - "/v1/invites/me", - m.ListMyInvitesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), - body=None, + "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 list_my_invites_all( + async def create_firewall_rule_set( self, *, - page: int | None = None, - page_size: int | 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, - ) -> 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 + ) -> 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 resend_invite( + async def delete_firewall_address_group( self, - invite_id: str, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, ) -> m.SuccessResponse: - """Call ``POST /v1/invites/resend/{inviteId}``.""" + """Call ``DELETE /v1/firewall/address-groups/{id}``.""" return await self._client._call( - "POST", - f"/v1/invites/resend/{_path(invite_id)}", + "DELETE", + f"/v1/firewall/address-groups/{_path(id)}", m.SuccessResponse, query=_query(extra_query), body=None, @@ -20933,247 +20830,205 @@ async def resend_invite( timeout=timeout, ) - async def update_invite( + async def delete_firewall_rule( self, + 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 ``PATCH /v1/invites``.""" + """Call ``DELETE /v1/firewall/rules/{id}``.""" return await self._client._call( - "PATCH", - "/v1/invites", + "DELETE", + f"/v1/firewall/rules/{_path(id)}", 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), - ), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncInvoiceService(_ServiceAsync): - """The NodeRings InvoiceService API.""" - - async def get_invoice( + async def delete_firewall_rule_set( self, - invoice_id: str, + id: str, *, + force: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetInvoiceResponse: - """ - GetInvoice retrieves a single invoice with line items + ) -> 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, + ) - It calls ``GET /v1/invoices/{invoiceId}``. - """ + 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/invoices/{_path(invoice_id)}", - m.GetInvoiceResponse, + f"/v1/firewall/address-groups/{_path(id)}", + m.FirewallAddressGroup, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_invoices( + async def get_firewall_rule( self, + id: str, *, - 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, + direction: m.FirewallDirection | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListInvoicesResponse: + ) -> m.FirewallRuleResource: """ - ListInvoices lists invoices for a subscription or organization + Call ``GET /v1/firewall/rules/{id}``. - It calls ``GET /v1/invoices``. + Args: + direction: Optional: Filter by direction. If not specified, returns the rule regardless of direction. """ 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), - ), + f"/v1/firewall/rules/{_path(id)}", + m.FirewallRuleResource, + query=_query(extra_query, ("direction", direction)), body=None, idempotent=False, timeout=timeout, ) - async def list_invoices_all( + async def get_firewall_rule_set( self, + id: str, *, - 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``. - """ + ) -> m.FirewallRuleSet: + """Call ``GET /v1/firewall/rulesets/{id}``.""" return await self._client._call( - "POST", - f"/v1/invoices/{_path(invoice_id)}:pay", - m.PayInvoiceResponse, + "GET", + f"/v1/firewall/rulesets/{_path(id)}", + m.FirewallRuleSet, 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( + async def list_firewall_address_groups( self, - plan_id: str, *, - node_id: 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.GetPlanLiveValidationResponse: - """Call ``GET /v1/provider/plans/{planId}/live-validation``.""" + ) -> m.ListFirewallAddressGroupsResponse: + """ + Call ``GET /v1/firewall/address-groups``. + + Args: + name: Note: family filter removed as address groups can now contain mixed IPv4/IPv6 + """ return await self._client._call( "GET", - f"/v1/provider/plans/{_path(plan_id)}/live-validation", - m.GetPlanLiveValidationResponse, - query=_query(extra_query, ("nodeId", node_id)), + "/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_eligible_nodes_for_plan( + async def list_firewall_address_groups_all( self, - plan_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.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, - ) + ) -> AsyncIterator[m.FirewallAddressGroup]: + """ + Every result of :meth:`list_firewall_address_groups`, reading page after page. - async def list_plan_live_validation_benchmarks( + ``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_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 + + async def list_firewall_rule_sets( self, - plan_id: str, *, - node_id: str | 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.ListPlanLiveValidationBenchmarksResponse: - """Call ``GET /v1/provider/plans/{planId}/live-validation/benchmarks``.""" + ) -> 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 + """ 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)), + "/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, ) - async def list_plan_live_validation_benchmarks_all( + async def list_firewall_rule_sets_all( self, - plan_id: str, *, - node_id: str | 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, - ) -> AsyncIterator[m.PlanLiveValidationBenchmarkView]: + ) -> AsyncIterator[m.FirewallRuleSet]: """ - Every result of :meth:`list_plan_live_validation_benchmarks`, 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). """ @@ -21181,55 +21036,60 @@ async def list_plan_live_validation_benchmarks_all( 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, + res = await self.list_firewall_rule_sets( page=page, page_size=size, - node_id=node_id, + name=name, + filter_attachment=filter_attachment, extra_query=extra_query, timeout=timeout, ) - items = res.benchmarks + items = res.rulesets 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_plan_live_validations( + async def list_firewall_rules( self, + ruleset_id: str, *, - plan_id: str | None = None, - search: str | 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.ListPlanLiveValidationsResponse: - """Call ``GET /v1/provider/live-validations``.""" + ) -> 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 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)), + 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 list_plan_live_validations_all( + async def list_firewall_rules_all( self, + ruleset_id: str, *, - plan_id: str | None = None, - search: str | 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, - ) -> AsyncIterator[m.PlanLiveValidationView]: + ) -> AsyncIterator[m.FirewallRuleResource]: """ - Every result of :meth:`list_plan_live_validations`, 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). """ @@ -21237,15 +21097,15 @@ async def list_plan_live_validations_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_plan_live_validations( + res = await self.list_firewall_rules( + ruleset_id, page=page, page_size=size, - plan_id=plan_id, - search=search, + direction=direction, extra_query=extra_query, timeout=timeout, ) - items = res.validations + items = res.rules for item in items: yield item seen += len(items) @@ -21253,993 +21113,3968 @@ async def list_plan_live_validations_all( return page += 1 - async def start_plan_live_validation( + async def move_firewall_rule( self, - plan_id: str, + id: str, *, - include_benchmarking: bool | None = None, - node_id: 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.StartPlanLiveValidationResponse: - """Call ``POST /v1/provider/plans/{planId}/live-validation``.""" + ) -> 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( "POST", - f"/v1/provider/plans/{_path(plan_id)}/live-validation", - m.StartPlanLiveValidationResponse, + f"/v1/firewall/rules/{_path(id)}/move", + m.FirewallRuleResource, query=_query(extra_query), body=_body( - m.StartPlanLiveValidationBody, - extra_body, - False, - ("include_benchmarking", include_benchmarking), - ("node_id", node_id), + m.MoveFirewallRuleBody, extra_body, False, ("position", position), ("target_rule_id", target_rule_id) ), idempotent=False, timeout=timeout, ) - -class AsyncManualPayoutService(_ServiceAsync): - """The NodeRings ManualPayoutService API.""" - - async def create_manual_payout( + async def update_firewall_address_group( self, + id: str, *, - 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, + 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.CreateManualPayoutResponse: + ) -> m.FirewallAddressGroup: """ - Call ``POST /v1/provider/manual-payout``. + Call ``PATCH /v1/firewall/address-groups/{id}``. 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) + 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", - "/v1/provider/manual-payout", - m.CreateManualPayoutResponse, + "PATCH", + f"/v1/firewall/address-groups/{_path(id)}", + m.FirewallAddressGroup, 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), - ), + body=_body(m.UpdateFirewallAddressGroupBody, extra_body, False, ("group", group)), idempotent=False, timeout=timeout, ) - async def delete_manual_payout( + async def update_firewall_rule( self, + 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.SuccessResponse: - """Call ``DELETE /v1/provider/manual-payout``.""" + ) -> 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). + """ return await self._client._call( - "DELETE", - "/v1/provider/manual-payout", - m.SuccessResponse, + "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, ) - async def get_manual_payout( + async 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.GetManualPayoutResponse: - """Call ``GET /v1/provider/manual-payout``.""" + ) -> m.FirewallRuleSet: + """Call ``PATCH /v1/firewall/rulesets/{id}``.""" return await self._client._call( - "GET", - "/v1/provider/manual-payout", - m.GetManualPayoutResponse, + "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 AsyncMarketplaceService(_ServiceAsync): - """The NodeRings MarketplaceService API.""" +class AsyncGameServerService(_ServiceAsync): + """The NodeRings GameServerService API.""" - async def get_marketplace_plan( + async def archive_files( self, - plan_id: str, + 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.GetMarketplacePlanResponse: - """Call ``GET /v1/marketplace/plans/{planId}``.""" + ) -> m.ArchiveFilesResponse: + """Call ``POST /v1/game-servers/{id}/files:archive``.""" return await self._client._call( - "GET", - f"/v1/marketplace/plans/{_path(plan_id)}", - m.GetMarketplacePlanResponse, + "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 get_provider( + async def change_game_server_game( self, - provider_id: str, + 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.GetProviderResponse: - """Call ``GET /v1/marketplace/providers/{providerId}``.""" + ) -> m.GameServer: + """Call ``POST /v1/game-servers/{id}:changeGame``.""" return await self._client._call( - "GET", - f"/v1/marketplace/providers/{_path(provider_id)}", - m.GetProviderResponse, + "POST", + f"/v1/game-servers/{_path(id)}:changeGame", + m.GameServer, query=_query(extra_query), - body=None, + body=_body( + m.ChangeGameServerGameBody, + extra_body, + False, + ("accept_eula", accept_eula), + ("environment", environment), + ("template_id", template_id), + ), idempotent=False, timeout=timeout, ) - async def get_public_storefront( + async def copy_file( self, - slug: str, + 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.GetPublicStorefrontResponse: - """Call ``GET /v1/public/storefronts/{slug}``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/files:copy``.""" return await self._client._call( - "GET", - f"/v1/public/storefronts/{_path(slug)}", - m.GetPublicStorefrontResponse, + "POST", + f"/v1/game-servers/{_path(id)}/files:copy", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.CopyFileBody, extra_body, False, ("location", location)), idempotent=False, timeout=timeout, ) - async def get_public_storefront_by_id( + async def create_allocation( self, - provider_id: str, + id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPublicStorefrontResponse: - """Call ``GET /v1/public/storefronts/by-id/{providerId}``.""" + ) -> m.GameServerAllocation: + """Call ``POST /v1/game-servers/{id}/allocations``.""" return await self._client._call( - "GET", - f"/v1/public/storefronts/by-id/{_path(provider_id)}", - m.GetPublicStorefrontResponse, + "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, ) - async def list_available_addons( + async def create_backup( self, + id: str, *, - 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, + name: str | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListAvailableAddonsResponse: - """ - Call ``GET /v1/marketplace/addons``. + ) -> 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, + ) - Args: - filter_billing_type: - BILLING_TYPE_PERCENTAGE: Percentage-based pricing (e.g., 30% of parent plan) - """ + async def create_database( + 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``.""" 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, + "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, ) - async def list_available_addons_all( + async def create_folder( self, + id: str, *, - 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, + 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, - ) -> AsyncIterator[m.Addon]: - """ - Every result of :meth:`list_available_addons`, reading page after page. + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/files:folder``.""" + return await self._client._call( + "POST", + f"/v1/game-servers/{_path(id)}/files:folder", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.CreateFolderBody, extra_body, False, ("name", name), ("root", root)), + 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_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( + async def create_game_server( 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, + 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.ListAvailablePlansResponse: + ) -> m.GameServer: """ - Call ``GET /v1/marketplace/plans``. + Call ``POST /v1/game-servers``. A retry of the same call cannot create a second resource: + the SDK sends an idempotency key. 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) + 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( - "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/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), ), - body=None, - idempotent=False, + idempotent=True, timeout=timeout, ) - async def list_available_regions( + async def create_schedule( self, + id: str, *, - filter_asset_type: m.AssetType | 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.ListAvailableRegionsResponse: + ) -> m.GameServerSchedule: """ - Call ``GET /v1/marketplace/regions``. + Call ``POST /v1/game-servers/{id}/schedules``. 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). + is_active: Omitted means the schedule is created enabled. """ return await self._client._call( - "GET", - "/v1/marketplace/regions", - m.ListAvailableRegionsResponse, - query=_query(extra_query, ("filterAssetType", filter_asset_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 list_marketplace_provider_directory( + async def create_schedule_task( self, + id: str, + schedule_id: str, *, - page: int | None = None, - page_size: int | None = None, - search: str | None = None, - filter_asset_type: m.AssetType | 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.ListMarketplaceProviderDirectoryResponse: - """Call ``GET /v1/marketplace/provider-directory``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}/tasks``.""" 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), + "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), ), - body=None, idempotent=False, timeout=timeout, ) - async def list_marketplace_provider_directory_all( + async def delete_allocation( self, + id: str, + allocation_id: str, *, - 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 + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}/allocations/{allocationId}``.""" + return await self._client._call( + "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_providers( + async def delete_backup( self, + id: str, + backup_uuid: 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, + truncate: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListProvidersResponse: + ) -> m.SuccessResponse: """ - Call ``GET /v1/marketplace/providers``. + Call ``DELETE /v1/game-servers/{id}/backups/{backupUuid}``. 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. + truncate: Restore only. When true, the panel deletes every file before extracting the backup. """ 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), - ), + "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_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( + async def delete_database( self, + id: str, + database_id: str, *, - 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``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}/databases/{databaseId}``.""" 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), - ), + "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_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( + async def delete_files( self, + id: str, *, - 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, + 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.SearchMarketplaceResponse: - """ - Call ``POST /v1/marketplace/search``. - - Args: - turnstile_token: Cloudflare Turnstile token (required for anonymous callers when auth.turnstile.requireOnAnonymousMarketplaceSearch). - """ + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/files:delete``.""" return await self._client._call( "POST", - "/v1/marketplace/search", - m.SearchMarketplaceResponse, + f"/v1/game-servers/{_path(id)}/files:delete", + m.SuccessResponse, 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), - ), + body=_body(m.DeleteFilesBody, extra_body, False, ("files", files), ("root", root)), idempotent=False, timeout=timeout, ) - -class AsyncMetadataService(_ServiceAsync): - """The NodeRings MetadataService API.""" - - async def get_platform_versions( + async def delete_game_server( self, + id: str, *, 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``. - """ + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}``.""" return await self._client._call( - "GET", - "/v1/platform-versions", - m.PlatformVersions, + "DELETE", + f"/v1/game-servers/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_version( + async def delete_schedule( self, + id: str, + schedule_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.Metadata: - """Call ``GET /v1/version``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}/schedules/{scheduleId}``.""" return await self._client._call( - "GET", - "/v1/version", - m.Metadata, + "DELETE", + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def health_check( + async def delete_schedule_task( self, + id: str, + schedule_id: str, + task_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.HealthCheckResponse: - """Call ``GET /v1/healthz``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/game-servers/{id}/schedules/{scheduleId}/tasks/{taskId}``.""" return await self._client._call( - "GET", - "/v1/healthz", - m.HealthCheckResponse, + "DELETE", + f"/v1/game-servers/{_path(id)}/schedules/{_path(schedule_id)}/tasks/{_path(task_id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_distros( + async def download_file( self, + id: str, *, + path: str | None = None, 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``. - """ + ) -> m.DownloadFileResponse: + """Call ``GET /v1/game-servers/{id}/files/download``.""" return await self._client._call( "GET", - "/v1/distros", - m.ListDistrosResponse, - query=_query(extra_query), + f"/v1/game-servers/{_path(id)}/files/download", + m.DownloadFileResponse, + query=_query(extra_query, ("path", path)), body=None, idempotent=False, timeout=timeout, ) - -class AsyncMetricService(_ServiceAsync): - """The NodeRings MetricService API.""" - - async def get_metric( + async def execute_schedule( self, id: str, + schedule_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.GetMetricResponse: - """ - Get a specific metric by ID or code - - It calls ``GET /v1/metrics/{id}``. - - Args: - code: Alternative to id - """ + ) -> m.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/schedules/{scheduleId}:execute``.""" return await self._client._call( - "GET", - f"/v1/metrics/{_path(id)}", - m.GetMetricResponse, - query=_query(extra_query, ("code", code)), - body=None, + "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, ) - async def list_metrics( + async def get_game_server( 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.GameServer: + """Call ``GET /v1/game-servers/{id}``.""" return await self._client._call( "GET", - "/v1/metrics", - m.ListMetricsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("billableOnly", billable_only)), + f"/v1/game-servers/{_path(id)}", + m.GameServer, + query=_query(extra_query), 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( + async def get_game_server_resources( 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: - """ - 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. - """ + ) -> m.GameServerResources: + """Call ``GET /v1/game-servers/{id}/resources``.""" return await self._client._call( - "POST", - "/v1/metrics-write-credentials", - m.CreateMetricsWriteCredentialResponse, + "GET", + f"/v1/game-servers/{_path(id)}/resources", + m.GameServerResources, 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, ) - async def list_metrics_write_credentials( + async def get_startup( self, + id: str, *, - 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. - """ + ) -> m.GetStartupResponse: + """Call ``GET /v1/game-servers/{id}/startup``.""" 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), - ), + f"/v1/game-servers/{_path(id)}/startup", + m.GetStartupResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_metrics_write_credentials_all( + async def list_allocations( self, + id: str, *, - 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 + ) -> m.ListGameServerAllocationsResponse: + """Call ``GET /v1/game-servers/{id}/allocations``.""" + return await self._client._call( + "GET", + f"/v1/game-servers/{_path(id)}/allocations", + m.ListGameServerAllocationsResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - async def revoke_metrics_write_credential( + async def list_backups( 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``.""" + ) -> m.ListGameServerBackupsResponse: + """Call ``GET /v1/game-servers/{id}/backups``.""" return await self._client._call( - "POST", - f"/v1/metrics-write-credentials/{_path(id)}:revoke", - m.SuccessResponse, + "GET", + f"/v1/game-servers/{_path(id)}/backups", + m.ListGameServerBackupsResponse, query=_query(extra_query), - body=_body(m.RevokeMetricsWriteCredentialBody, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - async def rotate_metrics_write_credential( + async def list_databases( 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``.""" + ) -> m.ListDatabasesResponse: + """Call ``GET /v1/game-servers/{id}/databases``.""" return await self._client._call( - "POST", - f"/v1/metrics-write-credentials/{_path(id)}:rotate", - m.CreateMetricsWriteCredentialResponse, + "GET", + f"/v1/game-servers/{_path(id)}/databases", + m.ListDatabasesResponse, query=_query(extra_query), - body=_body(m.RotateMetricsWriteCredentialBody, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncMonitoringService(_ServiceAsync): - """The NodeRings MonitoringService API.""" - - async def create_monitoring_launch( + async def list_files( self, + id: str, *, - next: str | None = None, - resource_id: str | 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.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. - """ + ) -> m.ListFilesResponse: + """Call ``GET /v1/game-servers/{id}/files``.""" 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) - ), + "GET", + f"/v1/game-servers/{_path(id)}/files", + m.ListFilesResponse, + query=_query(extra_query, ("directory", directory)), + body=None, idempotent=False, timeout=timeout, ) - async def rotate_monitoring_datasource_token( + async def list_game_servers( self, *, - 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: - """ - RotateMonitoringDatasourceToken replaces the organization's Grafana datasource token. - - It calls ``POST /v1/monitoring/datasource-token:rotate``. - """ + ) -> m.ListGameServersResponse: + """Call ``GET /v1/game-servers``.""" return await self._client._call( - "POST", - "/v1/monitoring/datasource-token:rotate", - m.SuccessResponse, - query=_query(extra_query), - body=_body(m.RotateMonitoringDatasourceTokenRequest, extra_body, False), + "GET", + "/v1/game-servers", + m.ListGameServersResponse, + query=_query(extra_query, ("pageSize", page_size)), + body=None, idempotent=False, timeout=timeout, ) - -class AsyncNodePlacementService(_ServiceAsync): - """The NodeRings NodePlacementService API.""" - - async def get_node_placement_policy( + async def list_order_games( self, *, + plan_id: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetNodePlacementPolicyResponse: - """Call ``GET /v1/node-placement-policy``.""" + ) -> m.ListOrderGamesResponse: + """Call ``GET /v1/game-servers:order-games``.""" return await self._client._call( "GET", - "/v1/node-placement-policy", - m.GetNodePlacementPolicyResponse, - query=_query(extra_query), + "/v1/game-servers:order-games", + m.ListOrderGamesResponse, + query=_query(extra_query, ("planId", plan_id)), body=None, idempotent=False, timeout=timeout, ) - async def update_node_placement_policy( + async def list_schedules( + self, + id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.ListSchedulesResponse: + """Call ``GET /v1/game-servers/{id}/schedules``.""" + return await self._client._call( + "GET", + f"/v1/game-servers/{_path(id)}/schedules", + m.ListSchedulesResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + async 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 ``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/game-servers/{_path(id)}/backups/{_path(backup_uuid)}:lock", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.LockBackupBody, extra_body, False, ("truncate", truncate)), + idempotent=False, + timeout=timeout, + ) + + async def open_console( + 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``.""" + return await self._client._call( + "POST", + f"/v1/game-servers/{_path(id)}:console", + m.OpenConsoleResponse, + query=_query(extra_query), + body=_body(m.OpenConsoleBody, extra_body, False), + idempotent=False, + timeout=timeout, + ) + + async def power_game_server( + 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``.""" + return await self._client._call( + "POST", + f"/v1/game-servers/{_path(id)}:power", + m.GameServer, + query=_query(extra_query), + body=_body(m.PowerGameServerBody, extra_body, False, ("signal", signal)), + idempotent=False, + timeout=timeout, + ) + + async def read_file( + self, + 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``.""" + return await self._client._call( + "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 reinstall_game_server( + self, + 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``.""" + return await self._client._call( + "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 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.SuccessResponse: + """Call ``POST /v1/game-servers/{id}/files:rename``.""" + return await self._client._call( + "POST", + f"/v1/game-servers/{_path(id)}/files:rename", + m.SuccessResponse, + query=_query(extra_query), + body=_body(m.RenameFileBody, extra_body, False, ("dest", dest), ("root", root), ("source", source)), + idempotent=False, + timeout=timeout, + ) + + async def rename_game_server( + 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.GameServer: + """Call ``POST /v1/game-servers/{id}:rename``.""" + return await self._client._call( + "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 restore_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 ``POST /v1/game-servers/{id}/backups/{backupUuid}:restore``. + + Args: + truncate: Restore only. When true, the panel deletes every file before extracting the backup. + """ + 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)), + idempotent=False, + timeout=timeout, + ) + + async 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.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, + ) + + async 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.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, @@ -22247,216 +25082,1069 @@ async def update_node_placement_policy( 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.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), + ), + idempotent=False, + timeout=timeout, + ) + + async def validate_node_topology( + self, + *, + 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.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( + "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, + ) + + +class AsyncOAuth2Service(_ServiceAsync): + """The NodeRings OAuth2Service API.""" + + async def authorize( + 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, + 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 + """ + return await 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, + ) + + async 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 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 delete_client( + self, + client_id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """ + DeleteClient deletes an OAuth2 client + + It calls ``DELETE /v1/oauth2/clients/{clientId}``. + """ + return await self._client._call( + "DELETE", + f"/v1/oauth2/clients/{_path(client_id)}", + m.SuccessResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + async 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.ListOAuth2ClientsResponse: + """ + ListClients lists OAuth2 clients for the organization + + It calls ``GET /v1/oauth2/clients``. + """ + return await self._client._call( + "GET", + "/v1/oauth2/clients", + m.ListOAuth2ClientsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def list_clients_all( + self, + *, + page: int | None = None, + page_size: int | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> AsyncIterator[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 = 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) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + return + page += 1 + + async 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 await 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, + ) + + async def revoke_token( + 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" + """ + return await self._client._call( + "POST", + "/v1/oauth2/revoke", + m.SuccessResponse, + query=_query(extra_query), + 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 token( + 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 + """ + 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/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 await 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, + ) + + async def delete_organization( + self, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``DELETE /v1/organizations``.""" + return await self._client._call( + "DELETE", + "/v1/organizations", + m.SuccessResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def get_organization( + self, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetOrganizationResponse: + """Call ``GET /v1/organization``.""" + return await self._client._call( + "GET", + "/v1/organization", + m.GetOrganizationResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def list_organizations( + 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``.""" + return await self._client._call( + "GET", + "/v1/organizations", + m.ListOrganizationsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), + body=None, + idempotent=False, + timeout=timeout, + ) + + async def list_organizations_all( + self, + *, + page: int | None = None, + page_size: int | None = None, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> AsyncIterator[m.Organization]: + """ + 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). + """ + page = page or 0 + size = page_size if page_size and page_size > 0 else 100 + seen = 0 + while True: + res = await 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) + if len(items) < size or (res.total_count > 0 and seen >= res.total_count): + 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( - "PUT", - "/v1/node-placement-policy", - m.UpdateNodePlacementPolicyResponse, + "PATCH", + "/v1/organizations", + m.UpdateOrganizationResponse, query=_query(extra_query), body=_body( - m.UpdateNodePlacementPolicyRequest, + m.UpdateOrganizationRequest, extra_body, False, - ("default_strategy", default_strategy), - ("region_overrides", region_overrides), + ("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 AsyncNodeService(_ServiceAsync): - """The NodeRings NodeService API.""" +class AsyncPaymentMethodService(_ServiceAsync): + """The NodeRings PaymentMethodService API.""" - async def create_node( + async def attach_payment_method( 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, + create_setup_intent: bool | 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, + 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.SuccessResponse: + ) -> m.AttachPaymentMethodResponse: """ - Call ``POST /v1/node``. + 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: - 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. + 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( "POST", - "/v1/node", - m.SuccessResponse, + "/v1/payment-methods", + m.AttachPaymentMethodResponse, query=_query(extra_query), body=_body( - m.CreateNodeRequest, + m.AttachPaymentMethodRequest, 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), + ("create_setup_intent", create_setup_intent), ("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), + ("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, + ) + + async def list_payment_methods( + self, + *, + 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.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/payment-methods", + m.ListPaymentMethodsResponse, + query=_query( + extra_query, + ("subscriptionId", subscription_id), + ("onlyDefault", only_default), + ("page", page), + ("pageSize", page_size), ), + body=None, 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}``.""" + async def list_payment_methods_all( + self, + *, + 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.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 = await 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 + + 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/node/{_path(id)}", - m.SuccessResponse, + f"/v1/payment-methods/{_path(payment_method_id)}", + m.RemovePaymentMethodResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_node( + async def set_default_payment_method( self, - id: str, + payment_method_id: str, *, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetNodeResponse: - """Call ``GET /v1/node/{id}``.""" + ) -> 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``. + """ return await self._client._call( - "GET", - f"/v1/node/{_path(id)}", - m.GetNodeResponse, + "POST", + f"/v1/payment-methods/{_path(payment_method_id)}:set-default", + m.SetDefaultPaymentMethodResponse, query=_query(extra_query), - body=None, + body=_body(m.SetDefaultPaymentMethodBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def get_node_cpu_map( + +class AsyncPaymentService(_ServiceAsync): + """The NodeRings PaymentService API.""" + + async def get_payment( self, - id: str, + payment_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetNodeCPUMapResponse: + ) -> m.GetPaymentResponse: """ - Dedicated CPU cores: full topology + per-CPU occupancy for the node topology board - (docs/README-DEDICATED-CPU-CORES.md §6.3/§8.3). + GetPayment retrieves a single payment with refunds - It calls ``GET /v1/node/{id}/cpu-map``. + It calls ``GET /v1/payments/{paymentId}``. """ return await self._client._call( "GET", - f"/v1/node/{_path(id)}/cpu-map", - m.GetNodeCPUMapResponse, + f"/v1/payments/{_path(payment_id)}", + m.GetPaymentResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_nodes( + async def list_payments( self, *, + invoice_id: str | None = None, + status: m.PaymentStatus | str | 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.ListNodesResponse: + ) -> m.ListPaymentsResponse: """ - Call ``GET /v1/nodes``. + ListPayments lists payments for an invoice or organization - Args: - platform_id: Optional filter; UUID format validated in ListNodes when set. + It calls ``GET /v1/payments``. """ return await self._client._call( "GET", - "/v1/nodes", - m.ListNodesResponse, + "/v1/payments", + m.ListPaymentsResponse, query=_query( - extra_query, - ("page", page), - ("pageSize", page_size), - ("platformId", platform_id), - ("serviceStatus", service_status), - ("expand", expand), - ("search", search), - ("regionId", region_id), + extra_query, ("invoiceId", invoice_id), ("status", status), ("page", page), ("pageSize", page_size) ), body=None, idempotent=False, timeout=timeout, ) - async def list_nodes_all( + 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, - 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]: + ) -> AsyncIterator[m.Payment]: """ - Every result of :meth:`list_nodes`, 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). """ @@ -22464,18 +26152,15 @@ async def list_nodes_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_nodes( + res = await self.list_payments( page=page, page_size=size, - platform_id=platform_id, - service_status=service_status, - expand=expand, - search=search, - region_id=region_id, + invoice_id=invoice_id, + status=status, extra_query=extra_query, timeout=timeout, ) - items = res.nodes + items = res.payments for item in items: yield item seen += len(items) @@ -22483,250 +26168,158 @@ async def list_nodes_all( return page += 1 - async def update_node( + +class AsyncPayoutConfigurationService(_ServiceAsync): + """The NodeRings PayoutConfigurationService API.""" + + async def get_payout_configuration( 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. - """ + ) -> m.GetPayoutConfigurationResponse: + """Call ``GET /v1/provider/payout-configuration``.""" return await self._client._call( - "PATCH", - f"/v1/node/{_path(id)}", - m.UpdateNodeResponse, + "GET", + "/v1/provider/payout-configuration", + m.GetPayoutConfigurationResponse, 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), - ), + body=None, idempotent=False, timeout=timeout, ) - async def validate_node_topology( + async def update_payout_configuration( self, *, - node_id: str | None = None, - topology_paste: 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.ValidateNodeTopologyResponse: + ) -> m.GetPayoutConfigurationResponse: """ - Dedicated CPU cores: parse-preview of a topology paste without persisting. - - It calls ``POST /v1/node/topology/validate``. + Call ``PUT /v1/provider/payout-configuration``. 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. + 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", - "/v1/node/topology/validate", - m.ValidateNodeTopologyResponse, + "PUT", + "/v1/provider/payout-configuration", + m.GetPayoutConfigurationResponse, query=_query(extra_query), body=_body( - m.ValidateNodeTopologyRequest, - extra_body, - False, - ("node_id", node_id), - ("topology_paste", topology_paste), - ), - idempotent=False, - timeout=timeout, - ) - - -class AsyncOAuth2Service(_ServiceAsync): - """The NodeRings OAuth2Service API.""" - - async def authorize( - 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, - 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 - """ - return await 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), + m.UpdatePayoutConfigurationRequest, + extra_body, + False, + ("enabled", enabled), + ("schedule_time", schedule_time), + ("schedule_timezone", schedule_timezone), + ("schedule_type", schedule_type), ), - body=None, idempotent=False, timeout=timeout, ) - async def create_client( + +class AsyncPayoutInvoiceService(_ServiceAsync): + """The NodeRings PayoutInvoiceService API.""" + + async def get_payout_invoice( self, + id: str, *, - 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``. - """ + ) -> m.GetPayoutInvoiceResponse: + """Call ``GET /v1/provider/payout-invoices/{id}``.""" return await self._client._call( - "POST", - "/v1/oauth2/clients", - m.CreateOAuth2ClientResponse, + "GET", + f"/v1/provider/payout-invoices/{_path(id)}", + m.GetPayoutInvoiceResponse, 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=None, idempotent=False, timeout=timeout, ) - async def delete_client( + async def get_provider_revenue( self, - client_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.SuccessResponse: + ) -> m.GetProviderRevenueResponse: """ - DeleteClient deletes an OAuth2 client + Call ``GET /v1/provider/revenue``. - It calls ``DELETE /v1/oauth2/clients/{clientId}``. + 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( - "DELETE", - f"/v1/oauth2/clients/{_path(client_id)}", - m.SuccessResponse, - query=_query(extra_query), + "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), + ), body=None, idempotent=False, timeout=timeout, ) - async def list_clients( + 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.ListOAuth2ClientsResponse: + ) -> m.ListHeldPayoutsResponse: """ - ListClients lists OAuth2 clients for the organization + Paid client invoices whose payout to this provider is on hold, soonest release first. - It calls ``GET /v1/oauth2/clients``. + It calls ``GET /v1/provider/held-payouts``. """ return await self._client._call( "GET", - "/v1/oauth2/clients", - m.ListOAuth2ClientsResponse, + "/v1/provider/held-payouts", + m.ListHeldPayoutsResponse, query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - async def list_clients_all( + async 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, - ) -> AsyncIterator[m.OAuth2Client]: + ) -> AsyncIterator[m.HeldPayout]: """ - Every result of :meth:`list_clients`, 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). """ @@ -22734,8 +26327,13 @@ 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_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) @@ -22743,235 +26341,253 @@ async def list_clients_all( return page += 1 - async 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 await 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, - ) - - async def revoke_token( + async def list_payout_invoices( self, *, - client_id: str | None = None, - token: str | None = None, - token_type_hint: 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: + ) -> m.ListPayoutInvoicesResponse: """ - RevokeToken revokes an access or refresh token - - It calls ``POST /v1/oauth2/revoke``. + Call ``GET /v1/provider/payout-invoices``. Args: - token_type_hint: "access_token" or "refresh_token" + status: Filter by payout status """ return await self._client._call( - "POST", - "/v1/oauth2/revoke", - m.SuccessResponse, - query=_query(extra_query), - body=_body( - m.RevokeTokenRequest, - extra_body, - False, - ("client_id", client_id), - ("token", token), - ("token_type_hint", token_type_hint), - ), + "GET", + "/v1/provider/payout-invoices", + m.ListPayoutInvoicesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("status", status)), + body=None, idempotent=False, timeout=timeout, ) - async def token( + async def list_payout_invoices_all( 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, + 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.TokenResponse: + ) -> AsyncIterator[m.PayoutInvoice]: """ - Token exchanges authorization code for access token - - It calls ``POST /v1/oauth2/token``. + Every result of :meth:`list_payout_invoices`, reading page after page. - 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 + ``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/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, - ) - + 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 -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, +class AsyncPermissionService(_ServiceAsync): + """The NodeRings PermissionService API.""" + + async 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/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). - """ + """Call ``POST /v1/permissions/assign-to-role``.""" return await self._client._call( "POST", - "/v1/organizations", + "/v1/permissions/assign-to-role", m.SuccessResponse, query=_query(extra_query), body=_body( - m.CreateOrganizationRequest, + m.AssignPermissionToRoleRequest, 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), + ("permission_ids", permission_ids), + ("role_id", role_id), ), idempotent=False, timeout=timeout, ) - async def delete_organization( + async def list_effective_permissions( self, *, + user_ids: list[str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/organizations``.""" + ) -> m.ListEffectivePermissionsResponse: + """Call ``GET /v1/permissions/effective``.""" return await self._client._call( - "DELETE", - "/v1/organizations", - m.SuccessResponse, - query=_query(extra_query), + "GET", + "/v1/permissions/effective", + m.ListEffectivePermissionsResponse, + query=_query(extra_query, ("userIds", user_ids)), body=None, idempotent=False, timeout=timeout, ) - async def get_organization( + async def list_permissions( self, *, + 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.GetOrganizationResponse: - """Call ``GET /v1/organization``.""" + ) -> m.ListPermissionsResponse: + """Call ``GET /v1/permissions``.""" return await self._client._call( "GET", - "/v1/organization", - m.GetOrganizationResponse, - query=_query(extra_query), + "/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_organizations( + async def list_permissions_all( + self, + *, + 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, + ) -> AsyncIterator[m.Permission]: + """ + 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). + """ + 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 + + 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, + 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.ListOrganizationsResponse: - """Call ``GET /v1/organizations``.""" + ) -> m.ListPlansResponse: + """ + Call ``GET /v1/plans``. + + 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 await self._client._call( "GET", - "/v1/organizations", - m.ListOrganizationsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "/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), + ), body=None, idempotent=False, timeout=timeout, ) - async def list_organizations_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, + 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.Organization]: + ) -> AsyncIterator[m.Plan]: """ - Every result of :meth:`list_organizations`, 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). """ @@ -22979,13 +26595,20 @@ 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_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.organizations + items = res.plans for item in items: yield item seen += len(items) @@ -22993,184 +26616,173 @@ async def list_organizations_all( return page += 1 - async def update_organization( + async def subscribe( self, + plan_id: str, *, - 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, + 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``. + + 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/plans/{_path(plan_id)}:subscribe", + m.SubscribeResponse, + query=_query(extra_query, ("billingPeriod", billing_period)), + body=None, + idempotent=False, + timeout=timeout, + ) + + +class AsyncPlatformService(_ServiceAsync): + """The NodeRings PlatformService API.""" + + async 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.SuccessResponse: + """Call ``POST /v1/platforms/{platformId}:AssignAgent``.""" + return await self._client._call( + "POST", + 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 create_platform( + 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, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.UpdateOrganizationResponse: + ) -> m.SuccessResponse: """ - Call ``PATCH /v1/organizations``. + Call ``POST /v1/platform``. 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). + 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( - "PATCH", - "/v1/organizations", - m.UpdateOrganizationResponse, + "POST", + "/v1/platform", + m.SuccessResponse, query=_query(extra_query), body=_body( - m.UpdateOrganizationRequest, + m.CreatePlatformRequest, 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), + ("agent_id", agent_id), + ("assign_customer_ipv6", assign_customer_ipv6), + ("driver", driver), + ("endpoint_url", endpoint_url), ("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), + ("panel_url", panel_url), + ("pterodactyl", pterodactyl), ), idempotent=False, timeout=timeout, ) - -class AsyncPaymentMethodService(_ServiceAsync): - """The NodeRings PaymentMethodService API.""" - - async def attach_payment_method( + async def delete_platform( self, + id: str, *, - 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.AttachPaymentMethodResponse: - """ - 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``. + ) -> m.SuccessResponse: + """Call ``DELETE /v1/platform/{id}``.""" + return await self._client._call( + "DELETE", + f"/v1/platform/{_path(id)}", + m.SuccessResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - 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 - """ + async def get_platform( + self, + id: str, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetPlatformResponse: + """Call ``GET /v1/platform/{id}``.""" return await self._client._call( - "POST", - "/v1/payment-methods", - m.AttachPaymentMethodResponse, + "GET", + f"/v1/platform/{_path(id)}", + m.GetPlatformResponse, query=_query(extra_query), - body=_body( - m.AttachPaymentMethodRequest, - 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), - ), + body=None, idempotent=False, timeout=timeout, ) - async def list_payment_methods( + async def list_platforms( self, *, - subscription_id: str | None = None, - only_default: bool | 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.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.ListPlatformsResponse: + """Call ``GET /v1/platforms``.""" return await self._client._call( "GET", - "/v1/payment-methods", - m.ListPaymentMethodsResponse, + "/v1/platforms", + m.ListPlatformsResponse, query=_query( extra_query, - ("subscriptionId", subscription_id), - ("onlyDefault", only_default), ("page", page), ("pageSize", page_size), + ("serviceStatus", service_status), + ("search", search), ), body=None, idempotent=False, timeout=timeout, ) - async def list_payment_methods_all( + async def list_platforms_all( self, *, - subscription_id: str | None = None, - only_default: bool | 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.PaymentMethod]: + ) -> AsyncIterator[m.Platform]: """ - Every result of :meth:`list_payment_methods`, 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). """ @@ -23178,15 +26790,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_platforms( page=page, page_size=size, - subscription_id=subscription_id, - only_default=only_default, + service_status=service_status, + search=search, extra_query=extra_query, timeout=timeout, ) - items = res.payment_methods + items = res.platforms for item in items: yield item seen += len(items) @@ -23194,122 +26806,107 @@ async def list_payment_methods_all( return page += 1 - async def remove_payment_method( + async def unassign_agent( self, - payment_method_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.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 ``POST /v1/platforms/{platformId}:UnassignAgent``.""" return await self._client._call( - "DELETE", - f"/v1/payment-methods/{_path(payment_method_id)}", - m.RemovePaymentMethodResponse, + "POST", + f"/v1/platforms/{_path(platform_id)}:UnassignAgent", + m.SuccessResponse, query=_query(extra_query), - body=None, + body=_body(m.UnassignAgentBody, extra_body, False, ("agent_id", agent_id)), idempotent=False, timeout=timeout, ) - async def set_default_payment_method( + async def update_platform( self, - payment_method_id: str, + id: str, *, + 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.SetDefaultPaymentMethodResponse: + ) -> m.UpdatePlatformResponse: """ - Set a payment method as the default payment method Validates payment method belongs to - organization/subscription + Call ``PATCH /v1/platform/{id}``. - It calls ``POST /v1/payment-methods/{paymentMethodId}:set-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. """ return await self._client._call( - "POST", - f"/v1/payment-methods/{_path(payment_method_id)}:set-default", - m.SetDefaultPaymentMethodResponse, + "PATCH", + f"/v1/platform/{_path(id)}", + m.UpdatePlatformResponse, query=_query(extra_query), - body=_body(m.SetDefaultPaymentMethodBody, extra_body, False), + body=_body( + m.UpdatePlatformBody, + extra_body, + False, + ("assign_customer_ipv6", assign_customer_ipv6), + ("endpoint_url", endpoint_url), + ("name", name), + ), idempotent=False, timeout=timeout, ) -class AsyncPaymentService(_ServiceAsync): - """The NodeRings PaymentService API.""" - - async 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 await self._client._call( - "GET", - f"/v1/payments/{_path(payment_id)}", - m.GetPaymentResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) +class AsyncPreflightService(_ServiceAsync): + """The NodeRings PreflightService API.""" - async def list_payments( + async def list_preflight_checks( self, *, - invoice_id: str | None = None, - status: m.PaymentStatus | 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, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPaymentsResponse: - """ - ListPayments lists payments for an invoice or organization - - It calls ``GET /v1/payments``. - """ + ) -> m.ListPreflightChecksResponse: + """Call ``GET /v1/provider/preflight-checks``.""" return await self._client._call( "GET", - "/v1/payments", - m.ListPaymentsResponse, + "/v1/provider/preflight-checks", + m.ListPreflightChecksResponse, query=_query( - extra_query, ("invoiceId", invoice_id), ("status", status), ("page", page), ("pageSize", page_size) + extra_query, + ("planCode", plan_code), + ("planId", plan_id), + ("issuesOnly", issues_only), + ("page", page), + ("pageSize", page_size), ), body=None, idempotent=False, timeout=timeout, ) - async def list_payments_all( + async def list_preflight_checks_all( self, *, - invoice_id: str | None = None, - status: m.PaymentStatus | 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, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Payment]: + ) -> AsyncIterator[m.PlanPreflightView]: """ - Every result of :meth:`list_payments`, 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). """ @@ -23317,15 +26914,16 @@ async def list_payments_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_payments( + res = await self.list_preflight_checks( page=page, page_size=size, - invoice_id=invoice_id, - status=status, + plan_code=plan_code, + plan_id=plan_id, + issues_only=issues_only, extra_query=extra_query, timeout=timeout, ) - items = res.payments + items = res.plans for item in items: yield item seen += len(items) @@ -23334,425 +26932,487 @@ async def list_payments_all( page += 1 -class AsyncPayoutConfigurationService(_ServiceAsync): - """The NodeRings PayoutConfigurationService API.""" +class AsyncProviderConnectService(_ServiceAsync): + """The NodeRings ProviderConnectService API.""" - async def get_payout_configuration( + async def complete_connect_oauth( self, *, + 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.GetPayoutConfigurationResponse: - """Call ``GET /v1/provider/payout-configuration``.""" + ) -> 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/payout-configuration", - m.GetPayoutConfigurationResponse, + "POST", + "/v1/provider/connect/oauth:complete", + m.CompleteConnectOAuthResponse, query=_query(extra_query), - body=None, + body=_body(m.CompleteConnectOAuthRequest, extra_body, False, ("code", code), ("state", state)), idempotent=False, timeout=timeout, ) - async def update_payout_configuration( + async def create_connect_account( self, *, - enabled: bool | None = None, - schedule_time: str | None = None, - schedule_timezone: str | None = None, - schedule_type: m.PayoutScheduleType | 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.GetPayoutConfigurationResponse: + ) -> m.CreateConnectAccountResponse: """ - Call ``PUT /v1/provider/payout-configuration``. + Call ``POST /v1/provider/connect/account``. 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 + 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( - "PUT", - "/v1/provider/payout-configuration", - m.GetPayoutConfigurationResponse, + "POST", + "/v1/provider/connect/account", + m.CreateConnectAccountResponse, query=_query(extra_query), body=_body( - m.UpdatePayoutConfigurationRequest, + m.CreateConnectAccountRequest, extra_body, False, - ("enabled", enabled), - ("schedule_time", schedule_time), - ("schedule_timezone", schedule_timezone), - ("schedule_type", schedule_type), + ("country", country), + ("email", email), + ("metadata", metadata), + ("type", type), ), idempotent=False, timeout=timeout, ) - -class AsyncPayoutInvoiceService(_ServiceAsync): - """The NodeRings PayoutInvoiceService API.""" - - async def get_payout_invoice( + async def create_connect_tax_registration( self, - 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.GetPayoutInvoiceResponse: - """Call ``GET /v1/provider/payout-invoices/{id}``.""" + ) -> 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", - f"/v1/provider/payout-invoices/{_path(id)}", - m.GetPayoutInvoiceResponse, + "POST", + "/v1/provider/connect/tax-registrations", + m.CreateConnectTaxRegistrationResponse, query=_query(extra_query), - body=None, + body=_body( + m.CreateConnectTaxRegistrationRequest, + extra_body, + False, + ("country", country), + ("registration_type", registration_type), + ("state", state), + ), idempotent=False, timeout=timeout, ) - async def get_provider_revenue( + async def create_connect_tax_session( 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_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderRevenueResponse: + ) -> m.CreateConnectTaxSessionResponse: """ - Call ``GET /v1/provider/revenue``. + Creates a Stripe AccountSession client secret for Connect tax_settings / tax_registrations + embedded components (legacy; prefer native tax RPCs). - 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) + It calls ``POST /v1/provider/connect/tax-session``. """ 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), - ), + "POST", + "/v1/provider/connect/tax-session", + m.CreateConnectTaxSessionResponse, + query=_query(extra_query), + body=dict(extra_body or {}), + idempotent=False, + timeout=timeout, + ) + + async def disconnect_connect_account( + self, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.SuccessResponse: + """Call ``DELETE /v1/provider/connect/account``.""" + return await self._client._call( + "DELETE", + "/v1/provider/connect/account", + m.SuccessResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_held_payouts( + async def expire_connect_tax_registration( 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.ListHeldPayoutsResponse: - """ - Paid client invoices whose payout to this provider is on hold, soonest release first. + ) -> 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, + ) - It calls ``GET /v1/provider/held-payouts``. - """ + async def get_connect_account( + self, + *, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetConnectAccountResponse: + """Call ``GET /v1/provider/connect/account``.""" return await self._client._call( "GET", - "/v1/provider/held-payouts", - m.ListHeldPayoutsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size)), + "/v1/provider/connect/account", + m.GetConnectAccountResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_held_payouts_all( + async def get_connect_tax_settings( self, *, - page: int | None = None, - page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[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 = 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 + ) -> m.GetConnectTaxSettingsResponse: + """Call ``GET /v1/provider/connect/tax-settings``.""" + return await self._client._call( + "GET", + "/v1/provider/connect/tax-settings", + m.GetConnectTaxSettingsResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - async def list_payout_invoices( + async def list_connect_tax_registrations( 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: + ) -> m.ListConnectTaxRegistrationsResponse: + """Call ``GET /v1/provider/connect/tax-registrations``.""" + return await self._client._call( + "GET", + "/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: """ - Call ``GET /v1/provider/payout-invoices``. + Starts Stripe Connect OAuth so a provider can attach an existing Standard account. - Args: - status: Filter by payout status + It calls ``POST /v1/provider/connect/oauth:start``. """ return await self._client._call( - "GET", - "/v1/provider/payout-invoices", - m.ListPayoutInvoicesResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("status", status)), - body=None, + "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 list_payout_invoices_all( + async def update_connect_tax_settings( self, *, - page: int | None = None, - page_size: int | None = None, - status: m.PayoutStatus | str | 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, - ) -> AsyncIterator[m.PayoutInvoice]: + ) -> m.UpdateConnectTaxSettingsResponse: """ - Every result of :meth:`list_payout_invoices`, reading page after page. + Call ``PUT /v1/provider/connect/tax-settings``. - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + Args: + head_office: Structured address for Connect tax head office. """ - 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 + 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), + ), + idempotent=False, + timeout=timeout, + ) -class AsyncPermissionService(_ServiceAsync): - """The NodeRings PermissionService API.""" +class AsyncProviderCustomerService(_ServiceAsync): + """The NodeRings ProviderCustomerService API.""" - async def assign_permission_to_role( + async def block_provider_customer_purchases( self, + client_organization_id: str, *, - permission_ids: list[str] | None = None, - role_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/permissions/assign-to-role``.""" + """ + Call ``POST /v1/provider/customers/{clientOrganizationId}:block-purchases``. + + Args: + reason: Why a VM or purchase was seized/blocked. + """ return await self._client._call( "POST", - "/v1/permissions/assign-to-role", + f"/v1/provider/customers/{_path(client_organization_id)}:block-purchases", m.SuccessResponse, query=_query(extra_query), body=_body( - m.AssignPermissionToRoleRequest, - extra_body, - False, - ("permission_ids", permission_ids), - ("role_id", role_id), + m.BlockProviderCustomerPurchasesBody, extra_body, False, ("message", message), ("reason", reason) ), idempotent=False, timeout=timeout, ) - async def list_effective_permissions( + async def get_provider_customer( self, + client_organization_id: str, *, - user_ids: list[str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListEffectivePermissionsResponse: - """Call ``GET /v1/permissions/effective``.""" + ) -> m.GetProviderCustomerResponse: + """Call ``GET /v1/provider/customers/{clientOrganizationId}``.""" return await self._client._call( "GET", - "/v1/permissions/effective", - m.ListEffectivePermissionsResponse, - query=_query(extra_query, ("userIds", user_ids)), + f"/v1/provider/customers/{_path(client_organization_id)}", + m.GetProviderCustomerResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_permissions( + async def get_provider_customer_billing( self, + client_organization_id: str, *, - 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.GetProviderCustomerBillingResponse: + """Call ``GET /v1/provider/customers/{clientOrganizationId}/billing``.""" return await self._client._call( "GET", - "/v1/permissions", - m.ListPermissionsResponse, - query=_query(extra_query, ("page", page), ("pageSize", page_size), ("filterName", filter_name)), + f"/v1/provider/customers/{_path(client_organization_id)}/billing", + m.GetProviderCustomerBillingResponse, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_permissions_all( + async def get_provider_customer_stats( self, *, - 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, - ) -> AsyncIterator[m.Permission]: + ) -> m.GetProviderCustomerStatsResponse: """ - Every result of :meth:`list_permissions`, reading page after page. + Path must not be `/customers/stats`: some gateways match + `/customers/{client_organization_id}` first and treat "stats" as a UUID field (validation + error). - ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). + It calls ``GET /v1/provider/customer-stats``. """ - 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( + "GET", + "/v1/provider/customer-stats", + m.GetProviderCustomerStatsResponse, + query=_query(extra_query), + body=None, + idempotent=False, + timeout=timeout, + ) - async def remove_permission_from_role( + async def list_provider_customer_assets( self, + client_organization_id: str, *, - permission_ids: list[str] | None = None, - role_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.SuccessResponse: - """Call ``DELETE /v1/permissions/remove-from-role``.""" + ) -> 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( - "DELETE", - "/v1/permissions/remove-from-role", - m.SuccessResponse, - query=_query(extra_query, ("permissionIds", permission_ids), ("roleId", role_id)), + "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 list_provider_customer_assets_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, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> AsyncIterator[m.ProviderCustomerAssetRow]: + """ + Every result of :meth:`list_provider_customer_assets`, reading page after page. -class AsyncPlanService(_ServiceAsync): - """The NodeRings PlanService 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_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_plans( + async def list_provider_customers( 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, + activity_filter: m.ProviderCustomerActivityFilter | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListPlansResponse: + ) -> m.ListProviderCustomersResponse: """ - Call ``GET /v1/plans``. + Call ``GET /v1/provider/customers``. 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. + 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/plans", - m.ListPlansResponse, + "/v1/provider/customers", + m.ListProviderCustomersResponse, 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), + ("activityFilter", activity_filter), ), body=None, idempotent=False, timeout=timeout, ) - async def list_plans_all( + async def list_provider_customers_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, + activity_filter: m.ProviderCustomerActivityFilter | str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> AsyncIterator[m.Plan]: + ) -> AsyncIterator[m.ProviderCustomerRow]: """ - Every result of :meth:`list_plans`, reading page after page. + 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). """ @@ -23760,20 +27420,15 @@ 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( + res = await self.list_provider_customers( 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, + activity_filter=activity_filter, extra_query=extra_query, timeout=timeout, ) - items = res.plans + items = res.customers for item in items: yield item seen += len(items) @@ -23781,173 +27436,302 @@ async def list_plans_all( return page += 1 - async def subscribe( + async def restart_provider_customer_virtual_machine( self, - plan_id: str, + client_organization_id: str, + virtual_machine_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.VirtualMachine: """ - Call ``POST /v1/plans/{planId}:subscribe``. + 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, + ) - 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. + 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.VirtualMachine: + """ + Call ``POST + /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:start``. """ return await self._client._call( "POST", - f"/v1/plans/{_path(plan_id)}:subscribe", - m.SubscribeResponse, - query=_query(extra_query, ("billingPeriod", billing_period)), - body=None, + 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, + ) + + 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``. + """ + 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), 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``. -class AsyncPlatformService(_ServiceAsync): - """The NodeRings PlatformService API.""" + 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, + ) - async def assign_agent( + async def unblock_provider_customer_purchases( self, - platform_id: str, + client_organization_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 ``POST /v1/provider/customers/{clientOrganizationId}:unblock-purchases``.""" return await self._client._call( "POST", - f"/v1/platforms/{_path(platform_id)}:AssignAgent", + f"/v1/provider/customers/{_path(client_organization_id)}:unblock-purchases", m.SuccessResponse, query=_query(extra_query), - body=_body(m.AssignAgentBody, extra_body, False, ("agent_id", agent_id)), + body=_body(m.UnblockProviderCustomerPurchasesBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def create_platform( + async def unblock_provider_customer_virtual_machine( self, + client_organization_id: str, + virtual_machine_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: + ) -> m.VirtualMachine: + """ + Call ``POST + /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:unblock``. + """ + 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, + idempotent=False, + timeout=timeout, + ) + + async def get_dashboard_billing_sales( + 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, + extra_query: dict[str, Any] | None = None, + timeout: Timeout = NOT_GIVEN, + ) -> m.GetDashboardBillingSalesResponse: """ - Call ``POST /v1/platform``. + Call ``GET /v1/provider/dashboard/billing-sales``. 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. + 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/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), + "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 delete_platform( + async def get_dashboard_customer_acquisition_timeseries( self, - id: str, *, + range_days: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/platform/{id}``.""" + ) -> m.GetDashboardCustomerAcquisitionTimeseriesResponse: + """Call ``GET /v1/provider/dashboard/customer-acquisition-timeseries``.""" return await self._client._call( - "DELETE", - f"/v1/platform/{_path(id)}", - m.SuccessResponse, - query=_query(extra_query), + "GET", + "/v1/provider/dashboard/customer-acquisition-timeseries", + m.GetDashboardCustomerAcquisitionTimeseriesResponse, + query=_query(extra_query, ("rangeDays", range_days)), body=None, idempotent=False, timeout=timeout, ) - async def get_platform( + async def get_dashboard_summary( self, - id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetPlatformResponse: - """Call ``GET /v1/platform/{id}``.""" + ) -> m.GetDashboardSummaryResponse: + """Call ``GET /v1/provider/dashboard/summary``.""" return await self._client._call( "GET", - f"/v1/platform/{_path(id)}", - m.GetPlatformResponse, + "/v1/provider/dashboard/summary", + m.GetDashboardSummaryResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_platforms( + async def list_dashboard_addon_catalog_stats( 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.ListPlatformsResponse: - """Call ``GET /v1/platforms``.""" + ) -> m.ListDashboardAddonCatalogStatsResponse: + """Call ``GET /v1/provider/dashboard/addon-catalog-stats``.""" return await self._client._call( "GET", - "/v1/platforms", - m.ListPlatformsResponse, + "/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), - ("serviceStatus", service_status), - ("search", search), ), body=None, idempotent=False, timeout=timeout, ) - async def list_platforms_all( + async 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, - 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.ProviderDashboardAddonCatalogRow]: """ - Every result of :meth:`list_platforms`, 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). """ @@ -23955,123 +27739,155 @@ 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_dashboard_addon_catalog_stats( page=page, page_size=size, - service_status=service_status, - search=search, + 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.platforms + 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 - async def unassign_agent( + async def list_dashboard_infrastructure( self, - platform_id: str, *, - agent_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.SuccessResponse: - """Call ``POST /v1/platforms/{platformId}:UnassignAgent``.""" + ) -> m.ListDashboardInfrastructureResponse: + """Call ``GET /v1/provider/dashboard/infrastructure``.""" return await self._client._call( - "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)), + "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 update_platform( + async def list_dashboard_infrastructure_all( 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, + 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.UpdatePlatformResponse: + ) -> AsyncIterator[m.ProviderDashboardNodeRollup]: """ - Call ``PATCH /v1/platform/{id}``. + Every result of :meth:`list_dashboard_infrastructure`, reading page after page. - 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`` 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, + *, + 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( - "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), + "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, ) - -class AsyncPreflightService(_ServiceAsync): - """The NodeRings PreflightService API.""" - - async def list_preflight_checks( + async def list_dashboard_ipam_assignments( self, *, - plan_code: str | None = None, - plan_id: str | None = None, - issues_only: bool | 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.ListPreflightChecksResponse: - """Call ``GET /v1/provider/preflight-checks``.""" + ) -> m.ListDashboardIPAMAssignmentsResponse: + """Call ``GET /v1/provider/dashboard/ipam/assignments``.""" return await self._client._call( "GET", - "/v1/provider/preflight-checks", - m.ListPreflightChecksResponse, + "/v1/provider/dashboard/ipam/assignments", + m.ListDashboardIPAMAssignmentsResponse, query=_query( extra_query, - ("planCode", plan_code), - ("planId", plan_id), - ("issuesOnly", issues_only), + ("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_preflight_checks_all( + async def list_dashboard_ipam_assignments_all( self, *, - plan_code: str | None = None, - plan_id: str | None = None, - issues_only: bool | 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.PlanPreflightView]: + ) -> AsyncIterator[m.DashboardIPAMAssignmentRow]: """ - Every result of :meth:`list_preflight_checks`, 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). """ @@ -24079,16 +27895,17 @@ 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_dashboard_ipam_assignments( page=page, page_size=size, - plan_code=plan_code, - plan_id=plan_id, - issues_only=issues_only, + network_id=network_id, + search=search, + platform_id=platform_id, + ip_family=ip_family, extra_query=extra_query, timeout=timeout, ) - items = res.plans + items = res.assignments for item in items: yield item seen += len(items) @@ -24096,786 +27913,771 @@ async def list_preflight_checks_all( return page += 1 - -class AsyncProviderConnectService(_ServiceAsync): - """The NodeRings ProviderConnectService API.""" - - async def complete_connect_oauth( + async def list_dashboard_plan_subscription_stats( self, *, - code: str | None = None, - state: str | None = None, - 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.CompleteConnectOAuthResponse: - """ - Completes Stripe Connect OAuth after Stripe redirects back with a code. - - It calls ``POST /v1/provider/connect/oauth:complete``. - """ + ) -> m.ListDashboardPlanSubscriptionStatsResponse: + """Call ``GET /v1/provider/dashboard/plan-subscription-stats``.""" return await 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/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 create_connect_account( + async def list_dashboard_ticket_statistics( 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, + from_time: datetime | None = None, + to_time: datetime | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> 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 - """ + ) -> m.ListDashboardTicketStatisticsResponse: + """Call ``GET /v1/provider/dashboard/tickets/statistics``.""" return await 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), - ), + "GET", + "/v1/provider/dashboard/tickets/statistics", + m.ListDashboardTicketStatisticsResponse, + query=_query(extra_query, ("fromTime", from_time), ("toTime", to_time)), + body=None, idempotent=False, timeout=timeout, ) - async def create_connect_tax_registration( + async def list_dashboard_virtual_machines( self, *, - country: str | None = None, - registration_type: str | None = None, - state: str | None = None, - 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.CreateConnectTaxRegistrationResponse: - """ - Call ``POST /v1/provider/connect/tax-registrations``. - - Args: - registration_type: optional; defaults per country - state: required for US - """ + ) -> m.ListDashboardVirtualMachinesResponse: + """Call ``GET /v1/provider/dashboard/virtual-machines``.""" return await 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), + "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 create_connect_tax_session( - self, - *, - extra_body: dict[str, Any] | None = None, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> 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( - "POST", - "/v1/provider/connect/tax-session", - m.CreateConnectTaxSessionResponse, - query=_query(extra_query), - body=dict(extra_body or {}), - idempotent=False, - timeout=timeout, - ) +class AsyncProviderNetworkService(_ServiceAsync): + """The NodeRings ProviderNetworkService API.""" - async def disconnect_connect_account( + async def get_smtp_outbound_provider_policy( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/provider/connect/account``.""" + ) -> m.GetSMTPOutboundProviderPolicyResponse: + """Call ``GET /v1/provider/network/smtp-outbound-policy``.""" return await self._client._call( - "DELETE", - "/v1/provider/connect/account", - m.SuccessResponse, + "GET", + "/v1/provider/network/smtp-outbound-policy", + m.GetSMTPOutboundProviderPolicyResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def expire_connect_tax_registration( + async def list_virtual_machine_smtp_outbound_policies( self, - 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.ExpireConnectTaxRegistrationResponse: - """Call ``POST /v1/provider/connect/tax-registrations/{id}/expire``.""" + ) -> 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( - "POST", - f"/v1/provider/connect/tax-registrations/{_path(id)}/expire", - m.ExpireConnectTaxRegistrationResponse, - query=_query(extra_query), - body=_body(m.ExpireConnectTaxRegistrationBody, 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, ) - async def get_connect_account( + async 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, - ) -> m.GetConnectAccountResponse: - """Call ``GET /v1/provider/connect/account``.""" - return await self._client._call( - "GET", - "/v1/provider/connect/account", - m.GetConnectAccountResponse, - query=_query(extra_query), - body=None, - idempotent=False, - timeout=timeout, - ) + ) -> AsyncIterator[m.VirtualMachineSMTPOutboundPolicyView]: + """ + Every result of :meth:`list_virtual_machine_smtp_outbound_policies`, reading page after + page. - async def get_connect_tax_settings( + ``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 + + async def update_smtp_outbound_provider_policy( 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.GetConnectTaxSettingsResponse: - """Call ``GET /v1/provider/connect/tax-settings``.""" + ) -> 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( - "GET", - "/v1/provider/connect/tax-settings", - m.GetConnectTaxSettingsResponse, + "PUT", + "/v1/provider/network/smtp-outbound-policy", + m.GetSMTPOutboundProviderPolicyResponse, query=_query(extra_query), - body=None, + body=_body( + m.UpdateSMTPOutboundProviderPolicyRequest, extra_body, False, ("block_by_default", block_by_default) + ), idempotent=False, timeout=timeout, ) - async def list_connect_tax_registrations( + async 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.ListConnectTaxRegistrationsResponse: - """Call ``GET /v1/provider/connect/tax-registrations``.""" + ) -> m.VirtualMachineSMTPOutboundPolicyView: + """Call ``PUT /v1/provider/network/smtp-outbound-policies/{virtualMachineId}``.""" return await self._client._call( - "GET", - "/v1/provider/connect/tax-registrations", - m.ListConnectTaxRegistrationsResponse, + "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, ) - async def start_connect_oauth( + +class AsyncProviderOnboardingService(_ServiceAsync): + """The NodeRings ProviderOnboardingService API.""" + + async def get_provider_onboarding_checklist( 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. - - It calls ``POST /v1/provider/connect/oauth:start``. - """ + ) -> m.GetProviderOnboardingChecklistResponse: + """Call ``GET /v1/provider/onboarding/checklist``.""" return await self._client._call( - "POST", - "/v1/provider/connect/oauth:start", - m.StartConnectOAuthResponse, + "GET", + "/v1/provider/onboarding/checklist", + m.GetProviderOnboardingChecklistResponse, query=_query(extra_query), - body=_body(m.StartConnectOAuthRequest, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - async def update_connect_tax_settings( + +class AsyncProviderPlanService(_ServiceAsync): + """The NodeRings ProviderPlanService API.""" + + async def calculate_plan_pricing( self, *, - default_tax_behavior: str | None = None, - default_tax_code: str | None = None, - head_office: m.ConnectTaxAddress | dict[str, Any] | 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.UpdateConnectTaxSettingsResponse: + ) -> m.CalculatePlanPricingResponse: """ - Call ``PUT /v1/provider/connect/tax-settings``. + Call ``POST /v1/plans:calculate``. Args: - head_office: Structured address for Connect tax head office. + instances: Resource instances to calculate pricing for """ return await self._client._call( - "PUT", - "/v1/provider/connect/tax-settings", - m.UpdateConnectTaxSettingsResponse, + "POST", + "/v1/plans:calculate", + m.CalculatePlanPricingResponse, query=_query(extra_query), body=_body( - m.UpdateConnectTaxSettingsRequest, + m.CalculatePlanPricingRequest, extra_body, False, - ("default_tax_behavior", default_tax_behavior), - ("default_tax_code", default_tax_code), - ("head_office", head_office), + ("calc_config", calc_config), + ("instances", instances), + ("plan_config", plan_config), ), idempotent=False, timeout=timeout, ) - -class AsyncProviderCustomerService(_ServiceAsync): - """The NodeRings ProviderCustomerService API.""" - - async def block_provider_customer_purchases( + async def create_plan( self, - client_organization_id: str, *, - message: str | None = None, - reason: m.ComplianceReason | 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.SuccessResponse: """ - Call ``POST /v1/provider/customers/{clientOrganizationId}:block-purchases``. + Call ``POST /v1/plans``. Args: - reason: Why a VM or purchase was seized/blocked. + 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/provider/customers/{_path(client_organization_id)}:block-purchases", + "/v1/plans", m.SuccessResponse, query=_query(extra_query), body=_body( - m.BlockProviderCustomerPurchasesBody, extra_body, False, ("message", message), ("reason", reason) + 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_provider_customer( + async def delete_plan( self, - client_organization_id: str, + id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderCustomerResponse: - """Call ``GET /v1/provider/customers/{clientOrganizationId}``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/plans/{id}``.""" return await self._client._call( - "GET", - f"/v1/provider/customers/{_path(client_organization_id)}", - m.GetProviderCustomerResponse, + "DELETE", + f"/v1/plans/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def get_provider_customer_billing( + async def list_assignable_nodes_for_plan( 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.GetProviderCustomerBillingResponse: - """Call ``GET /v1/provider/customers/{clientOrganizationId}/billing``.""" + ) -> 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/provider/customers/{_path(client_organization_id)}/billing", - m.GetProviderCustomerBillingResponse, - query=_query(extra_query), + "/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 get_provider_customer_stats( + async def update_plan( 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.GetProviderCustomerStatsResponse: + ) -> m.SuccessResponse: """ - Path must not be `/customers/stats`: some gateways match - `/customers/{client_organization_id}` first and treat "stats" as a UUID field (validation - error). + Call ``PATCH /v1/plans/{id}``. - It calls ``GET /v1/provider/customer-stats``. + 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). """ return await self._client._call( - "GET", - "/v1/provider/customer-stats", - m.GetProviderCustomerStatsResponse, + "PATCH", + f"/v1/plans/{_path(id)}", + m.SuccessResponse, query=_query(extra_query), - body=None, + 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, ) - async def list_provider_customer_assets( + +class AsyncProviderReviewService(_ServiceAsync): + """The NodeRings ProviderReviewService API.""" + + async def create_provider_review_reply( self, - client_organization_id: str, + review_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, + reply_message: str | None = None, + extra_body: dict[str, Any] | 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.CreateProviderReviewReplyResponse: + """Call ``POST /v1/provider-reviews/{reviewId}/reply``.""" 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), - ), - body=None, + "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, ) - async def list_provider_customer_assets_all( + async def delete_provider_review_reply( self, - client_organization_id: str, + review_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, - ) -> AsyncIterator[m.ProviderCustomerAssetRow]: - """ - 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). - """ - 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 + ) -> 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, + ) - async def list_provider_customers( + async def list_provider_reviews( self, *, page: int | None = None, page_size: int | None = None, + star_ratings: list[int] | None = None, search: str | None = None, - activity_filter: m.ProviderCustomerActivityFilter | str | None = None, + reply_filter: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListProviderCustomersResponse: + ) -> m.ListProviderReviewsResponse: """ - Call ``GET /v1/provider/customers``. + Call ``GET /v1/provider-reviews``. 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). + 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/provider/customers", - m.ListProviderCustomersResponse, + "/v1/provider-reviews", + m.ListProviderReviewsResponse, query=_query( extra_query, ("page", page), ("pageSize", page_size), + ("starRatings", star_ratings), ("search", search), - ("activityFilter", activity_filter), + ("replyFilter", reply_filter), ), body=None, idempotent=False, timeout=timeout, ) - async def list_provider_customers_all( + async def update_provider_review_reply( self, + review_id: str, *, - page: int | None = None, - page_size: int | None = None, - search: str | None = None, - activity_filter: m.ProviderCustomerActivityFilter | 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, - ) -> AsyncIterator[m.ProviderCustomerRow]: - """ - Every result of :meth:`list_provider_customers`, reading page after page. + ) -> 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, + ) - ``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( +class AsyncProviderStorefrontService(_ServiceAsync): + """The NodeRings ProviderStorefrontService API.""" + + async def get_my_storefront( 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``. - """ + ) -> m.GetMyStorefrontResponse: + """Call ``GET /v1/provider/storefront``.""" return await self._client._call( - "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:restart", - m.VirtualMachine, + "GET", + "/v1/provider/storefront", + m.GetMyStorefrontResponse, query=_query(extra_query), - body=_body(m.RestartProviderCustomerVirtualMachineBody, extra_body, False), + body=None, idempotent=False, timeout=timeout, ) - async def start_provider_customer_virtual_machine( + async def opt_in_storefront( 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}:start``. - """ + ) -> m.GetMyStorefrontResponse: + """Call ``POST /v1/provider/storefront/opt-in``.""" return await self._client._call( "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:start", - m.VirtualMachine, + "/v1/provider/storefront/opt-in", + m.GetMyStorefrontResponse, query=_query(extra_query), - body=_body(m.StartProviderCustomerVirtualMachineBody, extra_body, False), + body=dict(extra_body or {}), idempotent=False, timeout=timeout, ) - async def stop_provider_customer_virtual_machine( + async def opt_out_storefront( 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``. - """ + ) -> m.GetMyStorefrontResponse: + """Call ``POST /v1/provider/storefront/opt-out``.""" return await self._client._call( "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:stop", - m.VirtualMachine, + "/v1/provider/storefront/opt-out", + m.GetMyStorefrontResponse, query=_query(extra_query), - body=_body(m.StopProviderCustomerVirtualMachineBody, extra_body, False), + body=dict(extra_body or {}), idempotent=False, timeout=timeout, ) - async def suspend_provider_customer_virtual_machine( + async def preview_my_storefront( 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.PreviewMyStorefrontResponse: + """Call ``GET /v1/provider/storefront/preview``.""" return await self._client._call( - "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:suspend", - m.VirtualMachine, + "GET", + "/v1/provider/storefront/preview", + m.PreviewMyStorefrontResponse, query=_query(extra_query), - body=_body( - m.SuspendProviderCustomerVirtualMachineBody, extra_body, False, ("message", message), ("reason", reason) - ), + body=None, idempotent=False, timeout=timeout, ) - async def unblock_provider_customer_purchases( + async def submit_my_storefront( self, - client_organization_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/provider/customers/{clientOrganizationId}:unblock-purchases``.""" + ) -> m.GetMyStorefrontResponse: + """Call ``POST /v1/provider/storefront/submit``.""" return await self._client._call( "POST", - f"/v1/provider/customers/{_path(client_organization_id)}:unblock-purchases", - m.SuccessResponse, + "/v1/provider/storefront/submit", + m.GetMyStorefrontResponse, query=_query(extra_query), - body=_body(m.UnblockProviderCustomerPurchasesBody, extra_body, False), + body=dict(extra_body or {}), idempotent=False, timeout=timeout, ) - async def unblock_provider_customer_virtual_machine( + async def update_my_storefront( self, - client_organization_id: str, - virtual_machine_id: str, *, + 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.VirtualMachine: - """ - Call ``POST - /v1/provider/customers/{clientOrganizationId}/virtual-machines/{virtualMachineId}:unblock``. - """ + ) -> m.GetMyStorefrontResponse: + """Call ``PATCH /v1/provider/storefront``.""" return await self._client._call( - "POST", - f"/v1/provider/customers/{_path(client_organization_id)}/virtual-machines/{_path(virtual_machine_id)}:unblock", - m.VirtualMachine, + "PATCH", + "/v1/provider/storefront", + m.GetMyStorefrontResponse, query=_query(extra_query), - body=_body(m.UnblockProviderCustomerVirtualMachineBody, extra_body, False), + 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), + ), idempotent=False, timeout=timeout, ) -class AsyncProviderDashboardPlansTabService(_ServiceAsync): - """The NodeRings ProviderDashboardPlansTabService API.""" +class AsyncProviderTicketNotificationService(_ServiceAsync): + """The NodeRings ProviderTicketNotificationService API.""" - async def get_dashboard_plans_tab_stats( + async def get_provider_ticket_notification_policy( self, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ProviderDashboardPlansTabStats: - """Call ``GET /v1/provider/dashboard/plans-tab-stats``.""" + ) -> m.GetProviderTicketNotificationPolicyResponse: + """Call ``GET /v1/provider/ticket-notification-policy``.""" return await self._client._call( "GET", - "/v1/provider/dashboard/plans-tab-stats", - m.ProviderDashboardPlansTabStats, + "/v1/provider/ticket-notification-policy", + m.GetProviderTicketNotificationPolicyResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - -class AsyncProviderDashboardService(_ServiceAsync): - """The NodeRings ProviderDashboardService API.""" - - async def get_dashboard_asset_sales_timeseries( + async def send_provider_ticket_notification_test( self, *, - range_days: int | None = None, + extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetDashboardAssetSalesTimeseriesResponse: - """Call ``GET /v1/provider/dashboard/asset-sales-timeseries``.""" + ) -> m.SuccessResponse: + """Call ``POST /v1/provider/ticket-notification-policy:send-test``.""" return await self._client._call( - "GET", - "/v1/provider/dashboard/asset-sales-timeseries", - m.GetDashboardAssetSalesTimeseriesResponse, - query=_query(extra_query, ("rangeDays", range_days)), - body=None, + "POST", + "/v1/provider/ticket-notification-policy:send-test", + m.SuccessResponse, + query=_query(extra_query), + body=dict(extra_body or {}), idempotent=False, timeout=timeout, ) - async def get_dashboard_billing_sales( + async def update_provider_ticket_notification_policy( 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, + 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.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. - """ + ) -> m.GetProviderTicketNotificationPolicyResponse: + """Call ``PUT /v1/provider/ticket-notification-policy``.""" 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), - ), - body=None, + "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, ) - async def get_dashboard_customer_acquisition_timeseries( - self, - *, - 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``.""" - return await self._client._call( - "GET", - "/v1/provider/dashboard/customer-acquisition-timeseries", - m.GetDashboardCustomerAcquisitionTimeseriesResponse, - query=_query(extra_query, ("rangeDays", range_days)), - body=None, - idempotent=False, - timeout=timeout, - ) - async def get_dashboard_summary( +class AsyncRefundService(_ServiceAsync): + """The NodeRings RefundService API.""" + + async def get_refund( self, + refund_id: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetDashboardSummaryResponse: - """Call ``GET /v1/provider/dashboard/summary``.""" + ) -> m.GetRefundResponse: + """ + GetRefund retrieves a single refund with payment and invoice details + + It calls ``GET /v1/refunds/{refundId}``. + """ return await self._client._call( "GET", - "/v1/provider/dashboard/summary", - m.GetDashboardSummaryResponse, + f"/v1/refunds/{_path(refund_id)}", + m.GetRefundResponse, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_dashboard_addon_catalog_stats( + async def list_refunds( self, *, - addon_search: str | None = None, - addon_type_filter: str | None = None, - addon_billing_type_filter: str | 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.ListDashboardAddonCatalogStatsResponse: - """Call ``GET /v1/provider/dashboard/addon-catalog-stats``.""" + ) -> m.ListRefundsResponse: + """ + ListRefunds lists refunds for a payment, invoice, or organization + + It calls ``GET /v1/refunds``. + """ return await self._client._call( "GET", - "/v1/provider/dashboard/addon-catalog-stats", - m.ListDashboardAddonCatalogStatsResponse, + "/v1/refunds", + m.ListRefundsResponse, query=_query( extra_query, - ("addonSearch", addon_search), - ("addonTypeFilter", addon_type_filter), - ("addonBillingTypeFilter", addon_billing_type_filter), + ("paymentId", payment_id), + ("invoiceId", invoice_id), + ("status", status), ("page", page), ("pageSize", page_size), ), @@ -24884,19 +28686,19 @@ async def list_dashboard_addon_catalog_stats( timeout=timeout, ) - async def list_dashboard_addon_catalog_stats_all( + async def list_refunds_all( self, *, - addon_search: str | None = None, - addon_type_filter: str | None = None, - addon_billing_type_filter: str | 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, - ) -> AsyncIterator[m.ProviderDashboardAddonCatalogRow]: + ) -> AsyncIterator[m.Refund]: """ - Every result of :meth:`list_dashboard_addon_catalog_stats`, reading page after page. + 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). """ @@ -24904,155 +28706,120 @@ 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_refunds( page=page, page_size=size, - addon_search=addon_search, - addon_type_filter=addon_type_filter, - addon_billing_type_filter=addon_billing_type_filter, + payment_id=payment_id, + invoice_id=invoice_id, + status=status, extra_query=extra_query, timeout=timeout, ) - items = res.addon_catalog + items = res.refunds 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( + +class AsyncRegionService(_ServiceAsync): + """The NodeRings RegionService API.""" + + async def create_region( self, *, - platform_id: str | None = None, - region_id: str | None = None, - page: int | None = None, - page_size: int | 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.ListDashboardInfrastructureResponse: - """Call ``GET /v1/provider/dashboard/infrastructure``.""" + ) -> m.Region: + """Call ``POST /v1/regions``.""" 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), + "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), ), - body=None, idempotent=False, timeout=timeout, ) - async def list_dashboard_infrastructure_all( + async def delete_region( 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, - ) -> AsyncIterator[m.ProviderDashboardNodeRollup]: - """ - 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). - """ - 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 + ) -> 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, + ) - async def list_dashboard_ipam( + async def get_region( 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.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), - ), + ) -> m.Region: + """Call ``GET /v1/regions/{id}``.""" + return await self._client._call( + "GET", + f"/v1/regions/{_path(id)}", + m.Region, + query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_dashboard_ipam_assignments( + async def list_countries_cities( self, *, - network_id: str | None = None, - search: str | None = None, - platform_id: str | None = None, + query: 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.ListDashboardIPAMAssignmentsResponse: - """Call ``GET /v1/provider/dashboard/ipam/assignments``.""" + ) -> m.ListCountriesCitiesResponse: + """Call ``GET /v1/countries-cities``.""" return await 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), - ), + "/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_dashboard_ipam_assignments_all( + async def list_countries_cities_all( self, *, - network_id: str | None = None, - search: str | None = None, - platform_id: str | None = None, + query: 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.DashboardIPAMAssignmentRow]: + ) -> AsyncIterator[m.Country]: """ - Every result of :meth:`list_dashboard_ipam_assignments`, 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). """ @@ -25060,17 +28827,14 @@ 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_countries_cities( page=page, page_size=size, - network_id=network_id, - search=search, - platform_id=platform_id, - ip_family=ip_family, + query=query, extra_query=extra_query, timeout=timeout, ) - items = res.assignments + items = res.countries for item in items: yield item seen += len(items) @@ -25078,145 +28842,94 @@ async def list_dashboard_ipam_assignments_all( return page += 1 - async def list_dashboard_plan_subscription_stats( - 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``.""" - 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, - idempotent=False, - timeout=timeout, - ) - - async def list_dashboard_ticket_statistics( + async def list_datacenters( self, *, - from_time: datetime | None = None, - to_time: datetime | 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.ListDashboardTicketStatisticsResponse: - """Call ``GET /v1/provider/dashboard/tickets/statistics``.""" + ) -> m.ListDatacentersResponse: + """Call ``GET /v1/datacenters``.""" return await self._client._call( "GET", - "/v1/provider/dashboard/tickets/statistics", - m.ListDashboardTicketStatisticsResponse, - query=_query(extra_query, ("fromTime", from_time), ("toTime", to_time)), + "/v1/datacenters", + m.ListDatacentersResponse, + query=_query(extra_query, ("query", query), ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - async def list_dashboard_virtual_machines( + async def list_datacenters_all( 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, + 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.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, - ) - - -class AsyncProviderNetworkService(_ServiceAsync): - """The NodeRings ProviderNetworkService API.""" + ) -> AsyncIterator[m.DatacenterInfo]: + """ + Every result of :meth:`list_datacenters`, reading page after page. - 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, - ) + ``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_virtual_machine_smtp_outbound_policies( + async 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.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.ListRegionsResponse: + """Call ``GET /v1/regions``.""" 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)), + "/v1/regions", + m.ListRegionsResponse, + query=_query( + extra_query, ("page", page), ("pageSize", page_size), ("search", search), ("platformId", platform_id) + ), body=None, idempotent=False, timeout=timeout, ) - async def list_virtual_machine_smtp_outbound_policies_all( + async def list_regions_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.VirtualMachineSMTPOutboundPolicyView]: + ) -> AsyncIterator[m.Region]: """ - Every result of :meth:`list_virtual_machine_smtp_outbound_policies`, 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). """ @@ -25224,14 +28937,15 @@ async 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 = await self.list_virtual_machine_smtp_outbound_policies( + res = await self.list_regions( page=page, page_size=size, search=search, + platform_id=platform_id, extra_query=extra_query, timeout=timeout, ) - items = res.policies + items = res.regions for item in items: yield item seen += len(items) @@ -25239,752 +28953,805 @@ async def list_virtual_machine_smtp_outbound_policies_all( return page += 1 - async def update_smtp_outbound_provider_policy( + +class AsyncRegisteredDomainService(_ServiceAsync): + """The NodeRings RegisteredDomainService API.""" + + async def approve_outgoing_transfer( 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.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.RegisteredDomain: + """Call ``POST /v1/registrar/domains/{name}/transfer-out/approve``.""" return await self._client._call( - "PUT", - "/v1/provider/network/smtp-outbound-policy", - m.GetSMTPOutboundProviderPolicyResponse, + "POST", + f"/v1/registrar/domains/{_path(name)}/transfer-out/approve", + m.RegisteredDomain, query=_query(extra_query), - body=_body( - m.UpdateSMTPOutboundProviderPolicyRequest, extra_body, False, ("block_by_default", block_by_default) - ), + body=_body(m.ApproveOutgoingTransferBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def update_virtual_machine_smtp_outbound_policy( + async def confirm_registrant_change( self, - virtual_machine_id: str, + token: str, *, - action: m.SMTPOutboundVMAction | str | None = None, + approve: bool | 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.ConfirmRegistrantChangeResponse: + """ + Anonymous via the signed token from the approval email. + + It calls ``POST /v1/registrar/registrant-changes/{token}``. + """ return await self._client._call( - "PUT", - f"/v1/provider/network/smtp-outbound-policies/{_path(virtual_machine_id)}", - m.VirtualMachineSMTPOutboundPolicyView, + "POST", + f"/v1/registrar/registrant-changes/{_path(token)}", + m.ConfirmRegistrantChangeResponse, query=_query(extra_query), - body=_body(m.UpdateVirtualMachineSMTPOutboundPolicyBody, extra_body, False, ("action", action)), + body=_body(m.ConfirmRegistrantChangeBody, extra_body, False, ("approve", approve)), idempotent=False, timeout=timeout, ) - -class AsyncProviderOnboardingService(_ServiceAsync): - """The NodeRings ProviderOnboardingService API.""" - - async def get_provider_onboarding_checklist( + async def delete_domain_glue_record( self, + name: str, + host: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.GetProviderOnboardingChecklistResponse: - """Call ``GET /v1/provider/onboarding/checklist``.""" + ) -> m.SuccessResponse: + """Call ``DELETE /v1/registrar/domains/{name}/glue/{host}``.""" return await self._client._call( - "GET", - "/v1/provider/onboarding/checklist", - m.GetProviderOnboardingChecklistResponse, + "DELETE", + f"/v1/registrar/domains/{_path(name)}/glue/{_path(host)}", + m.SuccessResponse, query=_query(extra_query), body=None, - idempotent=False, - timeout=timeout, - ) - - -class AsyncProviderPlanService(_ServiceAsync): - """The NodeRings ProviderPlanService API.""" + idempotent=False, + timeout=timeout, + ) - async def calculate_plan_pricing( + async def delete_registered_domain( self, + name: str, *, - 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, + confirm_name: str | None = None, + confirmation_code: str | 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.CalculatePlanPricingResponse: + ) -> m.DeleteRegisteredDomainResponse: """ - Call ``POST /v1/plans:calculate``. + 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: - instances: Resource instances to calculate pricing for + confirm_name: Typed confirmation: must equal name. + confirmation_code: Code emailed to the org owners (30 min). Empty = send a code. """ return await self._client._call( "POST", - "/v1/plans:calculate", - m.CalculatePlanPricingResponse, + f"/v1/registrar/domains/{_path(name)}/delete", + m.DeleteRegisteredDomainResponse, query=_query(extra_query), body=_body( - m.CalculatePlanPricingRequest, + m.DeleteRegisteredDomainBody, extra_body, False, - ("calc_config", calc_config), - ("instances", instances), - ("plan_config", plan_config), + ("confirm_name", confirm_name), + ("confirmation_code", confirmation_code), + ("reauth_token", reauth_token), ), idempotent=False, timeout=timeout, ) - async def create_plan( + async def get_domain_auth_code( self, + name: 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, + reauth_token: str | None = None, extra_body: dict[str, Any] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> m.GetDomainAuthCodeResponse: """ - Call ``POST /v1/plans``. + POST so the reauth token travels in the body. Sensitive response. + + It calls ``POST /v1/registrar/domains/{name}/auth-code``. 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). + reauth_token: Step-up token from ReauthenticateUser (10 minutes). """ return await self._client._call( "POST", - "/v1/plans", - m.SuccessResponse, + f"/v1/registrar/domains/{_path(name)}/auth-code", + m.GetDomainAuthCodeResponse, 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), - ), + body=_body(m.GetDomainAuthCodeBody, extra_body, False, ("reauth_token", reauth_token)), idempotent=False, timeout=timeout, ) - async def delete_plan( + async def get_registered_domain( self, - id: str, + name: str, *, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: - """Call ``DELETE /v1/plans/{id}``.""" + ) -> m.RegisteredDomain: + """Call ``GET /v1/registrar/domains/{name}``.""" return await self._client._call( - "DELETE", - f"/v1/plans/{_path(id)}", - m.SuccessResponse, + "GET", + f"/v1/registrar/domains/{_path(name)}", + m.RegisteredDomain, query=_query(extra_query), body=None, idempotent=False, timeout=timeout, ) - async def list_assignable_nodes_for_plan( + async def list_domain_events( self, + name: str, *, - template_plan_id: str | None = None, - plan_id: str | None = None, - region_id: str | None = None, + 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.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.ListDomainEventsResponse: + """Call ``GET /v1/registrar/domains/{name}/events``.""" 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/registrar/domains/{_path(name)}/events", + m.ListDomainEventsResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size), ("kinds", kinds)), body=None, idempotent=False, timeout=timeout, ) - async def update_plan( + async def list_domain_events_all( self, - id: str, + name: 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, + kinds: list[m.DomainEventKind | str] | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.SuccessResponse: + ) -> AsyncIterator[m.DomainEvent]: """ - Call ``PATCH /v1/plans/{id}``. + Every result of :meth:`list_domain_events`, 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 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.""" + 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 - async def create_provider_review_reply( + async def list_domain_glue_records( self, - review_id: str, + name: 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``.""" + ) -> m.ListDomainGlueRecordsResponse: + """Call ``GET /v1/registrar/domains/{name}/glue``.""" return await self._client._call( - "POST", - f"/v1/provider-reviews/{_path(review_id)}/reply", - m.CreateProviderReviewReplyResponse, + "GET", + f"/v1/registrar/domains/{_path(name)}/glue", + m.ListDomainGlueRecordsResponse, query=_query(extra_query), - body=_body(m.CreateProviderReviewReplyBody, extra_body, False, ("reply_message", reply_message)), + body=None, idempotent=False, timeout=timeout, ) - async def delete_provider_review_reply( + async def list_domain_invoices( self, - review_id: str, + name: str, *, + page: int | None = None, + page_size: int | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.DeleteProviderReviewReplyResponse: - """Call ``DELETE /v1/provider-reviews/{reviewId}/reply``.""" + ) -> 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``. + """ return await self._client._call( - "DELETE", - f"/v1/provider-reviews/{_path(review_id)}/reply", - m.DeleteProviderReviewReplyResponse, - query=_query(extra_query), + "GET", + f"/v1/registrar/domains/{_path(name)}/invoices", + m.ListDomainInvoicesResponse, + query=_query(extra_query, ("page", page), ("pageSize", page_size)), body=None, idempotent=False, timeout=timeout, ) - async def list_provider_reviews( + async def list_domain_invoices_all( self, + name: str, *, page: int | None = None, page_size: int | None = None, - star_ratings: list[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( + self, + *, + page: int | None = None, + page_size: int | None = None, + states: list[m.RegisteredDomainState | str] | None = None, search: str | None = None, - reply_filter: int | None = None, + expiring_soon: bool | None = None, + needs_attention: bool | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.ListProviderReviewsResponse: + ) -> m.ListRegisteredDomainsResponse: """ - Call ``GET /v1/provider-reviews``. + Call ``GET /v1/registrar/domains``. 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. + 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. """ return await self._client._call( "GET", - "/v1/provider-reviews", - m.ListProviderReviewsResponse, + "/v1/registrar/domains", + m.ListRegisteredDomainsResponse, query=_query( extra_query, ("page", page), ("pageSize", page_size), - ("starRatings", star_ratings), + ("states", states), ("search", search), - ("replyFilter", reply_filter), + ("expiringSoon", expiring_soon), + ("needsAttention", needs_attention), ), body=None, idempotent=False, timeout=timeout, ) - async def update_provider_review_reply( + async def list_registered_domains_all( self, - review_id: str, *, - reply_message: str | 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, + ) -> 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( + self, + name: 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.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, - ) - + ) -> m.DomainOrder: + """ + Creates a renew order (checkout path, 3-D Secure possible). -class AsyncProviderStorefrontService(_ServiceAsync): - """The NodeRings ProviderStorefrontService API.""" + 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. - async def get_my_storefront( - self, - *, - extra_query: dict[str, Any] | None = None, - timeout: Timeout = NOT_GIVEN, - ) -> m.GetMyStorefrontResponse: - """Call ``GET /v1/provider/storefront``.""" + Args: + 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( - "GET", - "/v1/provider/storefront", - m.GetMyStorefrontResponse, + "POST", + f"/v1/registrar/domains/{_path(name)}/renew", + m.DomainOrder, query=_query(extra_query), - body=None, - idempotent=False, + body=_body(m.RenewDomainBody, extra_body, True, ("idempotency_key", idempotency_key), ("years", years)), + idempotent=True, timeout=timeout, ) - async def opt_in_storefront( + async def resend_registrant_verification( self, + name: 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.ResendRegistrantVerificationResponse: + """Call ``POST /v1/registrar/domains/{name}/verification/resend``.""" return await self._client._call( "POST", - "/v1/provider/storefront/opt-in", - m.GetMyStorefrontResponse, + f"/v1/registrar/domains/{_path(name)}/verification/resend", + m.ResendRegistrantVerificationResponse, query=_query(extra_query), - body=dict(extra_body or {}), + body=_body(m.ResendRegistrantVerificationBody, extra_body, False), idempotent=False, timeout=timeout, ) - async def opt_out_storefront( + async def reset_domain_auth_code( 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.GetMyStorefrontResponse: - """Call ``POST /v1/provider/storefront/opt-out``.""" + ) -> m.GetDomainAuthCodeResponse: + """Call ``POST /v1/registrar/domains/{name}/auth-code/reset``.""" return await self._client._call( "POST", - "/v1/provider/storefront/opt-out", - m.GetMyStorefrontResponse, + f"/v1/registrar/domains/{_path(name)}/auth-code/reset", + m.GetDomainAuthCodeResponse, query=_query(extra_query), - body=dict(extra_body or {}), + body=_body(m.ResetDomainAuthCodeBody, extra_body, False, ("reauth_token", reauth_token)), idempotent=False, timeout=timeout, ) - async def preview_my_storefront( + async 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.PreviewMyStorefrontResponse: - """Call ``GET /v1/provider/storefront/preview``.""" + ) -> 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 await self._client._call( - "GET", - "/v1/provider/storefront/preview", - m.PreviewMyStorefrontResponse, + "POST", + f"/v1/registrar/domains/{_path(name)}/restore", + m.DomainOrder, query=_query(extra_query), - body=None, - idempotent=False, + body=_body(m.RestoreDomainBody, extra_body, True, ("idempotency_key", idempotency_key)), + idempotent=True, timeout=timeout, ) - async def submit_my_storefront( + async def retry_domain_transfer( 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.GetMyStorefrontResponse: - """Call ``POST /v1/provider/storefront/submit``.""" + ) -> 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``. + """ return await self._client._call( "POST", - "/v1/provider/storefront/submit", - m.GetMyStorefrontResponse, + f"/v1/registrar/order-items/{_path(order_item_id)}/retry-transfer", + m.DomainOrder, query=_query(extra_query), - body=dict(extra_body or {}), + body=_body(m.RetryDomainTransferBody, extra_body, False, ("auth_code", auth_code)), idempotent=False, timeout=timeout, ) - async def update_my_storefront( + async def set_domain_auto_renew( self, + name: str, *, - 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, + 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.GetMyStorefrontResponse: - """Call ``PATCH /v1/provider/storefront``.""" + ) -> 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). + """ return await self._client._call( - "PATCH", - "/v1/provider/storefront", - m.GetMyStorefrontResponse, + "PUT", + f"/v1/registrar/domains/{_path(name)}/auto-renew", + m.RegisteredDomain, query=_query(extra_query), body=_body( - m.UpdateMyStorefrontRequest, + m.SetDomainAutoRenewBody, 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), + ("auto_renew", auto_renew), + ("mit_consent", mit_consent), + ("payment_method_id", payment_method_id), + ("whois_privacy_auto_renew", whois_privacy_auto_renew), ), idempotent=False, timeout=timeout, ) - -class AsyncProviderTicketNotificationService(_ServiceAsync): - """The NodeRings ProviderTicketNotificationService API.""" - - async def get_provider_ticket_notification_policy( + async def set_domain_dnssec( 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.GetProviderTicketNotificationPolicyResponse: - """Call ``GET /v1/provider/ticket-notification-policy``.""" + ) -> 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). + """ return await self._client._call( - "GET", - "/v1/provider/ticket-notification-policy", - m.GetProviderTicketNotificationPolicyResponse, + "PUT", + f"/v1/registrar/domains/{_path(name)}/dnssec", + m.RegisteredDomain, query=_query(extra_query), - body=None, + body=_body( + m.SetDomainDNSSECBody, + extra_body, + False, + ("dnskeys", dnskeys), + ("ds_records", ds_records), + ("mode", mode), + ), idempotent=False, timeout=timeout, ) - async def send_provider_ticket_notification_test( + async def set_domain_nameservers( 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.SuccessResponse: - """Call ``POST /v1/provider/ticket-notification-policy:send-test``.""" + ) -> 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. + """ return await self._client._call( - "POST", - "/v1/provider/ticket-notification-policy:send-test", - m.SuccessResponse, + "PUT", + f"/v1/registrar/domains/{_path(name)}/nameservers", + m.RegisteredDomain, query=_query(extra_query), - body=dict(extra_body or {}), + body=_body( + m.SetDomainNameserversBody, extra_body, False, ("nameservers", nameservers), ("ns_mode", ns_mode) + ), idempotent=False, timeout=timeout, ) - async def update_provider_ticket_notification_policy( + async def set_domain_privacy( self, + name: str, *, - policy: m.ProviderTicketNotificationPolicy | dict[str, Any] | None = None, + enabled: bool | None = None, + idempotency_key: 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.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. + """ return await self._client._call( "PUT", - "/v1/provider/ticket-notification-policy", - m.GetProviderTicketNotificationPolicyResponse, + f"/v1/registrar/domains/{_path(name)}/privacy", + m.SetDomainPrivacyResponse, query=_query(extra_query), - body=_body(m.UpdateProviderTicketNotificationPolicyRequest, extra_body, False, ("policy", policy)), - idempotent=False, + body=_body( + m.SetDomainPrivacyBody, extra_body, True, ("enabled", enabled), ("idempotency_key", idempotency_key) + ), + idempotent=True, timeout=timeout, ) - -class AsyncRefundService(_ServiceAsync): - """The NodeRings RefundService API.""" - - async def get_refund( + async def set_domain_transfer_lock( self, - refund_id: str, + name: 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.GetRefundResponse: + ) -> m.RegisteredDomain: """ - GetRefund retrieves a single refund with payment and invoice details + Unlocking requires a step-up reauth_token. - It calls ``GET /v1/refunds/{refundId}``. + It calls ``PUT /v1/registrar/domains/{name}/lock``. + + Args: + reauth_token: Step-up token from ReauthenticateUser; required to unlock. """ return await self._client._call( - "GET", - f"/v1/refunds/{_path(refund_id)}", - m.GetRefundResponse, + "PUT", + f"/v1/registrar/domains/{_path(name)}/lock", + m.RegisteredDomain, query=_query(extra_query), - body=None, + body=_body( + m.SetDomainTransferLockBody, extra_body, False, ("locked", locked), ("reauth_token", reauth_token) + ), idempotent=False, timeout=timeout, ) - async def list_refunds( + async def update_domain_contacts( self, + name: str, *, - 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, + 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.ListRefundsResponse: + ) -> m.UpdateDomainContactsResponse: """ - ListRefunds lists refunds for a payment, invoice, or organization + May start the change-of-registrant flow. - It calls ``GET /v1/refunds``. + 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 await 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), + "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), ), - body=None, idempotent=False, timeout=timeout, ) - 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( + async def upsert_domain_glue_record( self, + name: str, + host: str, *, - city_country_id: str | None = None, - datacenter_id: str | None = None, + 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.Region: - """Call ``POST /v1/regions``.""" + timeout: Timeout = NOT_GIVEN, + ) -> m.DomainGlueRecord: + """Call ``PUT /v1/registrar/domains/{name}/glue/{host}``.""" return await self._client._call( - "POST", - "/v1/regions", - m.Region, + "PUT", + f"/v1/registrar/domains/{_path(name)}/glue/{_path(host)}", + m.DomainGlueRecord, query=_query(extra_query), - body=_body( - m.CreateRegionRequest, - extra_body, - False, - ("city_country_id", city_country_id), - ("datacenter_id", datacenter_id), - ), + body=_body(m.UpsertDomainGlueRecordBody, extra_body, False, ("ipv4", ipv4), ("ipv6", ipv6)), idempotent=False, timeout=timeout, ) - async def delete_region( + +class AsyncRegistrarAdminService(_ServiceAsync): + """The NodeRings RegistrarAdminService API.""" + + async def add_domain_hold( self, - id: str, + 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.SuccessResponse: - """Call ``DELETE /v1/regions/{id}``.""" + ) -> m.AdminRegisteredDomain: + """ + Call ``POST /v1/registrar/admin/domains/{name}/holds``. + + Args: + hold: Holds sit beside the state; any hold blocks risky mutations. + """ return await self._client._call( - "DELETE", - f"/v1/regions/{_path(id)}", - m.SuccessResponse, + "POST", + f"/v1/registrar/admin/domains/{_path(name)}/holds", + m.AdminRegisteredDomain, query=_query(extra_query), - body=None, + body=_body(m.AddDomainHoldBody, extra_body, False, ("hold", hold), ("reason", reason)), idempotent=False, timeout=timeout, ) - async def get_region( + async def get_registrar_balance( self, - id: str, *, + provider: str | None = None, extra_query: dict[str, Any] | None = None, timeout: Timeout = NOT_GIVEN, - ) -> m.Region: - """Call ``GET /v1/regions/{id}``.""" + ) -> m.GetRegistrarBalanceResponse: + """ + Call ``GET /v1/registrar/admin/balance``. + + Args: + provider: Empty = configured default provider. + """ return await self._client._call( "GET", - f"/v1/regions/{_path(id)}", - m.Region, - query=_query(extra_query), + "/v1/registrar/admin/balance", + m.GetRegistrarBalanceResponse, + query=_query(extra_query, ("provider", provider)), body=None, idempotent=False, timeout=timeout, ) - async def list_countries_cities( + async def list_all_domain_orders( 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.ListCountriesCitiesResponse: - """Call ``GET /v1/countries-cities``.""" + ) -> m.ListAllDomainOrdersResponse: + """Call ``GET /v1/registrar/admin/orders``.""" return await self._client._call( "GET", - "/v1/countries-cities", - m.ListCountriesCitiesResponse, - query=_query(extra_query, ("query", query), ("page", page), ("pageSize", page_size)), + "/v1/registrar/admin/orders", + m.ListAllDomainOrdersResponse, + query=_query( + extra_query, + ("page", page), + ("pageSize", page_size), + ("states", states), + ("organizationId", organization_id), + ), body=None, idempotent=False, timeout=timeout, ) - async def list_countries_cities_all( + async def list_all_domain_orders_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.Country]: + ) -> AsyncIterator[m.AdminDomainOrder]: """ - Every result of :meth:`list_countries_cities`, reading page after page. + Every result of :meth:`list_all_domain_orders`, reading page after page. ``page`` is the first page (0 by default) and ``page_size`` the page size (100 by default). """ @@ -25992,14 +29759,15 @@ 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_all_domain_orders( page=page, page_size=size, - query=query, + states=states, + organization_id=organization_id, extra_query=extra_query, timeout=timeout, ) - items = res.countries + items = res.orders for item in items: yield item seen += len(items) @@ -26007,37 +29775,51 @@ async def list_countries_cities_all( return page += 1 - async def list_datacenters( + async def list_all_domains( 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.ListDatacentersResponse: - """Call ``GET /v1/datacenters``.""" + ) -> m.ListAllDomainsResponse: + """Call ``GET /v1/registrar/admin/domains``.""" return await self._client._call( "GET", - "/v1/datacenters", - m.ListDatacentersResponse, - query=_query(extra_query, ("query", query), ("page", page), ("pageSize", page_size)), + "/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, ) - async def list_datacenters_all( + async def list_all_domains_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.DatacenterInfo]: + ) -> AsyncIterator[m.AdminRegisteredDomain]: """ - Every result of :meth:`list_datacenters`, reading page after page. + 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). """ @@ -26045,14 +29827,17 @@ async def list_datacenters_all( size = page_size if page_size and page_size > 0 else 100 seen = 0 while True: - res = await self.list_datacenters( + res = await self.list_all_domains( page=page, page_size=size, - query=query, + states=states, + search=search, + organization_id=organization_id, + holds=holds, extra_query=extra_query, timeout=timeout, ) - items = res.datacenters + items = res.domains for item in items: yield item seen += len(items) @@ -26060,41 +29845,41 @@ async def list_datacenters_all( return page += 1 - async def list_regions( + async def list_tld_offerings( 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.ListRegionsResponse: - """Call ``GET /v1/regions``.""" + ) -> m.ListTldOfferingsResponse: + """Call ``GET /v1/registrar/admin/tlds``.""" return await self._client._call( "GET", - "/v1/regions", - m.ListRegionsResponse, + "/v1/registrar/admin/tlds", + m.ListTldOfferingsResponse, query=_query( - extra_query, ("page", page), ("pageSize", page_size), ("search", search), ("platformId", platform_id) + extra_query, ("page", page), ("pageSize", page_size), ("provider", provider), ("search", search) ), body=None, idempotent=False, timeout=timeout, ) - async def list_regions_all( + async def list_tld_offerings_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.Region]: + ) -> AsyncIterator[m.TldOffering]: """ - Every result of :meth:`list_regions`, reading page after page. + 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). """ @@ -26102,15 +29887,15 @@ 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_tld_offerings( page=page, page_size=size, + provider=provider, search=search, - platform_id=platform_id, extra_query=extra_query, timeout=timeout, ) - items = res.regions + items = res.offerings for item in items: yield item seen += len(items) @@ -26118,6 +29903,255 @@ async def list_regions_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.""" @@ -28433,6 +32467,36 @@ 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, *, @@ -29346,6 +33410,8 @@ class _Services: """The AgentService API.""" backup: BackupService """The BackupService API.""" + blog_subscription: BlogSubscriptionService + """The BlogSubscriptionService API.""" business_monitoring: BusinessMonitoringService """The BusinessMonitoringService API.""" chat: ChatService @@ -29368,6 +33434,12 @@ 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 @@ -29454,6 +33526,10 @@ 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 @@ -29483,6 +33559,7 @@ 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] @@ -29494,6 +33571,9 @@ 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] @@ -29537,6 +33617,8 @@ 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] @@ -29560,6 +33642,8 @@ class _AsyncServices: """The AgentService API.""" backup: AsyncBackupService """The BackupService API.""" + blog_subscription: AsyncBlogSubscriptionService + """The BlogSubscriptionService API.""" business_monitoring: AsyncBusinessMonitoringService """The BusinessMonitoringService API.""" chat: AsyncChatService @@ -29582,6 +33666,12 @@ 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 @@ -29668,6 +33758,10 @@ 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 @@ -29697,6 +33791,7 @@ 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] @@ -29708,6 +33803,9 @@ 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] @@ -29751,6 +33849,8 @@ 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 389da77..271b6b7 100644 --- a/src/noderings/models.py +++ b/src/noderings/models.py @@ -20,6 +20,7 @@ __all__ = [ "AddAddonToSubscriptionBody", "AddAddonToSubscriptionResponse", + "AddDomainHoldBody", "AddInternalCommentBody", "AddInternalCommentResponse", "AddReplyToTicketBody", @@ -36,10 +37,13 @@ "AddonStatus", "AddonSubscription", "AddonType", + "AdminDomainOrder", + "AdminRegisteredDomain", "Agent", "AgentGatewayRegion", "AggregationType", "AllocationStrategy", + "ApproveOutgoingTransferBody", "ArchiveFilesBody", "ArchiveFilesResponse", "AssetCategory", @@ -66,9 +70,11 @@ "BillingType", "BlockOrganizationPurchasesBody", "BlockProviderCustomerPurchasesBody", + "BlogSubscriptionStatus", "CPUType", "CalculatePlanPricingRequest", "CalculatePlanPricingResponse", + "CancelDomainOrderBody", "CancelRenewalRequest", "CancelResponse", "CaseType", @@ -82,6 +88,12 @@ "CheckDNSGeoRecordResponse", "CheckDNSSECDSBody", "CheckDNSZoneDelegationBody", + "CheckDomainsRequest", + "CheckDomainsResponse", + "CheckTransferRequest", + "CheckTransferResponse", + "CheckoutDomainOrderBody", + "CheckoutDomainOrderResponse", "City", "CityCountry", "ClearAllPrefixReservedIPsBody", @@ -103,16 +115,27 @@ "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", @@ -145,6 +168,8 @@ "CreateDNSZoneRequest", "CreateDNSZoneResponse", "CreateDatabaseBody", + "CreateDomainContactRequest", + "CreateDomainOrderRequest", "CreateDomainRequest", "CreateEnvironmentVariableRequest", "CreateEnvironmentVariableResponse", @@ -207,6 +232,7 @@ "DNSSECInfo", "DNSSECMode", "DNSZone", + "DNSZoneDelegationIssue", "DNSZoneState", "DashboardAssetSalesDayBucket", "DashboardBillingCommercialHealth", @@ -234,6 +260,8 @@ "DeleteFilesBody", "DeletePlatformVirtualMachineBody", "DeleteProviderReviewReplyResponse", + "DeleteRegisteredDomainBody", + "DeleteRegisteredDomainResponse", "DeleteRoadmapFeatureRequestCommentResponse", "DetachVMFirewallBody", "DisableAdditionalIPBody", @@ -244,6 +272,45 @@ "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", @@ -314,6 +381,7 @@ "GetCloudInitTemplateResponse", "GetConnectAccountResponse", "GetConnectTaxSettingsResponse", + "GetContactSchemaResponse", "GetConversationHistoryResponse", "GetCouponReportResponse", "GetCreditBalanceResponse", @@ -322,6 +390,8 @@ "GetDashboardBillingSalesResponse", "GetDashboardCustomerAcquisitionTimeseriesResponse", "GetDashboardSummaryResponse", + "GetDomainAuthCodeBody", + "GetDomainAuthCodeResponse", "GetDomainResponse", "GetEnvironmentVariableResponse", "GetExchangeRateResponse", @@ -354,8 +424,10 @@ "GetProviderResponse", "GetProviderRevenueResponse", "GetProviderTicketNotificationPolicyResponse", + "GetPublicPlatformStatsResponse", "GetPublicStorefrontResponse", "GetRefundResponse", + "GetRegistrarBalanceResponse", "GetRoadmapFeatureRequestResponse", "GetRoadmapStatsResponse", "GetSMTPOutboundProviderPolicyResponse", @@ -366,6 +438,7 @@ "GetSubscriptionCouponResponse", "GetSubscriptionStatusResponse", "GetTicketResponse", + "GetTldRequirementsResponse", "GetUsageRecordResponse", "GetUsageReportResponse", "GetUserResponse", @@ -398,6 +471,8 @@ "ListAddonSubscriptionsResponse", "ListAddonsResponse", "ListAgentsResponse", + "ListAllDomainOrdersResponse", + "ListAllDomainsResponse", "ListAllocationsResponse", "ListAssignableNodesForPlanResponse", "ListAvailableAddonsResponse", @@ -430,6 +505,11 @@ "ListDatabasesResponse", "ListDatacentersResponse", "ListDistrosResponse", + "ListDomainContactsResponse", + "ListDomainEventsResponse", + "ListDomainGlueRecordsResponse", + "ListDomainInvoicesResponse", + "ListDomainOrdersResponse", "ListEffectivePermissionsResponse", "ListEligibleNodesForPlanResponse", "ListEnvironmentVariablesResponse", @@ -480,6 +560,7 @@ "ListPublicStorefrontsResponse", "ListRefundsResponse", "ListRegionsResponse", + "ListRegisteredDomainsResponse", "ListRoadmapFeatureRequestCommentsResponse", "ListRoadmapFeatureRequestsResponse", "ListRoadmapProductCategoriesResponse", @@ -495,6 +576,8 @@ "ListTicketAttachmentsResponse", "ListTicketTemplatesResponse", "ListTicketsResponse", + "ListTldOfferingsResponse", + "ListTldPricesResponse", "ListUsageRecordsResponse", "ListUsersResponse", "ListVMTagsResponse", @@ -517,6 +600,7 @@ "MetricType", "MetricsWriteCredential", "MoneyAmount", + "MoveDomainToOrganizationBody", "MoveFirewallRuleBody", "MyStorefront", "Network", @@ -579,6 +663,7 @@ "PreviewCouponResponse", "PreviewMyStorefrontResponse", "PreviewNotificationTemplateResponse", + "PriceDomainOrderBody", "PricingCalculationConfig", "PricingLineItem", "PricingModel", @@ -610,11 +695,14 @@ "ProviderStripePaymentMethodDetails", "ProviderStripeTransaction", "ProviderTicketNotificationPolicy", + "PublicProductCount", "PublicStorefront", "PublicStorefrontCard", "PurchaseCreditsRequest", "PurchaseCreditsResponse", "ReadFileResponse", + "ReauthenticateUserRequest", + "ReauthenticateUserResponse", "RecordUsageRequest", "RecordUsageResponse", "RedeemCouponBody", @@ -628,26 +716,39 @@ "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", @@ -668,6 +769,8 @@ "SMTPOutboundVMAction", "SSHKey", "ScanDNSZoneRecordsResponse", + "SearchDomainsRequest", + "SearchDomainsResponse", "SearchMarketplaceRequest", "SearchMarketplaceResponse", "SearchTicketsRequest", @@ -678,13 +781,21 @@ "ServiceStatus", "ServingStatus", "SessionInfo", + "SetClientHoldBody", "SetDefaultPaymentMethodBody", "SetDefaultPaymentMethodResponse", + "SetDomainAutoRenewBody", + "SetDomainDNSSECBody", + "SetDomainNameserversBody", + "SetDomainPrivacyBody", + "SetDomainPrivacyResponse", + "SetDomainTransferLockBody", "SetGameNestOrderingRequest", "SetPasswordRequest", "SetPrimaryAllocationBody", "SetTicketPriorityBody", "SetTicketStatusBody", + "SetTldOfferingBody", "Snapshot", "SnapshotOperationStatus", "SnapshotStatus", @@ -706,12 +817,17 @@ "SubmitRoadmapFeatureRequestRequest", "SubmitRoadmapFeatureRequestResponse", "SubscribeResponse", + "SubscribeToBlogRequest", + "SubscribeToBlogResponse", "Subscription", "SubscriptionCoupon", "SubscriptionStatus", "SuccessResponse", "SuspendPlatformVirtualMachineBody", "SuspendProviderCustomerVirtualMachineBody", + "SyncDomainBody", + "SyncTldCatalogRequest", + "SyncTldCatalogResponse", "Ticket", "TicketAttachment", "TicketInternalComment", @@ -724,8 +840,14 @@ "TicketTemplateVariableDefinition", "TierMode", "Timestamps", + "TldCategory", + "TldEligibility", + "TldOffering", + "TldPrice", + "TldRiskTier", "TokenRequest", "TokenResponse", + "TransferCheckResult", "UnassignAgentBody", "UnbanOrganizationBody", "UnbanUserBody", @@ -735,6 +857,8 @@ "UnblockProviderCustomerVirtualMachineBody", "UndoCancelAddonBody", "UndoCancelRenewalRequest", + "UnsubscribeFromBlogRequest", + "UnsubscribeFromBlogResponse", "UpdateAddonBody", "UpdateAgentBody", "UpdateAgentResponse", @@ -749,6 +873,11 @@ "UpdateCouponBody", "UpdateCouponCodeBody", "UpdateDockerImageBody", + "UpdateDomainContactBody", + "UpdateDomainContactResponse", + "UpdateDomainContactsBody", + "UpdateDomainContactsResponse", + "UpdateDomainOrderBody", "UpdateEnvironmentVariableBody", "UpdateFirewallAddressGroupBody", "UpdateFirewallRuleBody", @@ -800,6 +929,7 @@ "UploadTicketAttachmentContentRequest", "UpsertDNSGeoRecordBody", "UpsertDNSRecordBody", + "UpsertDomainGlueRecordBody", "UpsertHookScriptRequest", "UsageAggregate", "UsageRecord", @@ -808,6 +938,8 @@ "UserDetails", "UserSummary", "VMTemplate", + "ValidateDomainContactRequest", + "ValidateDomainContactResponse", "ValidateNodeTopologyRequest", "ValidateNodeTopologyResponse", "ValidateNodeTopologyWarning", @@ -1034,6 +1166,93 @@ 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.""" @@ -1633,6 +1852,210 @@ 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.""" @@ -2108,6 +2531,27 @@ 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.""" @@ -2440,6 +2884,23 @@ 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. @@ -2603,6 +3064,41 @@ 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.""" @@ -2874,6 +3370,36 @@ 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.""" @@ -2949,6 +3475,81 @@ 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.""" @@ -2987,6 +3588,20 @@ 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 @@ -3419,6 +4034,31 @@ 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.""" @@ -4268,6 +4908,16 @@ 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.""" @@ -4374,6 +5024,14 @@ 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") @@ -4384,12 +5042,33 @@ 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. @@ -4437,27 +5116,832 @@ class DNSSECMode(OpenEnum): SIGNED_ACTIVE = "DNSSEC_MODE_SIGNED_ACTIVE" -class DockerImageChoice(Model): - """The API's v1DockerImageChoice object.""" +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" + + +class DomainVerification(Model): + """The API's v1DomainVerification object.""" - image: str = Field("") - name: str = Field("") + 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 Domain(Model): - """The API's v1Domain object.""" +class DomainVerificationStatus(OpenEnum): + """ + The API's DomainVerificationStatus enum. - 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") + Unknown values the API adds later are kept as strings. + """ + + UNSPECIFIED = "DOMAIN_VERIFICATION_STATUS_UNSPECIFIED" + VERIFIED = "DOMAIN_VERIFICATION_STATUS_VERIFIED" + PENDING = "DOMAIN_VERIFICATION_STATUS_PENDING" + FAILED = "DOMAIN_VERIFICATION_STATUS_FAILED" class DownloadFileResponse(Model): @@ -5219,6 +6703,17 @@ 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.""" @@ -5311,6 +6806,14 @@ 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.""" @@ -5628,6 +7131,25 @@ 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.""" @@ -5642,6 +7164,20 @@ 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.""" @@ -5715,6 +7251,12 @@ 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.""" @@ -6170,6 +7712,24 @@ 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.""" @@ -6445,6 +8005,48 @@ 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.""" @@ -6829,6 +8431,15 @@ 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.""" @@ -6946,6 +8557,24 @@ 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.""" @@ -8806,6 +10435,15 @@ 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.""" @@ -8875,6 +10513,25 @@ 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.""" @@ -9013,6 +10670,107 @@ 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. @@ -9062,6 +10820,12 @@ 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.""" @@ -9129,6 +10893,15 @@ 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.""" @@ -9307,6 +11080,33 @@ 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).""" @@ -9449,6 +11249,14 @@ 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.""" @@ -9668,6 +11476,33 @@ 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.""" @@ -9767,6 +11602,22 @@ 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.""" @@ -9945,6 +11796,114 @@ 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.""" @@ -9974,12 +11933,60 @@ 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.""" @@ -10013,6 +12020,27 @@ 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.""" @@ -10350,6 +12378,25 @@ 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 176187c..8faa85d 100644 --- a/tests/_operations.py +++ b/tests/_operations.py @@ -24,6 +24,9 @@ ("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", @@ -112,6 +115,26 @@ ("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"), @@ -256,6 +279,7 @@ ("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"), @@ -470,6 +494,41 @@ ("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"), @@ -557,6 +616,7 @@ ("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 5a17970..fc99f6c 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -321,6 +321,22 @@ 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 @@ -365,6 +381,17 @@ 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 93e8684..30670fb 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) == 485 + assert len(OPERATIONS) == 545 @pytest.mark.parametrize(("service", "method", "operation_id"), OPERATIONS, ids=[o[2] for o in OPERATIONS])