{
  "id": "type-n06",
  "revision": "a3ac3ef10f628542960a576ad2aff65adfa5e2ce9ec1565de091ddb840fe2d95",
  "regions": [
    {
      "id": "server",
      "label": "Server",
      "parent": null
    },
    {
      "id": "storage",
      "label": "Storage",
      "parent": null
    },
    {
      "id": "external",
      "label": "External",
      "parent": null
    }
  ],
  "nodes": [
    {
      "id": "checkout",
      "label": "Checkout saga",
      "kind": "N06",
      "region": "server",
      "ports": [
        {
          "id": "reserve",
          "profile": "P03",
          "contract": "ReserveStockReceiptV1",
          "polarity": "Require"
        },
        {
          "id": "charge",
          "profile": "P03",
          "contract": "ChargePaymentReceiptV1",
          "polarity": "Require"
        },
        {
          "id": "confirm",
          "profile": "P03",
          "contract": "ConfirmOrderReceiptV1",
          "polarity": "Require"
        },
        {
          "id": "record",
          "profile": "P02",
          "contract": "RecordSagaStepV1",
          "polarity": "Require"
        },
        {
          "id": "release",
          "profile": "P03",
          "contract": "ReleaseReservationCommandV1",
          "polarity": "Neutral"
        },
        {
          "id": "unknown",
          "profile": "P12",
          "contract": "UnknownChargeOutcomeV1",
          "polarity": "Offer"
        },
        {
          "id": "settled",
          "profile": "P01",
          "contract": "ReconciledChargeOutcomeV1",
          "polarity": "Require"
        }
      ]
    },
    {
      "id": "stock",
      "label": "Inventory reservation",
      "kind": "N21",
      "region": "storage",
      "ports": [
        {
          "id": "reserve",
          "profile": "P03",
          "contract": "ReserveStockReceiptV1",
          "polarity": "Offer"
        },
        {
          "id": "release",
          "profile": "P02",
          "contract": "ReleaseStockReceiptV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "payment",
      "label": "Payment adapter",
      "kind": "N19",
      "region": "external",
      "ports": [
        {
          "id": "charge",
          "profile": "P03",
          "contract": "ChargePaymentReceiptV1",
          "polarity": "Offer"
        },
        {
          "id": "status",
          "profile": "P02",
          "contract": "ChargeStatusByCommandIdV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "orders",
      "label": "Order authority",
      "kind": "N21",
      "region": "storage",
      "ports": [
        {
          "id": "confirm",
          "profile": "P03",
          "contract": "ConfirmOrderReceiptV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "release",
      "label": "Reservation release",
      "kind": "N02",
      "region": "server",
      "ports": [
        {
          "id": "release",
          "profile": "P03",
          "contract": "ReleaseReservationCommandV1",
          "polarity": "Neutral"
        },
        {
          "id": "stock",
          "profile": "P02",
          "contract": "ReleaseStockReceiptV1",
          "polarity": "Require"
        }
      ]
    },
    {
      "id": "journal",
      "label": "Checkout step journal",
      "kind": "N21",
      "region": "storage",
      "ports": [
        {
          "id": "append",
          "profile": "P02",
          "contract": "RecordSagaStepV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "reconcile",
      "label": "Unknown payment reconciliation",
      "kind": "N06",
      "region": "server",
      "ports": [
        {
          "id": "unknown",
          "profile": "P12",
          "contract": "UnknownChargeOutcomeV1",
          "polarity": "Require"
        },
        {
          "id": "status",
          "profile": "P02",
          "contract": "ChargeStatusByCommandIdV1",
          "polarity": "Require"
        },
        {
          "id": "settled",
          "profile": "P01",
          "contract": "ReconciledChargeOutcomeV1",
          "polarity": "Offer"
        }
      ]
    }
  ],
  "relations": [
    {
      "id": "reserve",
      "kind": "H05",
      "incidences": [
        {
          "node": "checkout",
          "port": "reserve",
          "role": "caller",
          "ordinal": 0
        },
        {
          "node": "stock",
          "port": "reserve",
          "role": "callee",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "charge",
      "kind": "H05",
      "incidences": [
        {
          "node": "checkout",
          "port": "charge",
          "role": "caller",
          "ordinal": 0
        },
        {
          "node": "payment",
          "port": "charge",
          "role": "callee",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "confirm",
      "kind": "H05",
      "incidences": [
        {
          "node": "checkout",
          "port": "confirm",
          "role": "caller",
          "ordinal": 0
        },
        {
          "node": "orders",
          "port": "confirm",
          "role": "callee",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "record",
      "kind": "H05",
      "incidences": [
        {
          "node": "checkout",
          "port": "record",
          "role": "caller",
          "ordinal": 0
        },
        {
          "node": "journal",
          "port": "append",
          "role": "callee",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "compensate",
      "kind": "H17",
      "incidences": [
        {
          "node": "checkout",
          "port": "release",
          "role": "forward",
          "ordinal": 0
        },
        {
          "node": "release",
          "port": "release",
          "role": "compensation",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "stock-release",
      "kind": "H05",
      "incidences": [
        {
          "node": "release",
          "port": "stock",
          "role": "caller",
          "ordinal": 0
        },
        {
          "node": "stock",
          "port": "release",
          "role": "callee",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "unknown-charge",
      "kind": "H03",
      "incidences": [
        {
          "node": "checkout",
          "port": "unknown",
          "role": "source",
          "ordinal": 0
        },
        {
          "node": "reconcile",
          "port": "unknown",
          "role": "target",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "charge-status",
      "kind": "H05",
      "incidences": [
        {
          "node": "reconcile",
          "port": "status",
          "role": "caller",
          "ordinal": 0
        },
        {
          "node": "payment",
          "port": "status",
          "role": "callee",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "settled-charge",
      "kind": "H02",
      "incidences": [
        {
          "node": "reconcile",
          "port": "settled",
          "role": "source",
          "ordinal": 0
        },
        {
          "node": "checkout",
          "port": "settled",
          "role": "target",
          "ordinal": 0
        }
      ]
    }
  ]
}
