platform97 Ops

Platform API

Cross-cutting operations that don't fit a single domain.

Queries

QUERY

adminBillingClients

#

Clients, alphabetically (PlatformAdmin only).

Argumente

  • filter
  • pagination
Gibt zurück!
QUERY

adminBlogPost

#

Single post by id, any status.

Argumente

  • tenantIdID
  • idID!
Gibt zurück
QUERY

adminBlogPostRevisions

#

Revision history for a post, newest first.

Argumente

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

adminBlogPosts

#

Admin listing of posts in one tenant with optional filters. All filters AND together. searchQuery matches title and slug case-insensitively (ILIKE). sort orders the whole list before it is paged; omitted, the most recently updated post comes first.

Argumente

  • tenantIdID
  • status
  • authorIdID
  • categoryIdID
  • searchQueryString
  • sort
  • pagination
Gibt zurück!
QUERY

adminBlogTags

#

Tags for the admin picker.

Argumente

  • tenantIdID
Gibt zurück[!]!
QUERY

adminDefaultBillingIssuer

#

The issuer new invoices default to (PlatformAdmin only).

Gibt zurück
QUERY

adminDemoSimulator

Veraltet#

Grund für die Abkündigung: Use adminDemoSimulatorWithValues; BET-205

Argumente

  • tenantId!
  • vertical
Gibt zurück
QUERY

adminDemoSimulatorWithValues

#

Argumente

  • tenantId!
  • vertical
Gibt zurück
QUERY

adminInvoice

#

One invoice with its line items and payments (PlatformAdmin only).

Argumente

  • id!
Gibt zurück
QUERY

adminInvoiceCorrection

#

A draft or replacement created to correct an issued invoice.

Argumente

  • id!
Gibt zurück
QUERY

adminInvoicePdf

#

Render an invoice to PDF, base64-encoded (PlatformAdmin only). A draft renders against the live parties so the author can preview their edits; an issued invoice renders from its own frozen snapshot.

Argumente

  • id!
Gibt zurück!
QUERY

adminInvoices

#

List platform invoices (PlatformAdmin only). sort orders the whole list before it is paged; omitted, the newest issue date comes first.

Argumente

  • filter
  • sort
  • pagination
Gibt zurück!
QUERY

changelogEntries

#

All changelog entries (drafts + published + archived). sort orders the whole list before it is paged; omitted, the most recently updated entry comes first.

Argumente

  • status
  • sort
  • pagination
Gibt zurück!
QUERY

changelogEntry

#

Single entry by ID (any status).

Argumente

  • idID!
Gibt zurück
QUERY

dataSyncPlan

#

Build a MigrationPlan for a source — read-only projection of what runDataSyncSource would do given the current config. Surfaced before the "Run sync now" button so the operator can review the per-phase row + blob projections, missing required answers, and warnings.

Argumente

  • sourceId!
Gibt zurück!
QUERY

dataSyncRun

#

One run by id (with full coverage report when completed).

Argumente

  • id!
Gibt zurück
QUERY

dataSyncRuns

#

Recent runs for a source. Standard offset pagination via the kernel's PaginationInput; clients send limit + page (or an after cursor); response carries the standard pageInfo. sort orders the whole history before it is paged (omitted: newest first).

Argumente

  • sourceId!
  • sort
  • pagination
Gibt zurück!
QUERY

dataSyncSource

#

One data-sync source by id (must belong to the calling tenant).

Argumente

  • id!
Gibt zurück
QUERY

dataSyncSources

#

Data-sync sources configured for the calling tenant. Standard offset pagination via the kernel's PaginationInput; sort orders the whole list before it is paged (omitted: newest first). Requires tenant_admin or higher.

Argumente

  • sort
  • pagination
Gibt zurück!
QUERY

discoverDataSyncSource

#

Run discovery against a source — returns the open admin questions plus estimated row counts. Read-only on the source DB.

Argumente

  • sourceId!
Gibt zurück!
QUERY

publishedBlogPostBySlug

#

Single published post by slug. Returns null for missing or non-public posts — drafts must never leak through this resolver.

Argumente

  • slugString!
Gibt zurück
QUERY

publishedBlogPosts

#

Reverse-chronological feed of published posts. Optional category filter (by slug). The website caches the response via Next.js ISR.

Argumente

  • categorySlugString
  • pagination
Gibt zurück!
QUERY

publishedChangelogEntries

#

Reverse-chronological feed of published entries. Optional product filter. The website caches the response via Next.js ISR (revalidate = 60).

Argumente

  • product
  • pagination
Gibt zurück!
QUERY

publishedChangelogEntryBySlug

#

Single published entry by slug. Returns null for missing or non-public entries — drafts must never leak through this resolver.

Argumente

  • slugString!
Gibt zurück
QUERY

recentGithubReleases

#

Recent releases for one source. Drafting screen calls this once the admin picks a source from the dropdown.

Argumente

  • sourceIdID!
  • limitInt!

    Standard

    20
Gibt zurück[!]!
QUERY

releaseArtifact

#

Single artifact by key. Returns null if no artifact uses that key — UI surfaces "unknown artifact" rather than erroring.

Argumente

  • keyString!
Gibt zurück
QUERY

releaseArtifactInFlightDispatch

#

The single in-flight dispatch (pending or in_progress) for this artifact, if any. Returns null when the artifact has no active release. The UI uses this to disable the "Cut release" button while a release is queued.

Argumente

  • artifactKeyString!
Gibt zurück
QUERY

releaseArtifactRecentDispatches

#

Recent dispatches for a single artifact. Used by the per-artifact detail screen to show the last N releases.

Argumente

  • artifactKeyString!
  • firstInt
Gibt zurück[!]!
QUERY

releaseArtifacts

#

Every artifact known to Release Hub, in the order they appear in release_artifacts.toml. Cards on the dashboard are rendered directly from this list.

Gibt zurück[!]!
QUERY

releaseDispatch

#

Single dispatch by id. The dispatch detail / live status page polls this endpoint while a run is in progress.

Argumente

  • idID!
Gibt zurück
QUERY

releaseDraftingPromptActive

#

Active drafting prompt revision (prompt_name = release_notes_drafting). Returns null when no admin has saved one yet — the use case falls back to the shipped default.

Gibt zurück
QUERY

releaseDraftingPromptRevisions

#

All revisions for the drafting prompt, newest first. Powers the revision history view in admin settings.

Gibt zurück[!]!
QUERY

releaseSources

#

All configured GitHub sources — populates the drafting picker and the settings list.

Gibt zurück[!]!
QUERY

serverInfo

#
Gibt zurück!
QUERY

tenantExportDestination

#

Single destination by id. Authorization: caller must satisfy resolve_target_tenant against the destination's tenant.

Argumente

  • id!
Gibt zurück
QUERY

tenantExportDestinations

#

List destinations for the caller's tenant (tenant-owner) or for the supplied tenant_id (PlatformAdmin only).

Argumente

  • tenantId
Gibt zurück[!]!
QUERY

tenantExportRun

#

Argumente

  • id!
Gibt zurück
QUERY

tenantExportRuns

#

Argumente

  • tenantId
  • limitInt!

    Standard

    50
Gibt zurück[!]!
QUERY

workspaceDataExport

#

Latest ten exports and the next generation date. No expensive source-table scans.

Gibt zurück!

Mutations

MUTATION

activateReleaseDraftingPrompt

#

Argumente

  • idID!
Gibt zurückBoolean!
MUTATION

adminArchiveBillingClient

#

Hide a client from the picker without touching their invoices.

Argumente

  • id!
Gibt zurückBoolean!
MUTATION

adminConfigureDemoSimulator

#

Argumente

  • input
  • details
Gibt zurück!
MUTATION

adminCreateInvoice

#

Create a draft invoice (PlatformAdmin only).

Argumente

  • input!
Gibt zurück!
MUTATION

adminCreateInvoiceCorrection

#

Create a correction draft from an issued invoice with no payments.

Argumente

  • id!
Gibt zurück!
MUTATION

adminDeleteInvoiceDraft

#

Delete a draft outright (PlatformAdmin only). Drafts only. An issued invoice is voided instead, so the number series keeps no gaps for an auditor to ask about.

Argumente

  • id!
Gibt zurückBoolean!
MUTATION

adminIssueInvoice

#

Issue a draft: assign its number and freeze both parties onto it. One-way. Issued content stays fixed; an unpaid invoice can be replaced through a linked correction draft.

Argumente

  • id!
Gibt zurück!
MUTATION

adminSaveBillingClient

#

Create or update a client (PlatformAdmin only).

Argumente

  • input!
Gibt zurück!
MUTATION

adminSaveBillingIssuer

#

Create or update an issuer (PlatformAdmin only).

Argumente

  • input!
Gibt zurück!
MUTATION

adminSetDemoSimulatorState

Veraltet#

Grund für die Abkündigung: Use adminSetDemoSimulatorStateWithValues; BET-205

Argumente

  • tenantId!
  • stateString!
  • vertical
Gibt zurück!
MUTATION

adminSetDemoSimulatorStateWithValues

#

Argumente

  • tenantId!
  • stateString!
  • vertical
Gibt zurück!
MUTATION

adminUnarchiveBillingClient

#

Bring an archived client back into the picker.

Argumente

  • id!
Gibt zurückBoolean!
MUTATION

adminUpdateInvoice

#

Replace a draft invoice's content (PlatformAdmin only).

Argumente

  • input!
Gibt zurück!
MUTATION

adminVoidInvoice

#

Void an issued invoice (PlatformAdmin only).

Argumente

  • id!
Gibt zurück!
MUTATION

archiveBlogPost

#

Argumente

  • tenantIdID
  • idID!
Gibt zurück!
MUTATION

archiveChangelogEntry

#

Archive an entry — hidden from the public feed and the default admin list. Revisions stay intact.

Argumente

  • idID!
Gibt zurück!
MUTATION

cancelDataSyncRun

#

Mark a queued or running sync run as cancelled. The background task notices the status change between phase commits and bails out at the next checkpoint. Idempotent on already-terminal runs (returns the run as-is).

Argumente

  • runId!
Gibt zurück!
MUTATION

createDataSyncSource

#

Provision a new data-sync source for the calling tenant. Requires tenant_owner. Secrets are AES-GCM encrypted at rest; they're never returned over GraphQL afterwards.

Argumente

  • input!
Gibt zurück!
MUTATION

createTenantExportDestination

#

Create a destination. tenant_id in the input is honored only when the caller is PlatformAdmin.

Argumente

  • input!
Gibt zurück!
MUTATION

deleteDataSyncSource

#

Delete a source. Cascades to its data_sync_runs rows. When purgeMappings = true (default false), also wipes every data_sync_mappings row that this source's provider produced for the tenant — a clean disconnect that lets a re-imported source mint fresh UUIDs without bumping into the old mapping table. The BetterSuite rows themselves stay intact.

Argumente

  • id!
  • purgeMappingsBoolean!

    Standard

    false
Gibt zurückBoolean!
MUTATION

deleteReleaseSource

#

Argumente

  • idID!
Gibt zurückBoolean!
MUTATION

deleteTenantExportDestination

#

Argumente

  • id!
Gibt zurückBoolean!
MUTATION

dispatchRelease

#

Cut a release for the given artifact. Persists a dispatch row (which acquires the artifact's in-flight slot via a DB unique index), POSTs workflow_dispatch to GitHub Actions, writes a ReleaseDispatched audit row. The returned ReleaseDispatch starts in status pending; the reconciler worker updates it to in_progress once GitHub surfaces the run id, then to a terminal status. Errors: * ArtifactNotFound — unknown artifactKey * InvalidDispatchInputs — typed-confirm mismatch, unknown input name, missing required input, invalid choice * DispatchInFlight — another dispatch for this artifact is still pending or in_progress * RateLimited — recent successful dispatch is inside the cooldown window (5 min by default) * GithubApi — workflow_dispatch POST failed upstream

Argumente

  • input!
Gibt zurück!
MUTATION

draftChangelogEntry

#

Argumente

  • input!
Gibt zurück!
MUTATION

fetchDataSyncSourceRemoteEnvFile

#

Read a .env-shaped file from the legacy backend host via the source's already-saved SSH tunnel credentials. The raw contents are returned to the client, which parses them with the same routine the "paste .env" textarea uses. Requires connection_mode = ssh_tunnel and saved SSH secrets.

Argumente

  • sourceId!
  • remotePathString!
Gibt zurückString!
MUTATION

grantWorkspaceDataExport

#

Audited, one-use migration exception. Never bypasses global resource budgets.

Argumente

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

publishBlogPost

#

Argumente

  • tenantIdID
  • idID!
Gibt zurück!
MUTATION

publishChangelogEntry

#

Promote a draft to published (or republish an archived entry). Idempotent.

Argumente

  • idID!
Gibt zurück!
MUTATION

queueTenantExportRun

#

Queue an export run. v1 only the planning phase (dry_run = true) produces real output; non-dry runs land on the run row as failed with a "not implemented yet" message until the COPY+SSH pipeline is wired.

Argumente

  • input!
Gibt zurück!
MUTATION

refineChangelogEntry

#

Argumente

  • input!
Gibt zurück!
MUTATION

requestWorkspaceDataExport

#

Generate a portable backup, at most weekly. Repeated requests return the pending job.

Gibt zurück!
MUTATION

retryDataSyncRun

#

Re-trigger a sync against the source of a previous (typically failed) run. Mints a fresh run row — the original is left intact for audit. Convenience over runDataSyncSource(sourceId) so the UI's Retry button doesn't have to look up the source id client-side.

Argumente

  • runId!
Gibt zurück!
MUTATION

runDataSyncSource

#

Trigger a sync run. Mutation returns immediately with a SyncRun in queued status; the worker picks it up and transitions through running → completed / failed. Clients poll (or subscribe via the realtime service) for progress.

Argumente

  • sourceId!
  • dryRunBoolean!

    Standard

    false
Gibt zurück!
MUTATION

saveBlogPost

#

Argumente

  • input!
Gibt zurück!
MUTATION

saveBlogTag

#

Argumente

  • input!
Gibt zurück!
MUTATION

saveChangelogEntry

#

Create-or-update a changelog entry. New entries are inserted as drafts; promote with publishChangelogEntry. Every call appends a new revision row.

Argumente

  • input!
Gibt zurück!
MUTATION

saveReleaseDraftingPrompt

#

Argumente

  • input!
Gibt zurück!
MUTATION

scheduleBlogPost

#

Argumente

  • tenantIdID
  • idID!
  • publishAt!
Gibt zurück!
MUTATION

setDataSyncSourceLegacyEnv

#

Persist the parsed .env of the legacy app on the source row. Server parses the raw blob (so the canonical key set stays defined in Rust), stores it under data_sync_sources.legacy_env_import. The provider config resolves layered against this — operator answers win, otherwise env-derived defaults flow through, otherwise compiled defaults. Re-importing replaces the column without touching config, so explicit operator overrides survive.

Argumente

  • sourceId!
  • envContentsString!
Gibt zurück!
MUTATION

tenantExportRunDownloadUrl

Veraltet#

Grund für die Abkündigung: Use tenantExportRunDownloadUrlResult; BET-205

Argumente

  • runId!
  • ttlSecondsInt
Gibt zurück!
MUTATION

tenantExportRunDownloadUrlResult

#

Mint a short-lived download URL for a successful tarball-mode run's artifact. The URL points at the platform's /api/tenant-export/runs/:id/artifact route, which validates the embedded token and streams the .tar.gz. Re-minting rotates the token; any previous URL stops working. ttl_seconds is bounded between 60s and 7 days; default is download_token_default_ttl from AppState (24h out of the box).

Argumente

  • runId!
  • ttlSecondsInt
Gibt zurück!
MUTATION

testDataSyncSourceConnection

#

Validate a source's connection without saving anything. The admin can hit this from the Configure page before committing credentials. Read-only on the source DB; nothing is written to the target.

Argumente

  • input!
Gibt zurück!
MUTATION

testDataSyncSourceSshTunnel

#

Validate just the SSH layer — open the bastion session, capture the host-key fingerprint, disconnect. No MySQL connection is attempted. Returns success + the discovered fingerprint so the operator can sanity-check the bastion auth before saving credentials or running a full discovery.

Argumente

  • input!
Gibt zurück!
MUTATION

testTenantExportDestination

#

Dial the destination without queueing a run. Returns { ok, message, capturedSshFingerprint? }. For database destinations we open the SSH bastion tunnel (if configured) and run SELECT 1 against the target. For tarball destinations we touch the exports directory to confirm it's writable. When the SSH bastion's host key is captured for the first time, the fingerprint is BOTH persisted into the destination's config (so subsequent runs validate it) AND returned in the response so the UI can show it to the operator for explicit confirmation.

Argumente

  • id!
Gibt zurück!
MUTATION

unpublishBlogPost

#

Argumente

  • tenantIdID
  • idID!
Gibt zurück!
MUTATION

unpublishChangelogEntry

#

Flip a published entry back to draft. The original published_at is preserved so republishing keeps the same feed position.

Argumente

  • idID!
Gibt zurück!
MUTATION

updateDataSyncSource

#

Update a source's config and (optionally) its stored secrets. Requires tenant_owner.

Argumente

  • input!
Gibt zurück!
MUTATION

updateTenantExportDestination

#

Sparse update. The destination's tenant_id is fixed and not editable; transferring ownership isn't supported.

Argumente

  • input!
Gibt zurück!
MUTATION

upsertReleaseSource

#

Argumente

  • input!
Gibt zurück!
MUTATION

workspaceDataExportDownload

Veraltet#

Grund für die Abkündigung: Use workspaceDataExportDownloadResult; BET-205

Argumente

  • id!
Gibt zurück!
MUTATION

workspaceDataExportDownloadResult

#

Re-download an existing archive. Password confirmation never regenerates data.

Argumente

  • id!
Gibt zurück!

Subscriptions

SUBSCRIPTION

parkingProviderEvents

#

Subscribe to parking lot owner events (Parking service) Receive the bookings at the owner's lots as they change — a driver asking to book or for more time, paying, cancelling, a request or a payment lapsing — and the owner's notification center. **Requirements:** - Must be authenticated - Must have ParkSpotProvider role - Must be using Parking app

Gibt zurück!
SUBSCRIPTION

serviceCustomerEvents

Veraltet#

Subscribe to service-marketplace customer events **Requirements:** - Must be authenticated - Must have Customer role - Must be using the Service app

Grund für die Abkündigung: Use serviceCustomerEventStream; BET-205

Gibt zurück!
SUBSCRIPTION

serviceCustomerEventStream

#
Gibt zurück!
SUBSCRIPTION

serviceProviderEventStream

#
Gibt zurück!
SUBSCRIPTION

serviceServiceProviderEvents

Veraltet#

Subscribe to service-marketplace provider events A separate channel from the customer's, not a filtered view of it: a provider's lead traffic is commercially sensitive to other providers. **Requirements:** - Must be authenticated - Must have ServiceProvider role - Must be using the Service app

Grund für die Abkündigung: Use serviceProviderEventStream; BET-205

Gibt zurück!
SUBSCRIPTION

shopCustomerEventStream

#
Gibt zurück!
SUBSCRIPTION

shopVendorEventStream

#
Gibt zurück!