Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions components/docs/api-reference.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { HashTargetOpener } from './hash-target-opener';

function typeName(schema:ApiObject): string {
if(schema.$ref)return schema.$ref.split('/').pop();
if(schema.const!==undefined)return `${Array.isArray(schema.type)?schema.type.join(' | '):schema.type||(schema.const===null?'null':Array.isArray(schema.const)?'array':typeof schema.const)} · const`;
if(Array.isArray(schema.type))return schema.type.join(' | ');
if(schema.enum)return `${schema.type||'string'} · enum`;
if(schema.type==='array')return `array<${typeName(schema.items||{})}>`;
Expand All @@ -25,10 +26,11 @@ function Schema({value,spec,depth=0,seen=[],anchor}:{value:ApiObject;spec:ApiObj
const properties=Object.entries(schema.properties||{}) as [string,ApiObject][];
return <div className="docs-schema">
{!properties.length&&schema.required?.length>0&&<p className="docs-property-values">Required: {schema.required.join(', ')}</p>}
{properties.map(([name,raw])=>{const prop=resolveReference(raw,spec);const nested=prop.properties||prop.items||prop.oneOf||prop.allOf||prop.anyOf;const id=anchor?schemaAnchorId(anchor,name,prop):undefined;const childAnchor=id&&prop.items?`${id}-items`:id;return <div className="docs-property" key={name} id={id}><div className="docs-property-heading"><code>{name}</code><span>{typeName(prop)}</span>{schema.required?.includes(name)&&<em>required</em>}{prop.nullable&&<span>nullable</span>}{prop.readOnly&&<span>read only</span>}</div><DocDescription text={prop.description}/>{prop.enum&&<p className="docs-property-values">Values: {prop.enum.map((item:unknown)=>JSON.stringify(item)).join(', ')}</p>}{prop.default!==undefined&&<p className="docs-property-values">Default: <code>{JSON.stringify(prop.default)}</code></p>}{prop.example!==undefined&&<p className="docs-property-values">Example: <code>{JSON.stringify(prop.example)}</code></p>}{['format','minimum','maximum','minLength','maxLength','pattern','minItems','maxItems'].some(key=>prop[key]!==undefined)&&<p className="docs-property-values">{['format','minimum','maximum','minLength','maxLength','pattern','minItems','maxItems'].filter(key=>prop[key]!==undefined).map(key=>`${key}: ${prop[key]}`).join(' · ')}</p>}{nested&&depth<12&&<details className="docs-schema-details"><summary>{prop.type==='array'?'Item properties':'Properties'}<span className="docs-sr-only"> for {name}</span></summary><Schema value={prop.items||raw} spec={spec} depth={depth+1} seen={visited} anchor={childAnchor}/></details>}</div>;})}
{properties.map(([name,raw])=>{const prop=resolveReference(raw,spec);const nested=prop.properties||prop.items||prop.oneOf||prop.allOf||prop.anyOf;const id=anchor?schemaAnchorId(anchor,name,prop):undefined;const childAnchor=id&&prop.items?`${id}-items`:id;return <div className="docs-property" key={name} id={id}><div className="docs-property-heading"><code>{name}</code><span>{typeName(prop)}</span>{schema.required?.includes(name)&&<em>required</em>}{prop.nullable&&<span>nullable</span>}{prop.readOnly&&<span>read only</span>}</div><DocDescription text={prop.description}/>{prop.const!==undefined&&<p className="docs-property-values">Fixed value: <code>{JSON.stringify(prop.const)}</code></p>}{prop.enum&&<p className="docs-property-values">Values: {prop.enum.map((item:unknown)=>JSON.stringify(item)).join(', ')}</p>}{prop.default!==undefined&&<p className="docs-property-values">Default: <code>{JSON.stringify(prop.default)}</code></p>}{prop.example!==undefined&&<p className="docs-property-values">Example: <code>{JSON.stringify(prop.example)}</code></p>}{['format','minimum','maximum','minLength','maxLength','pattern','minItems','maxItems'].some(key=>prop[key]!==undefined)&&<p className="docs-property-values">{['format','minimum','maximum','minLength','maxLength','pattern','minItems','maxItems'].filter(key=>prop[key]!==undefined).map(key=>`${key}: ${prop[key]}`).join(' · ')}</p>}{nested&&depth<12&&<details className="docs-schema-details"><summary>{prop.type==='array'?'Item properties':'Properties'}<span className="docs-sr-only"> for {name}</span></summary><Schema value={prop.items||raw} spec={spec} depth={depth+1} seen={visited} anchor={childAnchor}/></details>}</div>;})}
{schema.items&&<Schema value={schema.items} spec={spec} depth={depth+1} seen={visited} anchor={anchor&&`${anchor}-items`}/>}
{(['oneOf','anyOf','allOf'] as const).map(kind=>schema[kind]?.map((variant:ApiObject,index:number)=><details className="docs-schema-details" key={`${kind}-${index}`} id={anchor&&`${anchor}-${anchorSlug(kind)}-${index}`}><summary>{kind} · {typeName(variant)} {index+1}</summary><DocDescription text={resolveReference(variant,spec).description}/><Schema value={variant} spec={spec} depth={depth+1} seen={visited} anchor={anchor&&`${anchor}-${anchorSlug(kind)}-${index}`}/></details>))}
{!properties.length&&!schema.items&&!schema.oneOf&&!schema.anyOf&&!schema.allOf&&(!schema.required?.length||schema.type||schema.enum)&&<p className="docs-property-values"><code>{typeName(schema)}</code>{schema.enum?` · ${schema.enum.map((v:unknown)=>JSON.stringify(v)).join(', ')}`:''}</p>}
{schema.const!==undefined&&<p className="docs-property-values">Fixed value: <code>{JSON.stringify(schema.const)}</code></p>}
{schema.additionalProperties&&<details className="docs-schema-details" id={anchor&&`${anchor}-additional-properties`}><summary>Additional properties</summary>{typeof schema.additionalProperties==='object'?<Schema value={schema.additionalProperties} spec={spec} depth={depth+1} seen={visited} anchor={anchor&&`${anchor}-additional-properties`}/>:<p>Additional keys are allowed.</p>}</details>}
</div>;
}
Expand All @@ -55,7 +57,7 @@ export async function ApiReference({page}:{page:DocPage}) {
{operation.deprecated&&<aside className="docs-callout docs-callout-warning"><span>Deprecated</span><p>This endpoint is marked deprecated in the source specification.</p></aside>}
<section id="authentication"><h2>Authentication</h2>{security?.length===0?<p>This endpoint does not require authentication.</p>:security?.length?<div>{security.map((item:ApiObject,index:number)=><div key={index}>{Object.entries(item).map(([name,scopes])=>{const scheme=spec.components?.securitySchemes?.[name]||{};return <p key={name}><code>{scheme.name||name}</code> {scheme.in?`in ${scheme.in}`:scheme.scheme||scheme.type||''}{Array.isArray(scopes)&&scopes.length?` · scopes: ${scopes.join(', ')}`:''}</p>;})}</div>)}</div>:<p>See the <Link href="/authentication">authentication guide</Link> for API key and account access requirements.</p>}</section>
<section id="request-example"><h2>Request</h2><DocsCode language="bash" label="cURL">{request}</DocsCode>{parameters.some(param=>param.in==='query'||param.in==='path')&&<p className="docs-small-note">Replace the YOUR_ placeholders with your values. Required query parameters are included; optional parameters are listed below.</p>}<ApiPlayground operation={summarizeOperation({method:page.api.method,path:page.api.path,spec})} baseUrl={siteConfig.apiUrl}/></section>
{parameters.length>0&&<section id="parameters"><h2>Parameters</h2>{['path','query','header','cookie'].map(location=>{const list=parameters.filter(param=>param.in===location);return list.length?<div className="docs-parameter-group" key={location}><h3>{location.charAt(0).toUpperCase()+location.slice(1)} parameters</h3>{list.map(param=><div className="docs-property" key={param.name} id={`parameter-${anchorSlug(param.name)}`}><div className="docs-property-heading"><code>{param.name}</code><span>{typeName(param.schema||{})}</span>{param.required&&<em>required</em>}</div><DocDescription text={param.description}/>{param.schema?.enum&&<p className="docs-property-values">Values: {param.schema.enum.map((v:unknown)=>JSON.stringify(v)).join(', ')}</p>}{param.schema?.default!==undefined&&<p className="docs-property-values">Default: {JSON.stringify(param.schema.default)}</p>}{param.schema?.properties&&<Schema value={param.schema} spec={spec}/>}</div>)}</div>:null;})}</section>}
{parameters.length>0&&<section id="parameters"><h2>Parameters</h2>{['path','query','header','cookie'].map(location=>{const list=parameters.filter(param=>param.in===location);return list.length?<div className="docs-parameter-group" key={location}><h3>{location.charAt(0).toUpperCase()+location.slice(1)} parameters</h3>{list.map(param=><div className="docs-property" key={param.name} id={`parameter-${anchorSlug(param.name)}`}><div className="docs-property-heading"><code>{param.name}</code><span>{typeName(param.schema||{})}</span>{param.required&&<em>required</em>}</div><DocDescription text={param.description}/>{param.schema?.const!==undefined&&<p className="docs-property-values">Fixed value: <code>{JSON.stringify(param.schema.const)}</code></p>}{param.schema?.enum&&<p className="docs-property-values">Values: {param.schema.enum.map((v:unknown)=>JSON.stringify(v)).join(', ')}</p>}{param.schema?.default!==undefined&&<p className="docs-property-values">Default: {JSON.stringify(param.schema.default)}</p>}{param.schema?.properties&&<Schema value={param.schema} spec={spec}/>}</div>)}</div>:null;})}</section>}
{body.content&&<section id="request-body"><h2>Request body {body.required&&<span className="docs-required-label">required</span>}</h2><DocDescription text={body.description}/>{Object.entries(body.content).map(([format,media],index)=><div key={format}><p className="docs-media-type">{format}</p>{(media as ApiObject).schema&&<Schema value={(media as ApiObject).schema} spec={spec} anchor={index===0?'body':undefined}/>}<Examples media={media as ApiObject} spec={spec} label="Request example"/></div>)}</section>}
<section id="responses"><h2>Responses</h2><div className="docs-responses">{Object.entries(operation.responses||{}).map(([status,raw])=>{const response=resolveReference(raw as ApiObject,spec);return <details key={status} open={status.startsWith('2')}><summary><span className={`docs-status ${status.startsWith('2')?'docs-status-success':''}`}>{status}</span><span><DocInlineDescription text={response.description?.split('\n')[0]||'Response'}/></span><i aria-hidden="true">+</i></summary><div className="docs-response-body"><DocDescription text={response.description?.includes('\n')?response.description:undefined}/>{Object.entries(response.headers||{}).map(([name,value])=><div key={name} className="docs-property"><div className="docs-property-heading"><code>{name}</code><span>response header</span></div><DocDescription text={resolveReference(value as ApiObject,spec).description}/></div>)}{Object.entries(response.content||{}).map(([format,media],index)=><div key={format}><p className="docs-media-type">{format}</p>{(media as ApiObject).schema&&<Schema value={(media as ApiObject).schema} spec={spec} anchor={status===anchoredResponse&&index===0?'response':undefined}/>}<Examples media={media as ApiObject} spec={spec} label={`${status} example`}/></div>)}{!response.content&&<p className="docs-small-note">No response body schema is specified.</p>}</div></details>;})}</div></section>
<section id="specification" className="docs-specification"><h2>Full specification</h2><p>Download the OpenAPI file for complete schemas, constraints, and examples.</p><Link href={`/spec/${page.api.spec}`} download>Download {page.api.spec} <span aria-hidden="true"><SkyArrow direction="down" /></span></Link><details><summary>View operation source</summary><DocsCode language="json">{JSON.stringify(operation,null,2)}</DocsCode></details></section>
Expand Down
2 changes: 1 addition & 1 deletion content/docs/contracts/example-cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -1231,7 +1231,7 @@
],
"sourceHashes": {
"content/docs/source/api-reference/openapi/accounts.json": "1a5a04f9ec358a15b8339b7029c9fed5fe69c6f042c8b03b6b4f03f3aafdeeed",
"content/docs/source/api-reference/openapi/content.json": "f790ee44d1b881709e393a65500bec23493e21a391c7b66555e0c78750f95239",
"content/docs/source/api-reference/openapi/content.json": "877afed1e0fb5c95afab8c5e294bae38fabdf48f50f226e0089b9ff50438870d",
"content/docs/source/api-reference/openapi/research.json": "f301a714e994e99b1dbcfc63ee18824537cf42813d8df3906ac7c2436a481ae0",
"content/docs/source/api-reference/openapi/releases.json": "0e1239e256b2c1f8f189d81e013f942518619a24214b7c2b7f99baad15de7d3c",
"content/docs/source/api-reference/openapi/social.json": "5bd167a78cf6a17c46724486e2921882be20969ea32f3c0297f5b7e7ba9a30aa",
Expand Down
4 changes: 2 additions & 2 deletions content/docs/contracts/operation-inventory.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"apiSourceCommit": "b7bddd14ff1d9e81b4e531ef7e152cf34cc6f728",
"apiSourceCommit": "28f860142522d6901e912ea2942d2b76b170a645",
"evidence": "Static source only; tool discovery and OAuth host verification remain separate. Conditional registration and scope filters mean this is not a promised catalog count.",
"operations": [
{
Expand Down Expand Up @@ -3837,7 +3837,7 @@
"content/docs/source/api-reference/openapi/accounts.json": "1a5a04f9ec358a15b8339b7029c9fed5fe69c6f042c8b03b6b4f03f3aafdeeed",
"content/docs/source/api-reference/openapi/ai.json": "678f649fff58a1c49c81002ea2cbe66636ad5da1044ea66261e6ab4084600687",
"content/docs/source/api-reference/openapi/applications.json": "07cf7c630ca81816d73e9198b863dc0a9c8e987f4e0794375951ead06e498ad6",
"content/docs/source/api-reference/openapi/content.json": "f790ee44d1b881709e393a65500bec23493e21a391c7b66555e0c78750f95239",
"content/docs/source/api-reference/openapi/content.json": "877afed1e0fb5c95afab8c5e294bae38fabdf48f50f226e0089b9ff50438870d",
"content/docs/source/api-reference/openapi/context.json": "10b243ab1098a7428fb935dfb0780ff0f9a1c8885b96feda8e453acff4a1df17",
"content/docs/source/api-reference/openapi/players.json": "4a4c90583fe1de6487444581b293a32b1cc04622fc929965ab90f365feb8bc94",
"content/docs/source/api-reference/openapi/projects.json": "b059cf8baa83a7f73a3c15db19f54fa56e46a3840e91bd42979b83550f543ace",
Expand Down
2 changes: 1 addition & 1 deletion content/docs/manifest.json

Large diffs are not rendered by default.

59 changes: 58 additions & 1 deletion content/docs/source/api-reference/openapi/content.json
Original file line number Diff line number Diff line change
Expand Up @@ -6663,7 +6663,20 @@
"object",
"null"
],
"description": "Quote id, fingerprint, revision, expiry, complete line_items, maximum_usd, credits, piece/file/caption counts and retry policy."
"description": "Customer quote: maximum_usd and assets[].maximum_usd are customer charge ceilings; line_items[].usd and credits are customer charges, not measured provider expenses. Included zero-USD services have no additional customer fee. Concepts, contingency and refinements are not budgeted. Additive cost_accounting labels are pending the coordinated API release; older responses may omit them without changing these meanings.",
"properties": {
"maximum_usd": {
"type": "number",
"description": "Maximum customer charge in USD for this quoted scope, not measured provider expense."
},
"credits": {
"type": "number",
"description": "Customer credit charge for this quoted scope."
},
"cost_accounting": {
"$ref": "#/components/schemas/ReleasePackCostAccounting"
}
}
}
}
},
Expand Down Expand Up @@ -7205,6 +7218,50 @@
},
"additionalProperties": false,
"description": "Read-only current-snapshot progress. Full requested scope comes from saved deliverables, not a targeted retry quote. Unique asset IDs count pieces; distinct owned storage keys count files. Generated means persisted final composition files, not submitted provider work or intermediate images. QA passed is separate from usable (completed with reviewed files and a nonblank caption). No new timeline events or duration measurements are recorded."
},
"ReleasePackCostAccounting": {
"type": "object",
"description": "Explanatory labels only. They do not change prices, configuration digests, fingerprints or approval validity. Actual provider expense requires separate measurement evidence. A fresh targeted retry quote is a new customer approval, not a funded refinement allowance.",
"properties": {
"amount_basis": {
"type": "string",
"const": "customer_charge"
},
"included_services": {
"type": "string",
"const": "no_additional_customer_charge"
},
"provider_cost_status": {
"type": "string",
"const": "not_measured"
},
"concepts": {
"type": "string",
"const": "not_budgeted"
},
"contingency": {
"type": "string",
"const": "not_budgeted"
},
"refinements": {
"type": "string",
"const": "not_budgeted"
},
"provider_cost_usd": {
"type": "null",
"description": "Unknown: pack receipts do not provide measured provider expenses. Zero customer line items do not establish zero provider cost."
}
},
"required": [
"amount_basis",
"included_services",
"provider_cost_status",
"concepts",
"contingency",
"refinements",
"provider_cost_usd"
],
"additionalProperties": false
}
}
}
Expand Down
Loading
Loading