Rivier/ Reference/ hosting

One turn of the conversation

post/hosting/coder/projects/{id}/turns

One turn of the conversation: say what to make or change, and the coder works on the project's files with the library, runs the automatic checks, repairs what it can and saves a checkpoint. The answer says whether it was saved, asked a question, proposed three design directions to pick from, only answered, or could not be saved (the project is then as it was). With Accept: text/event-stream the same turn arrives as events while it works (status, say, tool, fixed, checkpoint, question, directions, notice, preview, then result). A saved turn by a signed-in person is also sent to the project's preview when Praecise Cloud is connected.

Before you call

Credential
Authorization: Bearer $KEY
Scope
hosting:write
Graphql
Mutation.hostingCoderTurnCreate
Sdk
hosting.coderTurn.create
Cli
hosting coder turn create

Parameters

  • idstring (uuid)required
    In the path

Request bodyapplication/json, required

  • textstringrequired
    What the person says: what to make, or what to change At most 8000 characters.

Responses

  • 200application/json
    Success
    • outcomestringrequired
      One of: saved, asked, directions, answered, not_saved, limit.
    • replystringrequired
    • checkpointobject
      • idstringrequired
      • projectIdstringrequired
      • seqnumberrequired
      • parentstring or nullrequired
      • messagestringrequired
      • restoresstring
      • bystringrequired
      • createdAtstringrequired
      • filesnumberrequired
    • questionobject
      • textstringrequired
      • choiceslist of stringrequired
    • directionslist of object
      Three design directions to pick from; the person answers with the name of one
      • namestringrequired
        At most 40 characters.
      • moodstringrequired
        At most 200 characters.
      • themestringrequired
        One of: light, dark.
      • accentobjectrequired
        • huenumberrequired
          At least 0. At most 360.
        • chromanumberrequired
          At least 0. At most 0.3.
      • radiusstringrequired
        One of: none, sm, md, lg, full.
      • displaystringrequired
        At most 60 characters.
      • bodystringrequired
        At most 60 characters.
      • densitystringrequired
        One of: airy, regular, compact.
      • motionstringrequired
        One of: still, gentle, lively.
      • imagerystring
        At most 160 characters.
    • leftlist of object
      • checkstringrequired
      • severitystringrequired
        One of: error, advice.
      • pathstringrequired
      • linenumber
      • messagestringrequired
    • usageobjectrequired
      • innumberrequired
      • outnumberrequired
      • estimatedbooleanrequired
    • stepsnumberrequired
    • previewobject
      Where the saved turn is being shown, when Praecise Cloud is connected and a person asked
      • labelstringrequired
      • urlstringrequired
      • checkpointstringrequired
      • bundlestringrequired
      • jobstring or nullrequired
      • statestringrequired
        One of: building, running, failed, archived.
    • previewRefusedstring
      Why the saved turn could not be shown, in Praecise Cloud's own words
  • 400application/json
    The request was malformed
    • errorstringrequired
    • messagestring
  • 401application/json
    No valid credential
    • errorstringrequired
    • messagestring
  • 403application/json
    The credential lacks the scope, origin or address
    • errorstringrequired
    • messagestring
  • 429application/json
    Over the key's rate limit; see Retry-After
    • errorstringrequired
    • messagestring

This page as Markdown