tenant192 Ops

Tenant API

Tenant configuration, branding, regional settings, and onboarding state.

Queries

QUERY

adminAddonBreakdown

#

Add-on usage breakdown (PlatformAdmin only).

Gibt zurück[!]!
QUERY

adminBillingEvents

#

List billing events for a tenant (PlatformAdmin only).

Argumente

  • tenantId!
  • pagination
Gibt zurück!
QUERY

adminChurnMetrics

#

Churn metrics over a given number of months (PlatformAdmin only).

Argumente

  • monthsInt!

    Standard

    1
Gibt zurück!
QUERY

adminGetTenant

#

Get a single tenant by ID (PlatformAdmin only).

Argumente

  • id!
Gibt zurück
QUERY

adminListCountryExclusivities

#

List all active country exclusivity agreements. PlatformAdmin only.

Argumente

  • pagination!

    Standard

    {
      "limit": 10,
      "page": 1,
      "after": null
    }
Gibt zurück!
QUERY

adminListPlatformNotificationChannels

#

List every configured channel. PlatformAdmin only.

Gibt zurück[!]!
QUERY

adminListRegionExclusivities

#

List all active region (city) exclusivity agreements. PlatformAdmin only.

Argumente

  • pagination!

    Standard

    {
      "limit": 10,
      "page": 1,
      "after": null
    }
Gibt zurück!
QUERY

adminListRegistrations

#

List tenant registrations with optional status filter (PlatformAdmin only).

Argumente

  • input!

    Standard

    {
      "status": null,
      "pagination": {
        "limit": 10,
        "page": 1,
        "after": null
      }
    }
Gibt zurück!
QUERY

adminListTenants

#

List tenants with optional search and status filter (PlatformAdmin only).

Argumente

  • input!

    Standard

    {
      "search": null,
      "status": null,
      "pagination": {
        "limit": 10,
        "page": 1,
        "after": null
      }
    }
Gibt zurück!
QUERY

adminPendingTenantDataWipe

#

Active (PENDING or EXECUTING) wipe for the given tenant, if any. Powers the "pending wipe banner" on the tenant detail page. PlatformAdmin only.

Argumente

  • tenantId!
Gibt zurück
QUERY

adminPlatformNotificationEventKinds

#

Enumerate every event kind the platform can fire — the UI uses this to populate the subscription checkbox list so new events appear automatically after a migration.

Gibt zurück[!]!
QUERY

adminPlatformUsage

#

Overall platform usage metrics (PlatformAdmin only).

Gibt zurück!
QUERY

adminRevenueMetrics

#

Platform-wide revenue metrics (PlatformAdmin only).

Gibt zurück!
QUERY

adminStoreCredentials

#

Configured store credentials — redacted metadata only, never key material.

Gibt zurück[!]!
QUERY

adminStoreReleaseOverview

#

Store release status of every platform connected app: live / in-review / beta versions per store, compared against the latest code version released through the Release Hub.

Gibt zurück!
QUERY

adminSubscriptions

#

List all subscriptions (PlatformAdmin only).

Argumente

  • status
  • pagination
Gibt zurück!
QUERY

adminSubscriptionsByPlan

#

Subscription breakdown by plan (PlatformAdmin only).

Gibt zurück[!]!
QUERY

adminSubscriptionsByStatus

#

Subscription breakdown by status (PlatformAdmin only).

Gibt zurück[!]!
QUERY

adminTenantActivity

#

Operational activity snapshot for a specific tenant (PlatformAdmin only). Returns total account counts broken down by role, total order counts broken down by kind and lifecycle status, and a 30-day daily series of new accounts + orders so the admin console can visualize how an individual tenant is tracking through its setup.

Argumente

  • tenantId!
Gibt zurück!
QUERY

adminTenantBranding

#

Get the current branding configuration for a specific tenant (PlatformAdmin only).

Argumente

  • tenantId!
Gibt zurück
QUERY

adminTenantDataWipe

#

Look up a single wipe by ID. PlatformAdmin only.

Argumente

  • id!
Gibt zurück
QUERY

adminTenantDataWipes

#

Most recent wipe requests across all tenants. Powers the dashboard "pending wipes" panel and the audit lookup page. PlatformAdmin only.

Argumente

  • limitInt!

    Standard

    50
Gibt zurück[!]!
QUERY

adminTenantDomains

#

List all domains (system + custom) of a specific tenant (PlatformAdmin only). Mirrors myDomains but takes the target tenant from the argument instead of the request context, so platform admins can inspect a tenant they're not impersonating. Used by the admin tenant detail page.

Argumente

  • tenantId!
Gibt zurück[!]!
QUERY

adminTenantOnboardingStatus

#

Get onboarding status for any tenant (PlatformAdmin only).

Argumente

  • tenantId!
Gibt zurück!
QUERY

adminTenantOperationCities

#

List the *active* operation cities for a tenant (PlatformAdmin only). Backward-compatible shape: returns only ACTIVE rows so existing admin console clients reading this field keep working. Use adminTenantOperationCityList when the admin needs to see paused (DISABLED_BY_PLAN / DISABLED_BY_TENANT) rows too.

Argumente

  • tenantId!
Gibt zurück[!]!
QUERY

adminTenantOperationCityList

#

Full operation-city allow-list for a tenant — active and disabled rows — for the platform-admin tenant detail UI (PlatformAdmin only). Mirrors the tenant-side myOperationCityList so support staff see the same picture the tenant sees, including cities that were auto-shrunk on a plan downgrade.

Argumente

  • tenantId!
Gibt zurück[!]!
QUERY

adminTenantPlatformAddons

#

Admin view of any tenant's platform addons. Includes audit fields (granted_by, granted_at, note) and revoked-but-retained rows (enabled = false). PlatformAdmin only.

Argumente

  • tenantId!
Gibt zurück[!]!
QUERY

adminTenantStats

#

Quick dashboard aggregation of tenant and registration counts (PlatformAdmin only).

Gibt zurück!
QUERY

adminTenantSubscription

#

Get a specific tenant's subscription (PlatformAdmin only).

Argumente

  • tenantId!
Gibt zurück
QUERY

adminTenantWallet

#

Read any tenant's plan-credit wallet (PlatformAdmin only).

Argumente

  • tenantId!
  • currencyString!
Gibt zurück!
QUERY

adminTenantWalletEntries

#

Recent ledger entries for a tenant wallet, newest first (PlatformAdmin only). Capped at limit (default 50, max 200).

Argumente

  • tenantId!
  • currencyString!
  • limitInt
Gibt zurück[!]!
QUERY

adminTopTenants

#

Top tenants by transaction volume (PlatformAdmin only).

Argumente

  • limitInt!

    Standard

    10
Gibt zurück[!]!
QUERY

adminTrialConversion

#

Trial-to-paid conversion metrics (PlatformAdmin only).

Gibt zurück!
QUERY

adminVerticalDistribution

#

Distribution of tenants across verticals (PlatformAdmin only).

Gibt zurück[!]!
QUERY

apiKeyAuditLog

#

Get the audit log for API key events. Can filter by specific API key ID or get all events for the tenant. Requires TenantAdmin role.

Argumente

  • input!
Gibt zurück!
QUERY

apiKeys

#

List all API keys for the current tenant. By default, only active (non-revoked) keys are returned. Set includeRevoked to true to include revoked keys. Requires TenantAdmin role.

Argumente

  • includeRevokedBoolean!

    Standard

    false
Gibt zurück[!]!
QUERY

availablePlans

#

Browse available plans (public, no auth required).

Gibt zurück[!]!
QUERY

brandCatalog

#

Styles, marks and preset colours available to brand generation.

Gibt zurück!
QUERY

branding

#

Get the current branding configuration. Returns the active branding for the current tenant.

Gibt zurück
QUERY

brandingRevisions

#

Get all branding configuration revisions. Returns the history of branding changes for this tenant.

Gibt zurück[!]!
QUERY

brandingVersion

#

Get branding configuration by version. Useful for previewing or rolling back to a previous version.

Argumente

  • versionInt!
Gibt zurück
QUERY

cardlessAllowedPlans

#

Plan ids that may be started cardless (a 14-day trial with no card up front). Every plan not listed requires a card via Stripe checkout.

Gibt zurück[String!]!
QUERY

citiesByCountry

#

List all cities in a country (for admin dropdowns).

Argumente

  • countryCodeString!
Gibt zurück[!]!
QUERY

clientBootstrap

#

One-shot tenant bootstrap. Returns the tenant identity + every client-facing config slice in a single round-trip. Read by the client SDK at app startup; per-domain queries (branding, mapProviderConfig, …) stay available for admin tools.

Gibt zurück!
QUERY

countryExclusivityTiers

#

Get all country exclusivity tier definitions with pricing.

Gibt zurück[!]!
QUERY

currentTenantStoreReviewer

#

The tenant's auto-provisioned store-review account. Returns null if the reviewer hasn't been provisioned yet — the frontend should surface a "Provision" CTA in that case.

Gibt zurück
QUERY

discoverTenantByCode

#

Discover a tenant by its join code (public, no auth required). The code is case-insensitive. Returns null if no active tenant matches.

Argumente

  • codeString!
Gibt zurück
QUERY

discoverTenantByDomain

#

Discover a tenant by its domain (public, no auth required). Resolves the tenant from a custom or system domain string (e.g., "acme-rides.bettersuite.io" or "ride.acmetaxi.com"). Returns null if no active tenant matches the domain.

Argumente

  • domainString!
Gibt zurück
QUERY

discoverTenantsByCity

#

Discover active tenants operating in a specific city (public, no auth required).

Argumente

  • cityId!
Gibt zurück[!]!
QUERY

discoverTenantsByCountry

#

Discover active tenants operating in a country (public, no auth required). Returns tenants that have at least one operation city in the given country.

Argumente

  • countryCodeString!
Gibt zurück[!]!
QUERY

discoverTenantsNearby

#

Discover tenants near a geographic location (public, no auth required). Searches via operation cities within the given radius, ordered by distance to the nearest city.

Argumente

  • input!
Gibt zurück[!]!
QUERY

exclusivityPriceForCities

#

Get exclusivity pricing for specific cities. Returns per-city pricing based on population, along with availability (whether the city is already locked by another tenant). Call this after the tenant has selected their operation cities.

Argumente

  • cityIds[!]!
Gibt zurück[!]!
QUERY

exclusivityPriceForCountries

#

Get exclusivity pricing for specific countries.

Argumente

  • countryCodes[String!]!
Gibt zurück[!]!
QUERY

exclusivityTiers

#

Get all exclusivity tier definitions with pricing. Useful for displaying a pricing table in the UI.

Gibt zurück[!]!
QUERY

isSlugAvailable

#

Check if a slug is available

Argumente

  • slugString!
Gibt zurückBoolean!
QUERY

mapProviderConfig

#

Get the current map provider configuration. Returns the active map provider settings for the current tenant, including configured providers (Google Maps, Mapbox, etc.) and their services.

Gibt zurück
QUERY

meTenant

#

Get the current tenant (based on JWT token)

Gibt zurück
QUERY

meTenantPlatformAddons

#

Returns the platform-controlled addons granted to the caller's tenant. Tenants use this to drive UI gates (showing the "Star members" tab only when the StarTier addon is effective, etc.).

Gibt zurück[!]!
QUERY

myActiveOperationCount

#

Count of currently-active cities for the tenant. Useful for UI gauges next to the plan's locations limit without round-tripping the full list.

Gibt zurückInt!
QUERY

myAddons

#

Get the current tenant's active add-ons.

Gibt zurück[!]!
QUERY

myCountryExclusivities

#

List the current tenant's active country exclusivities.

Gibt zurück[!]!
QUERY

myDomains

#

List all domains (system + custom) for the current tenant.

Gibt zurück[!]!
QUERY

myInvoices

#

Get the current tenant's invoice history (upcoming and past).

Argumente

  • pagination
Gibt zurück!
QUERY

myOperationCities

#

List the *active* cities assigned to the current tenant. Backward-compatible shape: returns only ACTIVE rows so existing clients reading this field continue to see what they did before. Use myOperationCityList for the full allow-list including disabled rows.

Gibt zurück[!]!
QUERY

myOperationCityList

#

Full allow-list: active and disabled rows. Disabled rows stay in the list with their status/disabledReason so the UI can show reactivate affordances without rediscovering cities.

Gibt zurück[!]!
QUERY

myOperationFootprint

#

Aggregated footprint of where the tenant operates: distinct countries, admin regions, and cities, joined with the shared geo reference tables. One round trip for cascading dropdowns (tax zone editor, region setup, dashboard summaries) so each surface doesn't re-derive the dedupe / join logic.

Gibt zurück!
QUERY

myRegionExclusivities

#

List the current tenant's active region exclusivities.

Gibt zurück[!]!
QUERY

mySubscription

#

Get the current tenant's active subscription.

Gibt zurück
QUERY

myUsage

#

Get the current tenant's usage meters. Event-counter meters (e.g. monthly_transactions) come from the usage-meter store, written by record_usage. State counters (verticals, locations) are synthesized here from their authoritative sources — the active subscription and the operation-area repo — so they can't drift from reality.

Gibt zurück[!]!
QUERY

notificationSettings

#

Get the current notification settings configuration. Returns the active notification settings for the current tenant.

Gibt zurück
QUERY

parkingConfig

#

Get the current parking configuration. Returns the active parking config for the current tenant.

Gibt zurück
QUERY

paymentGatewayConfig

#

Get the current payment gateway configuration. Returns the active payment gateway config for the current tenant.

Gibt zurück
QUERY

planAddons

#

Get available add-ons for a plan (public).

Argumente

  • planIdString!
Gibt zurück[!]!
QUERY

planDetails

#

Get details for a specific plan (public).

Argumente

  • planIdString!
Gibt zurück
QUERY

platformConnectedApps

#

All platform-owned connected apps (shared by every tenant). Callable by tenant admins too — they need to see what they're inheriting (and opt out of) on the domain-admin UI.

Gibt zurück[!]!
QUERY

regionalSettings

#

Get the current regional settings configuration. Returns locale, measurement system, time format, map defaults, wallet top-up presets, and support contact for the current tenant.

Gibt zurück
QUERY

searchCities

#

Search reference cities by name prefix (for admin UI dropdowns).

Argumente

  • queryString!
  • countryCodeString
  • limitInt
Gibt zurück[!]!
QUERY

serviceConfig

#

Get the current service configuration. Returns the active service config for the current tenant.

Gibt zurück
QUERY

shopSettings

#

Get the current shop settings configuration. Returns the active shop settings for the current tenant.

Gibt zurück
QUERY

supportedLanguages

#

List every language the platform can render end-user UI in. This is the canonical superset a tenant picks its available_languages from. Static platform metadata — no tenant context required.

Gibt zurück[!]!
QUERY

tenant

#

Get a tenant by ID (admin operation)

Argumente

  • id!
Gibt zurück
QUERY

tenantAuthPolicy

#

Resolve the tenant's effective AuthPolicy. Never returns null — falls back to the platform default when the tenant has no revision stored.

Gibt zurück!
QUERY

tenantConnectedApps

#

Connected apps owned by a tenant. Tenant admins omit tenantId (defaults to their own); platform admins may pass any tenantId.

Argumente

  • tenantIdID
Gibt zurück[!]!
QUERY

tenantDisabledPlatformAppIds

#

IDs of platform apps the tenant has opted out of. Tenant admins omit tenantId; platform admins may pass any tenantId.

Argumente

  • tenantIdID
Gibt zurück[ID!]!
QUERY

tenantInfo

#

Get public tenant information. Returns tenant info including branding, current plan details, available upgrades, and add-ons. Accessible to all authenticated users within the tenant.

Gibt zurück!
QUERY

tenantOnboardingStatus

#

Get the onboarding completion status for the current tenant.

Gibt zurück!
QUERY

tenants

#

Get all tenants (admin operation)

Gibt zurück[!]!
QUERY

tenantTesters

#

The tenant's tester accounts (role · phone · deterministic OTP). Empty until the roster is provisioned.

Gibt zurück[!]!
QUERY

tenantTierPolicy

#

Get the public tier policy for the current tenant. Apps read this unauthenticated to decide whether to allow guest order creation or pop the registration sheet.

Gibt zurück
QUERY

tenantWallet

#

Return the current tenant's plan-credit wallet balance for the given currency. Returns a wallet with exists=false (and zero balances) when the tenant has never been credited — callers should still treat this as a valid empty wallet rather than an error.

Argumente

  • currencyString!
Gibt zurück!

Mutations

MUTATION

addAddon

#

Add an addon to the current subscription.

Argumente

  • input!
Gibt zurück!
MUTATION

addCustomDomain

#

Add a custom domain for a tenant app. The domain must be globally unique. After adding, the tenant must set up a CNAME record pointing to the system subdomain (returned in the entity's cname_target field) and then call verifyCustomDomain.

Argumente

  • input!
Gibt zurück!
MUTATION

addOperationCity

#

Add a city to the current tenant's operation areas. If the city is already in the allow-list (any status), the row is reactivated rather than re-inserted. Reactivation and net-new adds both consume one slot of the plan's locations limit.

Argumente

  • cityId!
Gibt zurückBoolean!
MUTATION

addTenantTester

#

Add a single custom tester for a vertical (customer or provider role), optionally with a specific phone number.

Argumente

  • input!
Gibt zurück!
MUTATION

adminActivateTenant

#

Re-activate a suspended or cancelled tenant (PlatformAdmin only). Blocked tenants cannot be activated — use adminUnblockTenant instead.

Argumente

  • id!
Gibt zurück!
MUTATION

adminAddOperationCity

#

Add a city to a tenant's operation areas (PlatformAdmin only).

Argumente

  • tenantId!
  • cityId!
Gibt zurückBoolean!
MUTATION

adminAssignPlan

#

Force-assign a plan to a tenant (PlatformAdmin only, bypasses Stripe).

Argumente

  • tenantId!
  • planIdString!
  • periodDaysInt

    Number of days for the subscription period (None = indefinite).

Gibt zurück!
MUTATION

adminBlockTenant

#

Block a tenant immediately (PlatformAdmin only). Blocked tenants cannot be auto-reactivated by billing events. Use adminUnblockTenant to restore access.

Argumente

  • id!
  • reasonString!
Gibt zurück!
MUTATION

adminCancelRegistration

#

Cancel a pending registration (PlatformAdmin only).

Argumente

  • idString!
Gibt zurückBoolean!
MUTATION

adminCancelTenantDataWipe

#

Cancel a pending wipe within the grace window. Any platform admin can cancel any pending wipe — the action is the "safe" direction so no step-up is required.

Argumente

  • id!
Gibt zurück!
MUTATION

adminChangeTenantSlug

#

Change a tenant's slug (PlatformAdmin only). The slug is the root of every system app subdomain (<slug>-<app>.<apex>), so this is a high-impact, **hard-cut** operation: * every system tenant_domains row is regenerated in place — the old subdomains stop resolving immediately (no alias/redirect), * any verified custom domain is auto-unverified because its CNAME target has moved; the returned custom_domains_to_repoint tells the admin/tenant the new target to point at and re-verify, * the domain -> tenant cache entries for the old subdomains are evicted so resolution flips over without waiting for TTL. Admin/owner passkeys are unaffected (their WebAuthn RP ID is anchored to the apex, not the subdomain). End-user passkeys bound to a system subdomain will need to be re-registered — those users fall back to OTP. Step-up gated: the platform admin must hold a fresh elevation token, mirroring admin_delete_tenant.

Argumente

  • input!
Gibt zurück!
MUTATION

adminClearPlatformAddon

#

Drop the addon record entirely so the override goes back to "absent" — distinct from admin_revoke_platform_addon, which keeps a enabled = false record as an explicit kill switch. Used to **reset** a per-tenant override (e.g. clear an AiAccess flip so the plan-tier check decides going forward).

Argumente

  • input!
Gibt zurückBoolean!
MUTATION

adminCreateCountryExclusivity

#

Create a country exclusivity agreement for a tenant. PlatformAdmin only. If monthly_price_minor is omitted the price is auto-calculated from the country's GDP-based value tier.

Argumente

  • input!
Gibt zurück!
MUTATION

adminCreatePlatformNotificationChannel

#

Create a new notification channel. PlatformAdmin only.

Argumente

  • input!
Gibt zurück!
MUTATION

adminCreateRegionExclusivity

#

Create a region exclusivity agreement for a tenant. PlatformAdmin only. If monthly_price_minor is omitted the price is auto-calculated from the city's population tier and country GDP data.

Argumente

  • input!
Gibt zurück!
MUTATION

adminCreateTenant

#

Create a new tenant as PlatformAdmin. When skip_verification is true, tenant + admin account are created immediately. When false, an invitation email is sent with a 7-day verification link.

Argumente

  • input!
Gibt zurück!
MUTATION

adminCreditTenantWallet

#

Grant credit to a tenant's plan-credit wallet (PlatformAdmin only). Records an AdminGiftCredit ledger transaction; idempotency is on the caller — every call adds another grant.

Argumente

  • input!
Gibt zurück!
MUTATION

adminDeletePlatformNotificationChannel

#

Delete a channel. PlatformAdmin only. Returns true on success.

Argumente

  • idString!
Gibt zurückBoolean!
MUTATION

adminDeleteStoreCredential

#

Remove a platform store credential (polling for that store stops).

Argumente

  • store!
Gibt zurückBoolean!
MUTATION

adminDeleteTenant

#

Soft-delete a tenant (PlatformAdmin only). Step-up gated — the platform admin must re-enter their password to mint an elevation token before this mutation will proceed. Tenant deletion is irreversible from the tenant's side, so a stolen platform-admin session cannot wipe a tenant without the password too.

Argumente

  • id!
Gibt zurückBoolean!
MUTATION

adminExtendSubscription

#

Extend a subscription's period (PlatformAdmin only).

Argumente

  • subscriptionId!
  • extendDaysInt!
Gibt zurück!
MUTATION

adminGrantPlatformAddon

#

Grant a platform-controlled addon to a tenant. PlatformAdmin only. expires_at = None makes the grant indefinite. Re-granting an existing addon overwrites the previous record (new granted_by and granted_at stamps; new expiry).

Argumente

  • input!
Gibt zurück!
MUTATION

adminProvisionRegistration

#

Force-create a tenant from a pending or email-verified registration. Admin picks a plan — the tenant, account, and subscription are created immediately, bypassing the user's onboarding flow. PlatformAdmin only. Force-create with a specific plan. Falls back to the registration's plan or the default trial.

Argumente

  • input!
Gibt zurückBoolean!
MUTATION

adminReactivateSubscription

#

Reactivate a cancelled (or cancel-at-period-end) subscription (PlatformAdmin only).

Argumente

  • subscriptionId!
Gibt zurück!
MUTATION

adminRefreshStoreReleases

#

Run the store poll synchronously — all platform apps, or one app when connectedAppId is given. Pairs poll concurrently and the whole run is capped at 60s so the request can't outlive edge timeouts; per-app failures land in errors without failing the mutation.

Argumente

  • connectedAppIdID
Gibt zurück!
MUTATION

adminRemoveOperationCity

#

Remove a city from a tenant's operation areas (PlatformAdmin only).

Argumente

  • tenantId!
  • cityId!
Gibt zurückBoolean!
MUTATION

adminRetryTenantDataWipe

#

Re-queue a FAILED wipe. Sets the row back to PENDING with execute_at = now() so the worker picks it up on its next tick. Step-up gated — same protection as scheduling a fresh wipe.

Argumente

  • id!
Gibt zurück!
MUTATION

adminRevokeCountryExclusivity

#

Revoke (deactivate) a country exclusivity agreement. PlatformAdmin only.

Argumente

  • id!
Gibt zurückBoolean!
MUTATION

adminRevokePlatformAddon

#

Revoke a previously granted addon. PlatformAdmin only. The grant record is kept (with enabled = false) so the audit trail of past activations is recoverable from the config history. A subsequent grant will overwrite it.

Argumente

  • input!
Gibt zurückBoolean!
MUTATION

adminRevokeRegionExclusivity

#

Revoke (deactivate) a region exclusivity agreement. PlatformAdmin only.

Argumente

  • id!
Gibt zurückBoolean!
MUTATION

adminScheduleTenantDataWipe

#

Schedule a tenant data wipe with a 12-hour grace window. The data is not deleted immediately; a background worker executes the request after execute_at. Cancel within the window via adminCancelTenantDataWipe. Step-up gated — the platform admin must re-enter their password to mint an elevation token before this mutation will proceed.

Argumente

  • input!
Gibt zurück!
MUTATION

adminSetBillingEmail

#

Set or clear the billing email override on a subscription (PlatformAdmin only).

Argumente

  • subscriptionId!
  • billingEmailString

    New billing email; null falls back to the tenant admin email.

Gibt zurück!
MUTATION

adminSetCancelAtPeriodEnd

#

Toggle cancel-at-period-end on a subscription (PlatformAdmin only).

Argumente

  • subscriptionId!
  • cancelAtPeriodEndBoolean!
Gibt zurück!
MUTATION

adminSetGraceUntil

#

Set or clear the grace-period end on a subscription (PlatformAdmin only).

Argumente

  • subscriptionId!
  • graceUntil

    New grace-until; null clears the grace period.

Gibt zurück!
MUTATION

adminSetPauseUntil

#

Set or clear the pause end on a subscription (PlatformAdmin only).

Argumente

  • subscriptionId!
  • pauseUntil

    New pause-until; null clears the pause.

Gibt zurück!
MUTATION

adminSetSubscriptionCustomLimits

#

Set or clear custom per-subscription limit overrides (PlatformAdmin only). Input must be a JSON object keyed by limit_id (e.g. {"max_drivers": 250}).

Argumente

  • subscriptionId!
  • customLimitsJsonString

    JSON object keyed by limit_id; null clears all overrides.

Gibt zurück!
MUTATION

adminSetSubscriptionVerticals

#

Replace the selected verticals on a subscription (PlatformAdmin only).

Argumente

  • subscriptionId!
  • verticals[!]!
Gibt zurück!
MUTATION

adminSetTrialEnd

#

Set or clear the trial end date on a subscription (PlatformAdmin only).

Argumente

  • subscriptionId!
  • trialEnd

    New trial end; null clears the trial end.

Gibt zurück!
MUTATION

adminSuspendTenant

#

Suspend a tenant (PlatformAdmin only).

Argumente

  • id!
Gibt zurück!
MUTATION

adminTestPlatformNotificationChannel

#

Send a synchronous test notification to a channel. PlatformAdmin only. Returns true when the underlying HTTP call succeeded.

Argumente

  • idString!
Gibt zurückBoolean!
MUTATION

adminUnblockTenant

#

Unblock a blocked tenant (PlatformAdmin only). Restores the tenant to Active status.

Argumente

  • id!
Gibt zurück!
MUTATION

adminUpdateCountryExclusivity

#

Update a country exclusivity agreement. PlatformAdmin only.

Argumente

  • input!
Gibt zurück!
MUTATION

adminUpdatePlatformNotificationChannel

#

Update an existing channel. PlatformAdmin only.

Argumente

  • input!
Gibt zurück!
MUTATION

adminUpdateRegionExclusivity

#

Update a region exclusivity agreement. PlatformAdmin only.

Argumente

  • input!
Gibt zurück!
MUTATION

adminUpdateSubscriptionStatus

#

Override a subscription's status (PlatformAdmin only).

Argumente

  • subscriptionId!
  • status!
Gibt zurück!
MUTATION

adminUpdateTenant

#

Update tenant fields (PlatformAdmin only).

Argumente

  • input!
Gibt zurück!
MUTATION

adminUpsertAppStoreCredential

#

Store (or replace) the platform App Store Connect API key. The key material is encrypted at rest and never readable back over the API.

Argumente

  • input!
Gibt zurück!
MUTATION

adminUpsertGooglePlayCredential

#

Store (or replace) the platform Google Play service account. The JSON key is encrypted at rest and never readable back over the API.

Argumente

  • input!
Gibt zurück!
MUTATION

adminVerifyRegistrationEmail

#

Verify a pending registration's email. Moves status to EmailVerified so the user can log in and complete onboarding (plan selection + payment) themselves. Bypasses email token and expiry. PlatformAdmin only.

Argumente

  • idString!
Gibt zurückBoolean!
MUTATION

applyTenantWalletToBilling

#

Forward the tenant wallet's credit (in currency) to the active subscription's PSP customer balance. Idempotent in the sense that repeated calls when the wallet is empty are no-ops.

Argumente

  • currencyString!
Gibt zurück!
MUTATION

cancelAllRegionExclusivities

#

Cancel all region exclusivities for the current tenant.

Gibt zurückInt!
MUTATION

cancelCountryExclusivity

#

Cancel country exclusivity for a specific country.

Argumente

  • countryCodeString!
Gibt zurückBoolean!
MUTATION

cancelRegionExclusivity

#

Cancel region exclusivity for a specific city.

Argumente

  • cityId!
Gibt zurückBoolean!
MUTATION

cancelSubscription

#

Cancel the current subscription.

Argumente

  • input!
Gibt zurück!
MUTATION

changePlan

#

Upgrade or downgrade the subscription plan.

Argumente

  • input!
Gibt zurück!
MUTATION

completeOnboarding

#

Complete onboarding by subscribing to a plan. Creates the tenant, admin account, and subscription. Returns new authentication tokens for the created tenant admin.

Argumente

  • input!
Gibt zurück!
MUTATION

confirmCheckoutSession

#

Finalize a Stripe checkout without waiting for the webhook. The client calls this on return from checkout. We retrieve the session from Stripe, reject it if it hasn't completed + paid, then run the same provisioning the webhook does. If the webhook already processed it, this returns alreadyProcessed = true instead of double-provisioning. No GraphQL authentication required — the registration flow calls this before the tenant exists, so there's no session to bind to. The session_id itself is the authenticator: it's unguessable and Stripe only hands it out to the paying user, and the mutation can only produce side effects if the PSP confirms the session is complete + paid.

Argumente

  • input!
Gibt zurück!
MUTATION

createApiKey

#

Create a new API key for the tenant. The plaintext key is returned only once. Store it securely. Requires Owner-tier (TenantOwner or PlatformAdmin) — issuing a long-lived backend credential is a danger-zone action.

Argumente

  • input!
Gibt zurück!
MUTATION

createBillingPortalSession

#

Create a Stripe Billing Portal session. Returns the portal URL.

Argumente

  • returnUrlString!
Gibt zurückString!
MUTATION

createConnectedApp

#

Create a connected app. * ownership = Platform — PlatformAdmin only, tenantId must be null. * ownership = Tenant — any admin, tenantId must be set (tenant admins may only create rows for their own tenant).

Argumente

  • input!
Gibt zurück!
MUTATION

createRegistrationCheckout

#

Create a Stripe checkout session for an email-verified registration. No tenant exists yet — the webhook will create it after payment. No authentication required (the registration_id serves as the identifier).

Argumente

  • input!
Gibt zurück!
MUTATION

deleteConnectedApp

#

Soft-delete a connected app. Same authorization rules as update.

Argumente

  • idID!
Gibt zurückBoolean!
MUTATION

disablePlatformConnectedApp

#

Opt the tenant out of a platform-owned app — it stops appearing in AASA / assetlinks for that tenant's domains.

Argumente

  • connectedAppIdID!
  • tenantIdID
Gibt zurückBoolean!
MUTATION

enablePlatformConnectedApp

#

Re-enable (i.e., remove from the opt-out set) a previously-disabled platform app for the tenant.

Argumente

  • connectedAppIdID!
  • tenantIdID
Gibt zurückBoolean!
MUTATION

generateBranding

#

Generate a brand from a curated style and the operator's brand colour. Renders every mark variant, materialises each into an upload, and stores the recipe alongside so the brand can be re-rendered when the name or style changes. Non-mark company fields (name, links, legal) are preserved — this replaces the *marks*, not the identity. Requires an admin-tier caller: tenant admin, tenant owner, or an impersonating platform admin.

Argumente

  • input!
Gibt zurück!
MUTATION

previewLegacyPurchaseCode

#

Validate a code without consuming it. Surfaces "already redeemed" so the UI can warn the user before they commit.

Argumente

  • input!
Gibt zurück!
MUTATION

provisionTenantStoreReviewer

#

Provision (or sync) the store-review account. Three branches, see StoreReviewManagementUseCase docs: 1. Account missing → returns credentials (one-time plaintext). 2. Account exists, roles drifted → returns info + synced_roles. 3. Account exists, roles current → errors. Caller should switch to the password reset action.

Gibt zurück!
MUTATION

provisionTenantTesters

#

Provision (or top up) the auto roster — one tester per (app, role) slot for the tenant's subscribed verticals. Idempotent.

Gibt zurück!
MUTATION

purchaseCountryExclusivity

#

Purchase country-level exclusivity for one or more countries.

Argumente

  • countryCodes[String!]!
Gibt zurück[!]!
MUTATION

purchaseRegionExclusivity

#

Purchase region exclusivity for one or more cities. The tenant must have an active subscription and the cities must be in their operation areas. The exclusivity covers all verticals on the tenant's current subscription and lasts until cancelled or the subscription ends.

Argumente

  • cityIds[!]!
Gibt zurück[!]!
MUTATION

reactivateSubscription

#

Reactivate a cancelled subscription (before period end).

Gibt zurück!
MUTATION

redeemLegacyPurchaseCode

#

Redeem a legacy purchase code, crediting the tenant wallet by the exact amount the customer originally paid. Single-use per code.

Argumente

  • input!
Gibt zurück!
MUTATION

registerTenant

#

Register a new tenant. Sends a verification email to the admin. No authentication required.

Argumente

  • input!
Gibt zurück!
MUTATION

removeAddon

#

Remove an addon from the current subscription.

Argumente

  • addonIdString!
Gibt zurückBoolean!
MUTATION

removeCustomDomain

#

Remove a custom domain. Only custom domains can be removed; system domains are managed automatically.

Argumente

  • idString!
Gibt zurückBoolean!
MUTATION

removeOperationCity

#

Remove a city from the current tenant's operation areas. This permanently drops the row from the allow-list. Use setOperationCityActive to soft-disable instead — disabled rows stay parked for one-click reactivation.

Argumente

  • cityId!
Gibt zurückBoolean!
MUTATION

removeTenantTester

#

Remove a tester account. Returns true if a tester was deleted.

Argumente

  • accountId!
Gibt zurückBoolean!
MUTATION

removeVerticalBrand

#

Remove branding for a specific vertical. Requires an admin-tier caller: tenant admin, tenant owner, or an impersonating platform admin.

Argumente

  • vertical!
Gibt zurück!
MUTATION

resendVerificationEmail

#

Resend the verification email for a pending registration. Rate limited: max 5 resends, 60s cooldown between resends. No authentication required.

Argumente

  • emailString!
Gibt zurück!
MUTATION

resetTenantStoreReviewerPassword

#

Rotate the reviewer's password and return the new plaintext once. Errors with "store-review account not found" if the reviewer hasn't been provisioned yet.

Gibt zurück!
MUTATION

revokeAllApiKeys

#

Revoke all API keys for the tenant. All keys will immediately become invalid. Use with caution! Requires Owner-tier (TenantOwner or PlatformAdmin).

Argumente

  • input!
Gibt zurück!
MUTATION

revokeApiKey

#

Revoke a single API key. The key will immediately become invalid for authentication. Requires Owner-tier (TenantOwner or PlatformAdmin).

Argumente

  • input!
Gibt zurück!
MUTATION

rollbackBranding

#

Rollback branding to a previous version. Creates a new version with the content from the specified version. Requires an admin-tier caller: tenant admin, tenant owner, or an impersonating platform admin.

Argumente

  • versionInt!
Gibt zurück!
MUTATION

rotateApiKey

#

Rotate an API key (revoke old and create new in one operation). This enables zero-downtime key rotation by creating the new key before revoking the old one. Requires Owner-tier (TenantOwner or PlatformAdmin) **and** a fresh step-up elevation token — rotation is a destructive security action that should be paired with a re-auth so a stolen Owner session can't quietly mint a long-lived key.

Argumente

  • input!
Gibt zurück!
MUTATION

saveTenantConfig

#

Save a tenant configuration (TenantAdmin for own tenant, PlatformAdmin for any). Creates a new versioned revision and sets it as current. Provide exactly one config variant via the @oneOf input.

Argumente

  • tenantId

    Target tenant ID. Required for PlatformAdmin; uses own tenant for TenantAdmin.

  • config!
Gibt zurückBoolean!
MUTATION

setOperationCityActive

#

Toggle the active state of an existing operation city. Activating a row enforces the plan locations limit (it consumes a slot). Deactivating frees the slot but keeps the row in the allow-list so the tenant can flip it back without rediscovering the city.

Argumente

  • cityId!
  • activeBoolean!
Gibt zurückBoolean!
MUTATION

setPlanCardless

#

Set whether plan_id may be started cardless. PlatformAdmin only. Returns the new value.

Argumente

  • planIdString!
  • allowCardlessBoolean!
Gibt zurückBoolean!
MUTATION

setTenantDiscoverable

#

Toggle whether a tenant is publicly discoverable. Accessible by: - **TenantAdmin**: can toggle discoverability of their own tenant. - **PlatformAdmin**: can toggle discoverability of any tenant (pass tenant_id).

Argumente

  • tenantId

    Target tenant. Required for PlatformAdmin; ignored for TenantAdmin (uses own tenant).

  • discoverableBoolean!
Gibt zurück!
MUTATION

setTenantIsDemo

#

Toggle whether a tenant is a demo/test tenant. Demo tenants get relaxed auth and extra UI features. This is a platform-level setting and can only be changed by PlatformAdmin.

Argumente

  • tenantId!
  • isDemoBoolean!
Gibt zurück!
MUTATION

setVerticalAppBrand

#

Set or update branding for a specific app within a vertical. Requires an admin-tier caller: tenant admin, tenant owner, or an impersonating platform admin.

Argumente

  • vertical!
  • app!
  • input!
Gibt zurück!
MUTATION

setVerticalBrand

#

Set or update branding for a specific vertical. Requires an admin-tier caller: tenant admin, tenant owner, or an impersonating platform admin.

Argumente

  • vertical!
  • input!
Gibt zurück!
MUTATION

subscribeToPlan

#

Start the subscription flow. Creates a Stripe Checkout Session and returns the checkout URL. No subscription is saved until the checkout completes and the webhook fires.

Argumente

  • input!
Gibt zurück!
MUTATION

updateAddonQuantity

#

Update the quantity of an existing addon.

Argumente

  • input!
Gibt zurück!
MUTATION

updateAuthPolicy

#

Save a new revision of the tenant's AuthPolicy. Requires TenantAdmin (or PlatformAdmin impersonation). The payload replaces the rule set in full — there's no merge semantics, the version-bump-per-save pattern matches update_tier_config.

Argumente

  • input!
Gibt zurück!
MUTATION

updateBranding

#

Update the entire branding configuration. Creates a new version and sets it as current. Requires an admin-tier caller: tenant admin, tenant owner, or an impersonating platform admin.

Argumente

  • input!
Gibt zurück!
MUTATION

updateCompanyBrand

#

Update only the company brand. Preserves existing vertical brands. Requires an admin-tier caller: tenant admin, tenant owner, or an impersonating platform admin.

Argumente

  • input!
Gibt zurück!
MUTATION

updateConnectedApp

#

Update mutable fields on a connected app. Ownership and platform are immutable — delete + recreate if those need to change.

Argumente

  • input!
Gibt zurück!
MUTATION

updateOnboardingBusiness

#

Persist the business name + a unique slug on an email-verified registration. No authentication required (the registration_id is the identifier).

Argumente

  • input!
Gibt zurück!
MUTATION

updateRegionalSettings

#

Update regional settings configuration. Sets locale, measurement system, time format, map defaults, wallet top-up presets, and support contact for the tenant. Creates a new version and sets it as current. Requires TenantAdmin role.

Argumente

  • input!
Gibt zurück!
MUTATION

updateTierConfig

#

Save a new revision of the tenant's tier policy (display names, verification ladder, expiry days, strike thresholds, payment-method requirement). Requires TenantAdmin role.

Argumente

  • input!
Gibt zurück!
MUTATION

verifyCustomDomain

#

Verify DNS for a custom domain by checking host resolution. The tenant must have already set up a CNAME record pointing the custom domain to the system subdomain. This mutation performs a basic DNS lookup to confirm the domain resolves. Full CNAME chain verification may be added later.

Argumente

  • idString!
Gibt zurück!
MUTATION

verifyTenantRegistration

#

Verify a tenant registration email token. Marks the registration as EmailVerified — no tenant is created yet. The user must log in and complete onboarding (plan subscription) to become a real tenant. No authentication required.

Argumente

  • tokenString!
Gibt zurück!