{
  "service": "scan-pwa",
  "version": "0.1.0",
  "description": "Progressive web app and edge gateway for the Scan capture surface.",
  "origin": "https://scan.starlightglobal.industries",
  "authentication": {
    "configured": true,
    "providers": [
      "device",
      "github"
    ],
    "planned": [
      "device",
      "github"
    ],
    "available": [
      "device",
      "github"
    ]
  },
  "authorization": {
    "store": true,
    "roles": [
      "visitor",
      "member",
      "operator"
    ],
    "capabilities": {
      "capture:upload": {
        "summary": "Check the connection to Scan. Captures stay on this device until you sign in.",
        "fields": [
          "status",
          "feedback.send"
        ],
        "roles": [
          "visitor",
          "member",
          "operator"
        ]
      },
      "storage:durable": {
        "summary": "Captures, items and storage locations are kept on the server, tied to an account rather than a device.",
        "fields": [
          "captures.declare",
          "captures.chunk",
          "captures.seal",
          "jobs.status",
          "items",
          "trash",
          "media",
          "claims.devices",
          "locations"
        ],
        "roles": [
          "member",
          "operator"
        ]
      },
      "vision:segment": {
        "summary": "Have a photograph masked and embedded on the owned GPU host, paid from your Starlight credits.",
        "fields": [
          "segmentation.account",
          "segmentation.result"
        ],
        "roles": [
          "member",
          "operator"
        ]
      },
      "vision:analyze": {
        "summary": "Run model inference over a capture to draft the item record.",
        "fields": [
          "ai.vision"
        ],
        "roles": [
          "operator"
        ]
      },
      "inventory:write": {
        "summary": "Read and write the live inventory: items and the approval queue.",
        "fields": [
          "inventory.items",
          "inventory.admin",
          "inventory.remote"
        ],
        "roles": [
          "operator"
        ]
      }
    }
  },
  "bff": {
    "configured": false,
    "service": "scan-backend",
    "repository": "repositories/inventory/scan/backend"
  },
  "endpoints": {
    "health": {
      "method": "GET",
      "path": "/api/health",
      "tier": "public"
    },
    "session": {
      "method": "GET",
      "path": "/api/session",
      "tier": "session"
    },
    "device_session": {
      "method": "POST",
      "path": "/api/auth/device",
      "tier": "public"
    },
    "sign_in": {
      "method": "GET",
      "path": "/api/auth/{provider}/start",
      "tier": "public"
    },
    "sign_in_callback": {
      "method": "GET",
      "path": "/api/auth/{provider}/callback",
      "tier": "public"
    },
    "sign_out": {
      "method": "POST",
      "path": "/api/auth/signout",
      "tier": "public"
    },
    "claim": {
      "method": "POST",
      "path": "/api/auth/claim",
      "tier": "session"
    },
    "locations": {
      "methods": [
        "GET",
        "POST"
      ],
      "path": "/api/locations",
      "capability": "storage:durable"
    },
    "location": {
      "methods": [
        "PATCH",
        "DELETE"
      ],
      "path": "/api/locations/{id}",
      "capability": "storage:durable"
    },
    "capture_declare": {
      "method": "POST",
      "path": "/api/captures",
      "capability": "storage:durable"
    },
    "capture_chunk": {
      "method": "PUT",
      "path": "/api/captures/{uploadId}/{field}",
      "capability": "storage:durable"
    },
    "capture_seal": {
      "method": "POST",
      "path": "/api/captures/{uploadId}/complete",
      "capability": "storage:durable"
    },
    "job": {
      "method": "GET",
      "path": "/api/jobs/{uploadId}",
      "capability": "storage:durable"
    },
    "items": {
      "method": "GET",
      "path": "/api/items",
      "capability": "storage:durable"
    },
    "item": {
      "methods": [
        "GET",
        "PATCH",
        "DELETE"
      ],
      "path": "/api/items/{id}",
      "capability": "storage:durable"
    },
    "item_restore": {
      "method": "POST",
      "path": "/api/items/{id}/restore",
      "capability": "storage:durable"
    },
    "trash": {
      "method": "GET",
      "path": "/api/trash",
      "capability": "storage:durable"
    },
    "trash_purge": {
      "method": "POST",
      "path": "/api/trash/{id}/purge",
      "capability": "storage:durable"
    },
    "media": {
      "method": "GET",
      "path": "/api/media/{tenant}/{uploadId}/{field}",
      "capability": "storage:durable"
    }
  },
  "storage": {
    "edge": true,
    "trash_hours": 24
  }
}