{
  "id": "web-commerce",
  "revision": "b8f8390ef70aa6f93223c465061ddbb86b45c2508669fbe8f280f44aeee945ca",
  "regions": [
    {
      "id": "browser",
      "label": "Browser"
    },
    {
      "id": "edge",
      "label": "Edge services"
    },
    {
      "id": "data",
      "label": "Data authorities"
    }
  ],
  "nodes": [
    {
      "id": "view",
      "label": "Checkout Surface",
      "kind": "N11",
      "region": "browser",
      "ports": [
        {
          "id": "order",
          "profile": "P04",
          "contract": "OrderIntentV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "order",
      "label": "Order saga",
      "kind": "N06",
      "region": "edge",
      "ports": [
        {
          "id": "intent",
          "profile": "P04",
          "contract": "OrderIntentV1",
          "polarity": "Require"
        },
        {
          "id": "authority",
          "profile": "P20",
          "contract": "CheckoutGrantV1",
          "polarity": "Require"
        },
        {
          "id": "reserve",
          "profile": "P02",
          "contract": "ReservationV1",
          "polarity": "Require"
        },
        {
          "id": "payment",
          "profile": "P02",
          "contract": "ChargeV1",
          "polarity": "Require"
        },
        {
          "id": "dispatch",
          "profile": "P03",
          "contract": "DispatchV1",
          "polarity": "Offer"
        },
        {
          "id": "compensation",
          "profile": "P24",
          "contract": "SagaRefV1",
          "polarity": "Neutral"
        }
      ]
    },
    {
      "id": "auth",
      "label": "Tenant / principal gate",
      "kind": "N33",
      "region": "edge",
      "ports": [
        {
          "id": "grant",
          "profile": "P20",
          "contract": "CheckoutGrantV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "stock",
      "label": "Inventory authority",
      "kind": "N21",
      "region": "data",
      "ports": [
        {
          "id": "reserve",
          "profile": "P02",
          "contract": "ReservationV1",
          "polarity": "Offer"
        },
        {
          "id": "reservation",
          "profile": "P24",
          "contract": "ReservationRefV1",
          "polarity": "Neutral"
        }
      ]
    },
    {
      "id": "payment",
      "label": "Payment provider",
      "kind": "N30",
      "region": "data",
      "ports": [
        {
          "id": "charge",
          "profile": "P02",
          "contract": "ChargeV1",
          "polarity": "Offer"
        },
        {
          "id": "chargeRef",
          "profile": "P24",
          "contract": "ChargeRefV1",
          "polarity": "Neutral"
        }
      ]
    },
    {
      "id": "fulfil",
      "label": "Fulfilment queue",
      "kind": "N24",
      "region": "data",
      "ports": [
        {
          "id": "command",
          "profile": "P03",
          "contract": "DispatchV1",
          "polarity": "Require"
        }
      ]
    }
  ],
  "relations": [
    {
      "id": "intent",
      "kind": "H02",
      "incidences": [
        {
          "node": "view",
          "port": "order",
          "role": "provider",
          "ordinal": 0
        },
        {
          "node": "order",
          "port": "intent",
          "role": "consumer",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "grant",
      "kind": "H23",
      "incidences": [
        {
          "node": "auth",
          "port": "grant",
          "role": "provider",
          "ordinal": 0
        },
        {
          "node": "order",
          "port": "authority",
          "role": "consumer",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "stock",
      "kind": "H05",
      "incidences": [
        {
          "node": "stock",
          "port": "reserve",
          "role": "provider",
          "ordinal": 0
        },
        {
          "node": "order",
          "port": "reserve",
          "role": "consumer",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "payment",
      "kind": "H05",
      "incidences": [
        {
          "node": "payment",
          "port": "charge",
          "role": "provider",
          "ordinal": 0
        },
        {
          "node": "order",
          "port": "payment",
          "role": "consumer",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "dispatch",
      "kind": "H02",
      "incidences": [
        {
          "node": "order",
          "port": "dispatch",
          "role": "provider",
          "ordinal": 0
        },
        {
          "node": "fulfil",
          "port": "command",
          "role": "consumer",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "saga",
      "kind": "H17",
      "incidences": [
        {
          "node": "stock",
          "port": "reservation",
          "role": "reservation",
          "ordinal": 0
        },
        {
          "node": "payment",
          "port": "chargeRef",
          "role": "charge",
          "ordinal": 1
        },
        {
          "node": "order",
          "port": "compensation",
          "role": "coordinator",
          "ordinal": 2
        }
      ]
    }
  ]
}
