{
  "id": "type-p21",
  "revision": "a0508cb0c7f1ea375fccec0eb44c0eb0874079ee435c44e4e2f38c81fe1eaf3e",
  "regions": [
    {
      "id": "mobile",
      "label": "Mobile",
      "parent": null
    },
    {
      "id": "boundary",
      "label": "Boundary",
      "parent": null
    },
    {
      "id": "common-logic",
      "label": "Common logic",
      "parent": null
    },
    {
      "id": "native",
      "label": "Native",
      "parent": null
    },
    {
      "id": "server",
      "label": "Server",
      "parent": null
    }
  ],
  "nodes": [
    {
      "id": "route",
      "label": "Conversation route scope",
      "kind": "N12",
      "region": "mobile",
      "ports": [
        {
          "id": "scope",
          "profile": "P21",
          "contract": "ConversationLifecycleV1",
          "polarity": "Offer"
        },
        {
          "id": "leave",
          "profile": "P14",
          "contract": "ConversationDrainV1",
          "polarity": "Offer"
        }
      ]
    },
    {
      "id": "subscription",
      "label": "Realtime subscription",
      "kind": "N15",
      "region": "boundary",
      "ports": [
        {
          "id": "scope",
          "profile": "P21",
          "contract": "ConversationLifecycleV1",
          "polarity": "Require"
        },
        {
          "id": "renew",
          "profile": "P02",
          "contract": "SubscriptionLeaseRenewalV1",
          "polarity": "Require"
        },
        {
          "id": "messages",
          "profile": "P06",
          "contract": "BoundedConversationMessagesV1",
          "polarity": "Offer"
        },
        {
          "id": "drain",
          "profile": "P14",
          "contract": "ConversationDrainV1",
          "polarity": "Require"
        }
      ]
    },
    {
      "id": "decoder",
      "label": "Message decoder",
      "kind": "N01",
      "region": "common-logic",
      "ports": [
        {
          "id": "scope",
          "profile": "P21",
          "contract": "ConversationLifecycleV1",
          "polarity": "Require"
        },
        {
          "id": "messages",
          "profile": "P06",
          "contract": "BoundedConversationMessagesV1",
          "polarity": "Require"
        }
      ]
    },
    {
      "id": "file",
      "label": "Attachment file handle",
      "kind": "N16",
      "region": "native",
      "ports": [
        {
          "id": "scope",
          "profile": "P21",
          "contract": "ConversationLifecycleV1",
          "polarity": "Require"
        }
      ]
    },
    {
      "id": "server",
      "label": "Lease authority",
      "kind": "N21",
      "region": "server",
      "ports": [
        {
          "id": "renew",
          "profile": "P02",
          "contract": "SubscriptionLeaseRenewalV1",
          "polarity": "Offer"
        }
      ]
    }
  ],
  "relations": [
    {
      "id": "scope",
      "kind": "H19",
      "incidences": [
        {
          "node": "route",
          "port": "scope",
          "role": "owner",
          "ordinal": 0
        },
        {
          "node": "subscription",
          "port": "scope",
          "role": "resource",
          "ordinal": 0
        },
        {
          "node": "decoder",
          "port": "scope",
          "role": "resource",
          "ordinal": 1
        },
        {
          "node": "file",
          "port": "scope",
          "role": "resource",
          "ordinal": 2
        }
      ]
    },
    {
      "id": "lease",
      "kind": "H05",
      "incidences": [
        {
          "node": "subscription",
          "port": "renew",
          "role": "caller",
          "ordinal": 0
        },
        {
          "node": "server",
          "port": "renew",
          "role": "callee",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "messages",
      "kind": "H02",
      "incidences": [
        {
          "node": "subscription",
          "port": "messages",
          "role": "source",
          "ordinal": 0
        },
        {
          "node": "decoder",
          "port": "messages",
          "role": "target",
          "ordinal": 0
        }
      ]
    },
    {
      "id": "drain",
      "kind": "H03",
      "incidences": [
        {
          "node": "route",
          "port": "leave",
          "role": "source",
          "ordinal": 0
        },
        {
          "node": "subscription",
          "port": "drain",
          "role": "target",
          "ordinal": 0
        }
      ]
    }
  ]
}
