{
  "id": "AUCoreN8nPreview",
  "name": "AnswerUp Core - governed record update preview",
  "versionId": "bbf7be55-1c18-4be1-a8d2-7a5ac6a26e23",
  "active": false,
  "nodes": [
    {
      "id": "manual",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "parameters": {}
    },
    {
      "id": "http-1",
      "name": "Reset success fixture",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        260,
        0
      ],
      "parameters": {
        "method": "POST",
        "url": "http://127.0.0.1:4319/fixtures",
        "options": {
          "timeout": 10000
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\"recordId\":\"record-success\",\"visible\":true,\"loseResponse\":false}"
      }
    },
    {
      "id": "http-2",
      "name": "Verified update",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        520,
        0
      ],
      "parameters": {
        "method": "POST",
        "url": "http://127.0.0.1:4318/actions/update",
        "options": {
          "timeout": 10000
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer demo-operator"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({requestId:'n8n-' + $execution.id + '-success', recordId:'record-success', label:'Ready'}) }}"
      }
    },
    {
      "id": "http-3",
      "name": "Replay same operation",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        780,
        0
      ],
      "parameters": {
        "method": "POST",
        "url": "http://127.0.0.1:4318/actions/update",
        "options": {
          "timeout": 10000
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer demo-operator"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({requestId:'n8n-' + $execution.id + '-success', recordId:'record-success', label:'Ready'}) }}"
      }
    },
    {
      "id": "http-4",
      "name": "Supported claim",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1040,
        0
      ],
      "parameters": {
        "method": "POST",
        "url": "http://127.0.0.1:4318/claims/check",
        "options": {
          "timeout": 10000
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer demo-operator"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({requestId:'n8n-' + $execution.id + '-success', requestedClaim:'record_updated'}) }}"
      }
    },
    {
      "id": "http-5",
      "name": "Unsupported claim",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1300,
        0
      ],
      "parameters": {
        "method": "POST",
        "url": "http://127.0.0.1:4318/claims/check",
        "options": {
          "timeout": 10000
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer demo-operator"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({requestId:'n8n-' + $execution.id + '-success', requestedClaim:'email_sent'}) }}"
      }
    },
    {
      "id": "http-6",
      "name": "Lose response and hide readback",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1560,
        0
      ],
      "parameters": {
        "method": "POST",
        "url": "http://127.0.0.1:4319/fixtures",
        "options": {
          "timeout": 10000
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\"recordId\":\"record-lost\",\"loseResponse\":true,\"visible\":false}"
      }
    },
    {
      "id": "http-7",
      "name": "Lost response UNKNOWN",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1820,
        0
      ],
      "parameters": {
        "method": "POST",
        "url": "http://127.0.0.1:4318/actions/update",
        "options": {
          "timeout": 10000
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer demo-operator"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({requestId:'n8n-' + $execution.id + '-lost', recordId:'record-lost', label:'Reviewed'}) }}"
      }
    },
    {
      "id": "http-8",
      "name": "Inconclusive recovery UNKNOWN",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2080,
        0
      ],
      "parameters": {
        "method": "POST",
        "url": "={{ 'http://127.0.0.1:4318/actions/n8n-' + $execution.id + '-lost/reconcile' }}",
        "options": {
          "timeout": 10000
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer demo-operator"
            }
          ]
        }
      }
    },
    {
      "id": "http-9",
      "name": "Reveal authoritative evidence",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2340,
        0
      ],
      "parameters": {
        "method": "POST",
        "url": "http://127.0.0.1:4319/fixtures",
        "options": {
          "timeout": 10000
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{\"recordId\":\"record-lost\",\"visible\":true}"
      }
    },
    {
      "id": "http-10",
      "name": "Read only recovery COMMITTED",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2600,
        0
      ],
      "parameters": {
        "method": "POST",
        "url": "={{ 'http://127.0.0.1:4318/actions/n8n-' + $execution.id + '-lost/reconcile' }}",
        "options": {
          "timeout": 10000
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "{}",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer demo-operator"
            }
          ]
        }
      }
    },
    {
      "id": "http-11",
      "name": "Replay recovered operation",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        2860,
        0
      ],
      "parameters": {
        "method": "POST",
        "url": "http://127.0.0.1:4318/actions/update",
        "options": {
          "timeout": 10000
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer demo-operator"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({requestId:'n8n-' + $execution.id + '-lost', recordId:'record-lost', label:'Reviewed'}) }}"
      }
    },
    {
      "id": "http-12",
      "name": "Provider evidence",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3120,
        0
      ],
      "parameters": {
        "method": "GET",
        "url": "http://127.0.0.1:4319/state",
        "options": {
          "timeout": 10000
        }
      }
    },
    {
      "id": "http-13",
      "name": "Host evidence",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        3380,
        0
      ],
      "parameters": {
        "method": "GET",
        "url": "http://127.0.0.1:4318/evidence",
        "options": {
          "timeout": 10000
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer demo-operator"
            }
          ]
        }
      }
    }
  ],
  "connections": {
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Reset success fixture",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reset success fixture": {
      "main": [
        [
          {
            "node": "Verified update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Verified update": {
      "main": [
        [
          {
            "node": "Replay same operation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Replay same operation": {
      "main": [
        [
          {
            "node": "Supported claim",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Supported claim": {
      "main": [
        [
          {
            "node": "Unsupported claim",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Unsupported claim": {
      "main": [
        [
          {
            "node": "Lose response and hide readback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lose response and hide readback": {
      "main": [
        [
          {
            "node": "Lost response UNKNOWN",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lost response UNKNOWN": {
      "main": [
        [
          {
            "node": "Inconclusive recovery UNKNOWN",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Inconclusive recovery UNKNOWN": {
      "main": [
        [
          {
            "node": "Reveal authoritative evidence",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reveal authoritative evidence": {
      "main": [
        [
          {
            "node": "Read only recovery COMMITTED",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read only recovery COMMITTED": {
      "main": [
        [
          {
            "node": "Replay recovered operation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Replay recovered operation": {
      "main": [
        [
          {
            "node": "Provider evidence",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Provider evidence": {
      "main": [
        [
          {
            "node": "Host evidence",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "saveDataSuccessExecution": "all",
    "saveDataErrorExecution": "all"
  },
  "pinData": {},
  "tags": []
}
