schemaVersion: "1"
type: "design"
id: "new-design"
nodes:
  - { id: "sdk", component: "sdk-client", group: "system", label: "SDK" }
  - { id: "client", component: "client", props: { platform: "web" }, group: "system" }
  - { id: "createflow", component: "azure-functions", label: "CreateFlow" }
  - { id: "db", component: "azure-cosmos-db", label: "DB" }
  - { id: "createflow-2", component: "azure-functions", label: "GetFlow" }
  - { id: "createflow-3", component: "azure-functions", label: "CosmosToQueue" }
  - { id: "azure-queue-storage", component: "azure-queue-storage" }
  - { id: "createflow-4", component: "azure-functions", label: "QueueToDcr" }
  - { id: "azure-log-analytics", component: "azure-log-analytics" }
  - { id: "web-browser", component: "web-browser" }
  - { id: "createflow-5", component: "azure-functions", label: "GetFlow" }
  - { id: "azure-monitor-data-collection-rule", component: "azure-monitor-data-collection-rule" }
  - { id: "azure-monitor-data-collection-endpoint", component: "azure-monitor-data-collection-endpoint" }
edges:
  - from: "sdk"
    to: "createflow"
    protocol: "http"
    mode: "sync"
    label: "POST api.flowsaga/flows"
  - from: "createflow"
    to: "db"
    protocol: "http"
    mode: "sync"
    label: "Insert"
  - from: "db"
    to: "createflow-2"
    protocol: "http"
    mode: "sync"
    label: "Query"
  - from: "db"
    to: "createflow-3"
    protocol: "http"
    mode: "sync"
    label: "+OnNewRecordAdded"
  - from: "createflow-3"
    to: "azure-queue-storage"
    protocol: "http"
    mode: "sync"
    label: "Push"
  - from: "azure-queue-storage"
    to: "createflow-4"
    protocol: "http"
    mode: "sync"
    label: "PULL Every 1 Minute"
  - from: "web-browser"
    to: "createflow-5"
    protocol: "http"
    mode: "sync"
    label: "GET"
  - from: "createflow-5"
    to: "azure-log-analytics"
    protocol: "http"
    mode: "sync"
    label: "GET"
  - from: "azure-monitor-data-collection-rule"
    to: "azure-log-analytics"
    protocol: "http"
    mode: "sync"
    label: "Sync Automatically"
  - from: "createflow-4"
    to: "azure-monitor-data-collection-endpoint"
    protocol: "http"
    mode: "sync"
  - from: "azure-monitor-data-collection-endpoint"
    to: "azure-monitor-data-collection-rule"
    protocol: "http"
    mode: "sync"
groups:
  - id: "system"
    kind: "system"
    label: "External"
