AlmondTill/G3N API

transitionSuggestionSchema

mutation · in the family Suggestion schema

What it does

Park, reactivate, or permanently retire one of the desk's detectors for your organization.

park stops the generator for the org (the refresh engine skips parked schemas); reactivate resumes it; doom is the deliberate permanent kill — parked-first (active→doomed is documentedForbidden) and refused CONFLICT/REFERENCED while open suggestions still cite the schema (close them first); a doomed schema never re-ensures. Requires the unrestricted capability + the record's current revision.

Before you call

A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.

Capability area: Organization structure — Opening and closing organizations and facilities — the legal and physical structure of your group.

Roles that may call it:

What happens

Parking stops that detector ("we no longer run these") — existing offers stay until they expire or close; reactivating resumes it. Retiring is permanent and only allowed from parked, with no open offers still pointing at it.

Careful

Retired schemas never come back — the desk will not re-register that detector for this organization.

Arguments

NameTypeRequiredNotes
idID ID!yesThe id of the record.
revisionID ID!yesThe revision id you read on the record; the change is refused if an edit landed in the meantime.
opSuggestionSchemaTransitionOp SuggestionSchemaTransitionOp!yesOne of the values of [SuggestionSchemaTransitionOp](/types/SuggestionSchemaTransitionOp/).
reasonStringno

Concurrency

Send the record’s current revision from your last read as revision. A stale revision is refused as CONFLICT/REVISION_STALE — read the record again and retry with the new value.

Returns

SuggestionSchema SuggestionSchema! — A SuggestionSchema: ONE row per (Organization × declared skill), ensure-minted lazily at the first desk refresh (authorless; the (org × skill) uniqueness marker makes the ensure race-proof). Parking it stops the generator for the org (‘we no longer run these’ — reactivatable, owner-gated A2_STRUCTURE); dooming is the deliberate permanent kill (parked-first; refused CONFLICT/REFERENCED while open suggestions still cite it; a doomed schema never re-ensures). Every Suggestion's schemaId drills down here — provenance to the generator. The skill's declared words/watches/drafts live in the contracts SUGGESTION_SKILL_REGISTRY. The ops event domain (at.ops.suggestion_schema.*).

Example request

graphql
mutation ExampleTransitionSuggestionSchema($id: ID!, $revision: ID!, $op: SuggestionSchemaTransitionOp!, $reason: String) {
  transitionSuggestionSchema(id: $id, revision: $revision, op: $op, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    skill
  }
}

Variables:

json
{
  "id": "01900000-0000-7000-8000-0951c7be0000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "op": "park",
  "reason": "Correcting a miscount."
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

json
{
  "data": {
    "transitionSuggestionSchema": {
      "id": "01900000-0000-7000-8000-0951c7be0000",
      "sysId": "SS-EXMP-0000-000F",
      "type": "SuggestionSchema",
      "caption": "Blue jeans",
      "status": "parked",
      "parentId": "01900000-0000-7000-8000-eacdfcfd0000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "skill": "<skill>"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Used in