{
 "$schema": "../../lib/umlimator.schema.json",
 "schemaVersion": 2,
 "title": "Information flow diagram",
 "root": "order-flows",
 "nodes": [
  {"id": "shopper", "type": "uml.Actor", "label": "Shopper"},
  {"id": "storefront", "type": "uml.Component", "label": "Storefront"},
  {"id": "shop-api", "type": "uml.Component", "label": "Shop API"},
  {"id": "payment-provider", "type": "uml.Component", "label": "Payment provider"},
  {"id": "stock-ledger", "type": "uml.Class", "label": "StockLedger"},
  {"id": "notifications", "type": "uml.Interface", "label": "Notifications"},
  {"id": "book", "type": "uml.Class", "label": "Book"},
  {"id": "order-info", "type": "uml.InformationItem", "label": "Order"},
  {"id": "card-details", "type": "uml.InformationItem", "label": "Card details"},
  {"id": "receipt-info", "type": "uml.InformationItem", "label": "Receipt"},
  {"id": "stock-info", "type": "uml.InformationItem", "label": "Stock level"},
  {"id": "retry-note", "type": "uml.Comment", "label": "an order that fails to save is tried again, three times at most"}
 ],
 "edges": [
  {"id": "shopper-storefront", "type": "uml.InformationFlow", "from": "shopper", "to": "storefront", "label": "checkout", "props": {"conveyed": ["order-info", "card-details"]}},
  {"id": "storefront-payments", "type": "uml.InformationFlow", "from": "storefront", "to": "payment-provider", "props": {"conveyed": ["card-details"]}},
  {"id": "storefront-api", "type": "uml.InformationFlow", "from": "storefront", "to": "shop-api", "props": {"conveyed": ["order-info"]}},
  {"id": "api-retry", "type": "uml.InformationFlow", "from": "shop-api", "to": "shop-api", "label": "retry", "props": {"conveyed": ["order-info"]}},
  {"id": "api-ledger", "type": "uml.InformationFlow", "from": "shop-api", "to": "stock-ledger", "label": "reserve", "props": {"conveyed": ["order-info", "book"]}},
  {"id": "ledger-storefront", "type": "uml.InformationFlow", "from": "stock-ledger", "to": "storefront", "props": {"conveyed": ["stock-info"]}},
  {"id": "api-notifications", "type": "uml.InformationFlow", "from": "shop-api", "to": "notifications", "label": "confirm", "props": {"conveyed": ["order-info", "receipt-info"]}},
  {"id": "notifications-shopper", "type": "uml.InformationFlow", "from": "notifications", "to": "shopper", "props": {"conveyed": ["receipt-info"]}},
  {"id": "retry-note-link", "type": "uml.CommentLink", "from": "retry-note", "to": "shop-api"}
 ],
 "views": [
  {"id": "order-flows", "diagram": "uml.information-flow", "title": "What travels with an order", "parent": null, "nodeIds": ["shopper", "storefront", "shop-api", "payment-provider", "stock-ledger", "notifications", "book", "order-info", "card-details", "receipt-info", "stock-info", "retry-note"]},
  {"id": "order-flows-down", "diagram": "uml.information-flow", "title": "What travels with an order, laid out down", "parent": "order-flows", "nodeIds": ["shopper", "storefront", "shop-api", "payment-provider", "stock-ledger", "notifications", "book", "order-info", "card-details", "receipt-info", "stock-info", "retry-note"], "direction": "down", "layout": {"storefront": [2, 0]}}
 ]
}
