AlmondTill/G3N API

On this page

transitionSuggestionSchema

mutation · in the family Suggestion schema

What it does

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

One caller edge of the v2 schema FSM (park · reactivate · doom — the CsCase single-op class, A2_STRUCTURE owner-gated). 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.

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.

Who may call it

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

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!yesNo further notes.
reasonStringnoNo further notes.

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

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:

{
  "id": "01900000-0000-7000-8000-37386ae00000",
  "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

{
  "data": {
    "transitionSuggestionSchema": {
      "id": "01900000-0000-7000-8000-37386ae00000",
      "sysId": "SS-EXMP-0000-000F",
      "type": "SuggestionSchema",
      "caption": "Blue jeans",
      "status": "active",
      "parentId": "01900000-0000-7000-8000-065235280000",
      "rootId": "01900000-0000-7000-8000-a093dd800000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-b7960e180000",
      "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