{"openapi":"3.1.0","info":{"title":"Wegii — Data Escrow Deposit API","version":"1.0.0-sandbox","summary":"Agentic data escrow deposits: any bytes, verified and sealed, plus the WDX exchange format.","description":"A neutral third-party escrow for business data, designed to be driven by an AI agent or a vendor's job rather than a browser.\n\nConventions:\n- Bytes are stored exactly as received. WDX-mapped files are extra objects beside the raw ones.\n- Object paths go after /objects/ and may contain slashes.\n- Unknown values are omitted, never null or zero.\n- Every error is { error, message, detail?, docs }; message can be relayed to a person.\n- Unwired capabilities are listed under \"Not yet wired\" and return 501 with detail.blocker.\n- `x-mcp-tool` on an operation names the equivalent MCP tool.\n\nAgent orientation: http://wegii.com/llms.txt · Docs: http://wegii.com/docs · MCP: http://wegii.com/api/v1/mcp","contact":{"name":"Wegii","email":"sempleventures@gmail.com","url":"http://wegii.com/docs"},"license":{"name":"WDX is an open specification — see /docs/wdx.md"}},"externalDocs":{"description":"Docs as markdown","url":"http://wegii.com/docs/index.md"},"servers":[{"url":"http://wegii.com","description":"This host"}],"security":[{"bearer":[]}],"tags":[{"name":"Discovery","description":"What this host is and what your key can do."},{"name":"Keys","description":"Sandbox keys. Live keys are issued by Wegii."},{"name":"Deposits","description":"Open, list, seal, discard."},{"name":"Objects","description":"Any bytes, streamed or resumable."},{"name":"Manifests","description":"Schema, row counts and meanings."},{"name":"Snapshots","description":"Point-in-time views across deposits."},{"name":"WDX","description":"Wegii Data Exchange: shapes, schemas, validation and partner proposals."},{"name":"MCP","description":"Model Context Protocol transport for the same operations."},{"name":"Not yet wired","description":"Designed, answered with 501 and the blocker."}],"paths":{"/api/health":{"get":{"tags":["Discovery"],"operationId":"health","summary":"Liveness, mode and what is wired","description":"No key. Mirrors capabilities.notWired so an agent can check before integrating.","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/capabilities":{"get":{"tags":["Discovery"],"operationId":"capabilities","summary":"Identity, limits, usage, wired vs not wired","description":"Call once per session instead of guessing.","x-mcp-tool":"wegii_capabilities","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Capabilities"}}}},"401":{"$ref":"#/components/responses/E401"}}}},"/api/v1/sandbox/keys":{"post":{"tags":["Keys"],"operationId":"issue_sandbox_key","summary":"Issue a sandbox key","description":"No key needed. Isolated vendor space for test data. At most 10 per hour per address.","security":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"vendorName":{"type":"string"},"contact":{"type":"string"}}}}}},"responses":{"201":{"description":"Key issued — shown once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SandboxKey"}}}},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/deposits":{"post":{"tags":["Deposits"],"operationId":"create_deposit","summary":"Open a deposit","description":"A full copy, or a differential against a sealed baseDepositId for the same tenant.","x-mcp-tool":"wegii_create_deposit","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeposit"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deposit"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"}}},"get":{"tags":["Deposits"],"operationId":"list_deposits","summary":"List deposits, newest first","description":"Summaries without the object index.","x-mcp-tool":"wegii_list_deposits","parameters":[{"name":"tenant","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["open","sealed"]}},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":500}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deposits":{"type":"array","items":{"$ref":"#/components/schemas/Deposit"}}}}}}},"401":{"$ref":"#/components/responses/E401"}}}},"/api/v1/deposits/{id}":{"get":{"tags":["Deposits"],"operationId":"get_deposit","summary":"One deposit with its object index","description":"Includes tombstones and the verification result.","x-mcp-tool":"wegii_get_deposit","parameters":[{"$ref":"#/components/parameters/DepositId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deposit"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"}}},"delete":{"tags":["Deposits"],"operationId":"discard_deposit","summary":"Discard an open deposit","description":"Removes it and its bytes. A sealed deposit returns 409.","parameters":[{"$ref":"#/components/parameters/DepositId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"}}}},"/api/v1/deposits/{id}/seal":{"post":{"tags":["Deposits"],"operationId":"seal_deposit","summary":"Verify and make immutable","description":"Refuses empty or partial deposits, re-hashes every stored byte, cross-checks manifest.objects, computes depositHash. Permanent.","x-mcp-tool":"wegii_seal_deposit","parameters":[{"$ref":"#/components/parameters/DepositId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deposit"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"}}}},"/api/v1/deposits/{id}/objects/{path}":{"put":{"tags":["Objects"],"operationId":"put_object","summary":"Upload a whole object","description":"Streamed, any content type, any size. Stored byte for byte.","x-mcp-tool":"wegii_put_object","parameters":[{"$ref":"#/components/parameters/DepositId"},{"$ref":"#/components/parameters/ObjectPath"},{"$ref":"#/components/parameters/Shape"},{"$ref":"#/components/parameters/Rows"},{"$ref":"#/components/parameters/Sha256"}],"requestBody":{"content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectMeta"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"413":{"$ref":"#/components/responses/E413"},"422":{"$ref":"#/components/responses/E422"}}},"patch":{"tags":["Objects"],"operationId":"append_object","summary":"Resumable upload: append a chunk","description":"Send chunks at Upload-Offset; mark the last with X-Wegii-Upload-Final: true.","parameters":[{"$ref":"#/components/parameters/DepositId"},{"$ref":"#/components/parameters/ObjectPath"},{"$ref":"#/components/parameters/UploadOffset"},{"$ref":"#/components/parameters/UploadFinal"},{"$ref":"#/components/parameters/Shape"},{"$ref":"#/components/parameters/Rows"},{"$ref":"#/components/parameters/Sha256"}],"requestBody":{"content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObjectMeta"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"409":{"$ref":"#/components/responses/E409"},"413":{"$ref":"#/components/responses/E413"},"422":{"$ref":"#/components/responses/E422"}}},"head":{"tags":["Objects"],"operationId":"head_object","summary":"Object metadata as headers","description":"Upload-Offset tells a client where to resume.","parameters":[{"$ref":"#/components/parameters/DepositId"},{"$ref":"#/components/parameters/ObjectPath"}],"responses":{"200":{"description":"Upload-Offset, X-Wegii-Status, X-Wegii-Sha256, ETag"},"404":{"$ref":"#/components/responses/E404"}}},"get":{"tags":["Objects"],"operationId":"get_object","summary":"Download an object","description":"Streams the stored bytes.","x-mcp-tool":"wegii_get_object","parameters":[{"$ref":"#/components/parameters/DepositId"},{"$ref":"#/components/parameters/ObjectPath"}],"responses":{"200":{"description":"The bytes","content":{"*/*":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"}}},"delete":{"tags":["Objects"],"operationId":"delete_object","summary":"Delete an object","description":"Open deposits only. In a differential, a path held only by the base becomes a tombstone.","x-mcp-tool":"wegii_delete_object","parameters":[{"$ref":"#/components/parameters/DepositId"},{"$ref":"#/components/parameters/ObjectPath"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"}}}},"/api/v1/deposits/{id}/objects/{path}/validate":{"post":{"tags":["WDX"],"operationId":"validate_object","summary":"Validate an uploaded WDX JSONL object","description":"Streams the object line by line. Run before sealing.","x-mcp-tool":"wegii_validate_object","parameters":[{"$ref":"#/components/parameters/DepositId"},{"$ref":"#/components/parameters/ObjectPath"},{"name":"maxLines","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationReport"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"}}}},"/api/v1/deposits/{id}/manifest":{"put":{"tags":["Manifests"],"operationId":"put_manifest","summary":"Attach or replace the manifest","description":"Up to 25 MB. manifest.objects is checked at seal; everything else is kept for readers.","x-mcp-tool":"wegii_put_manifest","parameters":[{"$ref":"#/components/parameters/DepositId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","externalDocs":{"url":"http://wegii.com/docs/wdx.md#manifest"}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"413":{"$ref":"#/components/responses/E413"}}},"get":{"tags":["Manifests"],"operationId":"get_manifest","summary":"Read the manifest","description":"","parameters":[{"$ref":"#/components/parameters/DepositId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"}}}},"/api/v1/tenants/{tenant}/snapshot":{"get":{"tags":["Snapshots"],"operationId":"snapshot","summary":"Point-in-time object list for a tenant","description":"Latest sealed full deposit plus every later sealed differential.","x-mcp-tool":"wegii_snapshot","parameters":[{"name":"tenant","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Snapshot"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"}}}},"/api/v1/wdx/shapes":{"get":{"tags":["WDX"],"operationId":"wdx_shapes","summary":"WDX envelope, rules and shape registry","description":"Spec 0-draft.","x-mcp-tool":"wegii_wdx_shapes","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/wdx/shapes/{shape}":{"get":{"tags":["WDX"],"operationId":"wdx_shape_schema","summary":"JSON Schema for one shape","description":"JSON Schema 2020-12 for the full record envelope of e.g. party@0.","x-mcp-tool":"wegii_wdx_shape_schema","security":[],"parameters":[{"name":"shape","in":"path","required":true,"schema":{"type":"string","enum":["party@0","ledger-entry@0","document@0","appointment@0","asset@0","work-order@0"]}}],"responses":{"200":{"description":"JSON Schema","content":{"application/schema+json":{"schema":{"type":"object"}}}},"404":{"$ref":"#/components/responses/E404"}}}},"/api/v1/wdx/validate":{"post":{"tags":["WDX"],"operationId":"wdx_validate","summary":"Validate WDX records","description":"Up to 1,000 records. Errors break a rule; warnings mark fields the shape lacks — candidates for a proposal.","x-mcp-tool":"wegii_wdx_validate","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["records"],"properties":{"records":{"type":"array","items":{"$ref":"#/components/schemas/WdxRecord"},"maxItems":1000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationReport"}}}},"400":{"$ref":"#/components/responses/E400"},"413":{"$ref":"#/components/responses/E413"}}}},"/api/v1/wdx/proposals":{"post":{"tags":["WDX"],"operationId":"wdx_propose","summary":"Propose a shape, field or change","description":"Public once made. Examples are validated against the current registry and returned.","x-mcp-tool":"wegii_wdx_propose","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WdxProposalInput"}}}},"responses":{"201":{"description":"Recorded","content":{"application/json":{"schema":{"type":"object","properties":{"proposal":{"$ref":"#/components/schemas/WdxProposal"},"exampleCheck":{"type":"array"}}}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"}}},"get":{"tags":["WDX"],"operationId":"wdx_proposals","summary":"List proposals","description":"Newest first. Check before proposing a duplicate.","x-mcp-tool":"wegii_wdx_proposals","security":[],"parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["open","accepted","declined"]}},{"name":"shape","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"proposals":{"type":"array","items":{"$ref":"#/components/schemas/WdxProposal"}}}}}}}}}},"/api/v1/mcp":{"post":{"tags":["MCP"],"operationId":"mcp","summary":"MCP Streamable HTTP endpoint","description":"JSON-RPC 2.0: initialize, tools/list, tools/call. Send X-Wegii-Key and X-Wegii-Secret, or HTTP Basic key:secret.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"JSON-RPC response","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Notification accepted"}}}},"/api/v1/mcp/tools":{"get":{"tags":["MCP"],"operationId":"mcp_tools","summary":"MCP tool manifest","description":"Served live, so a client never holds a stale schema.","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/mcp/call":{"post":{"tags":["MCP"],"operationId":"mcp_call","summary":"Call one tool over plain JSON","description":"For n8n, Zapier, LangChain and GPT Actions.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"arguments":{"type":"object"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"}}}},"/api/v1/releases":{"post":{"tags":["Not yet wired"],"operationId":"not_wired_release","summary":"release (501)","description":"Beneficiary identity through Person Feed sign-in is not built. Wegii will not release data on an email claim.","responses":{"501":{"description":"Not implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotImplemented"}}}}}}},"/api/v1/deposits/{id}/restore-tests":{"post":{"tags":["Not yet wired"],"operationId":"not_wired_restore_tests","summary":"restore-tests (501)","description":"No isolated restore environment is provisioned yet. Seal reports restoreTest: not_run.","parameters":[{"$ref":"#/components/parameters/DepositId"}],"responses":{"501":{"description":"Not implemented","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotImplemented"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"wgk_sbx_… or wgk_live_…. X-Wegii-Key is also accepted."}},"parameters":{"DepositId":{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^dep_[a-z0-9]+$"}},"ObjectPath":{"name":"path","in":"path","required":true,"schema":{"type":"string"},"description":"Object path; may contain slashes. No empty, . or .. segments."},"Shape":{"name":"X-Wegii-Shape","in":"header","schema":{"type":"string","default":"raw"},"description":"raw | file | table:<name> | wdx:<shape>@<version>"},"Rows":{"name":"X-Wegii-Rows","in":"header","schema":{"type":"integer"},"description":"Row count; checked against manifest.objects at seal."},"Sha256":{"name":"X-Wegii-Sha256","in":"header","schema":{"type":"string","pattern":"^[a-f0-9]{64}$"},"description":"Mismatch rejects the upload (422)."},"UploadOffset":{"name":"Upload-Offset","in":"header","required":true,"schema":{"type":"integer"}},"UploadFinal":{"name":"X-Wegii-Upload-Final","in":"header","schema":{"type":"string","enum":["true"]}}},"responses":{"E400":{"description":"Bad request — the message names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E401":{"description":"Missing or invalid key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E404":{"description":"Not found for this key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E409":{"description":"Conflict — sealed, wrong offset, incomplete or empty.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E413":{"description":"Too large, or sandbox quota reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E422":{"description":"Checksum or manifest mismatch. Nothing was stored or sealed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E429":{"description":"Rate limited.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E403":{"description":"Forbidden — e.g. sandbox keys disabled on this host.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["error","message"],"description":"Every failure. `message` is written to be relayed to a person verbatim.","properties":{"error":{"type":"string","description":"Machine code, e.g. offset_mismatch"},"message":{"type":"string"},"detail":{"description":"Structured context: uploadOffset, paths, mismatches, blocker…"},"docs":{"type":"string"}}},"NotImplemented":{"allOf":[{"$ref":"#/components/schemas/Error"}],"description":"501 — the capability is designed but not wired. Do not retry; relay detail.blocker.","properties":{"error":{"const":"not_implemented"},"detail":{"type":"object","properties":{"blocker":{"type":"string"}}}}},"SandboxKey":{"type":"object","properties":{"key":{"type":"string","description":"wgk_sbx_… — shown once; Wegii stores only its sha256."},"vendorId":{"type":"string"},"mode":{"type":"string","enum":["sandbox"]},"limits":{"type":"object"}}},"Capabilities":{"type":"object","properties":{"vendor":{"type":"object"},"key":{"type":"object"},"sandbox":{"type":"boolean"},"limits":{"type":"object"},"wdx":{"type":"string"},"wired":{"type":"array","items":{"type":"string"}},"notWired":{"type":"array","items":{"$ref":"#/components/schemas/Blocker"}}}},"Blocker":{"type":"object","properties":{"capability":{"type":"string"},"endpoint":{"type":["string","null"]},"blocker":{"type":"string"}}},"CreateDeposit":{"type":"object","required":["tenant"],"properties":{"tenant":{"type":"string","pattern":"^[A-Za-z0-9._:@-]{1,128}$","description":"Your stable id for the customer whose data this is."},"kind":{"type":"string","enum":["full","differential"],"default":"full"},"baseDepositId":{"type":"string","description":"Required for a differential: a sealed deposit for the same tenant."},"source":{"type":"object","description":"{ system, version?, connector?: vendor | client }"},"beneficiary":{"type":"object","properties":{"email":{"type":"string"}},"description":"Stored as verified: false — a claim, not an identity."},"labels":{"type":"object","additionalProperties":{"type":"string"}}}},"ObjectMeta":{"type":"object","properties":{"path":{"type":"string"},"bytes":{"type":"integer"},"sha256":{"type":["string","null"]},"contentType":{"type":"string"},"shape":{"type":"string","description":"raw | file | table:<name> | wdx:<shape>@<version>"},"rows":{"type":["integer","null"]},"status":{"type":"string","enum":["partial","complete"]},"updatedAt":{"type":"string","format":"date-time"}}},"Deposit":{"type":"object","properties":{"id":{"type":"string"},"tenant":{"type":"string"},"kind":{"type":"string","enum":["full","differential"]},"baseDepositId":{"type":["string","null"]},"status":{"type":"string","enum":["open","sealed"]},"sandbox":{"type":"boolean"},"source":{"type":["object","null"]},"labels":{"type":["object","null"]},"beneficiary":{"type":["object","null"]},"createdAt":{"type":"string","format":"date-time"},"sealedAt":{"type":["string","null"],"format":"date-time"},"manifest":{"type":["object","null"]},"totals":{"type":"object","properties":{"objects":{"type":"integer"},"bytes":{"type":"integer"}}},"objects":{"type":"array","items":{"$ref":"#/components/schemas/ObjectMeta"}},"tombstones":{"type":"array","items":{"type":"string"}},"verification":{"type":["object","null"],"properties":{"checksums":{"type":"string"},"objectsVerified":{"type":"integer"},"bytesVerified":{"type":"integer"},"manifestCrossChecked":{"type":"integer"},"restoreTest":{"type":"string","enum":["not_run"]}}},"depositHash":{"type":["string","null"],"description":"sha256 over sorted path/sha256/bytes lines and tombstones."}}},"Snapshot":{"type":"object","properties":{"tenant":{"type":"string"},"asOf":{"type":"string","format":"date-time"},"basedOn":{"type":"string"},"deposits":{"type":"array","items":{"type":"string"}},"totals":{"type":"object"},"objects":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/ObjectMeta"}],"properties":{"depositId":{"type":"string"}}}}}},"WdxRecord":{"type":"object","required":["wdx","id","source","data"],"description":"The envelope every WDX record uses, whatever its shape. One per line in a .jsonl object.","properties":{"wdx":{"type":"string","examples":["party@0"]},"id":{"type":"string"},"source":{"type":"object","required":["system"],"properties":{"system":{"type":"string"},"table":{"type":"string"},"key":{"type":"string"}}},"data":{"type":"object"},"extra":{"type":"object"}}},"ValidationReport":{"type":"object","properties":{"valid":{"type":"boolean","description":"No errors. Warnings do not make a report invalid."},"checked":{"type":"integer"},"validRecords":{"type":"integer","description":"Records with no errors."},"truncated":{"type":"boolean","description":"Object validation stopped at maxLines."},"errorCount":{"type":"integer"},"warningCount":{"type":"integer"},"byShape":{"type":"object","additionalProperties":{"type":"integer"}},"results":{"type":"array","description":"Records with issues, capped at 100.","items":{"type":"object","properties":{"index":{"type":"integer"},"line":{"type":"integer"},"id":{"type":["string","null"]},"errors":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}},"warnings":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}}}}}}},"Issue":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}},"WdxProposalInput":{"type":"object","required":["kind","shape","title","rationale"],"properties":{"kind":{"type":"string","enum":["new-shape","new-field","change-field","new-version","other"]},"shape":{"type":"string","description":"Existing shape (party@0) or a new lowercase name (inspection)."},"title":{"type":"string","maxLength":140},"rationale":{"type":"string","maxLength":4000},"fields":{"type":"array","maxItems":50,"items":{"type":"object","required":["name","type"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["string","number","integer","boolean","object","array"]},"required":{"type":"boolean"},"description":{"type":"string"}}}},"examples":{"type":"array","maxItems":20,"items":{"$ref":"#/components/schemas/WdxRecord"},"description":"Synthetic only — proposals are public."},"sourceTables":{"type":"array","items":{"type":"string"}}}},"WdxProposal":{"allOf":[{"$ref":"#/components/schemas/WdxProposalInput"}],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["open","accepted","declined"]},"proposedBy":{"type":"object","properties":{"vendorName":{"type":"string"},"verified":{"type":"boolean"}}},"createdAt":{"type":"string","format":"date-time"}}}}}}