@typeship-ax/cli 0.6.0
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/LICENSE +9 -0
- package/README.md +40 -0
- package/api.json +5163 -0
- package/api.md +512 -0
- package/dist/cli-agent.d.ts +204 -0
- package/dist/cli-agent.d.ts.map +1 -0
- package/dist/cli-agent.js +525 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +2811 -0
- package/dist/core/http.d.ts +303 -0
- package/dist/core/http.d.ts.map +1 -0
- package/dist/core/http.js +770 -0
- package/dist/core/pagination.d.ts +51 -0
- package/dist/core/pagination.d.ts.map +1 -0
- package/dist/core/pagination.js +154 -0
- package/dist/dates.d.ts +33 -0
- package/dist/dates.d.ts.map +1 -0
- package/dist/dates.js +136 -0
- package/dist/errors.d.ts +81 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +103 -0
- package/dist/index.d.ts +92 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +86 -0
- package/dist/ops.d.ts +115 -0
- package/dist/ops.d.ts.map +1 -0
- package/dist/ops.js +79 -0
- package/dist/resources/account.d.ts +18 -0
- package/dist/resources/account.d.ts.map +1 -0
- package/dist/resources/account.js +26 -0
- package/dist/resources/api-keys.d.ts +37 -0
- package/dist/resources/api-keys.d.ts.map +1 -0
- package/dist/resources/api-keys.js +67 -0
- package/dist/resources/generate.d.ts +25 -0
- package/dist/resources/generate.d.ts.map +1 -0
- package/dist/resources/generate.js +41 -0
- package/dist/resources/generations.d.ts +31 -0
- package/dist/resources/generations.d.ts.map +1 -0
- package/dist/resources/generations.js +56 -0
- package/dist/resources/projects.d.ts +110 -0
- package/dist/resources/projects.d.ts.map +1 -0
- package/dist/resources/projects.js +220 -0
- package/dist/resources/spec-revisions.d.ts +47 -0
- package/dist/resources/spec-revisions.d.ts.map +1 -0
- package/dist/resources/spec-revisions.js +90 -0
- package/dist/schemas.d.ts +6 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +88 -0
- package/dist/types.d.ts +759 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +37 -0
- package/package.json +43 -0
- package/src/cli-agent.ts +685 -0
- package/src/cli.ts +2695 -0
- package/src/core/http.ts +1008 -0
- package/src/core/pagination.ts +195 -0
- package/src/dates.ts +126 -0
- package/src/errors.ts +117 -0
- package/src/index.ts +153 -0
- package/src/ops.ts +174 -0
- package/src/resources/account.ts +43 -0
- package/src/resources/api-keys.ts +105 -0
- package/src/resources/generate.ts +69 -0
- package/src/resources/generations.ts +100 -0
- package/src/resources/projects.ts +391 -0
- package/src/resources/spec-revisions.ts +150 -0
- package/src/schemas.ts +90 -0
- package/src/types.ts +825 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// typeship — specRevisions resource.
|
|
2
|
+
// Generated by typeship — https://typeship.dev — do not edit by hand.
|
|
3
|
+
import { paginate } from "../core/pagination.js";
|
|
4
|
+
import { BadRequestError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError, } from "../errors.js";
|
|
5
|
+
export class SpecRevisionsResource {
|
|
6
|
+
_core;
|
|
7
|
+
constructor(_core) {
|
|
8
|
+
this._core = _core;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* List specification revisions
|
|
12
|
+
*
|
|
13
|
+
* Immutable snapshots of the exact source text this project consumed, newest first. Raw content
|
|
14
|
+
* is available from each revision's content endpoint and is never embedded in a list response.
|
|
15
|
+
*
|
|
16
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
17
|
+
* `GET /projects/{project_id}/spec_revisions`
|
|
18
|
+
*/
|
|
19
|
+
list(projectId, params, options) {
|
|
20
|
+
return paginate(this._core, {
|
|
21
|
+
method: "GET",
|
|
22
|
+
path: `/projects/${encodeURIComponent(String(projectId))}/spec_revisions`,
|
|
23
|
+
query: {
|
|
24
|
+
limit: params?.limit,
|
|
25
|
+
cursor: params?.cursor,
|
|
26
|
+
},
|
|
27
|
+
errors: {
|
|
28
|
+
"400": BadRequestError,
|
|
29
|
+
"401": UnauthorizedError,
|
|
30
|
+
"403": ForbiddenError,
|
|
31
|
+
"404": NotFoundError,
|
|
32
|
+
"429": RateLimitedError,
|
|
33
|
+
},
|
|
34
|
+
idempotent: true,
|
|
35
|
+
schemaKey: "specRevisions.list",
|
|
36
|
+
options,
|
|
37
|
+
}, {
|
|
38
|
+
style: "cursor",
|
|
39
|
+
itemsField: "data",
|
|
40
|
+
cursorParam: "cursor",
|
|
41
|
+
nextCursorField: "next_cursor",
|
|
42
|
+
hasMoreField: "has_more",
|
|
43
|
+
limitParam: "limit",
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Retrieve a specification revision
|
|
48
|
+
*
|
|
49
|
+
* Metadata for one immutable source snapshot. Fetch raw source text from the content endpoint so
|
|
50
|
+
* metadata responses stay small and predictable.
|
|
51
|
+
* `GET /spec_revisions/{spec_revision_id}`
|
|
52
|
+
*/
|
|
53
|
+
async retrieve(specRevisionId, options) {
|
|
54
|
+
return this._core.request({
|
|
55
|
+
method: "GET",
|
|
56
|
+
path: `/spec_revisions/${encodeURIComponent(String(specRevisionId))}`,
|
|
57
|
+
errors: {
|
|
58
|
+
"401": UnauthorizedError,
|
|
59
|
+
"403": ForbiddenError,
|
|
60
|
+
"404": NotFoundError,
|
|
61
|
+
"429": RateLimitedError,
|
|
62
|
+
},
|
|
63
|
+
idempotent: true,
|
|
64
|
+
schemaKey: "specRevisions.retrieve",
|
|
65
|
+
options,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Retrieve a specification revision's raw text
|
|
70
|
+
*
|
|
71
|
+
* Returns the exact source text identified by the revision's SHA-256 digest, suitable for saving
|
|
72
|
+
* or piping directly into a diff.
|
|
73
|
+
* `GET /spec_revisions/{spec_revision_id}/content`
|
|
74
|
+
*/
|
|
75
|
+
async retrieveContent(specRevisionId, options) {
|
|
76
|
+
return this._core.request({
|
|
77
|
+
method: "GET",
|
|
78
|
+
path: `/spec_revisions/${encodeURIComponent(String(specRevisionId))}/content`,
|
|
79
|
+
errors: {
|
|
80
|
+
"401": UnauthorizedError,
|
|
81
|
+
"403": ForbiddenError,
|
|
82
|
+
"404": NotFoundError,
|
|
83
|
+
"429": RateLimitedError,
|
|
84
|
+
},
|
|
85
|
+
idempotent: true,
|
|
86
|
+
schemaKey: "specRevisions.retrieveContent",
|
|
87
|
+
options,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,CAkBpE,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CA+DxC,CAAC"}
|
package/dist/schemas.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
// typeship — schema tables for optional runtime validation.
|
|
2
|
+
// Generated by typeship — https://typeship.dev
|
|
3
|
+
// Consumed by core/http.ts when the client's validate option is enabled;
|
|
4
|
+
// carries no code, only data derived from the spec. Named components are
|
|
5
|
+
// deduplicated into DEFS and referenced by "req:Name" / "res:Name" keys.
|
|
6
|
+
export const SCHEMAS = {
|
|
7
|
+
"generate.run": { "req": { "$ref": "req:GenerateRequest" }, "res": { "$ref": "res:GenerationResult" } },
|
|
8
|
+
"projects.list": { "res": { "$ref": "res:ProjectList" } },
|
|
9
|
+
"projects.create": { "req": { "$ref": "req:CreateProjectRequest" }, "res": { "$ref": "res:Project" } },
|
|
10
|
+
"projects.retrieve": { "res": { "$ref": "res:Project" } },
|
|
11
|
+
"projects.delete": { "res": { "$ref": "res:DeletedProject" } },
|
|
12
|
+
"projects.update": { "req": { "$ref": "req:UpdateProjectRequest" }, "res": { "$ref": "res:Project" } },
|
|
13
|
+
"projects.retrieveGithubHealth": { "res": { "$ref": "res:GithubIntegrationHealth" } },
|
|
14
|
+
"projects.listGenerations": { "res": { "$ref": "res:GenerationList" } },
|
|
15
|
+
"projects.generate": { "res": { "$ref": "res:GenerationBatch" } },
|
|
16
|
+
"generations.retrieve": { "res": { "$ref": "res:Generation" } },
|
|
17
|
+
"generations.retrieveFile": { "res": { "type": "string" } },
|
|
18
|
+
"specRevisions.list": { "res": { "$ref": "res:SpecRevisionList" } },
|
|
19
|
+
"specRevisions.retrieve": { "res": { "$ref": "res:SpecRevision" } },
|
|
20
|
+
"specRevisions.retrieveContent": { "res": { "type": "string" } },
|
|
21
|
+
"account.retrieve": { "res": { "$ref": "res:Account" } },
|
|
22
|
+
"apiKeys.list": { "res": { "$ref": "res:ApiKeyList" } },
|
|
23
|
+
"apiKeys.revoke": { "res": { "$ref": "res:ApiKey" } },
|
|
24
|
+
};
|
|
25
|
+
export const DEFS = {
|
|
26
|
+
"req:GenerateRequest": { "type": "object", "additionalProperties": false, "properties": { "spec": { "$ref": "req:SpecInput" }, "outputs": { "type": "array", "minItems": 1, "maxItems": 1, "items": { "$ref": "req:OutputId" } }, "package_name": { "type": "string" }, "config": { "$ref": "req:Config" } }, "required": ["spec", "outputs"] },
|
|
27
|
+
"req:SpecInput": { "anyOf": [{ "$ref": "req:UrlSpecInput" }, { "$ref": "req:InlineSpecInput" }] },
|
|
28
|
+
"req:UrlSpecInput": { "type": "object", "additionalProperties": false, "properties": { "url": { "type": "string", "pattern": "^https?://" }, "headers": { "type": "object" } }, "required": ["url"] },
|
|
29
|
+
"req:InlineSpecInput": { "type": "object", "additionalProperties": false, "properties": { "inline": { "type": "string" } }, "required": ["inline"] },
|
|
30
|
+
"req:OutputId": { "type": "string", "enum": ["typescript-sdk", "python-sdk", "go-sdk", "cli", "mcp"] },
|
|
31
|
+
"req:Config": { "type": "object", "additionalProperties": false, "properties": { "globals": { "type": "array", "maxItems": 20, "items": { "type": "string" } }, "retries": { "$ref": "req:RetryTuning" }, "pagination": { "type": "object" }, "graphql": { "$ref": "req:GraphqlSettings" }, "cli": { "$ref": "req:CliBehavior" }, "mcp": { "$ref": "req:McpBehavior" }, "package": { "$ref": "req:PackageBehavior" }, "docs_url": { "type": ["string", "null"] } } },
|
|
32
|
+
"req:RetryTuning": { "type": "object", "additionalProperties": false, "properties": { "max_retries": { "type": "integer", "minimum": 0, "maximum": 10 }, "statuses": { "type": "array", "maxItems": 20, "items": { "type": "integer" } }, "initial_delay_ms": { "type": "integer", "minimum": 1 }, "max_delay_ms": { "type": "integer", "minimum": 1 }, "retry_non_idempotent": { "type": "boolean" }, "disabled": { "type": "boolean" }, "operations": { "type": "object" } } },
|
|
33
|
+
"req:GraphqlSettings": { "type": "object", "additionalProperties": false, "properties": { "endpoint": { "type": "string" }, "environments": { "type": "array", "maxItems": 10, "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "url": { "type": "string" } }, "required": ["name", "url"] } }, "auth": { "type": "string", "enum": ["bearer", "basic", "api_key", "none"] }, "api_key_header": { "type": "string" }, "title": { "type": "string", "maxLength": 80 }, "scalars": { "type": "object" } } },
|
|
34
|
+
"req:CliBehavior": { "type": "object", "additionalProperties": false, "properties": { "whoami_operation": { "type": ["string", "null"] }, "oauth_client_id": { "type": ["string", "null"] }, "oauth_scopes": { "type": "array", "maxItems": 20, "items": { "type": "string" } }, "oauth_audience": { "type": ["string", "null"] }, "update_notice": { "type": "boolean" }, "support_url": { "type": ["string", "null"] }, "auth_url": { "type": ["string", "null"] }, "mcp_url": { "type": ["string", "null"] }, "skills_repo": { "type": ["string", "null"] } } },
|
|
35
|
+
"req:McpBehavior": { "type": "object", "additionalProperties": false, "properties": { "tool_mode": { "type": "string", "enum": ["auto", "operations", "meta"] }, "instructions": { "type": ["string", "null"], "maxLength": 2000 }, "tool_descriptions": { "type": "object" } } },
|
|
36
|
+
"req:PackageBehavior": { "type": "object", "additionalProperties": false, "properties": { "version": { "type": ["string", "null"] }, "homepage": { "type": ["string", "null"] }, "license": { "type": ["string", "null"], "maxLength": 200 }, "license_text": { "type": ["string", "null"], "maxLength": 100000 }, "copyright": { "type": ["string", "null"], "maxLength": 200 }, "bin_name": { "type": ["string", "null"] }, "go_package_name": { "type": ["string", "null"] }, "mcp_name": { "type": ["string", "null"] } } },
|
|
37
|
+
"res:GenerationResult": { "type": "object", "properties": { "files": { "type": "array", "items": { "$ref": "res:GeneratedFile" } }, "warnings": { "type": "array", "items": { "type": "string" } }, "meta": { "$ref": "res:GenerationMeta" }, "limits": { "$ref": "res:GenerationLimits" }, "claim": { "anyOf": [{ "type": "null" }, { "type": "object", "properties": { "url": { "type": "string" }, "expires_at": { "type": "string" } }, "required": ["url", "expires_at"] }] } }, "required": ["files", "warnings", "meta"] },
|
|
38
|
+
"res:GeneratedFile": { "type": "object", "properties": { "path": { "type": "string" }, "content": { "type": "string" } }, "required": ["path", "content"] },
|
|
39
|
+
"res:GenerationMeta": { "type": "object", "properties": { "title": { "type": "string" }, "version": { "type": "string" }, "spec_format": { "type": "string", "enum": ["openapi", "graphql"] }, "oas_version": { "type": "string" }, "converted": { "type": "boolean" }, "package_name": { "type": "string" }, "client_name": { "type": "string" }, "outputs": { "type": "array", "items": { "$ref": "res:OutputId" } }, "resource_count": { "type": "integer" }, "operation_count": { "type": "integer" }, "schema_count": { "type": "integer" }, "paginated_operation_count": { "type": "integer" }, "omitted_operation_count": { "type": "integer" }, "pr_url": { "type": ["string", "null"] }, "pr_number": { "type": ["integer", "null"] }, "pr_status": { "type": "string", "enum": ["opened", "no_changes", "blocked"] }, "pr_error": { "type": "string" }, "changelog": { "type": "string" }, "breaking_count": { "type": "integer" }, "baseline": { "type": "string", "enum": ["destination", "last-generation", "none"] }, "package_compatibility": { "type": "string", "enum": ["success", "failure"] }, "package_compatibility_note": { "type": "string" }, "previous_version": { "type": "string" }, "file_count": { "type": "integer" }, "total_lines": { "type": "integer" } }, "required": ["title", "version", "oas_version", "package_name", "client_name", "outputs"] },
|
|
40
|
+
"res:OutputId": { "type": "string", "enum": ["typescript-sdk", "python-sdk", "go-sdk", "cli", "mcp"] },
|
|
41
|
+
"res:GenerationLimits": { "type": "object", "properties": { "max_operations": { "type": "integer" }, "omitted_operations": { "type": "integer" }, "reason": { "type": "string", "enum": ["anonymous", "free_plan"] }, "signup_url": { "type": "string" }, "upgrade_url": { "type": "string" } }, "required": ["max_operations", "omitted_operations", "reason", "upgrade_url"] },
|
|
42
|
+
"res:ProjectList": { "type": "object", "additionalProperties": false, "properties": { "object": { "$ref": "res:ListObject" }, "data": { "type": "array", "items": { "$ref": "res:Project" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"] } }, "required": ["object", "data", "has_more", "next_cursor"] },
|
|
43
|
+
"res:ListObject": { "type": "string", "const": "list" },
|
|
44
|
+
"res:Project": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "res:ProjectId" }, "object": { "type": "string", "const": "project" }, "name": { "type": "string", "maxLength": 80 }, "source": { "$ref": "res:ProjectSource" }, "packages": { "$ref": "res:ProjectPackages" }, "auto_regen": { "type": "boolean" }, "spec_patches": { "type": "array", "items": { "$ref": "res:SpecPatch" } }, "config": { "anyOf": [{ "$ref": "res:Config" }, { "type": "null" }] }, "mcp_enabled": { "type": "boolean" }, "mcp_url": { "type": ["string", "null"] }, "relay_enabled": { "type": "boolean" }, "outputs": { "type": "array", "minItems": 1, "items": { "$ref": "res:OutputId" } }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": ["id", "object", "name", "source", "packages", "auto_regen", "spec_patches", "config", "mcp_enabled", "mcp_url", "relay_enabled", "outputs", "created_at", "updated_at"] },
|
|
45
|
+
"res:ProjectId": { "type": "string", "pattern": "^prj_[a-z0-9]{16}$" },
|
|
46
|
+
"res:ProjectSource": { "anyOf": [{ "$ref": "res:UrlProjectSource" }, { "$ref": "res:GithubProjectSource" }] },
|
|
47
|
+
"res:UrlProjectSource": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "url" }, "url": { "type": "string", "maxLength": 2048, "pattern": "^https?://" }, "headers_configured": { "type": "boolean" } }, "required": ["kind", "url", "headers_configured"] },
|
|
48
|
+
"res:GithubProjectSource": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "github" }, "repository": { "type": "string", "maxLength": 202, "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$" }, "path": { "type": "string", "minLength": 1, "maxLength": 4096, "pattern": "^(?!/)(?!.*\\.\\.).+$" } }, "required": ["kind", "repository", "path"] },
|
|
49
|
+
"res:ProjectPackages": { "type": "object", "additionalProperties": false, "properties": { "typescript-sdk": { "$ref": "res:ProjectPackageDelivery" }, "python-sdk": { "$ref": "res:ProjectPackageDelivery" }, "go-sdk": { "$ref": "res:ProjectPackageDelivery" }, "cli": { "$ref": "res:ProjectPackageDelivery" }, "mcp": { "$ref": "res:ProjectPackageDelivery" } }, "required": ["typescript-sdk", "python-sdk", "go-sdk", "cli", "mcp"] },
|
|
50
|
+
"res:ProjectPackageDelivery": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": ["string", "null"] }, "version": { "type": ["string", "null"] }, "destination": { "anyOf": [{ "$ref": "res:ProjectDestination" }, { "type": "null" }] } }, "required": ["name", "version", "destination"] },
|
|
51
|
+
"res:ProjectDestination": { "type": "object", "additionalProperties": false, "properties": { "repo": { "type": ["string", "null"] }, "directory": { "type": ["string", "null"] } }, "required": ["repo", "directory"] },
|
|
52
|
+
"res:SpecPatch": { "type": "object", "additionalProperties": false, "properties": { "op": { "type": "string", "enum": ["set", "append", "remove", "rename"] }, "path": { "type": "string" }, "value": {}, "to": { "type": ["string", "null"] }, "reason": { "type": ["string", "null"] } }, "required": ["op", "path"] },
|
|
53
|
+
"res:Config": { "type": "object", "additionalProperties": false, "properties": { "globals": { "type": "array", "maxItems": 20, "items": { "type": "string" } }, "retries": { "$ref": "res:RetryTuning" }, "pagination": { "type": "object" }, "graphql": { "$ref": "res:GraphqlSettings" }, "cli": { "$ref": "res:CliBehavior" }, "mcp": { "$ref": "res:McpBehavior" }, "package": { "$ref": "res:PackageBehavior" }, "docs_url": { "type": ["string", "null"] } } },
|
|
54
|
+
"res:RetryTuning": { "type": "object", "additionalProperties": false, "properties": { "max_retries": { "type": "integer", "minimum": 0, "maximum": 10 }, "statuses": { "type": "array", "maxItems": 20, "items": { "type": "integer" } }, "initial_delay_ms": { "type": "integer", "minimum": 1 }, "max_delay_ms": { "type": "integer", "minimum": 1 }, "retry_non_idempotent": { "type": "boolean" }, "disabled": { "type": "boolean" }, "operations": { "type": "object" } } },
|
|
55
|
+
"res:GraphqlSettings": { "type": "object", "additionalProperties": false, "properties": { "endpoint": { "type": "string" }, "environments": { "type": "array", "maxItems": 10, "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "url": { "type": "string" } }, "required": ["name", "url"] } }, "auth": { "type": "string", "enum": ["bearer", "basic", "api_key", "none"] }, "api_key_header": { "type": "string" }, "title": { "type": "string", "maxLength": 80 }, "scalars": { "type": "object" } } },
|
|
56
|
+
"res:CliBehavior": { "type": "object", "additionalProperties": false, "properties": { "whoami_operation": { "type": ["string", "null"] }, "oauth_client_id": { "type": ["string", "null"] }, "oauth_scopes": { "type": "array", "maxItems": 20, "items": { "type": "string" } }, "oauth_audience": { "type": ["string", "null"] }, "update_notice": { "type": "boolean" }, "support_url": { "type": ["string", "null"] }, "auth_url": { "type": ["string", "null"] }, "mcp_url": { "type": ["string", "null"] }, "skills_repo": { "type": ["string", "null"] } } },
|
|
57
|
+
"res:McpBehavior": { "type": "object", "additionalProperties": false, "properties": { "tool_mode": { "type": "string", "enum": ["auto", "operations", "meta"] }, "instructions": { "type": ["string", "null"], "maxLength": 2000 }, "tool_descriptions": { "type": "object" } } },
|
|
58
|
+
"res:PackageBehavior": { "type": "object", "additionalProperties": false, "properties": { "version": { "type": ["string", "null"] }, "homepage": { "type": ["string", "null"] }, "license": { "type": ["string", "null"], "maxLength": 200 }, "license_text": { "type": ["string", "null"], "maxLength": 100000 }, "copyright": { "type": ["string", "null"], "maxLength": 200 }, "bin_name": { "type": ["string", "null"] }, "go_package_name": { "type": ["string", "null"] }, "mcp_name": { "type": ["string", "null"] } } },
|
|
59
|
+
"req:CreateProjectRequest": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "source": { "$ref": "req:ProjectSourceInput" }, "outputs": { "type": "array", "minItems": 1, "items": { "$ref": "req:OutputId" } }, "packages": { "$ref": "req:Packages" }, "auto_regen": { "type": "boolean" }, "spec_patches": { "type": "array", "maxItems": 50, "items": { "$ref": "req:SpecPatch" } }, "mcp_enabled": { "type": "boolean" }, "relay_enabled": { "type": "boolean" }, "config": { "anyOf": [{ "$ref": "req:Config" }, { "type": "null" }] } }, "required": ["name", "source", "outputs"] },
|
|
60
|
+
"req:ProjectSourceInput": { "anyOf": [{ "$ref": "req:UrlProjectSourceInput" }, { "$ref": "req:GithubProjectSourceInput" }] },
|
|
61
|
+
"req:UrlProjectSourceInput": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "url" }, "url": { "type": "string", "maxLength": 2048, "pattern": "^https?://" }, "headers": { "anyOf": [{ "type": "object" }, { "type": "null" }] } }, "required": ["kind", "url"] },
|
|
62
|
+
"req:GithubProjectSourceInput": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "github" }, "repository": { "type": "string", "maxLength": 202, "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$" }, "path": { "type": "string", "minLength": 1, "maxLength": 4096, "pattern": "^(?!/)(?!.*\\.\\.).+$" } }, "required": ["kind", "repository", "path"] },
|
|
63
|
+
"req:Packages": { "type": "object", "additionalProperties": false, "properties": { "typescript-sdk": { "$ref": "req:PackageDelivery" }, "python-sdk": { "$ref": "req:PackageDelivery" }, "go-sdk": { "$ref": "req:PackageDelivery" }, "cli": { "$ref": "req:PackageDelivery" }, "mcp": { "$ref": "req:PackageDelivery" } } },
|
|
64
|
+
"req:PackageDelivery": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": ["string", "null"] }, "version": { "type": ["string", "null"], "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$" }, "destination": { "anyOf": [{ "$ref": "req:Destination" }, { "type": "null" }] } } },
|
|
65
|
+
"req:Destination": { "type": "object", "additionalProperties": false, "properties": { "repo": { "type": ["string", "null"] }, "directory": { "type": ["string", "null"] } } },
|
|
66
|
+
"req:SpecPatch": { "type": "object", "additionalProperties": false, "properties": { "op": { "type": "string", "enum": ["set", "append", "remove", "rename"] }, "path": { "type": "string" }, "value": {}, "to": { "type": ["string", "null"] }, "reason": { "type": ["string", "null"] } }, "required": ["op", "path"] },
|
|
67
|
+
"res:DeletedProject": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "res:ProjectId" }, "object": { "type": "string", "const": "project" }, "deleted": { "type": "boolean", "const": true } }, "required": ["id", "object", "deleted"] },
|
|
68
|
+
"req:UpdateProjectRequest": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "source": { "$ref": "req:ProjectSourceInput" }, "outputs": { "type": "array", "minItems": 1, "items": { "$ref": "req:OutputId" } }, "packages": { "$ref": "req:Packages" }, "auto_regen": { "type": "boolean" }, "spec_patches": { "type": "array", "maxItems": 50, "items": { "$ref": "req:SpecPatch" } }, "mcp_enabled": { "type": "boolean" }, "relay_enabled": { "type": "boolean" }, "config": { "anyOf": [{ "$ref": "req:Config" }, { "type": "null" }] } } },
|
|
69
|
+
"res:GithubIntegrationHealth": { "type": "object", "additionalProperties": false, "properties": { "object": { "type": "string", "const": "github_integration_health" }, "project_id": { "$ref": "res:ProjectId" }, "status": { "type": "string", "enum": ["ready", "action_required"] }, "repositories": { "type": "array", "items": { "$ref": "res:GithubRepositoryHealth" } }, "required_statuses": { "type": "object", "additionalProperties": false, "properties": { "source": { "type": "array", "items": { "type": "string" } }, "destination": { "type": "array", "items": { "type": "string" } } }, "required": ["source", "destination"] }, "last_delivery": { "anyOf": [{ "$ref": "res:GithubDeliveryHealth" }, { "type": "null" }] } }, "required": ["object", "project_id", "status", "repositories", "required_statuses", "last_delivery"] },
|
|
70
|
+
"res:GithubRepositoryHealth": { "type": "object", "additionalProperties": false, "properties": { "repository": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string", "enum": ["source", "destination"] } }, "status": { "type": "string", "enum": ["ready", "action_required"] }, "default_branch": { "type": "string" }, "can_read": { "type": "boolean" }, "can_write": { "type": "boolean" }, "breaking_label": { "type": ["boolean", "null"] }, "spec": { "type": "string", "enum": ["readable", "missing"] }, "issues": { "type": "array", "items": { "$ref": "res:GithubHealthIssue" } } }, "required": ["repository", "roles", "status", "issues"] },
|
|
71
|
+
"res:GithubHealthIssue": { "type": "object", "additionalProperties": false, "properties": { "code": { "type": "string", "enum": ["installation_missing", "spec_unreadable", "contents_write_missing", "breaking_label_missing", "github_unavailable"] }, "message": { "type": "string" } }, "required": ["code", "message"] },
|
|
72
|
+
"res:GithubDeliveryHealth": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "event": { "type": "string" }, "status": { "type": "string", "enum": ["queued", "processing", "succeeded", "failed", "superseded"] }, "error": { "type": ["string", "null"] }, "created_at": { "type": "string" } }, "required": ["id", "event", "status", "error", "created_at"] },
|
|
73
|
+
"res:GenerationList": { "type": "object", "additionalProperties": false, "properties": { "object": { "$ref": "res:ListObject" }, "data": { "type": "array", "items": { "$ref": "res:Generation" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"] } }, "required": ["object", "data", "has_more", "next_cursor"] },
|
|
74
|
+
"res:Generation": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "res:GenerationId" }, "object": { "type": "string", "const": "generation" }, "files_omitted": { "type": "boolean" }, "files_index": { "type": "array", "items": { "$ref": "res:FileStub" } }, "project_id": { "$ref": "res:ProjectId" }, "status": { "type": "string", "enum": ["succeeded", "failed"] }, "trigger": { "type": "string", "enum": ["manual", "webhook", "poll", "preview"] }, "output": { "$ref": "res:OutputId" }, "meta": { "anyOf": [{ "$ref": "res:GenerationMeta" }, { "type": "null" }] }, "warnings": { "type": "array", "items": { "type": "string" } }, "files": { "type": "array", "items": { "$ref": "res:GeneratedFile" } }, "error": { "type": ["string", "null"] }, "created_at": { "type": "string" } }, "required": ["id", "object", "project_id", "status", "trigger", "output", "meta", "warnings", "error", "created_at"] },
|
|
75
|
+
"res:GenerationId": { "type": "string", "pattern": "^gen_[a-z0-9]{16}$" },
|
|
76
|
+
"res:FileStub": { "type": "object", "properties": { "path": { "type": "string" }, "bytes": { "type": "integer" } }, "required": ["path", "bytes"] },
|
|
77
|
+
"res:GenerationBatch": { "type": "object", "additionalProperties": false, "properties": { "data": { "type": "array", "items": { "anyOf": [{ "$ref": "res:Generation" }, { "$ref": "res:GenerationFailure" }] } } }, "required": ["data"] },
|
|
78
|
+
"res:GenerationFailure": { "type": "object", "additionalProperties": false, "properties": { "output": { "$ref": "res:OutputId" }, "status": { "type": "string", "const": "failed" }, "error": { "type": "string" } }, "required": ["output", "status", "error"] },
|
|
79
|
+
"res:SpecRevisionList": { "type": "object", "additionalProperties": false, "properties": { "object": { "$ref": "res:ListObject" }, "data": { "type": "array", "items": { "$ref": "res:SpecRevision" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"] } }, "required": ["object", "data", "has_more", "next_cursor"] },
|
|
80
|
+
"res:SpecRevision": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "res:SpecRevisionId" }, "object": { "type": "string", "const": "spec_revision" }, "project_id": { "$ref": "res:ProjectId" }, "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "size_bytes": { "type": "integer", "minimum": 0 }, "source": { "anyOf": [{ "$ref": "res:SpecRevisionSource" }, { "type": "null" }] }, "created_at": { "type": "string" } }, "required": ["id", "object", "project_id", "sha256", "size_bytes", "source", "created_at"] },
|
|
81
|
+
"res:SpecRevisionId": { "type": "string", "pattern": "^spec_[a-z0-9]{16}$" },
|
|
82
|
+
"res:SpecRevisionSource": { "anyOf": [{ "$ref": "res:UrlSpecRevisionSource" }, { "$ref": "res:GithubSpecRevisionSource" }] },
|
|
83
|
+
"res:UrlSpecRevisionSource": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "url" }, "url": { "type": "string" } }, "required": ["kind", "url"] },
|
|
84
|
+
"res:GithubSpecRevisionSource": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "github" }, "repository": { "type": "string" }, "path": { "type": "string" }, "ref": { "type": ["string", "null"] }, "commit_sha": { "type": ["string", "null"] } }, "required": ["kind", "repository", "path"] },
|
|
85
|
+
"res:Account": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "^org_[A-Za-z0-9]+$" }, "object": { "type": "string", "const": "account" }, "name": { "type": "string" }, "plan": { "type": "string", "enum": ["free", "pro", "enterprise"] }, "created_at": { "type": "string" } }, "required": ["id", "object", "name", "plan", "created_at"] },
|
|
86
|
+
"res:ApiKeyList": { "type": "object", "additionalProperties": false, "properties": { "object": { "$ref": "res:ListObject" }, "data": { "type": "array", "items": { "$ref": "res:ApiKey" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"] } }, "required": ["object", "data", "has_more", "next_cursor"] },
|
|
87
|
+
"res:ApiKey": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "object": { "type": "string", "const": "api_key" }, "name": { "type": "string" }, "last4": { "type": "string" }, "revoked": { "type": "boolean" }, "last_used_at": { "type": ["string", "null"] }, "created_at": { "type": "string" } }, "required": ["id", "object", "name", "last4", "revoked", "last_used_at", "created_at"] },
|
|
88
|
+
};
|