@talonic/docs 0.21.37 → 0.21.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/content.js +1 -1
- package/dist/seo.js +1823 -78
- package/openapi.json +1823 -78
- package/package.json +1 -1
- package/dist/tailwind-preset.d.cts +0 -45
- package/dist/tailwind-preset.d.ts +0 -45
package/openapi.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "Talonic API",
|
|
5
5
|
"version": "1.1.0",
|
|
6
|
-
"description": "Structure any document into schema-validated data.\n\nThe Talonic API lets you extract structured data from documents (PDFs, images,\nDOCX, CSV, plain text), manage reusable extraction schemas, track async jobs,\nand organise documents through sources.\n\n## Quick Start\n\n**1. Get your API key**\n\nSign up at [app.talonic.com](https://app.talonic.com) → Settings → API Keys → Create key.\nKeys start with `tlnc_`. All examples below use `tlnc_live_abc123` as a placeholder.\n\n**2. Extract your first document**\n\n```bash\ncurl -X POST https://api.talonic.com/v1/extract \\\n -H \"Authorization: Bearer tlnc_live_abc123\" \\\n -F \"file=@invoice.pdf\" \\\n -F 'schema={\"properties\":{\"vendor_name\":{\"type\":\"string\"},\"total_amount\":{\"type\":\"number\"},\"invoice_date\":{\"type\":\"string\"}}}'\n```\n\n**Python:**\n```python\nimport requests\nresp = requests.post(\"https://api.talonic.com/v1/extract\",\n headers={\"Authorization\": \"Bearer tlnc_live_abc123\"},\n files={\"file\": open(\"invoice.pdf\", \"rb\")},\n data={\"schema\": '{\"properties\":{\"vendor_name\":{\"type\":\"string\"},\"total_amount\":{\"type\":\"number\"},\"invoice_date\":{\"type\":\"string\"}}}'})\nprint(resp.json()[\"data\"])\n```\n\n**TypeScript:**\n```typescript\nconst form = new FormData();\nform.append(\"file\", fs.createReadStream(\"invoice.pdf\"));\nform.append(\"schema\", '{\"properties\":{\"vendor_name\":{\"type\":\"string\"},\"total_amount\":{\"type\":\"number\"},\"invoice_date\":{\"type\":\"string\"}}}');\nconst res = await fetch(\"https://api.talonic.com/v1/extract\", {\n method: \"POST\",\n headers: { Authorization: \"Bearer tlnc_live_abc123\" },\n body: form,\n}).then(r => r.json());\nconsole.log(res.data);\n```\n\n**3. What you get back**\n\n```json\n{\n \"extraction_id\": \"d1a2b3c4-5678-9abc-def0-1234567890ab\",\n \"request_id\": \"req_x7y8z9a0b1c2d3e4\",\n \"status\": \"complete\",\n \"document\": {\n \"id\": \"f0e1d2c3-b4a5-9687-8765-432109876543\",\n \"filename\": \"invoice.pdf\",\n \"pages\": 2,\n \"size_bytes\": 184320,\n \"type_detected\": \"Invoice\",\n \"language_detected\": \"en\"\n },\n \"data\": {\n \"vendor_name\": \"Acme GmbH\",\n \"total_amount\": 14250.00,\n \"invoice_date\": \"2025-03-15\"\n },\n \"confidence\": {\n \"overall\": 0.96,\n \"fields\": {\n \"vendor_name\": 0.97,\n \"total_amount\": 0.94,\n \"invoice_date\": 0.99\n }\n },\n \"processing\": {\n \"duration_ms\": 1840,\n \"pages_processed\": 2,\n \"region\": \"eu-west\"\n },\n \"links\": {\n \"self\": \"/v1/extractions/d1a2b3c4-5678-9abc-def0-1234567890ab\",\n \"document\": \"/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543\"\n }\n}\n```\n\n- **`data`** — extracted fields as key-value pairs matching your schema.\n- **`confidence.fields`** — per-field score from 0 to 1. Above 0.9 is high confidence; below 0.7 flags for review.\n- **`extraction_id`** — use this to retrieve, correct, or deliver results later.\n- Full response schema: [ExtractSyncResponse](#/components/schemas/ExtractSyncResponse)\n\n**4. Next steps**\n\n- **50+ pages?** Use async mode — see [Async Extraction Flow](#section/Async-Extraction-Flow) below.\n- **Reusable schemas** — save field definitions with `POST /v1/schemas`, then pass `schema_id` on future extractions.\n- **Receive results via webhook** — configure a delivery destination and listen for `document.extracted` events. See the [Delivery](#tag/Delivery) tag.\n\n---\n\n## Authentication\n\nAll requests require a Bearer token in the `Authorization` header.\nAPI keys are prefixed with `tlnc_` and scoped per customer.\n\n```\nAuthorization: Bearer tlnc_live_abc123...\n```\n\n## Async Extraction Pattern\n\nSmall documents (≤5 pages) are processed synchronously and return a `200`\nwith the extracted data immediately. Larger documents return a `202 Accepted`\nwith a `poll_url` — poll `GET /v1/documents/{id}` until `status` transitions\nto `completed`, then fetch results via `GET /v1/documents/{id}/extractions`.\n\nYou can force async processing by passing `options: {\"async\": true}` on\nany extraction request. Combine with webhooks for a fully event-driven flow:\nconfigure a webhook destination under Delivery and listen for the\n`extraction.complete` event.\n\n**Job status lifecycle:** `pending` → `processing` → `complete` | `failed`\n\n## Rate Limits\n\nThe **Free** tier is metered by a recurring **5,000-credit monthly grant**\n(no card required) that refreshes on the 1st of each month (UTC). Free\nrequests run until the monthly credit balance is spent, then return `402`\nuntil the next grant. A generous daily request ceiling is retained purely as\nabuse protection and does not bind a legitimate free user within the monthly\nenvelope. Inspect your balance and reset date via `GET /v1/account`.\n\nPaid tiers are metered per calendar day (UTC):\n\n| Tier | Extract | Platform | Ingest | Operations | Run | Ask |\n|------------|---------|----------|--------|------------|-----|-----|\n| Free | 1,000/day | 2,000/day | 1,000/day | 1,000/day | 1,000/day | 200/day |\n| Pro | 25,000/day | 50,000/day | 25,000/day | 25,000/day | 25,000/day | 5,000/day |\n| Enterprise | Unlimited | Unlimited | Unlimited | Unlimited | Unlimited | Unlimited |\n\nFree workspaces additionally receive 5,000 credits/month; spend is governed\nby credits (402 on exhaustion), with daily ceilings acting as abuse protection.\n\nResponses with a finite limit include rate-limit headers:\n- `X-RateLimit-Limit` — daily cap for the namespace\n- `X-RateLimit-Remaining` — requests left today\n- `X-RateLimit-Reset` — ISO 8601 timestamp when the window resets (midnight UTC)\n\n## Pagination\n\nList endpoints use cursor-based pagination. Pass `limit` (1–100, default 20),\n`cursor` (opaque token from `pagination.next_cursor`), and `order` (`asc` or `desc`, default `desc`).\n\n## Errors\n\nAll errors return a JSON body with `error` (machine-readable code) and `message`\n(human-readable explanation). Additional fields vary by error type.\n\n| Code | Error | Description |\n|------|--------------------|------------------------------------------|\n| 400 | validation_error | Request body is malformed or invalid |\n| 401 | unauthorized | Missing or invalid API key |\n| 403 | insufficient_scope | API key lacks the required scope |\n| 404 | not_found | Resource does not exist |\n| 409 | conflict | Resource state conflict |\n| 413 | payload_too_large | File exceeds 500 MB limit |\n| 422 | extraction_failed | Document could not be processed |\n| 429 | rate_limit_exceeded| Daily rate limit reached |\n| 500 | internal_error | Unexpected server error (retryable) |\n\nEvery error response follows this envelope:\n\n```json\n{\n \"statusCode\": 400,\n \"code\": \"VALIDATION_ERROR\",\n \"error\": \"Bad Request\",\n \"message\": \"name is required.\",\n \"retryable\": false,\n \"timestamp\": \"2026-04-25T14:30:00.000Z\",\n \"path\": \"/v1/schemas\"\n}\n```\n\nThe `code` field is one of: `VALIDATION_ERROR`, `AUTH_REQUIRED`, `TOKEN_EXPIRED`,\n`INSUFFICIENT_PERMISSIONS`, `RESOURCE_NOT_FOUND`, `QUOTA_EXCEEDED`,\n`INSUFFICIENT_CREDITS`, `LLM_RATE_LIMITED`, `LLM_TIMEOUT`, `LLM_UNAVAILABLE`,\n`OCR_FAILED`, `EXTRACTION_FAILED`, `EXTRACTION_TIMEOUT`, `FILE_TOO_LARGE`,\n`DUPLICATE_RESOURCE`, `DATASPACE_RUN_FAILED`, `INTERNAL_ERROR`.\n\n## Async Extraction Flow\n\nDocuments ≤5 pages return results synchronously (`200`). Larger documents\n— or any request with `options: {\"async\": true}` — return `202 Accepted`.\n\n**1. Submit extraction:**\n\n```bash\ncurl -X POST https://api.talonic.com/v1/extract \\\n -H \"Authorization: Bearer tlnc_live_abc123\" \\\n -F \"file=@contract.pdf\" \\\n -F 'options={\"async\": true}'\n```\n\nResponse `202`:\n```json\n{\n \"request_id\": \"req_x7y8z9a0\",\n \"status\": \"processing\",\n \"document\": { \"id\": \"f0e1d2c3-b4a5-9687-8765-432109876543\" },\n \"poll_url\": \"/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543\"\n}\n```\n\n**2. Poll until complete:**\n\n```bash\ncurl https://api.talonic.com/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543 \\\n -H \"Authorization: Bearer tlnc_live_abc123\"\n```\n\nWhile processing: `{ \"status\": \"processing\" }`\nWhen done: `{ \"status\": \"completed\" }`\n\n**3. Retrieve results:**\n\n```bash\ncurl https://api.talonic.com/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543/extractions \\\n -H \"Authorization: Bearer tlnc_live_abc123\"\n```\n\n**Python — complete async flow with exponential backoff:**\n\n```python\nimport time\nimport requests\n\nAPI_KEY = \"tlnc_live_...\"\nBASE = \"https://api.talonic.com/v1\"\nHEADERS = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\n# Step 1: Submit async extraction\nresp = requests.post(f\"{BASE}/extract\",\n headers=HEADERS,\n files={\"file\": open(\"contract.pdf\", \"rb\")},\n data={\"options\": '{\"async\": true}'})\ndoc_id = resp.json()[\"document\"][\"id\"]\n\n# Step 2: Poll with exponential backoff (2s → 4s → 8s → 16s → 30s cap)\ndelay = 2\nfor _ in range(20):\n time.sleep(delay)\n doc = requests.get(f\"{BASE}/documents/{doc_id}\", headers=HEADERS).json()\n if doc[\"status\"] == \"completed\":\n break\n if doc[\"status\"] == \"error\":\n raise Exception(f\"Extraction failed: {doc.get('error')}\")\n delay = min(delay * 2, 30)\n\n# Step 3: Retrieve extracted data\nextractions = requests.get(\n f\"{BASE}/documents/{doc_id}/extractions\", headers=HEADERS).json()\ndata = extractions[\"data\"][0][\"data\"]\nconfidence = extractions[\"data\"][0][\"confidence\"][\"overall\"]\nprint(f\"Extracted {len(data)} fields (confidence: {confidence})\")\nprint(data)\n# → {\"vendor_name\": \"Acme Corp\", \"total_amount\": 1250.00, ...}\n```\n\n**TypeScript — same flow:**\n\n```typescript\nconst API_KEY = \"tlnc_live_...\";\nconst BASE = \"https://api.talonic.com/v1\";\nconst headers = { Authorization: `Bearer ${API_KEY}` };\n\n// Step 1: Submit async extraction\nconst form = new FormData();\nform.append(\"file\", fs.createReadStream(\"contract.pdf\"));\nform.append(\"options\", '{\"async\": true}');\nconst { document } = await fetch(`${BASE}/extract`, {\n method: \"POST\", headers, body: form,\n}).then((r) => r.json());\n\n// Step 2: Poll with exponential backoff\nlet delay = 2000;\nlet doc: any;\nfor (let i = 0; i < 20; i++) {\n await new Promise((r) => setTimeout(r, delay));\n doc = await fetch(`${BASE}/documents/${document.id}`, { headers }).then((r) => r.json());\n if (doc.status === \"completed\") break;\n if (doc.status === \"error\") throw new Error(`Extraction failed: ${doc.error}`);\n delay = Math.min(delay * 2, 30_000);\n}\n\n// Step 3: Retrieve extracted data\nconst { data: extractions } = await fetch(\n `${BASE}/documents/${document.id}/extractions`, { headers }\n).then((r) => r.json());\nconsole.log(extractions[0].data);\n// → { vendor_name: \"Acme Corp\", total_amount: 1250.00, ... }\n```\n\nRecommended polling: 2s initial, exponential backoff (2→4→8→16→30s cap),\ntimeout after 5 minutes.\n\n**Alternative — Webhooks:** Configure a delivery destination and listen for\n`document.extracted` events. See the Delivery tag.\n\n**Job status state machine:**\n`pending` → `queued` → `processing` → `complete` | `failed`\n\n## Performance\n\n| Document size | Expected latency | Max timeout |\n|---------------|------------------|-------------|\n| 1–5 pages | Sync, <3s | 30s |\n| 6–50 pages | <30s average | 5 min |\n| 50+ pages | <5 min average | 30 min |\n\n**Uptime SLA:** 99.5% (Build), 99.9% (Scale), custom (Enterprise).\n\n**Max file size:** 500 MB. JSON request bodies (schemas, jobs): 1 MB.\n\n**Idempotency:** Pass `Idempotency-Key` header on POST requests. Keys are\nscoped to your organization (all keys in a workspace share one namespace).\nDuplicates return the cached response with `cached: true`.\n",
|
|
6
|
+
"description": "Structure any document into schema-validated data.\n\nThe Talonic API lets you extract structured data from documents (PDFs, images,\nDOCX, CSV, plain text), manage reusable extraction schemas, track async jobs,\nand organise documents through sources.\n\n## Quick Start\n\n**1. Get your API key**\n\nSign up at [app.talonic.com](https://app.talonic.com) → Settings → API Keys → Create key.\nKeys start with `tlnc_`. All examples below use `tlnc_live_abc123` as a placeholder.\n\n**2. Extract your first document**\n\n```bash\ncurl -X POST https://api.talonic.com/v1/extract \\\n -H \"Authorization: Bearer tlnc_live_abc123\" \\\n -F \"file=@invoice.pdf\" \\\n -F 'schema={\"properties\":{\"vendor_name\":{\"type\":\"string\"},\"total_amount\":{\"type\":\"number\"},\"invoice_date\":{\"type\":\"string\"}}}'\n```\n\n**Python:**\n```python\nimport requests\nresp = requests.post(\"https://api.talonic.com/v1/extract\",\n headers={\"Authorization\": \"Bearer tlnc_live_abc123\"},\n files={\"file\": open(\"invoice.pdf\", \"rb\")},\n data={\"schema\": '{\"properties\":{\"vendor_name\":{\"type\":\"string\"},\"total_amount\":{\"type\":\"number\"},\"invoice_date\":{\"type\":\"string\"}}}'})\nprint(resp.json()[\"data\"])\n```\n\n**TypeScript:**\n```typescript\nconst form = new FormData();\nform.append(\"file\", fs.createReadStream(\"invoice.pdf\"));\nform.append(\"schema\", '{\"properties\":{\"vendor_name\":{\"type\":\"string\"},\"total_amount\":{\"type\":\"number\"},\"invoice_date\":{\"type\":\"string\"}}}');\nconst res = await fetch(\"https://api.talonic.com/v1/extract\", {\n method: \"POST\",\n headers: { Authorization: \"Bearer tlnc_live_abc123\" },\n body: form,\n}).then(r => r.json());\nconsole.log(res.data);\n```\n\n**3. What you get back**\n\n```json\n{\n \"extraction_id\": \"d1a2b3c4-5678-9abc-def0-1234567890ab\",\n \"request_id\": \"req_x7y8z9a0b1c2d3e4\",\n \"status\": \"complete\",\n \"document\": {\n \"id\": \"f0e1d2c3-b4a5-9687-8765-432109876543\",\n \"filename\": \"invoice.pdf\",\n \"pages\": 2,\n \"size_bytes\": 184320,\n \"type_detected\": \"Invoice\",\n \"language_detected\": \"en\"\n },\n \"data\": {\n \"vendor_name\": \"Acme GmbH\",\n \"total_amount\": 14250.00,\n \"invoice_date\": \"2025-03-15\"\n },\n \"confidence\": {\n \"overall\": 0.96,\n \"fields\": {\n \"vendor_name\": 0.97,\n \"total_amount\": 0.94,\n \"invoice_date\": 0.99\n }\n },\n \"processing\": {\n \"duration_ms\": 1840,\n \"pages_processed\": 2,\n \"region\": \"eu-west\"\n },\n \"links\": {\n \"self\": \"/v1/extractions/d1a2b3c4-5678-9abc-def0-1234567890ab\",\n \"document\": \"/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543\"\n }\n}\n```\n\n- **`data`** — extracted fields as key-value pairs matching your schema.\n- **`confidence.fields`** — per-field score from 0 to 1. Above 0.9 is high confidence; below 0.7 flags for review.\n- **`extraction_id`** — use this to retrieve, correct, or deliver results later.\n- Full response schema: [ExtractSyncResponse](#/components/schemas/ExtractSyncResponse)\n\n**4. Next steps**\n\n- **50+ pages?** Use async mode — see [Async Extraction Flow](#section/Async-Extraction-Flow) below.\n- **Reusable schemas** — save field definitions with `POST /v1/schemas`, then pass `schema_id` on future extractions.\n- **Receive results via webhook** — configure a delivery destination and listen for `document.extracted` events. See the [Delivery](#tag/Delivery) tag.\n\n---\n\n## Authentication\n\nAll requests require a Bearer token in the `Authorization` header.\nAPI keys are prefixed with `tlnc_` and scoped per customer.\n\n```\nAuthorization: Bearer tlnc_live_abc123...\n```\n\n## Async Extraction Pattern\n\nSmall documents (≤5 pages) are processed synchronously and return a `200`\nwith the extracted data immediately. Larger documents return a `202 Accepted`\nwith a `poll_url` — poll `GET /v1/documents/{id}` until `status` transitions\nto `completed`, then fetch results via `GET /v1/documents/{id}/extractions`.\n\nYou can force async processing by passing `options: {\"async\": true}` on\nany extraction request. Combine with webhooks for a fully event-driven flow:\nconfigure a webhook destination under Delivery and listen for the\n`extraction.complete` event.\n\n**Job status lifecycle:** `pending` → `processing` → `complete` | `failed`\n\n## Rate Limits\n\nThe **Free** tier is metered by a recurring **5,000-credit monthly grant**\n(no card required) that refreshes on the 1st of each month (UTC). Free\nrequests run until the monthly credit balance is spent, then return `402`\nuntil the next grant. A generous daily request ceiling is retained purely as\nabuse protection and does not bind a legitimate free user within the monthly\nenvelope. Inspect your balance and reset date via `GET /v1/account`.\n\nPaid tiers are metered per calendar day (UTC):\n\n| Tier | Extract | Platform | Ingest | Operations | Run | Ask |\n|------------|---------|----------|--------|------------|-----|-----|\n| Free | 1,000/day | 2,000/day | 1,000/day | 1,000/day | 1,000/day | 200/day |\n| Pro | 25,000/day | 50,000/day | 25,000/day | 25,000/day | 25,000/day | 5,000/day |\n| Enterprise | Unlimited | Unlimited | Unlimited | Unlimited | Unlimited | Unlimited |\n\nFree workspaces additionally receive 5,000 credits/month; spend is governed\nby credits (402 on exhaustion), with daily ceilings acting as abuse protection.\n\nResponses with a finite limit include rate-limit headers:\n- `X-RateLimit-Limit` — daily cap for the namespace\n- `X-RateLimit-Remaining` — requests left today\n- `X-RateLimit-Reset` — ISO 8601 timestamp when the window resets (midnight UTC)\n\n## Pagination\n\nList endpoints use cursor-based pagination. Pass `limit` (1–100, default 20),\n`cursor` (opaque token from `pagination.next_cursor`), and `order` (`asc` or `desc`, default `desc`).\n\n## Errors\n\nAll errors return a JSON body with `error` (machine-readable code) and `message`\n(human-readable explanation). Additional fields vary by error type.\n\n| Code | Error | Description |\n|------|--------------------|------------------------------------------|\n| 400 | validation_error | Request body is malformed or invalid |\n| 401 | unauthorized | Missing or invalid API key |\n| 403 | insufficient_scope | API key lacks the required scope |\n| 404 | not_found | Resource does not exist |\n| 409 | conflict | Resource state conflict |\n| 413 | payload_too_large | File exceeds 500 MB limit |\n| 422 | extraction_failed | Document could not be processed |\n| 429 | rate_limit_exceeded| Daily rate limit reached |\n| 500 | internal_error | Unexpected server error (retryable) |\n\nEvery error response follows this envelope:\n\n```json\n{\n \"statusCode\": 400,\n \"code\": \"VALIDATION_ERROR\",\n \"error\": \"Bad Request\",\n \"message\": \"name is required.\",\n \"retryable\": false,\n \"timestamp\": \"2026-04-25T14:30:00.000Z\",\n \"path\": \"/v1/schemas\"\n}\n```\n\nThe `code` field is one of: `VALIDATION_ERROR`, `AUTH_REQUIRED`, `TOKEN_EXPIRED`,\n`INSUFFICIENT_PERMISSIONS`, `RESOURCE_NOT_FOUND`, `QUOTA_EXCEEDED`,\n`INSUFFICIENT_CREDITS`, `LLM_RATE_LIMITED`, `LLM_TIMEOUT`, `LLM_UNAVAILABLE`,\n`OCR_FAILED`, `EXTRACTION_FAILED`, `EXTRACTION_TIMEOUT`, `FILE_TOO_LARGE`,\n`DUPLICATE_RESOURCE`, `DATASPACE_RUN_FAILED`, `INTERNAL_ERROR`.\n\n### Refusal reasons\n\nA refusal an integration must branch on also carries `reason`, a stable\ntoken beside `code`. Branch on `reason`, not on `code`, `error` or the\nmessage: `code` says only which HTTP family the refusal belongs to, `error`\nis the HTTP status name on some refusals and a body discriminant on others,\nand messages are prose. The key is present only on refusals; absent means\n\"no stable reason, read `message`\". Message prefixes (`insufficient_grant:\n…`) are kept for older clients that parse them; where a message carries one it equals `reason`, but not every refusal has a prefix (the Apps-ladder refusals are plain sentences), so branch on `reason`.\n\n| `reason` | Status | What the caller does |\n|---|---|---|\n| `insufficient_grant` | 403 | The app holds no approved grant covering this resource, or the route is not reachable by an app service key at all. Not retryable — stop and ask the workspace owner to grant it. |\n| `install_pending_approval` | 403 | A newer version of the app awaits owner approval and the install is paused. Poll `GET /v1/apps/{id}/install/status`. |\n| `install_not_ready` | 403 / 409 | The install is not in force (403, no installed binding for this service key) or is parked on an unapproved version / has no bound OAuth client (409). Poll `GET /v1/apps/{id}/install/status`. |\n| `endpoint_not_confirmed` | 400 | The binding would give the install its first subscriptions, or `confirm_subscriptions_endpoint` does not equal the manifest's `subscriptions_endpoint`. An owner action — re-send with the confirmation. |\n| `slot_unbound` | 400 / 409 | A required requirement slot has no binding (400 at install/rebind, 409 when a run resolves an already-installed version). The owner binds the named aliases. |\n| `slot_unknown` | 400 | The request named an alias the manifest declares no slot for. Fix the manifest or the request. |\n| `hosted_manifest_read_only` | 409 | The app's manifest is fetched from the vendor's URL, so local edits are refused. Edit at the vendor host, then `POST /v1/apps/{id}/refresh`. |\n| `hosted_surface_fixed` | 422 | A hosted app's surface URL comes from its manifest and moves only when a new version is approved; drop `surface_url` from the patch. |\n| `manifest_fetch_failed` | 422 | The vendor's manifest URL could not be read. `details.violations` carries the fetch reason. Fix it at the vendor host and retry. |\n| `schema_validation_failed` | 422 | A manifest does not validate, on publish or on a hosted fetch. `details.violations` carries `{ pointer, keyword, message }` per failure. |\n| `refresh_failed` | 422 | A hosted refresh did not happen; the failure is recorded on the app and it stays live on its approved version. `details` carries `{ changed, error }`. Fix it at the vendor host. |\n| `insufficient_scope` | 403 | The key or token lacks a required scope. `required_scopes` names the ones that admit. Workspace keys and OAuth clients receive this; an app service key never does, because both scope paths hand an app principal to its grant checks instead. |\n| `unauthenticated` | 403 | The Apps surface saw no authenticated principal. |\n| `workspace_required` | 403 | The Apps surface needs a concrete workspace; a master-view key cannot call it. |\n| `insufficient_tier` | 403 | The caller's workspace role (or an OAuth token's role claim) ranks below the route's tier. `required` names the tier. |\n| `owner_required` | 403 | Grant and OAuth-client management needs a human workspace owner; no machine caller reaches it. |\n| `insufficient_app_grant` | 403 | The API key holds app grants, but none at the level this route needs. `required` names the tier. |\n| `decide_grant_required` | 403 | The decision-task protocol admits only a machine caller holding an explicit `decide` grant on the app. |\n\n## Async Extraction Flow\n\nDocuments ≤5 pages return results synchronously (`200`). Larger documents\n— or any request with `options: {\"async\": true}` — return `202 Accepted`.\n\n**1. Submit extraction:**\n\n```bash\ncurl -X POST https://api.talonic.com/v1/extract \\\n -H \"Authorization: Bearer tlnc_live_abc123\" \\\n -F \"file=@contract.pdf\" \\\n -F 'options={\"async\": true}'\n```\n\nResponse `202`:\n```json\n{\n \"request_id\": \"req_x7y8z9a0\",\n \"status\": \"processing\",\n \"document\": { \"id\": \"f0e1d2c3-b4a5-9687-8765-432109876543\" },\n \"poll_url\": \"/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543\"\n}\n```\n\n**2. Poll until complete:**\n\n```bash\ncurl https://api.talonic.com/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543 \\\n -H \"Authorization: Bearer tlnc_live_abc123\"\n```\n\nWhile processing: `{ \"status\": \"processing\" }`\nWhen done: `{ \"status\": \"completed\" }`\n\n**3. Retrieve results:**\n\n```bash\ncurl https://api.talonic.com/v1/documents/f0e1d2c3-b4a5-9687-8765-432109876543/extractions \\\n -H \"Authorization: Bearer tlnc_live_abc123\"\n```\n\n**Python — complete async flow with exponential backoff:**\n\n```python\nimport time\nimport requests\n\nAPI_KEY = \"tlnc_live_...\"\nBASE = \"https://api.talonic.com/v1\"\nHEADERS = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\n# Step 1: Submit async extraction\nresp = requests.post(f\"{BASE}/extract\",\n headers=HEADERS,\n files={\"file\": open(\"contract.pdf\", \"rb\")},\n data={\"options\": '{\"async\": true}'})\ndoc_id = resp.json()[\"document\"][\"id\"]\n\n# Step 2: Poll with exponential backoff (2s → 4s → 8s → 16s → 30s cap)\ndelay = 2\nfor _ in range(20):\n time.sleep(delay)\n doc = requests.get(f\"{BASE}/documents/{doc_id}\", headers=HEADERS).json()\n if doc[\"status\"] == \"completed\":\n break\n if doc[\"status\"] == \"error\":\n raise Exception(f\"Extraction failed: {doc.get('error')}\")\n delay = min(delay * 2, 30)\n\n# Step 3: Retrieve extracted data\nextractions = requests.get(\n f\"{BASE}/documents/{doc_id}/extractions\", headers=HEADERS).json()\ndata = extractions[\"data\"][0][\"data\"]\nconfidence = extractions[\"data\"][0][\"confidence\"][\"overall\"]\nprint(f\"Extracted {len(data)} fields (confidence: {confidence})\")\nprint(data)\n# → {\"vendor_name\": \"Acme Corp\", \"total_amount\": 1250.00, ...}\n```\n\n**TypeScript — same flow:**\n\n```typescript\nconst API_KEY = \"tlnc_live_...\";\nconst BASE = \"https://api.talonic.com/v1\";\nconst headers = { Authorization: `Bearer ${API_KEY}` };\n\n// Step 1: Submit async extraction\nconst form = new FormData();\nform.append(\"file\", fs.createReadStream(\"contract.pdf\"));\nform.append(\"options\", '{\"async\": true}');\nconst { document } = await fetch(`${BASE}/extract`, {\n method: \"POST\", headers, body: form,\n}).then((r) => r.json());\n\n// Step 2: Poll with exponential backoff\nlet delay = 2000;\nlet doc: any;\nfor (let i = 0; i < 20; i++) {\n await new Promise((r) => setTimeout(r, delay));\n doc = await fetch(`${BASE}/documents/${document.id}`, { headers }).then((r) => r.json());\n if (doc.status === \"completed\") break;\n if (doc.status === \"error\") throw new Error(`Extraction failed: ${doc.error}`);\n delay = Math.min(delay * 2, 30_000);\n}\n\n// Step 3: Retrieve extracted data\nconst { data: extractions } = await fetch(\n `${BASE}/documents/${document.id}/extractions`, { headers }\n).then((r) => r.json());\nconsole.log(extractions[0].data);\n// → { vendor_name: \"Acme Corp\", total_amount: 1250.00, ... }\n```\n\nRecommended polling: 2s initial, exponential backoff (2→4→8→16→30s cap),\ntimeout after 5 minutes.\n\n**Alternative — Webhooks:** Configure a delivery destination and listen for\n`document.extracted` events. See the Delivery tag.\n\n**Job status state machine:**\n`pending` → `queued` → `processing` → `complete` | `failed`\n\n## Performance\n\n| Document size | Expected latency | Max timeout |\n|---------------|------------------|-------------|\n| 1–5 pages | Sync, <3s | 30s |\n| 6–50 pages | <30s average | 5 min |\n| 50+ pages | <5 min average | 30 min |\n\n**Uptime SLA:** 99.5% (Build), 99.9% (Scale), custom (Enterprise).\n\n**Max file size:** 500 MB. JSON request bodies (schemas, jobs): 1 MB.\n\n**Idempotency:** Pass `Idempotency-Key` header on POST requests. Keys are\nscoped to your organization (all keys in a workspace share one namespace).\nDuplicates return the cached response with `cached: true`.\n",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "Talonic Support",
|
|
9
9
|
"email": "support@talonic.ai",
|
|
@@ -4535,7 +4535,8 @@
|
|
|
4535
4535
|
"enum": [
|
|
4536
4536
|
"in_flight",
|
|
4537
4537
|
"succeeded",
|
|
4538
|
-
"failed"
|
|
4538
|
+
"failed",
|
|
4539
|
+
"superseded"
|
|
4539
4540
|
]
|
|
4540
4541
|
}
|
|
4541
4542
|
},
|
|
@@ -4623,7 +4624,8 @@
|
|
|
4623
4624
|
"enum": [
|
|
4624
4625
|
"in_flight",
|
|
4625
4626
|
"succeeded",
|
|
4626
|
-
"failed"
|
|
4627
|
+
"failed",
|
|
4628
|
+
"superseded"
|
|
4627
4629
|
]
|
|
4628
4630
|
}
|
|
4629
4631
|
}
|
|
@@ -5797,7 +5799,7 @@
|
|
|
5797
5799
|
"get": {
|
|
5798
5800
|
"operationId": "listReviewRecords",
|
|
5799
5801
|
"summary": "List review queue records",
|
|
5800
|
-
"description": "Paginated list of validation records awaiting or having completed review
|
|
5802
|
+
"description": "Paginated list of validation records awaiting or having completed review.\n\n**App keys.** An app service key reaches this route under a `spec`\ngrant at `read`. The page is filtered to the Specs the app was granted:\na `spec` wildcard leaves it unfiltered, concrete ids narrow it to those\nSpecs, and an app holding no `spec` grant at `read` gets an empty page\n— never an unfiltered one.\n",
|
|
5801
5803
|
"tags": [
|
|
5802
5804
|
"Review"
|
|
5803
5805
|
],
|
|
@@ -5870,7 +5872,7 @@
|
|
|
5870
5872
|
"post": {
|
|
5871
5873
|
"operationId": "batchReviewAction",
|
|
5872
5874
|
"summary": "Apply a review action to many records",
|
|
5873
|
-
"description": "Approve or reject many validation records in one call. Failed ids\n(not found or not owned by the customer) are reported in the\n`results` array rather than aborting the whole batch.\n",
|
|
5875
|
+
"description": "Approve or reject many validation records in one call. Failed ids\n(not found or not owned by the customer) are reported in the\n`results` array rather than aborting the whole batch.\n\n**App keys.** An app service key reaches this route and every id is\nchecked individually: a record whose Spec the app does not hold at\n`act` is reported as `{ \"status\": \"error\", \"error\":\n\"insufficient_grant\" }` and is never mutated. `act` is a distinct\ngrant from `read`, so an app that can list a record still cannot\ndecide it without one.\n",
|
|
5874
5876
|
"tags": [
|
|
5875
5877
|
"Review"
|
|
5876
5878
|
],
|
|
@@ -5911,7 +5913,7 @@
|
|
|
5911
5913
|
"get": {
|
|
5912
5914
|
"operationId": "getReviewRecord",
|
|
5913
5915
|
"summary": "Get a review record",
|
|
5914
|
-
"description": "Returns the full record including per-field decisions and
|
|
5916
|
+
"description": "Returns the full record including per-field decisions and\nlow-confidence field list.\n\n**App keys.** Admitted by a `spec` grant at `read` covering the\nrecord's `schema_id`; anything else answers 403 `insufficient_grant`,\nthe same shape a record outside the tenant gets.\n",
|
|
5915
5917
|
"tags": [
|
|
5916
5918
|
"Review"
|
|
5917
5919
|
],
|
|
@@ -5947,6 +5949,7 @@
|
|
|
5947
5949
|
"post": {
|
|
5948
5950
|
"operationId": "performReviewAction",
|
|
5949
5951
|
"summary": "Approve or reject a review record",
|
|
5952
|
+
"description": "**App keys.** Admitted by a `spec` grant at `act` covering the\nrecord's `schema_id` — a `read` grant does not reach it. `reviewed_by`\nstays `null` for an app decision, because that field names a workspace\nuser.\n\n`GET /v1/review/stats` and `POST /v1/review/{id}/assign` are NOT\nreachable by an app service key under any grant.\n",
|
|
5950
5953
|
"tags": [
|
|
5951
5954
|
"Review"
|
|
5952
5955
|
],
|
|
@@ -18895,6 +18898,7 @@
|
|
|
18895
18898
|
"Field Reviews"
|
|
18896
18899
|
],
|
|
18897
18900
|
"summary": "List held field-review items",
|
|
18901
|
+
"description": "**App keys.** An app service key reaches this route under a `spec` grant at `read`. The page is filtered to the Specs the app was granted — a `spec` wildcard leaves it unfiltered, concrete ids narrow it to items whose run belongs to those Specs, and an app holding no `spec` grant at `read` gets an empty page, never an unfiltered one.",
|
|
18898
18902
|
"operationId": "listFieldReviews",
|
|
18899
18903
|
"security": [
|
|
18900
18904
|
{
|
|
@@ -18957,7 +18961,7 @@
|
|
|
18957
18961
|
"Field Reviews"
|
|
18958
18962
|
],
|
|
18959
18963
|
"summary": "Review-queue counts (total + per-trigger + per-pipeline)",
|
|
18960
|
-
"description": "Every pending tally in the response is product-scoped: it counts only fields whose resolution can still change the delivered data product, so on an assembly run `total` is smaller than the full queue that `GET /v1/field-reviews` lists by default. Pass `product_scoped=true` on the list route to enumerate exactly the items these counts describe. `reviewedByPipeline` is not a pending tally and is not scoped.",
|
|
18964
|
+
"description": "Every pending tally in the response is product-scoped: it counts only fields whose resolution can still change the delivered data product, so on an assembly run `total` is smaller than the full queue that `GET /v1/field-reviews` lists by default. Pass `product_scoped=true` on the list route to enumerate exactly the items these counts describe. `reviewedByPipeline` is not a pending tally and is not scoped.\n\n**App keys.** NOT reachable by an app service key under any grant, along with `GET /v1/field-reviews/triage`, `/value-clusters`, `/decisions` and `/decisions/export`: each spans every Spec in the tenant and carries no per-item id a grant could narrow it to.",
|
|
18961
18965
|
"operationId": "getFieldReviewSummary",
|
|
18962
18966
|
"security": [
|
|
18963
18967
|
{
|
|
@@ -19042,6 +19046,7 @@
|
|
|
19042
19046
|
"Field Reviews"
|
|
19043
19047
|
],
|
|
19044
19048
|
"summary": "Get a field-review item's reviewer detail",
|
|
19049
|
+
"description": "**App keys.** Admitted by a `spec` grant at `read` covering the Spec the item's run structures (`pipelines.schema_id` for the `docId`'s run); anything else answers 403 `insufficient_grant`, the same shape a pipeline document outside the tenant gets.",
|
|
19045
19050
|
"operationId": "getFieldReviewDetail",
|
|
19046
19051
|
"security": [
|
|
19047
19052
|
{
|
|
@@ -19083,6 +19088,7 @@
|
|
|
19083
19088
|
"Field Reviews"
|
|
19084
19089
|
],
|
|
19085
19090
|
"summary": "Resolve a held field-review item",
|
|
19091
|
+
"description": "**App keys.** Admitted by a `spec` grant at `act` covering the Spec the item's run structures — a `read` grant that lists the item does not reach it. The decision is logged as the `api` actor, and an app resolves as an unprivileged reviewer, so a complex field stays out of reach exactly as for a workspace key.",
|
|
19086
19092
|
"operationId": "resolveFieldReview",
|
|
19087
19093
|
"security": [
|
|
19088
19094
|
{
|
|
@@ -19152,6 +19158,7 @@
|
|
|
19152
19158
|
"Field Reviews"
|
|
19153
19159
|
],
|
|
19154
19160
|
"summary": "Resolve many field-review items at once",
|
|
19161
|
+
"description": "**App keys.** An app service key reaches this route and every item is checked individually: an item whose run belongs to a Spec the app does not hold at `act` is reported as `{ \"ok\": false, \"error\": \"insufficient_grant\" }` and is never resolved. `act` is a distinct grant from `read`, so an app that can list an item still cannot decide it without one.",
|
|
19155
19162
|
"operationId": "bulkResolveFieldReviews",
|
|
19156
19163
|
"security": [
|
|
19157
19164
|
{
|
|
@@ -21894,7 +21901,7 @@
|
|
|
21894
21901
|
"schema": {
|
|
21895
21902
|
"type": "string"
|
|
21896
21903
|
},
|
|
21897
|
-
"description": "Filter by event type, e.g. document.extracted"
|
|
21904
|
+
"description": "Filter by event type (comma-separated for several), e.g. document.extracted"
|
|
21898
21905
|
},
|
|
21899
21906
|
{
|
|
21900
21907
|
"name": "limit",
|
|
@@ -21913,12 +21920,32 @@
|
|
|
21913
21920
|
"schema": {
|
|
21914
21921
|
"type": "integer",
|
|
21915
21922
|
"default": 0
|
|
21916
|
-
}
|
|
21923
|
+
},
|
|
21924
|
+
"description": "Offset paging (newest first). Ignored when `after` is given."
|
|
21925
|
+
},
|
|
21926
|
+
{
|
|
21927
|
+
"name": "after",
|
|
21928
|
+
"in": "query",
|
|
21929
|
+
"required": false,
|
|
21930
|
+
"schema": {
|
|
21931
|
+
"type": "string"
|
|
21932
|
+
},
|
|
21933
|
+
"description": "Cursor: return events with an id greater than this one, OLDEST first. Resume from the previous page's next_cursor."
|
|
21934
|
+
},
|
|
21935
|
+
{
|
|
21936
|
+
"name": "since",
|
|
21937
|
+
"in": "query",
|
|
21938
|
+
"required": false,
|
|
21939
|
+
"schema": {
|
|
21940
|
+
"type": "string",
|
|
21941
|
+
"format": "date-time"
|
|
21942
|
+
},
|
|
21943
|
+
"description": "Only events created at or after this instant."
|
|
21917
21944
|
}
|
|
21918
21945
|
],
|
|
21919
21946
|
"responses": {
|
|
21920
21947
|
"200": {
|
|
21921
|
-
"description": "{ data: [{ id, event_type, payload, created_at }], total, limit, offset }"
|
|
21948
|
+
"description": "{ data: [{ id, event_type, payload, created_at }], total, limit, offset, next_cursor } — next_cursor is the resume point (the last id scanned) and null only on an empty page. Events naming documents the caller may not see are omitted (Sources-IAM); an app service key additionally sees only events its grants cover."
|
|
21922
21949
|
}
|
|
21923
21950
|
}
|
|
21924
21951
|
}
|
|
@@ -21981,7 +22008,7 @@
|
|
|
21981
22008
|
],
|
|
21982
22009
|
"responses": {
|
|
21983
22010
|
"200": {
|
|
21984
|
-
"description": "`{ data: [{ event, description }] }`. The `run.completed` and `run.failed` entries carry an extra `served_by_delivery` note:
|
|
22011
|
+
"description": "`{ data: [{ event, description }] }`. The `run.completed` and `run.failed` entries carry an extra `served_by_delivery` note: Delivery publishes them as `pipeline.completed` / `pipeline.failed` on every deployment (the outbox row, `/v1/events` and app subscriptions are unconditional); `delivery.run_signals_via_outbox` retires the legacy `run.*` fire and opens the `/v1/delivery/bindings` leg for them. Existing `/v1/webhooks` subscriptions keep working until migrated.\n"
|
|
21985
22012
|
}
|
|
21986
22013
|
}
|
|
21987
22014
|
}
|
|
@@ -24996,6 +25023,173 @@
|
|
|
24996
25023
|
}
|
|
24997
25024
|
}
|
|
24998
25025
|
},
|
|
25026
|
+
"/v1/apps/from-url": {
|
|
25027
|
+
"post": {
|
|
25028
|
+
"operationId": "registerAppFromUrl",
|
|
25029
|
+
"summary": "Register a vendor-hosted manifest as a new app (human workspace owner only)",
|
|
25030
|
+
"description": "Fetches the manifest, validates it in the hosted `published` context, and stores it as version 1, published and active; the app is created **enabled**, so an install can run it at once (`POST …/disable` is the kill switch). Discovery tries `/.well-known/talonic-app.json` first, then falls back to `/manifest.json`; `manifest_url` may be a bare host or a document URL. This is the front door for a third-party service that wants to be installed as a Talonic app without ever pushing content through the draft editor.",
|
|
25031
|
+
"tags": [
|
|
25032
|
+
"Apps"
|
|
25033
|
+
],
|
|
25034
|
+
"requestBody": {
|
|
25035
|
+
"required": true,
|
|
25036
|
+
"content": {
|
|
25037
|
+
"application/json": {
|
|
25038
|
+
"schema": {
|
|
25039
|
+
"type": "object",
|
|
25040
|
+
"required": [
|
|
25041
|
+
"manifest_url"
|
|
25042
|
+
],
|
|
25043
|
+
"properties": {
|
|
25044
|
+
"manifest_url": {
|
|
25045
|
+
"type": "string",
|
|
25046
|
+
"maxLength": 2048,
|
|
25047
|
+
"description": "An https URL (scheme + host, optionally with a path to the manifest document)."
|
|
25048
|
+
}
|
|
25049
|
+
}
|
|
25050
|
+
}
|
|
25051
|
+
}
|
|
25052
|
+
}
|
|
25053
|
+
},
|
|
25054
|
+
"responses": {
|
|
25055
|
+
"201": {
|
|
25056
|
+
"description": "The new app's manifest, the stored version, and the validation outcome.",
|
|
25057
|
+
"content": {
|
|
25058
|
+
"application/json": {
|
|
25059
|
+
"schema": {
|
|
25060
|
+
"type": "object",
|
|
25061
|
+
"properties": {
|
|
25062
|
+
"app": {
|
|
25063
|
+
"$ref": "#/components/schemas/AppManifest"
|
|
25064
|
+
},
|
|
25065
|
+
"version": {
|
|
25066
|
+
"type": "object",
|
|
25067
|
+
"properties": {
|
|
25068
|
+
"version": {
|
|
25069
|
+
"type": "integer"
|
|
25070
|
+
},
|
|
25071
|
+
"status": {
|
|
25072
|
+
"type": "string"
|
|
25073
|
+
},
|
|
25074
|
+
"content_hash": {
|
|
25075
|
+
"type": "string"
|
|
25076
|
+
},
|
|
25077
|
+
"manifest_path": {
|
|
25078
|
+
"type": "string",
|
|
25079
|
+
"enum": [
|
|
25080
|
+
"well-known",
|
|
25081
|
+
"fallback",
|
|
25082
|
+
"explicit"
|
|
25083
|
+
]
|
|
25084
|
+
},
|
|
25085
|
+
"fetched_at": {
|
|
25086
|
+
"type": "string",
|
|
25087
|
+
"format": "date-time"
|
|
25088
|
+
}
|
|
25089
|
+
}
|
|
25090
|
+
},
|
|
25091
|
+
"validation": {
|
|
25092
|
+
"allOf": [
|
|
25093
|
+
{
|
|
25094
|
+
"$ref": "#/components/schemas/AppManifestValidateResult"
|
|
25095
|
+
}
|
|
25096
|
+
],
|
|
25097
|
+
"description": "Always `{ valid: true, normalized }` on a 201 — an invalid or unreachable manifest 422s instead of registering."
|
|
25098
|
+
}
|
|
25099
|
+
}
|
|
25100
|
+
}
|
|
25101
|
+
}
|
|
25102
|
+
}
|
|
25103
|
+
},
|
|
25104
|
+
"403": {
|
|
25105
|
+
"$ref": "#/components/responses/Forbidden"
|
|
25106
|
+
},
|
|
25107
|
+
"409": {
|
|
25108
|
+
"description": "The slug, or this manifest_url, is already registered in the workspace."
|
|
25109
|
+
},
|
|
25110
|
+
"422": {
|
|
25111
|
+
"description": "`schema_validation_failed` (the manifest fails validation) or `manifest_fetch_failed` (the URL could not be fetched); both carry `details: { error, violations: AppManifestViolation[] }`.",
|
|
25112
|
+
"content": {
|
|
25113
|
+
"application/json": {
|
|
25114
|
+
"schema": {
|
|
25115
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
25116
|
+
},
|
|
25117
|
+
"example": {
|
|
25118
|
+
"statusCode": 422,
|
|
25119
|
+
"code": "VALIDATION_ERROR",
|
|
25120
|
+
"error": "Unprocessable Entity",
|
|
25121
|
+
"message": "schema_validation_failed",
|
|
25122
|
+
"retryable": false,
|
|
25123
|
+
"timestamp": "2026-04-25T14:30:00.000Z",
|
|
25124
|
+
"path": "/v1/apps/from-url",
|
|
25125
|
+
"details": {
|
|
25126
|
+
"error": "schema_validation_failed",
|
|
25127
|
+
"violations": [
|
|
25128
|
+
{
|
|
25129
|
+
"pointer": "/logic/fallback_cards",
|
|
25130
|
+
"keyword": "required",
|
|
25131
|
+
"message": "fallback_cards is required"
|
|
25132
|
+
}
|
|
25133
|
+
]
|
|
25134
|
+
}
|
|
25135
|
+
}
|
|
25136
|
+
}
|
|
25137
|
+
}
|
|
25138
|
+
}
|
|
25139
|
+
}
|
|
25140
|
+
}
|
|
25141
|
+
},
|
|
25142
|
+
"/v1/apps/manifest/validate": {
|
|
25143
|
+
"post": {
|
|
25144
|
+
"operationId": "validateAppManifest",
|
|
25145
|
+
"summary": "Validate a manifest document or URL (unauthenticated, public tooling)",
|
|
25146
|
+
"description": "No workspace credential is read or required: the rules are public by design, and this route reads no database and writes nothing. Rate-limited per caller IP (`apps.validate_rate_per_minute`), independent of any API key's own rate limit. Supply exactly one of `manifest_url` (fetched through the SSRF guard; discovery tries `/.well-known/talonic-app.json` then `/manifest.json`) or `content` (posted inline — in this mode the hosted origin rules, `allowed_origins`/`subscriptions_endpoint`/`surface.url`, are NOT checked, since a posted body proves no origin). `manifest_url` must be a public https URL.",
|
|
25147
|
+
"tags": [
|
|
25148
|
+
"Apps"
|
|
25149
|
+
],
|
|
25150
|
+
"security": [],
|
|
25151
|
+
"requestBody": {
|
|
25152
|
+
"required": true,
|
|
25153
|
+
"content": {
|
|
25154
|
+
"application/json": {
|
|
25155
|
+
"schema": {
|
|
25156
|
+
"type": "object",
|
|
25157
|
+
"properties": {
|
|
25158
|
+
"manifest_url": {
|
|
25159
|
+
"type": "string",
|
|
25160
|
+
"maxLength": 2048
|
|
25161
|
+
},
|
|
25162
|
+
"content": {
|
|
25163
|
+
"type": "object"
|
|
25164
|
+
}
|
|
25165
|
+
}
|
|
25166
|
+
}
|
|
25167
|
+
}
|
|
25168
|
+
}
|
|
25169
|
+
},
|
|
25170
|
+
"responses": {
|
|
25171
|
+
"200": {
|
|
25172
|
+
"description": "The validation outcome for every case, fetch failures included — an invalid manifest is an answer here, never a 4xx.",
|
|
25173
|
+
"content": {
|
|
25174
|
+
"application/json": {
|
|
25175
|
+
"schema": {
|
|
25176
|
+
"$ref": "#/components/schemas/AppManifestValidateResult"
|
|
25177
|
+
}
|
|
25178
|
+
}
|
|
25179
|
+
}
|
|
25180
|
+
},
|
|
25181
|
+
"400": {
|
|
25182
|
+
"description": "Neither manifest_url nor content was provided."
|
|
25183
|
+
},
|
|
25184
|
+
"413": {
|
|
25185
|
+
"description": "The posted content exceeds apps.hosted_manifest_max_bytes."
|
|
25186
|
+
},
|
|
25187
|
+
"429": {
|
|
25188
|
+
"description": "Too many manifest validations from this IP within the last minute."
|
|
25189
|
+
}
|
|
25190
|
+
}
|
|
25191
|
+
}
|
|
25192
|
+
},
|
|
24999
25193
|
"/v1/apps/{id}/logic/compile": {
|
|
25000
25194
|
"post": {
|
|
25001
25195
|
"operationId": "compileAppRules",
|
|
@@ -25967,11 +26161,11 @@
|
|
|
25967
26161
|
}
|
|
25968
26162
|
}
|
|
25969
26163
|
},
|
|
25970
|
-
"/v1/apps/{id}/
|
|
26164
|
+
"/v1/apps/{id}/session": {
|
|
25971
26165
|
"post": {
|
|
25972
|
-
"operationId": "
|
|
25973
|
-
"summary": "
|
|
25974
|
-
"description": "
|
|
26166
|
+
"operationId": "issueAppSurfaceSession",
|
|
26167
|
+
"summary": "Mint an embedded-surface session (human session only)",
|
|
26168
|
+
"description": "Issues the access token a workspace shell hands to this app's embedded surface: the app's declared surface.scopes, the caller's workspace role as the token's role claim, a lifetime of minutes and NO refresh token. Machine callers are 403; 409 when the workspace holds no installed app with a bound OAuth client, or the app has no published version. The Apps guard caps such a token at min(scope tier, role tier), so it can never outrank the person who opened it.",
|
|
25975
26169
|
"tags": [
|
|
25976
26170
|
"Apps"
|
|
25977
26171
|
],
|
|
@@ -25986,55 +26180,63 @@
|
|
|
25986
26180
|
}
|
|
25987
26181
|
}
|
|
25988
26182
|
],
|
|
25989
|
-
"
|
|
25990
|
-
"
|
|
25991
|
-
|
|
25992
|
-
"
|
|
25993
|
-
"
|
|
25994
|
-
"
|
|
25995
|
-
|
|
25996
|
-
"surface_url": {
|
|
25997
|
-
"type": "string",
|
|
25998
|
-
"maxLength": 2048,
|
|
25999
|
-
"description": "https URL of the external service UI; surfaces as endpoints.surface."
|
|
26000
|
-
},
|
|
26001
|
-
"allowed_origin": {
|
|
26002
|
-
"type": "string",
|
|
26003
|
-
"maxLength": 2048,
|
|
26004
|
-
"description": "Exact https origin admitted for the surface's browser calls. Must match the host of one of the OAuth client's registered redirect URIs, so oauth_client_id is required with it."
|
|
26005
|
-
},
|
|
26006
|
-
"oauth_client_id": {
|
|
26007
|
-
"type": "string",
|
|
26008
|
-
"format": "uuid"
|
|
26009
|
-
},
|
|
26010
|
-
"key_name": {
|
|
26011
|
-
"type": "string",
|
|
26012
|
-
"maxLength": 100
|
|
26013
|
-
}
|
|
26183
|
+
"responses": {
|
|
26184
|
+
"201": {
|
|
26185
|
+
"description": "Session issued.",
|
|
26186
|
+
"content": {
|
|
26187
|
+
"application/json": {
|
|
26188
|
+
"schema": {
|
|
26189
|
+
"$ref": "#/components/schemas/AppSurfaceSession"
|
|
26014
26190
|
}
|
|
26015
26191
|
}
|
|
26016
26192
|
}
|
|
26193
|
+
},
|
|
26194
|
+
"403": {
|
|
26195
|
+
"$ref": "#/components/responses/Forbidden"
|
|
26196
|
+
},
|
|
26197
|
+
"404": {
|
|
26198
|
+
"$ref": "#/components/responses/NotFound"
|
|
26199
|
+
},
|
|
26200
|
+
"409": {
|
|
26201
|
+
"$ref": "#/components/responses/Conflict"
|
|
26017
26202
|
}
|
|
26018
|
-
}
|
|
26203
|
+
}
|
|
26204
|
+
}
|
|
26205
|
+
},
|
|
26206
|
+
"/v1/apps/{id}/refresh": {
|
|
26207
|
+
"post": {
|
|
26208
|
+
"operationId": "refreshAppManifest",
|
|
26209
|
+
"summary": "Re-fetch a hosted app's manifest URL (human workspace owner only)",
|
|
26210
|
+
"description": "Consults the vendor's URL for a new document. A changed document is stored as a `fetched` candidate and NOTHING else moves — `active_version`, every install's `pending_approval_version`, and subscription rows are untouched; the approved claim keeps running until an owner approves the candidate (`POST .../install/approve`). A fetch or validation failure is RECORDED on the app (`last_fetch_error`) and answered as a 422 whose message starts `refresh_failed:` — the app stays live on its last-approved version either way.",
|
|
26211
|
+
"tags": [
|
|
26212
|
+
"Apps"
|
|
26213
|
+
],
|
|
26214
|
+
"parameters": [
|
|
26215
|
+
{
|
|
26216
|
+
"name": "id",
|
|
26217
|
+
"in": "path",
|
|
26218
|
+
"required": true,
|
|
26219
|
+
"schema": {
|
|
26220
|
+
"type": "string",
|
|
26221
|
+
"format": "uuid"
|
|
26222
|
+
}
|
|
26223
|
+
}
|
|
26224
|
+
],
|
|
26019
26225
|
"responses": {
|
|
26020
|
-
"
|
|
26021
|
-
"description": "
|
|
26226
|
+
"200": {
|
|
26227
|
+
"description": "The vendor's document was read.",
|
|
26022
26228
|
"content": {
|
|
26023
26229
|
"application/json": {
|
|
26024
26230
|
"schema": {
|
|
26025
26231
|
"type": "object",
|
|
26026
26232
|
"properties": {
|
|
26027
|
-
"
|
|
26028
|
-
"
|
|
26029
|
-
|
|
26030
|
-
"service_key": {
|
|
26031
|
-
"type": "string"
|
|
26032
|
-
},
|
|
26033
|
-
"masked_prefix": {
|
|
26034
|
-
"type": "string"
|
|
26233
|
+
"changed": {
|
|
26234
|
+
"type": "boolean",
|
|
26235
|
+
"description": "True when a new candidate version was stored."
|
|
26035
26236
|
},
|
|
26036
|
-
"
|
|
26037
|
-
"type": "
|
|
26237
|
+
"version": {
|
|
26238
|
+
"type": "integer",
|
|
26239
|
+
"description": "The candidate version number when changed, else the version already on file."
|
|
26038
26240
|
}
|
|
26039
26241
|
}
|
|
26040
26242
|
}
|
|
@@ -26044,17 +26246,23 @@
|
|
|
26044
26246
|
"403": {
|
|
26045
26247
|
"$ref": "#/components/responses/Forbidden"
|
|
26046
26248
|
},
|
|
26249
|
+
"404": {
|
|
26250
|
+
"$ref": "#/components/responses/NotFound"
|
|
26251
|
+
},
|
|
26047
26252
|
"409": {
|
|
26048
|
-
"
|
|
26253
|
+
"description": "The app is not hosted (source is pushed) — there is no manifest URL to refresh."
|
|
26049
26254
|
},
|
|
26050
26255
|
"422": {
|
|
26051
|
-
"description": "
|
|
26256
|
+
"description": "The fetch or the validation of the served document failed. `message` starts `refresh_failed:` followed by the reason (for example `refresh_failed: invalid_manifest: /subscriptions_endpoint must lie in an origin the manifest vouches for (...)`); `details` carries `{ changed: false, error }`; the same reason is recorded on the app as `last_fetch_error`."
|
|
26052
26257
|
}
|
|
26053
26258
|
}
|
|
26054
|
-
}
|
|
26055
|
-
|
|
26056
|
-
|
|
26057
|
-
|
|
26259
|
+
}
|
|
26260
|
+
},
|
|
26261
|
+
"/v1/apps/{id}/host": {
|
|
26262
|
+
"post": {
|
|
26263
|
+
"operationId": "hostApp",
|
|
26264
|
+
"summary": "Convert a pushed app to hosted (human workspace owner only)",
|
|
26265
|
+
"description": "Points an existing pushed app at a manifest URL. The fetched document becomes a candidate the owner approves like any refresh (or version 1 directly when the app never published). From here on the app's manifest is the vendor's document and the draft editor refuses writes (`hosted_manifest_read_only`).",
|
|
26058
26266
|
"tags": [
|
|
26059
26267
|
"Apps"
|
|
26060
26268
|
],
|
|
@@ -26069,21 +26277,43 @@
|
|
|
26069
26277
|
}
|
|
26070
26278
|
}
|
|
26071
26279
|
],
|
|
26280
|
+
"requestBody": {
|
|
26281
|
+
"required": true,
|
|
26282
|
+
"content": {
|
|
26283
|
+
"application/json": {
|
|
26284
|
+
"schema": {
|
|
26285
|
+
"type": "object",
|
|
26286
|
+
"required": [
|
|
26287
|
+
"manifest_url"
|
|
26288
|
+
],
|
|
26289
|
+
"properties": {
|
|
26290
|
+
"manifest_url": {
|
|
26291
|
+
"type": "string",
|
|
26292
|
+
"maxLength": 2048,
|
|
26293
|
+
"description": "An https URL."
|
|
26294
|
+
}
|
|
26295
|
+
}
|
|
26296
|
+
}
|
|
26297
|
+
}
|
|
26298
|
+
}
|
|
26299
|
+
},
|
|
26072
26300
|
"responses": {
|
|
26073
26301
|
"200": {
|
|
26074
|
-
"description": "
|
|
26302
|
+
"description": "Hosted.",
|
|
26075
26303
|
"content": {
|
|
26076
26304
|
"application/json": {
|
|
26077
26305
|
"schema": {
|
|
26078
26306
|
"type": "object",
|
|
26079
26307
|
"properties": {
|
|
26080
|
-
"
|
|
26081
|
-
"
|
|
26082
|
-
|
|
26083
|
-
|
|
26084
|
-
|
|
26085
|
-
],
|
|
26308
|
+
"changed": {
|
|
26309
|
+
"type": "boolean"
|
|
26310
|
+
},
|
|
26311
|
+
"version": {
|
|
26312
|
+
"type": "integer",
|
|
26086
26313
|
"nullable": true
|
|
26314
|
+
},
|
|
26315
|
+
"app": {
|
|
26316
|
+
"$ref": "#/components/schemas/AppManifest"
|
|
26087
26317
|
}
|
|
26088
26318
|
}
|
|
26089
26319
|
}
|
|
@@ -26092,13 +26322,201 @@
|
|
|
26092
26322
|
},
|
|
26093
26323
|
"403": {
|
|
26094
26324
|
"$ref": "#/components/responses/Forbidden"
|
|
26325
|
+
},
|
|
26326
|
+
"404": {
|
|
26327
|
+
"$ref": "#/components/responses/NotFound"
|
|
26328
|
+
},
|
|
26329
|
+
"409": {
|
|
26330
|
+
"description": "The app is already hosted."
|
|
26331
|
+
},
|
|
26332
|
+
"422": {
|
|
26333
|
+
"description": "The manifest could not be fetched or does not validate; carries `details: { error, violations: AppManifestViolation[] }` exactly as `POST /v1/apps/from-url` does.",
|
|
26334
|
+
"content": {
|
|
26335
|
+
"application/json": {
|
|
26336
|
+
"schema": {
|
|
26337
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
26338
|
+
}
|
|
26339
|
+
}
|
|
26340
|
+
}
|
|
26095
26341
|
}
|
|
26096
26342
|
}
|
|
26097
|
-
}
|
|
26098
|
-
|
|
26099
|
-
|
|
26100
|
-
|
|
26101
|
-
"
|
|
26343
|
+
}
|
|
26344
|
+
},
|
|
26345
|
+
"/v1/apps/{id}/install": {
|
|
26346
|
+
"post": {
|
|
26347
|
+
"operationId": "installApp",
|
|
26348
|
+
"summary": "Install an external app (human workspace owner only)",
|
|
26349
|
+
"description": "Mints the service key carrying the `decide` grant plus the manifest's `required_grants`, stores the surface URL and allowed browser origin, and pre-consents the OAuth client. The plaintext key is returned ONCE and is never retrievable again. Machine callers are 403 whatever grants they hold.",
|
|
26350
|
+
"tags": [
|
|
26351
|
+
"Apps"
|
|
26352
|
+
],
|
|
26353
|
+
"parameters": [
|
|
26354
|
+
{
|
|
26355
|
+
"name": "id",
|
|
26356
|
+
"in": "path",
|
|
26357
|
+
"required": true,
|
|
26358
|
+
"schema": {
|
|
26359
|
+
"type": "string",
|
|
26360
|
+
"format": "uuid"
|
|
26361
|
+
}
|
|
26362
|
+
}
|
|
26363
|
+
],
|
|
26364
|
+
"requestBody": {
|
|
26365
|
+
"required": false,
|
|
26366
|
+
"content": {
|
|
26367
|
+
"application/json": {
|
|
26368
|
+
"schema": {
|
|
26369
|
+
"type": "object",
|
|
26370
|
+
"properties": {
|
|
26371
|
+
"surface_url": {
|
|
26372
|
+
"type": "string",
|
|
26373
|
+
"maxLength": 2048,
|
|
26374
|
+
"description": "https URL of the external service UI; surfaces as endpoints.surface."
|
|
26375
|
+
},
|
|
26376
|
+
"allowed_origin": {
|
|
26377
|
+
"type": "string",
|
|
26378
|
+
"maxLength": 2048,
|
|
26379
|
+
"description": "Exact https origin admitted for the surface's browser calls. Must match the host of one of the OAuth client's registered redirect URIs, so oauth_client_id is required with it."
|
|
26380
|
+
},
|
|
26381
|
+
"oauth_client_id": {
|
|
26382
|
+
"type": "string",
|
|
26383
|
+
"format": "uuid"
|
|
26384
|
+
},
|
|
26385
|
+
"key_name": {
|
|
26386
|
+
"type": "string",
|
|
26387
|
+
"maxLength": 100
|
|
26388
|
+
},
|
|
26389
|
+
"confirm_subscriptions_endpoint": {
|
|
26390
|
+
"type": "string",
|
|
26391
|
+
"maxLength": 2048,
|
|
26392
|
+
"description": "The manifest's `subscriptions_endpoint`, retyped by the owner (§B13.2 check 2). Required, and compared byte-for-byte, whenever the active version subscribes to anything."
|
|
26393
|
+
},
|
|
26394
|
+
"bindings": {
|
|
26395
|
+
"type": "object",
|
|
26396
|
+
"additionalProperties": {
|
|
26397
|
+
"type": "string"
|
|
26398
|
+
},
|
|
26399
|
+
"description": "Requirement slots bound to workspace resources, `{ \"<alias>\": \"<uuid>\" | \"self\" }` — one entry per non-optional, non-`self`-scope slot the manifest's `requires[]` declares (see `AppManifest.requires`).",
|
|
26400
|
+
"example": {
|
|
26401
|
+
"invoices": "3f9c9e3a-1b2c-4d5e-8f60-1234567890ab"
|
|
26402
|
+
}
|
|
26403
|
+
}
|
|
26404
|
+
}
|
|
26405
|
+
}
|
|
26406
|
+
}
|
|
26407
|
+
}
|
|
26408
|
+
},
|
|
26409
|
+
"responses": {
|
|
26410
|
+
"201": {
|
|
26411
|
+
"description": "Installed. The service key AND the subscription signing secret appear here and nowhere else.",
|
|
26412
|
+
"content": {
|
|
26413
|
+
"application/json": {
|
|
26414
|
+
"schema": {
|
|
26415
|
+
"type": "object",
|
|
26416
|
+
"properties": {
|
|
26417
|
+
"install": {
|
|
26418
|
+
"$ref": "#/components/schemas/AppInstall"
|
|
26419
|
+
},
|
|
26420
|
+
"service_key": {
|
|
26421
|
+
"type": "string"
|
|
26422
|
+
},
|
|
26423
|
+
"masked_prefix": {
|
|
26424
|
+
"type": "string"
|
|
26425
|
+
},
|
|
26426
|
+
"subscription_secret": {
|
|
26427
|
+
"type": "string",
|
|
26428
|
+
"nullable": true,
|
|
26429
|
+
"description": "The signing secret every subscription row of the install shares; null when the manifest subscribes to nothing."
|
|
26430
|
+
},
|
|
26431
|
+
"subscriptions": {
|
|
26432
|
+
"$ref": "#/components/schemas/AppInstallSubscriptionsState"
|
|
26433
|
+
},
|
|
26434
|
+
"warning": {
|
|
26435
|
+
"type": "string"
|
|
26436
|
+
}
|
|
26437
|
+
}
|
|
26438
|
+
}
|
|
26439
|
+
}
|
|
26440
|
+
}
|
|
26441
|
+
},
|
|
26442
|
+
"400": {
|
|
26443
|
+
"description": "The bindings or the endpoint confirmation are incomplete; `message` starts with one of `endpoint_not_confirmed:` (confirm_subscriptions_endpoint missing or not byte-equal to the manifest's subscriptions_endpoint), `slot_unbound:` (a required, non-`self` slot has no binding), or `slot_unknown:` (a bindings alias the manifest does not declare).",
|
|
26444
|
+
"content": {
|
|
26445
|
+
"application/json": {
|
|
26446
|
+
"schema": {
|
|
26447
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
26448
|
+
},
|
|
26449
|
+
"example": {
|
|
26450
|
+
"statusCode": 400,
|
|
26451
|
+
"code": "VALIDATION_ERROR",
|
|
26452
|
+
"error": "Bad Request",
|
|
26453
|
+
"message": "slot_unbound: invoices — bind every required slot before installing",
|
|
26454
|
+
"retryable": false,
|
|
26455
|
+
"timestamp": "2026-04-25T14:30:00.000Z",
|
|
26456
|
+
"path": "/v1/apps/1f2e3d4c-5b6a-7980-abcd-ef0123456789/install"
|
|
26457
|
+
}
|
|
26458
|
+
}
|
|
26459
|
+
}
|
|
26460
|
+
},
|
|
26461
|
+
"403": {
|
|
26462
|
+
"$ref": "#/components/responses/Forbidden"
|
|
26463
|
+
},
|
|
26464
|
+
"409": {
|
|
26465
|
+
"$ref": "#/components/responses/Conflict"
|
|
26466
|
+
},
|
|
26467
|
+
"422": {
|
|
26468
|
+
"description": "A required grant target, or a bound requirement-slot resource, does not exist here, or the origin is not admissible."
|
|
26469
|
+
}
|
|
26470
|
+
}
|
|
26471
|
+
},
|
|
26472
|
+
"get": {
|
|
26473
|
+
"operationId": "getAppInstall",
|
|
26474
|
+
"summary": "The app's install row (human workspace owner only)",
|
|
26475
|
+
"description": "Carries the approval claim (`approved_version`, `pending_approval_version`) alongside the requirement-slot `bindings[]` and the subscription rows `subscriptions[]` (never the signing secret).",
|
|
26476
|
+
"tags": [
|
|
26477
|
+
"Apps"
|
|
26478
|
+
],
|
|
26479
|
+
"parameters": [
|
|
26480
|
+
{
|
|
26481
|
+
"name": "id",
|
|
26482
|
+
"in": "path",
|
|
26483
|
+
"required": true,
|
|
26484
|
+
"schema": {
|
|
26485
|
+
"type": "string",
|
|
26486
|
+
"format": "uuid"
|
|
26487
|
+
}
|
|
26488
|
+
}
|
|
26489
|
+
],
|
|
26490
|
+
"responses": {
|
|
26491
|
+
"200": {
|
|
26492
|
+
"description": "The install, or null when the app was never installed.",
|
|
26493
|
+
"content": {
|
|
26494
|
+
"application/json": {
|
|
26495
|
+
"schema": {
|
|
26496
|
+
"type": "object",
|
|
26497
|
+
"properties": {
|
|
26498
|
+
"install": {
|
|
26499
|
+
"allOf": [
|
|
26500
|
+
{
|
|
26501
|
+
"$ref": "#/components/schemas/AppInstall"
|
|
26502
|
+
}
|
|
26503
|
+
],
|
|
26504
|
+
"nullable": true
|
|
26505
|
+
}
|
|
26506
|
+
}
|
|
26507
|
+
}
|
|
26508
|
+
}
|
|
26509
|
+
}
|
|
26510
|
+
},
|
|
26511
|
+
"403": {
|
|
26512
|
+
"$ref": "#/components/responses/Forbidden"
|
|
26513
|
+
}
|
|
26514
|
+
}
|
|
26515
|
+
},
|
|
26516
|
+
"patch": {
|
|
26517
|
+
"operationId": "updateAppInstall",
|
|
26518
|
+
"summary": "Re-point a live install (human workspace owner only)",
|
|
26519
|
+
"description": "Updates the surface URL, the allowed browser origin, and the OAuth client the origin is bound to. An absent field is unchanged; an explicit null clears the value. The origin and client are validated by exactly the rules install applies, against the merged next state. The service key, its grants, and the install status are not touched here. 409 when the install is uninstalled - install again instead.",
|
|
26102
26520
|
"tags": [
|
|
26103
26521
|
"Apps"
|
|
26104
26522
|
],
|
|
@@ -26135,6 +26553,13 @@
|
|
|
26135
26553
|
"type": "string",
|
|
26136
26554
|
"format": "uuid",
|
|
26137
26555
|
"nullable": true
|
|
26556
|
+
},
|
|
26557
|
+
"bindings": {
|
|
26558
|
+
"type": "object",
|
|
26559
|
+
"additionalProperties": {
|
|
26560
|
+
"type": "string"
|
|
26561
|
+
},
|
|
26562
|
+
"description": "Rebind requirement slots: only the aliases present move, and only to resources of the slot's own kind. An alias with no stored binding takes its first one here. 400 `slot_unknown:` for an alias the approved manifest does not declare; 400 `endpoint_not_confirmed:` when the binding would give the install its first subscriptions (approve the version instead); 409 `install_not_ready:` while a newer version awaits approval — send bindings with `POST .../install/approve` then."
|
|
26138
26563
|
}
|
|
26139
26564
|
}
|
|
26140
26565
|
}
|
|
@@ -26157,6 +26582,16 @@
|
|
|
26157
26582
|
}
|
|
26158
26583
|
}
|
|
26159
26584
|
},
|
|
26585
|
+
"400": {
|
|
26586
|
+
"description": "slot_unknown: / endpoint_not_confirmed: (see the bindings field).",
|
|
26587
|
+
"content": {
|
|
26588
|
+
"application/json": {
|
|
26589
|
+
"schema": {
|
|
26590
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
26591
|
+
}
|
|
26592
|
+
}
|
|
26593
|
+
}
|
|
26594
|
+
},
|
|
26160
26595
|
"403": {
|
|
26161
26596
|
"$ref": "#/components/responses/Forbidden"
|
|
26162
26597
|
},
|
|
@@ -26167,7 +26602,7 @@
|
|
|
26167
26602
|
"$ref": "#/components/responses/Conflict"
|
|
26168
26603
|
},
|
|
26169
26604
|
"422": {
|
|
26170
|
-
"description": "The origin is not admissible for the bound OAuth client."
|
|
26605
|
+
"description": "The origin is not admissible for the bound OAuth client, OR (hosted apps only) `hosted_surface_fixed:` — `surface_url` was sent for a hosted app; its surface comes from the manifest and moves only when a new version is approved."
|
|
26171
26606
|
}
|
|
26172
26607
|
}
|
|
26173
26608
|
},
|
|
@@ -26214,6 +26649,377 @@
|
|
|
26214
26649
|
}
|
|
26215
26650
|
}
|
|
26216
26651
|
},
|
|
26652
|
+
"/v1/apps/{id}/install/status": {
|
|
26653
|
+
"get": {
|
|
26654
|
+
"operationId": "getAppInstallStatus",
|
|
26655
|
+
"summary": "The install's own status (reachable by the app's own service key, even while paused)",
|
|
26656
|
+
"description": "The one install route an app's own service key may call while its install awaits owner approval (§B13.2): enough to see WHY it is being refused, and nothing more — no service key id, no endpoint, no secret. Flat by contract (a different audience than `GET .../install`). `status` is null when the app was never installed.",
|
|
26657
|
+
"tags": [
|
|
26658
|
+
"Apps"
|
|
26659
|
+
],
|
|
26660
|
+
"parameters": [
|
|
26661
|
+
{
|
|
26662
|
+
"name": "id",
|
|
26663
|
+
"in": "path",
|
|
26664
|
+
"required": true,
|
|
26665
|
+
"schema": {
|
|
26666
|
+
"type": "string",
|
|
26667
|
+
"format": "uuid"
|
|
26668
|
+
}
|
|
26669
|
+
}
|
|
26670
|
+
],
|
|
26671
|
+
"responses": {
|
|
26672
|
+
"200": {
|
|
26673
|
+
"description": "Own-install status.",
|
|
26674
|
+
"content": {
|
|
26675
|
+
"application/json": {
|
|
26676
|
+
"schema": {
|
|
26677
|
+
"type": "object",
|
|
26678
|
+
"properties": {
|
|
26679
|
+
"status": {
|
|
26680
|
+
"type": "string",
|
|
26681
|
+
"nullable": true,
|
|
26682
|
+
"enum": [
|
|
26683
|
+
"installed",
|
|
26684
|
+
"suspended",
|
|
26685
|
+
"uninstalled"
|
|
26686
|
+
]
|
|
26687
|
+
},
|
|
26688
|
+
"approved_version": {
|
|
26689
|
+
"type": "integer",
|
|
26690
|
+
"nullable": true
|
|
26691
|
+
},
|
|
26692
|
+
"pending_approval_version": {
|
|
26693
|
+
"type": "integer",
|
|
26694
|
+
"nullable": true
|
|
26695
|
+
},
|
|
26696
|
+
"subscriptions": {
|
|
26697
|
+
"type": "array",
|
|
26698
|
+
"items": {
|
|
26699
|
+
"type": "object",
|
|
26700
|
+
"properties": {
|
|
26701
|
+
"event_type": {
|
|
26702
|
+
"type": "string"
|
|
26703
|
+
},
|
|
26704
|
+
"match": {
|
|
26705
|
+
"type": "object"
|
|
26706
|
+
},
|
|
26707
|
+
"status": {
|
|
26708
|
+
"type": "string",
|
|
26709
|
+
"enum": [
|
|
26710
|
+
"pending_verification",
|
|
26711
|
+
"active",
|
|
26712
|
+
"paused",
|
|
26713
|
+
"suspended",
|
|
26714
|
+
"revoked"
|
|
26715
|
+
]
|
|
26716
|
+
},
|
|
26717
|
+
"verified_at": {
|
|
26718
|
+
"type": "string",
|
|
26719
|
+
"format": "date-time",
|
|
26720
|
+
"nullable": true
|
|
26721
|
+
},
|
|
26722
|
+
"last_delivery_at": {
|
|
26723
|
+
"type": "string",
|
|
26724
|
+
"format": "date-time",
|
|
26725
|
+
"nullable": true
|
|
26726
|
+
},
|
|
26727
|
+
"failure_count": {
|
|
26728
|
+
"type": "integer"
|
|
26729
|
+
}
|
|
26730
|
+
}
|
|
26731
|
+
}
|
|
26732
|
+
},
|
|
26733
|
+
"bindings": {
|
|
26734
|
+
"type": "array",
|
|
26735
|
+
"description": "No disclosure beyond what the app's grants already cover: alias, kind, and the bound resource id.",
|
|
26736
|
+
"items": {
|
|
26737
|
+
"type": "object",
|
|
26738
|
+
"properties": {
|
|
26739
|
+
"alias": {
|
|
26740
|
+
"type": "string"
|
|
26741
|
+
},
|
|
26742
|
+
"kind": {
|
|
26743
|
+
"type": "string"
|
|
26744
|
+
},
|
|
26745
|
+
"resource_id": {
|
|
26746
|
+
"type": "string",
|
|
26747
|
+
"format": "uuid"
|
|
26748
|
+
}
|
|
26749
|
+
}
|
|
26750
|
+
}
|
|
26751
|
+
}
|
|
26752
|
+
}
|
|
26753
|
+
}
|
|
26754
|
+
}
|
|
26755
|
+
}
|
|
26756
|
+
},
|
|
26757
|
+
"403": {
|
|
26758
|
+
"$ref": "#/components/responses/Forbidden"
|
|
26759
|
+
}
|
|
26760
|
+
}
|
|
26761
|
+
}
|
|
26762
|
+
},
|
|
26763
|
+
"/v1/apps/{id}/install/diff": {
|
|
26764
|
+
"get": {
|
|
26765
|
+
"operationId": "getAppInstallDiff",
|
|
26766
|
+
"summary": "What approving would change (human workspace owner only)",
|
|
26767
|
+
"description": "The approved claim next to the pending one — grants and subscriptions added or removed, the surface scopes, requirement slots, vouched origins, identity, and whether the delivery endpoint or the surface URL moved.",
|
|
26768
|
+
"tags": [
|
|
26769
|
+
"Apps"
|
|
26770
|
+
],
|
|
26771
|
+
"parameters": [
|
|
26772
|
+
{
|
|
26773
|
+
"name": "id",
|
|
26774
|
+
"in": "path",
|
|
26775
|
+
"required": true,
|
|
26776
|
+
"schema": {
|
|
26777
|
+
"type": "string",
|
|
26778
|
+
"format": "uuid"
|
|
26779
|
+
}
|
|
26780
|
+
},
|
|
26781
|
+
{
|
|
26782
|
+
"name": "version",
|
|
26783
|
+
"in": "query",
|
|
26784
|
+
"required": false,
|
|
26785
|
+
"schema": {
|
|
26786
|
+
"type": "integer",
|
|
26787
|
+
"minimum": 1
|
|
26788
|
+
},
|
|
26789
|
+
"description": "A stored `fetched` candidate of a hosted app to diff against (several may await review at once); defaults to the install's `pending_approval_version`."
|
|
26790
|
+
}
|
|
26791
|
+
],
|
|
26792
|
+
"responses": {
|
|
26793
|
+
"200": {
|
|
26794
|
+
"description": "The install diff.",
|
|
26795
|
+
"content": {
|
|
26796
|
+
"application/json": {
|
|
26797
|
+
"schema": {
|
|
26798
|
+
"$ref": "#/components/schemas/AppInstallDiff"
|
|
26799
|
+
}
|
|
26800
|
+
}
|
|
26801
|
+
}
|
|
26802
|
+
},
|
|
26803
|
+
"403": {
|
|
26804
|
+
"$ref": "#/components/responses/Forbidden"
|
|
26805
|
+
},
|
|
26806
|
+
"404": {
|
|
26807
|
+
"$ref": "#/components/responses/NotFound"
|
|
26808
|
+
},
|
|
26809
|
+
"422": {
|
|
26810
|
+
"description": "version is not a positive integer."
|
|
26811
|
+
}
|
|
26812
|
+
}
|
|
26813
|
+
}
|
|
26814
|
+
},
|
|
26815
|
+
"/v1/apps/{id}/install/approve": {
|
|
26816
|
+
"post": {
|
|
26817
|
+
"operationId": "approveAppInstall",
|
|
26818
|
+
"summary": "Approve the version a publish parked on this install (human workspace owner only)",
|
|
26819
|
+
"description": "Re-runs the install-time checks against the new manifest, syncs grants and subscription rows, and lifts the pause (§B13.2, ruling C.23). For a hosted app, `version` may name a stored `fetched` candidate, which this call activates first; for a pushed app it must equal the version the publish parked.",
|
|
26820
|
+
"tags": [
|
|
26821
|
+
"Apps"
|
|
26822
|
+
],
|
|
26823
|
+
"parameters": [
|
|
26824
|
+
{
|
|
26825
|
+
"name": "id",
|
|
26826
|
+
"in": "path",
|
|
26827
|
+
"required": true,
|
|
26828
|
+
"schema": {
|
|
26829
|
+
"type": "string",
|
|
26830
|
+
"format": "uuid"
|
|
26831
|
+
}
|
|
26832
|
+
}
|
|
26833
|
+
],
|
|
26834
|
+
"requestBody": {
|
|
26835
|
+
"required": false,
|
|
26836
|
+
"content": {
|
|
26837
|
+
"application/json": {
|
|
26838
|
+
"schema": {
|
|
26839
|
+
"type": "object",
|
|
26840
|
+
"properties": {
|
|
26841
|
+
"version": {
|
|
26842
|
+
"type": "integer",
|
|
26843
|
+
"minimum": 1
|
|
26844
|
+
},
|
|
26845
|
+
"confirm_subscriptions_endpoint": {
|
|
26846
|
+
"type": "string",
|
|
26847
|
+
"maxLength": 2048,
|
|
26848
|
+
"description": "Required, and compared byte-for-byte, whenever the new manifest moved where events are delivered — the endpoint changed, or this version subscribes to something and the approved one subscribed to nothing."
|
|
26849
|
+
},
|
|
26850
|
+
"bindings": {
|
|
26851
|
+
"type": "object",
|
|
26852
|
+
"additionalProperties": {
|
|
26853
|
+
"type": "string"
|
|
26854
|
+
},
|
|
26855
|
+
"description": "Bindings for slots the new manifest adds, merged over the ones already stored."
|
|
26856
|
+
}
|
|
26857
|
+
}
|
|
26858
|
+
}
|
|
26859
|
+
}
|
|
26860
|
+
}
|
|
26861
|
+
},
|
|
26862
|
+
"responses": {
|
|
26863
|
+
"200": {
|
|
26864
|
+
"description": "Approved.",
|
|
26865
|
+
"content": {
|
|
26866
|
+
"application/json": {
|
|
26867
|
+
"schema": {
|
|
26868
|
+
"type": "object",
|
|
26869
|
+
"properties": {
|
|
26870
|
+
"install": {
|
|
26871
|
+
"$ref": "#/components/schemas/AppInstall"
|
|
26872
|
+
},
|
|
26873
|
+
"subscription_secret": {
|
|
26874
|
+
"type": "string",
|
|
26875
|
+
"nullable": true,
|
|
26876
|
+
"description": "Non-null ONLY when the approved manifest moved where events are delivered — a new secret was minted and this is its one appearance."
|
|
26877
|
+
},
|
|
26878
|
+
"subscriptions": {
|
|
26879
|
+
"$ref": "#/components/schemas/AppInstallSubscriptionsState"
|
|
26880
|
+
}
|
|
26881
|
+
}
|
|
26882
|
+
}
|
|
26883
|
+
}
|
|
26884
|
+
}
|
|
26885
|
+
},
|
|
26886
|
+
"400": {
|
|
26887
|
+
"description": "endpoint_not_confirmed: / slot_unbound: / slot_unknown: (see the request fields).",
|
|
26888
|
+
"content": {
|
|
26889
|
+
"application/json": {
|
|
26890
|
+
"schema": {
|
|
26891
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
26892
|
+
}
|
|
26893
|
+
}
|
|
26894
|
+
}
|
|
26895
|
+
},
|
|
26896
|
+
"403": {
|
|
26897
|
+
"$ref": "#/components/responses/Forbidden"
|
|
26898
|
+
},
|
|
26899
|
+
"404": {
|
|
26900
|
+
"$ref": "#/components/responses/NotFound"
|
|
26901
|
+
},
|
|
26902
|
+
"409": {
|
|
26903
|
+
"description": "Not installed, OR a newer version has since been published (compare-and-set on the version the owner read).",
|
|
26904
|
+
"content": {
|
|
26905
|
+
"application/json": {
|
|
26906
|
+
"schema": {
|
|
26907
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
26908
|
+
}
|
|
26909
|
+
}
|
|
26910
|
+
}
|
|
26911
|
+
},
|
|
26912
|
+
"422": {
|
|
26913
|
+
"description": "A bound requirement-slot resource does not exist here, or the origin/manifest is not admissible."
|
|
26914
|
+
}
|
|
26915
|
+
}
|
|
26916
|
+
}
|
|
26917
|
+
},
|
|
26918
|
+
"/v1/apps/{id}/install/verify-subscriptions": {
|
|
26919
|
+
"post": {
|
|
26920
|
+
"operationId": "verifyAppInstallSubscriptions",
|
|
26921
|
+
"summary": "Re-run the endpoint-ownership challenge with a fresh nonce (human workspace owner only)",
|
|
26922
|
+
"tags": [
|
|
26923
|
+
"Apps"
|
|
26924
|
+
],
|
|
26925
|
+
"parameters": [
|
|
26926
|
+
{
|
|
26927
|
+
"name": "id",
|
|
26928
|
+
"in": "path",
|
|
26929
|
+
"required": true,
|
|
26930
|
+
"schema": {
|
|
26931
|
+
"type": "string",
|
|
26932
|
+
"format": "uuid"
|
|
26933
|
+
}
|
|
26934
|
+
}
|
|
26935
|
+
],
|
|
26936
|
+
"responses": {
|
|
26937
|
+
"200": {
|
|
26938
|
+
"description": "Challenge re-run.",
|
|
26939
|
+
"content": {
|
|
26940
|
+
"application/json": {
|
|
26941
|
+
"schema": {
|
|
26942
|
+
"type": "object",
|
|
26943
|
+
"properties": {
|
|
26944
|
+
"install": {
|
|
26945
|
+
"$ref": "#/components/schemas/AppInstall"
|
|
26946
|
+
},
|
|
26947
|
+
"subscriptions": {
|
|
26948
|
+
"$ref": "#/components/schemas/AppInstallSubscriptionsState"
|
|
26949
|
+
}
|
|
26950
|
+
}
|
|
26951
|
+
}
|
|
26952
|
+
}
|
|
26953
|
+
}
|
|
26954
|
+
},
|
|
26955
|
+
"403": {
|
|
26956
|
+
"$ref": "#/components/responses/Forbidden"
|
|
26957
|
+
},
|
|
26958
|
+
"404": {
|
|
26959
|
+
"$ref": "#/components/responses/NotFound"
|
|
26960
|
+
},
|
|
26961
|
+
"409": {
|
|
26962
|
+
"$ref": "#/components/responses/Conflict"
|
|
26963
|
+
}
|
|
26964
|
+
}
|
|
26965
|
+
}
|
|
26966
|
+
},
|
|
26967
|
+
"/v1/apps/{id}/install/rotate-secret": {
|
|
26968
|
+
"post": {
|
|
26969
|
+
"operationId": "rotateAppInstallSecret",
|
|
26970
|
+
"summary": "Re-mint the subscription signing secret (human workspace owner only)",
|
|
26971
|
+
"description": "The plaintext is in the response ONCE; the rows re-prove the endpoint before anything is delivered under the new secret.",
|
|
26972
|
+
"tags": [
|
|
26973
|
+
"Apps"
|
|
26974
|
+
],
|
|
26975
|
+
"parameters": [
|
|
26976
|
+
{
|
|
26977
|
+
"name": "id",
|
|
26978
|
+
"in": "path",
|
|
26979
|
+
"required": true,
|
|
26980
|
+
"schema": {
|
|
26981
|
+
"type": "string",
|
|
26982
|
+
"format": "uuid"
|
|
26983
|
+
}
|
|
26984
|
+
}
|
|
26985
|
+
],
|
|
26986
|
+
"responses": {
|
|
26987
|
+
"200": {
|
|
26988
|
+
"description": "Rotated.",
|
|
26989
|
+
"content": {
|
|
26990
|
+
"application/json": {
|
|
26991
|
+
"schema": {
|
|
26992
|
+
"type": "object",
|
|
26993
|
+
"properties": {
|
|
26994
|
+
"subscription_secret": {
|
|
26995
|
+
"type": "string"
|
|
26996
|
+
},
|
|
26997
|
+
"install": {
|
|
26998
|
+
"$ref": "#/components/schemas/AppInstall"
|
|
26999
|
+
},
|
|
27000
|
+
"subscriptions": {
|
|
27001
|
+
"$ref": "#/components/schemas/AppInstallSubscriptionsState"
|
|
27002
|
+
},
|
|
27003
|
+
"warning": {
|
|
27004
|
+
"type": "string"
|
|
27005
|
+
}
|
|
27006
|
+
}
|
|
27007
|
+
}
|
|
27008
|
+
}
|
|
27009
|
+
}
|
|
27010
|
+
},
|
|
27011
|
+
"403": {
|
|
27012
|
+
"$ref": "#/components/responses/Forbidden"
|
|
27013
|
+
},
|
|
27014
|
+
"404": {
|
|
27015
|
+
"$ref": "#/components/responses/NotFound"
|
|
27016
|
+
},
|
|
27017
|
+
"409": {
|
|
27018
|
+
"$ref": "#/components/responses/Conflict"
|
|
27019
|
+
}
|
|
27020
|
+
}
|
|
27021
|
+
}
|
|
27022
|
+
},
|
|
26217
27023
|
"/v1/apps/{id}/install/suspend": {
|
|
26218
27024
|
"post": {
|
|
26219
27025
|
"operationId": "suspendAppInstall",
|
|
@@ -26484,6 +27290,168 @@
|
|
|
26484
27290
|
}
|
|
26485
27291
|
}
|
|
26486
27292
|
},
|
|
27293
|
+
"/v1/apps/{id}/subjects": {
|
|
27294
|
+
"get": {
|
|
27295
|
+
"operationId": "listAppStandingSubjects",
|
|
27296
|
+
"summary": "Standing decision per record group (highest revision across sealed runs)",
|
|
27297
|
+
"description": "One row per subject key: the highest-`decision_revision` verdict among SEALED, non-dry runs — the decision a dedupe-by-max-revision receiver converges on. Each row names the deciding run, its App version and that version's content hash; the `versions` map carries a semantic fingerprint per rule so clients can render historical outcomes only under semantically identical current rules. Cursor-paginated by subject key.",
|
|
27298
|
+
"tags": [
|
|
27299
|
+
"Apps"
|
|
27300
|
+
],
|
|
27301
|
+
"parameters": [
|
|
27302
|
+
{
|
|
27303
|
+
"name": "id",
|
|
27304
|
+
"in": "path",
|
|
27305
|
+
"required": true,
|
|
27306
|
+
"schema": {
|
|
27307
|
+
"type": "string",
|
|
27308
|
+
"format": "uuid"
|
|
27309
|
+
}
|
|
27310
|
+
},
|
|
27311
|
+
{
|
|
27312
|
+
"name": "limit",
|
|
27313
|
+
"in": "query",
|
|
27314
|
+
"schema": {
|
|
27315
|
+
"type": "integer",
|
|
27316
|
+
"minimum": 1,
|
|
27317
|
+
"maximum": 500,
|
|
27318
|
+
"default": 100
|
|
27319
|
+
}
|
|
27320
|
+
},
|
|
27321
|
+
{
|
|
27322
|
+
"name": "cursor",
|
|
27323
|
+
"in": "query",
|
|
27324
|
+
"schema": {
|
|
27325
|
+
"type": "string"
|
|
27326
|
+
},
|
|
27327
|
+
"description": "Opaque cursor: the last subject_key of the previous page."
|
|
27328
|
+
},
|
|
27329
|
+
{
|
|
27330
|
+
"name": "include",
|
|
27331
|
+
"in": "query",
|
|
27332
|
+
"schema": {
|
|
27333
|
+
"type": "string",
|
|
27334
|
+
"enum": [
|
|
27335
|
+
"summary"
|
|
27336
|
+
]
|
|
27337
|
+
},
|
|
27338
|
+
"description": "'summary' omits rule_outcomes and document_outcomes from each row."
|
|
27339
|
+
}
|
|
27340
|
+
],
|
|
27341
|
+
"responses": {
|
|
27342
|
+
"200": {
|
|
27343
|
+
"description": "Standing decisions page.",
|
|
27344
|
+
"content": {
|
|
27345
|
+
"application/json": {
|
|
27346
|
+
"schema": {
|
|
27347
|
+
"type": "object",
|
|
27348
|
+
"properties": {
|
|
27349
|
+
"subjects": {
|
|
27350
|
+
"type": "array",
|
|
27351
|
+
"items": {
|
|
27352
|
+
"type": "object",
|
|
27353
|
+
"properties": {
|
|
27354
|
+
"subject_key": {
|
|
27355
|
+
"type": "string"
|
|
27356
|
+
},
|
|
27357
|
+
"rolled_outcome": {
|
|
27358
|
+
"type": "string",
|
|
27359
|
+
"enum": [
|
|
27360
|
+
"passed",
|
|
27361
|
+
"failed",
|
|
27362
|
+
"indeterminate",
|
|
27363
|
+
"not_applicable"
|
|
27364
|
+
]
|
|
27365
|
+
},
|
|
27366
|
+
"auto": {
|
|
27367
|
+
"type": "boolean"
|
|
27368
|
+
},
|
|
27369
|
+
"substantive_passes": {
|
|
27370
|
+
"type": "integer"
|
|
27371
|
+
},
|
|
27372
|
+
"rule_outcomes": {
|
|
27373
|
+
"type": "object",
|
|
27374
|
+
"nullable": true
|
|
27375
|
+
},
|
|
27376
|
+
"document_outcomes": {
|
|
27377
|
+
"type": "array",
|
|
27378
|
+
"nullable": true,
|
|
27379
|
+
"items": {
|
|
27380
|
+
"type": "object"
|
|
27381
|
+
}
|
|
27382
|
+
},
|
|
27383
|
+
"decision_state": {
|
|
27384
|
+
"type": "string",
|
|
27385
|
+
"enum": [
|
|
27386
|
+
"eligible",
|
|
27387
|
+
"ineligible",
|
|
27388
|
+
"unclear"
|
|
27389
|
+
]
|
|
27390
|
+
},
|
|
27391
|
+
"decision_revision": {
|
|
27392
|
+
"type": "integer",
|
|
27393
|
+
"nullable": true
|
|
27394
|
+
},
|
|
27395
|
+
"run_id": {
|
|
27396
|
+
"type": "string",
|
|
27397
|
+
"format": "uuid"
|
|
27398
|
+
},
|
|
27399
|
+
"decided_at": {
|
|
27400
|
+
"type": "string",
|
|
27401
|
+
"format": "date-time"
|
|
27402
|
+
},
|
|
27403
|
+
"app_version": {
|
|
27404
|
+
"type": "integer"
|
|
27405
|
+
},
|
|
27406
|
+
"app_version_hash": {
|
|
27407
|
+
"type": "string",
|
|
27408
|
+
"nullable": true
|
|
27409
|
+
}
|
|
27410
|
+
}
|
|
27411
|
+
}
|
|
27412
|
+
},
|
|
27413
|
+
"next": {
|
|
27414
|
+
"type": "string",
|
|
27415
|
+
"nullable": true
|
|
27416
|
+
},
|
|
27417
|
+
"active_version": {
|
|
27418
|
+
"type": "integer",
|
|
27419
|
+
"nullable": true
|
|
27420
|
+
},
|
|
27421
|
+
"versions": {
|
|
27422
|
+
"type": "object",
|
|
27423
|
+
"additionalProperties": {
|
|
27424
|
+
"type": "object",
|
|
27425
|
+
"properties": {
|
|
27426
|
+
"content_hash": {
|
|
27427
|
+
"type": "string"
|
|
27428
|
+
},
|
|
27429
|
+
"fingerprints": {
|
|
27430
|
+
"type": "object",
|
|
27431
|
+
"additionalProperties": {
|
|
27432
|
+
"type": "string"
|
|
27433
|
+
}
|
|
27434
|
+
}
|
|
27435
|
+
}
|
|
27436
|
+
}
|
|
27437
|
+
}
|
|
27438
|
+
}
|
|
27439
|
+
}
|
|
27440
|
+
}
|
|
27441
|
+
}
|
|
27442
|
+
},
|
|
27443
|
+
"403": {
|
|
27444
|
+
"description": "Master view ('all') or missing workspace — a concrete tenant is required."
|
|
27445
|
+
},
|
|
27446
|
+
"404": {
|
|
27447
|
+
"$ref": "#/components/responses/NotFound"
|
|
27448
|
+
},
|
|
27449
|
+
"501": {
|
|
27450
|
+
"description": "Batch verdicts are not available in this deployment."
|
|
27451
|
+
}
|
|
27452
|
+
}
|
|
27453
|
+
}
|
|
27454
|
+
},
|
|
26487
27455
|
"/v1/apps/{id}/replays": {
|
|
26488
27456
|
"post": {
|
|
26489
27457
|
"operationId": "startAppReplay",
|
|
@@ -27505,6 +28473,135 @@
|
|
|
27505
28473
|
}
|
|
27506
28474
|
}
|
|
27507
28475
|
},
|
|
28476
|
+
"/v1/runs/{runId}/reconstruction": {
|
|
28477
|
+
"get": {
|
|
28478
|
+
"operationId": "reconstructRunDocumentMatrix",
|
|
28479
|
+
"summary": "Replay one subject's document×rule matrix from the frozen package (read-only)",
|
|
28480
|
+
"description": "A CURRENT-ENGINE replay of the run's frozen input package under its pinned App version, for runs sealed before per-document outcomes were persisted. No side effects: no LLM adjudication, no verdict rows, no revisions, no delivery. Integrity is judged per rule against the sealed rule_outcomes; cells of a diverged rule are withheld as historical_result_not_reproducible. The sealed outcomes remain authoritative.",
|
|
28481
|
+
"tags": [
|
|
28482
|
+
"Apps"
|
|
28483
|
+
],
|
|
28484
|
+
"parameters": [
|
|
28485
|
+
{
|
|
28486
|
+
"name": "runId",
|
|
28487
|
+
"in": "path",
|
|
28488
|
+
"required": true,
|
|
28489
|
+
"schema": {
|
|
28490
|
+
"type": "string",
|
|
28491
|
+
"format": "uuid"
|
|
28492
|
+
}
|
|
28493
|
+
},
|
|
28494
|
+
{
|
|
28495
|
+
"name": "subject",
|
|
28496
|
+
"in": "query",
|
|
28497
|
+
"required": true,
|
|
28498
|
+
"schema": {
|
|
28499
|
+
"type": "string"
|
|
28500
|
+
}
|
|
28501
|
+
}
|
|
28502
|
+
],
|
|
28503
|
+
"responses": {
|
|
28504
|
+
"200": {
|
|
28505
|
+
"description": "Reconstructed matrix for the subject.",
|
|
28506
|
+
"content": {
|
|
28507
|
+
"application/json": {
|
|
28508
|
+
"schema": {
|
|
28509
|
+
"type": "object",
|
|
28510
|
+
"properties": {
|
|
28511
|
+
"reconstructed": {
|
|
28512
|
+
"type": "boolean",
|
|
28513
|
+
"enum": [
|
|
28514
|
+
true
|
|
28515
|
+
]
|
|
28516
|
+
},
|
|
28517
|
+
"engine_note": {
|
|
28518
|
+
"type": "string"
|
|
28519
|
+
},
|
|
28520
|
+
"run_id": {
|
|
28521
|
+
"type": "string",
|
|
28522
|
+
"format": "uuid"
|
|
28523
|
+
},
|
|
28524
|
+
"subject_key": {
|
|
28525
|
+
"type": "string"
|
|
28526
|
+
},
|
|
28527
|
+
"sealed": {
|
|
28528
|
+
"type": "object",
|
|
28529
|
+
"properties": {
|
|
28530
|
+
"rolled_outcome": {
|
|
28531
|
+
"type": "string"
|
|
28532
|
+
},
|
|
28533
|
+
"auto": {
|
|
28534
|
+
"type": "boolean"
|
|
28535
|
+
}
|
|
28536
|
+
}
|
|
28537
|
+
},
|
|
28538
|
+
"replay": {
|
|
28539
|
+
"type": "object",
|
|
28540
|
+
"properties": {
|
|
28541
|
+
"rolled_outcome": {
|
|
28542
|
+
"type": "string"
|
|
28543
|
+
},
|
|
28544
|
+
"auto": {
|
|
28545
|
+
"type": "boolean"
|
|
28546
|
+
}
|
|
28547
|
+
}
|
|
28548
|
+
},
|
|
28549
|
+
"diverged_rules": {
|
|
28550
|
+
"type": "array",
|
|
28551
|
+
"items": {
|
|
28552
|
+
"type": "object",
|
|
28553
|
+
"properties": {
|
|
28554
|
+
"cardId": {
|
|
28555
|
+
"type": "string"
|
|
28556
|
+
},
|
|
28557
|
+
"sealed": {
|
|
28558
|
+
"type": "string",
|
|
28559
|
+
"nullable": true
|
|
28560
|
+
},
|
|
28561
|
+
"replay": {
|
|
28562
|
+
"type": "string",
|
|
28563
|
+
"nullable": true
|
|
28564
|
+
},
|
|
28565
|
+
"label": {
|
|
28566
|
+
"type": "string",
|
|
28567
|
+
"enum": [
|
|
28568
|
+
"historical_result_not_reproducible"
|
|
28569
|
+
]
|
|
28570
|
+
}
|
|
28571
|
+
}
|
|
28572
|
+
}
|
|
28573
|
+
},
|
|
28574
|
+
"document_outcomes": {
|
|
28575
|
+
"type": "array",
|
|
28576
|
+
"items": {
|
|
28577
|
+
"type": "object"
|
|
28578
|
+
}
|
|
28579
|
+
}
|
|
28580
|
+
}
|
|
28581
|
+
}
|
|
28582
|
+
}
|
|
28583
|
+
}
|
|
28584
|
+
},
|
|
28585
|
+
"403": {
|
|
28586
|
+
"description": "Master view ('all') or missing workspace — a concrete tenant is required."
|
|
28587
|
+
},
|
|
28588
|
+
"404": {
|
|
28589
|
+
"$ref": "#/components/responses/NotFound"
|
|
28590
|
+
},
|
|
28591
|
+
"422": {
|
|
28592
|
+
"description": "subject must be a single string query parameter."
|
|
28593
|
+
},
|
|
28594
|
+
"501": {
|
|
28595
|
+
"description": "Batch verdicts are not available in this deployment."
|
|
28596
|
+
},
|
|
28597
|
+
"503": {
|
|
28598
|
+
"description": "Reconstruction unavailable (package too large",
|
|
28599
|
+
"replay timed out": null,
|
|
28600
|
+
"or the process is at its concurrent-replay cap).": null
|
|
28601
|
+
}
|
|
28602
|
+
}
|
|
28603
|
+
}
|
|
28604
|
+
},
|
|
27508
28605
|
"/v1/runs/{runId}/record": {
|
|
27509
28606
|
"get": {
|
|
27510
28607
|
"operationId": "getAppRunRecord",
|
|
@@ -28148,7 +29245,7 @@
|
|
|
28148
29245
|
"type": "http",
|
|
28149
29246
|
"scheme": "bearer",
|
|
28150
29247
|
"bearerFormat": "JWT",
|
|
28151
|
-
"description": "OAuth 2.1 access token (JWT) from the connector OAuth flow. Routes\nthat declare this scheme reject `tlnc_` API keys with `401`.\n\nScopes a client may request (the live list is served by\n`GET /.well-known/oauth-authorization-server` as `scopes_supported`):\n\n| Scope | Grants |\n|---|---|\n| `extract:write` | Create extractions; every legacy `write` route |\n| `documents:read` | Read documents and extraction results |\n| `schemas:read` | Read schemas and field definitions |\n| `sources:read` | List connected sources |\n| `webhooks:manage` | Create and manage webhooks |\n| `apps:read` | Read apps, runs and results |\n| `apps:operate` | Run and operate apps |\n| `records:write` | Write record-set data |\n| `identity:read` | Identity only (`/oauth/userinfo`); no `/v1` privilege |\n\nA client that omits `scope` receives the five legacy public-API scopes\nonly. `apps:read`, `apps:operate`, `records:write` and `identity:read`\nare never granted implicitly and must be requested by name. The Apps\nscopes are checked directly by the routes that need them: holding\n`extract:write` does not satisfy an Apps write or a record-set write,\nand `apps:read` alone cannot start a run.\n"
|
|
29248
|
+
"description": "OAuth 2.1 access token (JWT) from the connector OAuth flow. Routes\nthat declare this scheme reject `tlnc_` API keys with `401`.\n\nScopes a client may request (the live list is served by\n`GET /.well-known/oauth-authorization-server` as `scopes_supported`):\n\n| Scope | Grants |\n|---|---|\n| `extract:write` | Create extractions; every legacy `write` route |\n| `documents:read` | Read documents and extraction results |\n| `schemas:read` | Read schemas and field definitions |\n| `sources:read` | List connected sources |\n| `webhooks:manage` | Create and manage webhooks |\n| `apps:read` | Read apps, runs and results |\n| `apps:operate` | Run and operate apps |\n| `apps:decide` | Claim and decide tasks on the workspace's apps as the person (the `decide` tier; needs an active senior_member-or-higher membership, checked on every request; never pre-consentable) |\n| `records:write` | Write record-set data |\n| `identity:read` | Identity only (`/oauth/userinfo`); no `/v1` privilege |\n\nA client that omits `scope` receives the five legacy public-API scopes\nonly. `apps:read`, `apps:operate`, `apps:decide`, `records:write` and `identity:read`\nare never granted implicitly and must be requested by name. The Apps\nscopes are checked directly by the routes that need them: holding\n`extract:write` does not satisfy an Apps write or a record-set write,\nand `apps:read` alone cannot start a run.\n"
|
|
28152
29249
|
}
|
|
28153
29250
|
},
|
|
28154
29251
|
"parameters": {
|
|
@@ -28732,7 +29829,7 @@
|
|
|
28732
29829
|
},
|
|
28733
29830
|
"AppManifest": {
|
|
28734
29831
|
"type": "object",
|
|
28735
|
-
"description": "An app as humans and agents both see it (docs/APPS-SPEC.md §B1.2).",
|
|
29832
|
+
"description": "An app as humans and agents both see it (docs/APPS-SPEC.md §B1.2). A `hosted` app's document is discovered at `/.well-known/talonic-app.json` first, then `/manifest.json` (`manifest_path` says which one answered); its `requires[]` slots are referenced elsewhere in the manifest as `$requires.<alias>` and bound to workspace resources at install (`POST .../install` `bindings`).",
|
|
28736
29833
|
"properties": {
|
|
28737
29834
|
"app_id": {
|
|
28738
29835
|
"type": "string",
|
|
@@ -28825,6 +29922,195 @@
|
|
|
28825
29922
|
"description": "The installed external service's UI. The one install-derived value a manifest carries - read-only, absent when the app is not installed."
|
|
28826
29923
|
}
|
|
28827
29924
|
}
|
|
29925
|
+
},
|
|
29926
|
+
"surface": {
|
|
29927
|
+
"type": "object",
|
|
29928
|
+
"description": "How the app's own UI may be hosted, from the ACTIVE version's manifest with the defaults applied (a manifest with no surface block reads as embed link, scopes [apps:read], context []). A draft never changes it.",
|
|
29929
|
+
"properties": {
|
|
29930
|
+
"embed": {
|
|
29931
|
+
"type": "string",
|
|
29932
|
+
"enum": [
|
|
29933
|
+
"iframe",
|
|
29934
|
+
"link"
|
|
29935
|
+
],
|
|
29936
|
+
"description": "iframe = hosted inside the shell; link = opened in its own tab."
|
|
29937
|
+
},
|
|
29938
|
+
"scopes": {
|
|
29939
|
+
"type": "array",
|
|
29940
|
+
"items": {
|
|
29941
|
+
"type": "string"
|
|
29942
|
+
},
|
|
29943
|
+
"description": "OAuth scopes an embedded session carries; a subset of the pre-consentable set (apps:read, apps:operate, records:write, identity:read)."
|
|
29944
|
+
},
|
|
29945
|
+
"context": {
|
|
29946
|
+
"type": "array",
|
|
29947
|
+
"items": {
|
|
29948
|
+
"type": "string"
|
|
29949
|
+
},
|
|
29950
|
+
"description": "What the shell shares over the handshake (theme, locale, role)."
|
|
29951
|
+
}
|
|
29952
|
+
}
|
|
29953
|
+
},
|
|
29954
|
+
"required_grants": {
|
|
29955
|
+
"type": "array",
|
|
29956
|
+
"description": "The capability claim an owner approves at install (§B13.1); disclosed BEFORE the service key is minted.",
|
|
29957
|
+
"items": {
|
|
29958
|
+
"type": "object",
|
|
29959
|
+
"properties": {
|
|
29960
|
+
"kind": {
|
|
29961
|
+
"type": "string"
|
|
29962
|
+
},
|
|
29963
|
+
"id": {
|
|
29964
|
+
"type": "string",
|
|
29965
|
+
"description": "A resource id, `*`, `self`, or `$requires.<alias>`."
|
|
29966
|
+
},
|
|
29967
|
+
"access": {
|
|
29968
|
+
"type": "string",
|
|
29969
|
+
"enum": [
|
|
29970
|
+
"read",
|
|
29971
|
+
"act",
|
|
29972
|
+
"write"
|
|
29973
|
+
]
|
|
29974
|
+
}
|
|
29975
|
+
}
|
|
29976
|
+
}
|
|
29977
|
+
},
|
|
29978
|
+
"subscriptions": {
|
|
29979
|
+
"type": "array",
|
|
29980
|
+
"description": "Outbox events the active version subscribes to, with the defaults applied.",
|
|
29981
|
+
"items": {
|
|
29982
|
+
"type": "object",
|
|
29983
|
+
"properties": {
|
|
29984
|
+
"event": {
|
|
29985
|
+
"type": "string"
|
|
29986
|
+
},
|
|
29987
|
+
"match": {
|
|
29988
|
+
"type": "object"
|
|
29989
|
+
}
|
|
29990
|
+
}
|
|
29991
|
+
}
|
|
29992
|
+
},
|
|
29993
|
+
"subscriptions_endpoint": {
|
|
29994
|
+
"type": "string",
|
|
29995
|
+
"nullable": true,
|
|
29996
|
+
"description": "Where events are delivered; null when the manifest subscribes to nothing."
|
|
29997
|
+
},
|
|
29998
|
+
"source": {
|
|
29999
|
+
"type": "string",
|
|
30000
|
+
"enum": [
|
|
30001
|
+
"pushed",
|
|
30002
|
+
"hosted"
|
|
30003
|
+
],
|
|
30004
|
+
"description": "pushed = draft + publish; hosted = fetched from manifest_url."
|
|
30005
|
+
},
|
|
30006
|
+
"manifest_url": {
|
|
30007
|
+
"type": "string",
|
|
30008
|
+
"nullable": true
|
|
30009
|
+
},
|
|
30010
|
+
"last_fetch_at": {
|
|
30011
|
+
"type": "string",
|
|
30012
|
+
"format": "date-time",
|
|
30013
|
+
"nullable": true
|
|
30014
|
+
},
|
|
30015
|
+
"last_fetch_error": {
|
|
30016
|
+
"type": "string",
|
|
30017
|
+
"nullable": true,
|
|
30018
|
+
"description": "Null when the last hosted fetch succeeded; the config page offers Refresh instead of a draft editor while this is set."
|
|
30019
|
+
},
|
|
30020
|
+
"identity": {
|
|
30021
|
+
"allOf": [
|
|
30022
|
+
{
|
|
30023
|
+
"$ref": "#/components/schemas/AppManifestIdentity"
|
|
30024
|
+
}
|
|
30025
|
+
],
|
|
30026
|
+
"nullable": true,
|
|
30027
|
+
"description": "Null when the manifest declares no `name`."
|
|
30028
|
+
},
|
|
30029
|
+
"requires": {
|
|
30030
|
+
"type": "array",
|
|
30031
|
+
"items": {
|
|
30032
|
+
"$ref": "#/components/schemas/AppRequirementSlot"
|
|
30033
|
+
}
|
|
30034
|
+
},
|
|
30035
|
+
"allowed_origins": {
|
|
30036
|
+
"type": "array",
|
|
30037
|
+
"items": {
|
|
30038
|
+
"type": "string"
|
|
30039
|
+
},
|
|
30040
|
+
"description": "Origins the manifest's host vouches for, beyond the manifest's own origin (the implicit default when empty). A hosted manifest's `subscriptions_endpoint` and `surface.url` must lie inside this set."
|
|
30041
|
+
}
|
|
30042
|
+
}
|
|
30043
|
+
},
|
|
30044
|
+
"AppSurfaceSession": {
|
|
30045
|
+
"type": "object",
|
|
30046
|
+
"description": "A short-lived OAuth access token a workspace shell hands to an app's embedded surface (docs/APPS-SPEC.md). No refresh token is issued: the shell calls the route again to renew.",
|
|
30047
|
+
"properties": {
|
|
30048
|
+
"access_token": {
|
|
30049
|
+
"type": "string",
|
|
30050
|
+
"description": "OAuth 2.1 access token, aud talonic:public-api. Its claims carry the same `role` and `tier` reported below, so a surface reached through the redirect flow reads the tier off the token itself."
|
|
30051
|
+
},
|
|
30052
|
+
"token_type": {
|
|
30053
|
+
"type": "string",
|
|
30054
|
+
"enum": [
|
|
30055
|
+
"Bearer"
|
|
30056
|
+
]
|
|
30057
|
+
},
|
|
30058
|
+
"expires_in": {
|
|
30059
|
+
"type": "integer",
|
|
30060
|
+
"description": "Lifetime in seconds (apps.embedded_session_ttl_seconds)."
|
|
30061
|
+
},
|
|
30062
|
+
"expires_at": {
|
|
30063
|
+
"type": "string",
|
|
30064
|
+
"format": "date-time"
|
|
30065
|
+
},
|
|
30066
|
+
"scopes": {
|
|
30067
|
+
"type": "array",
|
|
30068
|
+
"items": {
|
|
30069
|
+
"type": "string"
|
|
30070
|
+
},
|
|
30071
|
+
"description": "The app's declared surface.scopes, narrowed to the pre-consentable set."
|
|
30072
|
+
},
|
|
30073
|
+
"role": {
|
|
30074
|
+
"type": "string",
|
|
30075
|
+
"enum": [
|
|
30076
|
+
"viewer",
|
|
30077
|
+
"member",
|
|
30078
|
+
"senior_member",
|
|
30079
|
+
"owner"
|
|
30080
|
+
],
|
|
30081
|
+
"description": "The caller's client role in the workspace, carried on the token as the role claim."
|
|
30082
|
+
},
|
|
30083
|
+
"tier": {
|
|
30084
|
+
"type": "string",
|
|
30085
|
+
"enum": [
|
|
30086
|
+
"read",
|
|
30087
|
+
"run",
|
|
30088
|
+
"operate",
|
|
30089
|
+
"configure"
|
|
30090
|
+
],
|
|
30091
|
+
"description": "The Apps tier this token actually reaches: min(scope tier, role tier). A surface hides controls above it rather than discovering the 403."
|
|
30092
|
+
},
|
|
30093
|
+
"workspace_id": {
|
|
30094
|
+
"type": "string",
|
|
30095
|
+
"format": "uuid"
|
|
30096
|
+
},
|
|
30097
|
+
"app_id": {
|
|
30098
|
+
"type": "string",
|
|
30099
|
+
"format": "uuid"
|
|
30100
|
+
},
|
|
30101
|
+
"api_base": {
|
|
30102
|
+
"type": "string",
|
|
30103
|
+
"description": "Absolute API origin the surface calls back into (API_URL, else this request origin)."
|
|
30104
|
+
},
|
|
30105
|
+
"surface_url": {
|
|
30106
|
+
"type": "string",
|
|
30107
|
+
"nullable": true,
|
|
30108
|
+
"description": "The install's surface URL - what the shell frames."
|
|
30109
|
+
},
|
|
30110
|
+
"allowed_origin": {
|
|
30111
|
+
"type": "string",
|
|
30112
|
+
"nullable": true,
|
|
30113
|
+
"description": "The install's one allowed browser origin: the shell's postMessage target and the only origin it accepts messages from. Carried here because the install row itself is readable only by an owner, and any member may open a surface."
|
|
28828
30114
|
}
|
|
28829
30115
|
}
|
|
28830
30116
|
},
|
|
@@ -28893,6 +30179,38 @@
|
|
|
28893
30179
|
"type": "string",
|
|
28894
30180
|
"format": "date-time",
|
|
28895
30181
|
"nullable": true
|
|
30182
|
+
},
|
|
30183
|
+
"approved_version": {
|
|
30184
|
+
"type": "integer",
|
|
30185
|
+
"nullable": true,
|
|
30186
|
+
"description": "The manifest version this install's grants, subscriptions and bindings were last synced against (§B13.2)."
|
|
30187
|
+
},
|
|
30188
|
+
"approved_at": {
|
|
30189
|
+
"type": "string",
|
|
30190
|
+
"format": "date-time",
|
|
30191
|
+
"nullable": true
|
|
30192
|
+
},
|
|
30193
|
+
"approved_by": {
|
|
30194
|
+
"type": "string",
|
|
30195
|
+
"nullable": true
|
|
30196
|
+
},
|
|
30197
|
+
"pending_approval_version": {
|
|
30198
|
+
"type": "integer",
|
|
30199
|
+
"nullable": true,
|
|
30200
|
+
"description": "Set when a publish or hosted refresh parked a newer version on this install; while set the install is fail-closed (no embedded session, no run start, no decision-task offer, no delivery) until `POST .../install/approve`."
|
|
30201
|
+
},
|
|
30202
|
+
"subscriptions": {
|
|
30203
|
+
"type": "array",
|
|
30204
|
+
"items": {
|
|
30205
|
+
"$ref": "#/components/schemas/AppSubscription"
|
|
30206
|
+
}
|
|
30207
|
+
},
|
|
30208
|
+
"bindings": {
|
|
30209
|
+
"type": "array",
|
|
30210
|
+
"description": "What each requirement slot of the manifest was bound to at install.",
|
|
30211
|
+
"items": {
|
|
30212
|
+
"$ref": "#/components/schemas/AppInstallSlotBinding"
|
|
30213
|
+
}
|
|
28896
30214
|
}
|
|
28897
30215
|
}
|
|
28898
30216
|
},
|
|
@@ -29042,6 +30360,419 @@
|
|
|
29042
30360
|
}
|
|
29043
30361
|
}
|
|
29044
30362
|
},
|
|
30363
|
+
"AppManifestIdentity": {
|
|
30364
|
+
"type": "object",
|
|
30365
|
+
"description": "The vendor's self-declared identity block (docs/APPS-SPEC.md §B1.2). Required on a hosted manifest; informational on a pushed one, where the platform's own app row and content hash remain the identity of record.",
|
|
30366
|
+
"properties": {
|
|
30367
|
+
"name": {
|
|
30368
|
+
"type": "string"
|
|
30369
|
+
},
|
|
30370
|
+
"display_name": {
|
|
30371
|
+
"type": "string",
|
|
30372
|
+
"nullable": true
|
|
30373
|
+
},
|
|
30374
|
+
"description": {
|
|
30375
|
+
"type": "string",
|
|
30376
|
+
"nullable": true
|
|
30377
|
+
},
|
|
30378
|
+
"version": {
|
|
30379
|
+
"type": "string",
|
|
30380
|
+
"nullable": true
|
|
30381
|
+
},
|
|
30382
|
+
"homepage": {
|
|
30383
|
+
"type": "string",
|
|
30384
|
+
"nullable": true
|
|
30385
|
+
},
|
|
30386
|
+
"icon": {
|
|
30387
|
+
"type": "string",
|
|
30388
|
+
"nullable": true
|
|
30389
|
+
}
|
|
30390
|
+
}
|
|
30391
|
+
},
|
|
30392
|
+
"AppRequirementSlot": {
|
|
30393
|
+
"type": "object",
|
|
30394
|
+
"description": "One `requires[]` entry (external-apps design, hosted manifests). A manifest served from a vendor's host cannot know a workspace's ids, so it declares a slot here and references it as `$requires.<alias>` wherever a workspace id would otherwise appear (`required_grants[].id`, `input_bindings[].source.*Id`, `record_set_output.target.id`, `subscriptions[].match.<key>`, the target half of an `acts[]` entry). The installing owner binds each non-`self` slot to a resource via `POST .../install` `bindings`.",
|
|
30395
|
+
"properties": {
|
|
30396
|
+
"alias": {
|
|
30397
|
+
"type": "string",
|
|
30398
|
+
"pattern": "^[a-z][a-z0-9_]{0,31}$"
|
|
30399
|
+
},
|
|
30400
|
+
"kind": {
|
|
30401
|
+
"type": "string",
|
|
30402
|
+
"description": "AppResourceType, e.g. data_product, reference_table, source_connection, app, spec, pipeline, document_source, app_run_set, review."
|
|
30403
|
+
},
|
|
30404
|
+
"access": {
|
|
30405
|
+
"type": "string",
|
|
30406
|
+
"enum": [
|
|
30407
|
+
"read",
|
|
30408
|
+
"act",
|
|
30409
|
+
"write"
|
|
30410
|
+
]
|
|
30411
|
+
},
|
|
30412
|
+
"purpose": {
|
|
30413
|
+
"type": "string",
|
|
30414
|
+
"description": "One sentence the install disclosure shows."
|
|
30415
|
+
},
|
|
30416
|
+
"optional": {
|
|
30417
|
+
"type": "boolean"
|
|
30418
|
+
},
|
|
30419
|
+
"scope": {
|
|
30420
|
+
"type": "string",
|
|
30421
|
+
"enum": [
|
|
30422
|
+
"self"
|
|
30423
|
+
],
|
|
30424
|
+
"description": "'self' binds the slot to the app itself - admissible only on a `review` slot (any access) or an `app` slot with access `act` - so it needs no owner choice and never appears in `bindings`."
|
|
30425
|
+
}
|
|
30426
|
+
}
|
|
30427
|
+
},
|
|
30428
|
+
"AppSubscription": {
|
|
30429
|
+
"type": "object",
|
|
30430
|
+
"description": "One event-subscription row of an install, as the owner surfaces show it. The signing secret is never included.",
|
|
30431
|
+
"properties": {
|
|
30432
|
+
"id": {
|
|
30433
|
+
"type": "string",
|
|
30434
|
+
"format": "uuid"
|
|
30435
|
+
},
|
|
30436
|
+
"event_type": {
|
|
30437
|
+
"type": "string"
|
|
30438
|
+
},
|
|
30439
|
+
"match": {
|
|
30440
|
+
"type": "object"
|
|
30441
|
+
},
|
|
30442
|
+
"endpoint_url": {
|
|
30443
|
+
"type": "string"
|
|
30444
|
+
},
|
|
30445
|
+
"status": {
|
|
30446
|
+
"type": "string",
|
|
30447
|
+
"enum": [
|
|
30448
|
+
"pending_verification",
|
|
30449
|
+
"active",
|
|
30450
|
+
"paused",
|
|
30451
|
+
"suspended",
|
|
30452
|
+
"revoked"
|
|
30453
|
+
]
|
|
30454
|
+
},
|
|
30455
|
+
"failure_count": {
|
|
30456
|
+
"type": "integer"
|
|
30457
|
+
},
|
|
30458
|
+
"last_delivery_at": {
|
|
30459
|
+
"type": "string",
|
|
30460
|
+
"format": "date-time",
|
|
30461
|
+
"nullable": true
|
|
30462
|
+
},
|
|
30463
|
+
"verified_at": {
|
|
30464
|
+
"type": "string",
|
|
30465
|
+
"format": "date-time",
|
|
30466
|
+
"nullable": true
|
|
30467
|
+
}
|
|
30468
|
+
}
|
|
30469
|
+
},
|
|
30470
|
+
"AppInstallSlotBinding": {
|
|
30471
|
+
"type": "object",
|
|
30472
|
+
"description": "What one requirement-slot alias of the install's approved manifest is bound to.",
|
|
30473
|
+
"properties": {
|
|
30474
|
+
"alias": {
|
|
30475
|
+
"type": "string"
|
|
30476
|
+
},
|
|
30477
|
+
"kind": {
|
|
30478
|
+
"type": "string",
|
|
30479
|
+
"description": "AppResourceType of the bound resource."
|
|
30480
|
+
},
|
|
30481
|
+
"resource_id": {
|
|
30482
|
+
"type": "string",
|
|
30483
|
+
"format": "uuid"
|
|
30484
|
+
},
|
|
30485
|
+
"bound_at": {
|
|
30486
|
+
"type": "string",
|
|
30487
|
+
"format": "date-time"
|
|
30488
|
+
}
|
|
30489
|
+
}
|
|
30490
|
+
},
|
|
30491
|
+
"AppInstallSubscriptionsState": {
|
|
30492
|
+
"type": "object",
|
|
30493
|
+
"description": "What an install/approve/verify/rotate call reports about the install's subscription rows as a whole.",
|
|
30494
|
+
"properties": {
|
|
30495
|
+
"status": {
|
|
30496
|
+
"type": "string",
|
|
30497
|
+
"nullable": true,
|
|
30498
|
+
"enum": [
|
|
30499
|
+
"pending_verification",
|
|
30500
|
+
"active",
|
|
30501
|
+
"paused",
|
|
30502
|
+
"suspended",
|
|
30503
|
+
"revoked"
|
|
30504
|
+
],
|
|
30505
|
+
"description": "The status every row of the install carries, or null when it subscribes to nothing."
|
|
30506
|
+
},
|
|
30507
|
+
"verified": {
|
|
30508
|
+
"type": "boolean"
|
|
30509
|
+
},
|
|
30510
|
+
"reason": {
|
|
30511
|
+
"type": "string",
|
|
30512
|
+
"description": "Machine reason from the endpoint-ownership challenge when verified is false."
|
|
30513
|
+
},
|
|
30514
|
+
"count": {
|
|
30515
|
+
"type": "integer"
|
|
30516
|
+
}
|
|
30517
|
+
}
|
|
30518
|
+
},
|
|
30519
|
+
"AppInstallDiff": {
|
|
30520
|
+
"type": "object",
|
|
30521
|
+
"description": "What `GET .../install/diff` reports - the approved claim next to the pending one, so an owner can see what approving would change.",
|
|
30522
|
+
"properties": {
|
|
30523
|
+
"approved_version": {
|
|
30524
|
+
"type": "integer",
|
|
30525
|
+
"nullable": true
|
|
30526
|
+
},
|
|
30527
|
+
"pending_version": {
|
|
30528
|
+
"type": "integer",
|
|
30529
|
+
"nullable": true
|
|
30530
|
+
},
|
|
30531
|
+
"grants": {
|
|
30532
|
+
"type": "object",
|
|
30533
|
+
"properties": {
|
|
30534
|
+
"added": {
|
|
30535
|
+
"type": "array",
|
|
30536
|
+
"items": {
|
|
30537
|
+
"type": "object",
|
|
30538
|
+
"properties": {
|
|
30539
|
+
"kind": {
|
|
30540
|
+
"type": "string"
|
|
30541
|
+
},
|
|
30542
|
+
"id": {
|
|
30543
|
+
"type": "string"
|
|
30544
|
+
},
|
|
30545
|
+
"access": {
|
|
30546
|
+
"type": "string"
|
|
30547
|
+
}
|
|
30548
|
+
}
|
|
30549
|
+
}
|
|
30550
|
+
},
|
|
30551
|
+
"removed": {
|
|
30552
|
+
"type": "array",
|
|
30553
|
+
"items": {
|
|
30554
|
+
"type": "object",
|
|
30555
|
+
"properties": {
|
|
30556
|
+
"kind": {
|
|
30557
|
+
"type": "string"
|
|
30558
|
+
},
|
|
30559
|
+
"id": {
|
|
30560
|
+
"type": "string"
|
|
30561
|
+
},
|
|
30562
|
+
"access": {
|
|
30563
|
+
"type": "string"
|
|
30564
|
+
}
|
|
30565
|
+
}
|
|
30566
|
+
}
|
|
30567
|
+
}
|
|
30568
|
+
}
|
|
30569
|
+
},
|
|
30570
|
+
"subscriptions": {
|
|
30571
|
+
"type": "object",
|
|
30572
|
+
"properties": {
|
|
30573
|
+
"added": {
|
|
30574
|
+
"type": "array",
|
|
30575
|
+
"items": {
|
|
30576
|
+
"type": "object",
|
|
30577
|
+
"properties": {
|
|
30578
|
+
"event": {
|
|
30579
|
+
"type": "string"
|
|
30580
|
+
},
|
|
30581
|
+
"match": {
|
|
30582
|
+
"type": "object"
|
|
30583
|
+
}
|
|
30584
|
+
}
|
|
30585
|
+
}
|
|
30586
|
+
},
|
|
30587
|
+
"removed": {
|
|
30588
|
+
"type": "array",
|
|
30589
|
+
"items": {
|
|
30590
|
+
"type": "object",
|
|
30591
|
+
"properties": {
|
|
30592
|
+
"event": {
|
|
30593
|
+
"type": "string"
|
|
30594
|
+
},
|
|
30595
|
+
"match": {
|
|
30596
|
+
"type": "object"
|
|
30597
|
+
}
|
|
30598
|
+
}
|
|
30599
|
+
}
|
|
30600
|
+
}
|
|
30601
|
+
}
|
|
30602
|
+
},
|
|
30603
|
+
"endpoint": {
|
|
30604
|
+
"type": "object",
|
|
30605
|
+
"properties": {
|
|
30606
|
+
"from": {
|
|
30607
|
+
"type": "string",
|
|
30608
|
+
"nullable": true
|
|
30609
|
+
},
|
|
30610
|
+
"to": {
|
|
30611
|
+
"type": "string",
|
|
30612
|
+
"nullable": true
|
|
30613
|
+
},
|
|
30614
|
+
"changed": {
|
|
30615
|
+
"type": "boolean"
|
|
30616
|
+
}
|
|
30617
|
+
}
|
|
30618
|
+
},
|
|
30619
|
+
"scopes": {
|
|
30620
|
+
"type": "object",
|
|
30621
|
+
"properties": {
|
|
30622
|
+
"from": {
|
|
30623
|
+
"type": "array",
|
|
30624
|
+
"items": {
|
|
30625
|
+
"type": "string"
|
|
30626
|
+
}
|
|
30627
|
+
},
|
|
30628
|
+
"to": {
|
|
30629
|
+
"type": "array",
|
|
30630
|
+
"items": {
|
|
30631
|
+
"type": "string"
|
|
30632
|
+
}
|
|
30633
|
+
}
|
|
30634
|
+
}
|
|
30635
|
+
},
|
|
30636
|
+
"surface_url": {
|
|
30637
|
+
"type": "object",
|
|
30638
|
+
"description": "Where the manifest frames the app (surface.url). An approval that moves this re-points a hosted install's live surface.",
|
|
30639
|
+
"properties": {
|
|
30640
|
+
"from": {
|
|
30641
|
+
"type": "string",
|
|
30642
|
+
"nullable": true
|
|
30643
|
+
},
|
|
30644
|
+
"to": {
|
|
30645
|
+
"type": "string",
|
|
30646
|
+
"nullable": true
|
|
30647
|
+
},
|
|
30648
|
+
"changed": {
|
|
30649
|
+
"type": "boolean"
|
|
30650
|
+
}
|
|
30651
|
+
}
|
|
30652
|
+
},
|
|
30653
|
+
"slots": {
|
|
30654
|
+
"type": "object",
|
|
30655
|
+
"description": "Requirement slots the pending manifest adds, drops, or keeps.",
|
|
30656
|
+
"properties": {
|
|
30657
|
+
"added": {
|
|
30658
|
+
"type": "array",
|
|
30659
|
+
"items": {
|
|
30660
|
+
"$ref": "#/components/schemas/AppRequirementSlot"
|
|
30661
|
+
}
|
|
30662
|
+
},
|
|
30663
|
+
"removed": {
|
|
30664
|
+
"type": "array",
|
|
30665
|
+
"items": {
|
|
30666
|
+
"$ref": "#/components/schemas/AppRequirementSlot"
|
|
30667
|
+
}
|
|
30668
|
+
},
|
|
30669
|
+
"unchanged": {
|
|
30670
|
+
"type": "array",
|
|
30671
|
+
"items": {
|
|
30672
|
+
"$ref": "#/components/schemas/AppRequirementSlot"
|
|
30673
|
+
}
|
|
30674
|
+
}
|
|
30675
|
+
}
|
|
30676
|
+
},
|
|
30677
|
+
"allowed_origins": {
|
|
30678
|
+
"type": "object",
|
|
30679
|
+
"properties": {
|
|
30680
|
+
"from": {
|
|
30681
|
+
"type": "array",
|
|
30682
|
+
"nullable": true,
|
|
30683
|
+
"items": {
|
|
30684
|
+
"type": "string"
|
|
30685
|
+
}
|
|
30686
|
+
},
|
|
30687
|
+
"to": {
|
|
30688
|
+
"type": "array",
|
|
30689
|
+
"nullable": true,
|
|
30690
|
+
"items": {
|
|
30691
|
+
"type": "string"
|
|
30692
|
+
}
|
|
30693
|
+
}
|
|
30694
|
+
}
|
|
30695
|
+
},
|
|
30696
|
+
"identity": {
|
|
30697
|
+
"type": "object",
|
|
30698
|
+
"properties": {
|
|
30699
|
+
"from": {
|
|
30700
|
+
"allOf": [
|
|
30701
|
+
{
|
|
30702
|
+
"$ref": "#/components/schemas/AppManifestIdentity"
|
|
30703
|
+
}
|
|
30704
|
+
],
|
|
30705
|
+
"nullable": true
|
|
30706
|
+
},
|
|
30707
|
+
"to": {
|
|
30708
|
+
"allOf": [
|
|
30709
|
+
{
|
|
30710
|
+
"$ref": "#/components/schemas/AppManifestIdentity"
|
|
30711
|
+
}
|
|
30712
|
+
],
|
|
30713
|
+
"nullable": true
|
|
30714
|
+
}
|
|
30715
|
+
}
|
|
30716
|
+
}
|
|
30717
|
+
}
|
|
30718
|
+
},
|
|
30719
|
+
"AppManifestViolation": {
|
|
30720
|
+
"type": "object",
|
|
30721
|
+
"description": "One manifest defect, in the normative shape of docs/APPS-SPEC.md §B1.3.",
|
|
30722
|
+
"properties": {
|
|
30723
|
+
"pointer": {
|
|
30724
|
+
"type": "string",
|
|
30725
|
+
"description": "RFC 6901 JSON Pointer into the manifest, e.g. /logic/fallback_cards. A missing property names the property itself, not its parent."
|
|
30726
|
+
},
|
|
30727
|
+
"keyword": {
|
|
30728
|
+
"type": "string"
|
|
30729
|
+
},
|
|
30730
|
+
"message": {
|
|
30731
|
+
"type": "string"
|
|
30732
|
+
}
|
|
30733
|
+
}
|
|
30734
|
+
},
|
|
30735
|
+
"AppManifestValidateResult": {
|
|
30736
|
+
"type": "object",
|
|
30737
|
+
"description": "Response of `POST /v1/apps/manifest/validate` and the `validation` block of `POST /v1/apps/from-url` - an invalid manifest is an answer, not an error.",
|
|
30738
|
+
"properties": {
|
|
30739
|
+
"valid": {
|
|
30740
|
+
"type": "boolean"
|
|
30741
|
+
},
|
|
30742
|
+
"mode": {
|
|
30743
|
+
"type": "string",
|
|
30744
|
+
"enum": [
|
|
30745
|
+
"url",
|
|
30746
|
+
"content"
|
|
30747
|
+
],
|
|
30748
|
+
"description": "How the document reached the validator. In `content` mode the hosted origin rules (allowed_origins, subscriptions_endpoint, surface.url) are NOT applied - a posted body has no origin to prove."
|
|
30749
|
+
},
|
|
30750
|
+
"violations": {
|
|
30751
|
+
"type": "array",
|
|
30752
|
+
"items": {
|
|
30753
|
+
"$ref": "#/components/schemas/AppManifestViolation"
|
|
30754
|
+
}
|
|
30755
|
+
},
|
|
30756
|
+
"normalized": {
|
|
30757
|
+
"type": "object",
|
|
30758
|
+
"description": "The manifest with defaults applied - surface, subscriptions, identity, requires."
|
|
30759
|
+
},
|
|
30760
|
+
"manifest_url": {
|
|
30761
|
+
"type": "string",
|
|
30762
|
+
"description": "The URL actually fetched",
|
|
30763
|
+
"in `url` mode.": null
|
|
30764
|
+
},
|
|
30765
|
+
"manifest_path": {
|
|
30766
|
+
"type": "string",
|
|
30767
|
+
"enum": [
|
|
30768
|
+
"well-known",
|
|
30769
|
+
"fallback",
|
|
30770
|
+
"explicit"
|
|
30771
|
+
],
|
|
30772
|
+
"description": "Which document answered, in `url` mode: `/.well-known/talonic-app.json` (tried first), the `/manifest.json` fallback, or an explicit document URL."
|
|
30773
|
+
}
|
|
30774
|
+
}
|
|
30775
|
+
},
|
|
29045
30776
|
"AgentTaskMetadata": {
|
|
29046
30777
|
"type": "object",
|
|
29047
30778
|
"required": [
|
|
@@ -29336,7 +31067,7 @@
|
|
|
29336
31067
|
"string",
|
|
29337
31068
|
"null"
|
|
29338
31069
|
],
|
|
29339
|
-
"description": "
|
|
31070
|
+
"description": "The claimant: an API key id, or `oauth:<client_id>:<user_id>` for an OAuth session."
|
|
29340
31071
|
},
|
|
29341
31072
|
"claimed_at": {
|
|
29342
31073
|
"type": [
|
|
@@ -29389,10 +31120,18 @@
|
|
|
29389
31120
|
"first_cursor"
|
|
29390
31121
|
],
|
|
29391
31122
|
"properties": {
|
|
31123
|
+
"package_kind": {
|
|
31124
|
+
"type": "string",
|
|
31125
|
+
"enum": [
|
|
31126
|
+
"records",
|
|
31127
|
+
"mining_round"
|
|
31128
|
+
],
|
|
31129
|
+
"description": "`records` for a frozen input package; `mining_round` when the task stands for a mining round driven from outside, whose package is one record carrying the prompts the hosted model would have seen (record_count 1)."
|
|
31130
|
+
},
|
|
29392
31131
|
"record_count": {
|
|
29393
31132
|
"type": "integer",
|
|
29394
31133
|
"minimum": 0,
|
|
29395
|
-
"description": "Total records across every binding of the frozen package."
|
|
31134
|
+
"description": "Total records across every binding of the frozen package; 1 for a mining round."
|
|
29396
31135
|
},
|
|
29397
31136
|
"page_size": {
|
|
29398
31137
|
"type": "integer",
|
|
@@ -29584,7 +31323,7 @@
|
|
|
29584
31323
|
"outcome": {
|
|
29585
31324
|
"type": "object",
|
|
29586
31325
|
"additionalProperties": true,
|
|
29587
|
-
"description": "`single`: validated against the task's output contract. `verdict_matrix`: `{ subjects: [{ subject_key, rule_outcomes: { <rule id>: passed | failed | indeterminate }, auto?, detail? }] }` over the version's declared `logic.rules`; `rolled_outcome`, `substantive_passes` and `auto` are recomputed by the platform (a disagreeing advisory `auto` is journaled `decision_rejected` and overridden). `record_set`: `{ fields: [{ key, label?, data_type }], records: [{ source_record_id?, values }] }`, where each entry of `values` is either a bare value or `{ value, confidence?, status? }` (`status` one of filled, empty, flagged, pending_approval). Under the version's `record_set_output.mode = derive` the platform materializes a NEW `app_run` record set and ignores `confidence`/`status`; under `mode = promote` it appends cell versions into `record_set_output.target` (an `app_run` set the app holds a `write` grant on), matching rows by `source_record_id` against the target's record ids and columns against the target's fields, under the version's autonomy contract (`observe` rejects any value output, `propose` lands cells `pending_approval`, a value below `confidence_floor` is flagged and not written). Whole body ≤ `apps.submit_max_bytes` (413)."
|
|
31326
|
+
"description": "`single`: validated against the task's output contract. `verdict_matrix`: `{ subjects: [{ subject_key, rule_outcomes: { <rule id>: passed | failed | indeterminate }, auto?, detail? }] }` over the version's declared `logic.rules`; `rolled_outcome`, `substantive_passes` and `auto` are recomputed by the platform (a disagreeing advisory `auto` is journaled `decision_rejected` and overridden). `record_set`: `{ fields: [{ key, label?, data_type }], records: [{ source_record_id?, values }] }` (`key` must match `^[a-z][a-z0-9_]{0,63}$` and `data_type` one of `string`, `number`, `date`, `boolean`, `object`, `array`; a submission violating either is rejected as `decision_rejected`), where each entry of `values` is either a bare value or `{ value, confidence?, status? }` (`status` one of filled, empty, flagged, pending_approval). Under the version's `record_set_output.mode = derive` the platform materializes a NEW `app_run` record set and ignores `confidence`/`status`; under `mode = promote` it appends cell versions into `record_set_output.target` (an `app_run` set the app holds a `write` grant on), matching rows by `source_record_id` against the target's record ids and columns against the target's fields, under the version's autonomy contract (`observe` rejects any value output, `propose` lands cells `pending_approval`, a value below `confidence_floor` is flagged and not written). Whole body ≤ `apps.submit_max_bytes` (413)."
|
|
29588
31327
|
},
|
|
29589
31328
|
"confidence": {
|
|
29590
31329
|
"type": "number",
|
|
@@ -30155,6 +31894,11 @@
|
|
|
30155
31894
|
"description": "Machine-readable error discriminant. One of: VALIDATION_ERROR,\nAUTH_REQUIRED, TOKEN_EXPIRED, INSUFFICIENT_PERMISSIONS,\nRESOURCE_NOT_FOUND, QUOTA_EXCEEDED, INSUFFICIENT_CREDITS,\nLLM_RATE_LIMITED, LLM_TIMEOUT, LLM_UNAVAILABLE, OCR_FAILED,\nEXTRACTION_FAILED, EXTRACTION_TIMEOUT, FILE_TOO_LARGE,\nDUPLICATE_RESOURCE, DATASPACE_RUN_FAILED, INTERNAL_ERROR.\n",
|
|
30156
31895
|
"example": "VALIDATION_ERROR"
|
|
30157
31896
|
},
|
|
31897
|
+
"reason": {
|
|
31898
|
+
"type": "string",
|
|
31899
|
+
"description": "Stable refusal discriminant, present only on refusals an\nintegration must branch on — see \"Refusal reasons\" in the API\ndescription for the full list and what each one asks of the\ncaller. Branch on this rather than on `code`, `error` or the\nmessage text. One of: insufficient_grant,\ninstall_pending_approval, install_not_ready,\nendpoint_not_confirmed, slot_unbound, slot_unknown,\nhosted_manifest_read_only, hosted_surface_fixed,\nmanifest_fetch_failed, schema_validation_failed, refresh_failed,\ninsufficient_scope, unauthenticated, workspace_required,\ninsufficient_tier, owner_required, insufficient_app_grant,\ndecide_grant_required.\n",
|
|
31900
|
+
"example": "insufficient_grant"
|
|
31901
|
+
},
|
|
30158
31902
|
"error": {
|
|
30159
31903
|
"type": "string",
|
|
30160
31904
|
"description": "HTTP status name.",
|
|
@@ -33791,7 +35535,8 @@
|
|
|
33791
35535
|
"enum": [
|
|
33792
35536
|
"in_flight",
|
|
33793
35537
|
"succeeded",
|
|
33794
|
-
"failed"
|
|
35538
|
+
"failed",
|
|
35539
|
+
"superseded"
|
|
33795
35540
|
]
|
|
33796
35541
|
},
|
|
33797
35542
|
"attempt": {
|