@typeship-ax/mcp 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 +43 -0
- package/api.json +5163 -0
- package/api.md +512 -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/mcp-protocol.d.ts +453 -0
- package/dist/mcp-protocol.d.ts.map +1 -0
- package/dist/mcp-protocol.js +1262 -0
- package/dist/mcp.d.ts +5 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +449 -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/dist/worker.d.ts +5 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +12 -0
- package/package.json +45 -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/mcp-protocol.ts +1451 -0
- package/src/mcp.ts +448 -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
- package/src/worker.ts +13 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// typeship — apiKeys 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 ApiKeysResource {
|
|
6
|
+
_core;
|
|
7
|
+
constructor(_core) {
|
|
8
|
+
this._core = _core;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* List API keys
|
|
12
|
+
*
|
|
13
|
+
* Keys are never returned in full — only their identity and last four. Creation stays in the
|
|
14
|
+
* console deliberately: a leaked key that can mint more keys is a leaked account.
|
|
15
|
+
*
|
|
16
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
17
|
+
* `GET /api_keys`
|
|
18
|
+
*/
|
|
19
|
+
list(params, options) {
|
|
20
|
+
return paginate(this._core, {
|
|
21
|
+
method: "GET",
|
|
22
|
+
path: "/api_keys",
|
|
23
|
+
query: {
|
|
24
|
+
limit: params?.limit,
|
|
25
|
+
cursor: params?.cursor,
|
|
26
|
+
},
|
|
27
|
+
errors: {
|
|
28
|
+
"400": BadRequestError,
|
|
29
|
+
"401": UnauthorizedError,
|
|
30
|
+
"403": ForbiddenError,
|
|
31
|
+
"429": RateLimitedError,
|
|
32
|
+
},
|
|
33
|
+
idempotent: true,
|
|
34
|
+
schemaKey: "apiKeys.list",
|
|
35
|
+
options,
|
|
36
|
+
}, {
|
|
37
|
+
style: "cursor",
|
|
38
|
+
itemsField: "data",
|
|
39
|
+
cursorParam: "cursor",
|
|
40
|
+
nextCursorField: "next_cursor",
|
|
41
|
+
hasMoreField: "has_more",
|
|
42
|
+
limitParam: "limit",
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Revoke an API key
|
|
47
|
+
*
|
|
48
|
+
* Idempotent: revoking an already-revoked key returns the same body, so a rotation script that
|
|
49
|
+
* re-runs does not have to special-case having already succeeded.
|
|
50
|
+
* `DELETE /api_keys/{api_key_id}`
|
|
51
|
+
*/
|
|
52
|
+
async revoke(apiKeyId, options) {
|
|
53
|
+
return this._core.request({
|
|
54
|
+
method: "DELETE",
|
|
55
|
+
path: `/api_keys/${encodeURIComponent(String(apiKeyId))}`,
|
|
56
|
+
errors: {
|
|
57
|
+
"401": UnauthorizedError,
|
|
58
|
+
"403": ForbiddenError,
|
|
59
|
+
"404": NotFoundError,
|
|
60
|
+
"429": RateLimitedError,
|
|
61
|
+
},
|
|
62
|
+
idempotent: true,
|
|
63
|
+
schemaKey: "apiKeys.revoke",
|
|
64
|
+
options,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
2
|
+
import { TransportError, UnexpectedApiError, ValidationError, ApiResponseError, BadRequestError, ForbiddenError, PayloadTooLargeError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
3
|
+
import type { GenerateRequest, GenerationResult } from "../types.js";
|
|
4
|
+
export declare class GenerateResource {
|
|
5
|
+
private readonly _core;
|
|
6
|
+
constructor(_core: HttpCore);
|
|
7
|
+
/**
|
|
8
|
+
* Generate a package from a spec
|
|
9
|
+
*
|
|
10
|
+
* Stateless generation: nothing is stored. Returns the full generated
|
|
11
|
+
* package as files. Works without an API key: anonymous calls generate
|
|
12
|
+
* the first 25 operations, rate limited per IP address, and the
|
|
13
|
+
* response's `limits` object says what was held back and where to lift
|
|
14
|
+
* it; anonymous calls from a spec URL also carry `claim.url`, a link
|
|
15
|
+
* that turns the run into a project once a person signs in. With a key, the free plan generates
|
|
16
|
+
* the first 25 operations and
|
|
17
|
+
* paid plans generate the whole spec. A present but invalid key is a
|
|
18
|
+
* 401, not a downgrade to anonymous.
|
|
19
|
+
* `POST /generate`
|
|
20
|
+
*/
|
|
21
|
+
run(body: GenerateRequest, options?: RequestOptions): Promise<ApiResult<GenerationResult, GenerateRunError>>;
|
|
22
|
+
}
|
|
23
|
+
/** Every error `run` can produce, as a discriminated union. */
|
|
24
|
+
export type GenerateRunError = BadRequestError | UnauthorizedError | ForbiddenError | PayloadTooLargeError | UnprocessableEntityError | RateLimitedError | ApiResponseError | UnexpectedApiError | TransportError | ValidationError;
|
|
25
|
+
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/resources/generate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAErE,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;;;;;;;;;OAaG;IACG,GAAG,CACP,IAAI,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;CAkB1D;AAED,+DAA+D;AAC/D,MAAM,MAAM,gBAAgB,GACxB,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,oBAAoB,GACpB,wBAAwB,GACxB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// typeship — generate resource.
|
|
2
|
+
// Generated by typeship — https://typeship.dev — do not edit by hand.
|
|
3
|
+
import { ApiResponseError, BadRequestError, ForbiddenError, PayloadTooLargeError, RateLimitedError, UnauthorizedError, UnprocessableEntityError, } from "../errors.js";
|
|
4
|
+
export class GenerateResource {
|
|
5
|
+
_core;
|
|
6
|
+
constructor(_core) {
|
|
7
|
+
this._core = _core;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Generate a package from a spec
|
|
11
|
+
*
|
|
12
|
+
* Stateless generation: nothing is stored. Returns the full generated
|
|
13
|
+
* package as files. Works without an API key: anonymous calls generate
|
|
14
|
+
* the first 25 operations, rate limited per IP address, and the
|
|
15
|
+
* response's `limits` object says what was held back and where to lift
|
|
16
|
+
* it; anonymous calls from a spec URL also carry `claim.url`, a link
|
|
17
|
+
* that turns the run into a project once a person signs in. With a key, the free plan generates
|
|
18
|
+
* the first 25 operations and
|
|
19
|
+
* paid plans generate the whole spec. A present but invalid key is a
|
|
20
|
+
* 401, not a downgrade to anonymous.
|
|
21
|
+
* `POST /generate`
|
|
22
|
+
*/
|
|
23
|
+
async run(body, options) {
|
|
24
|
+
return this._core.request({
|
|
25
|
+
method: "POST",
|
|
26
|
+
path: "/generate",
|
|
27
|
+
body,
|
|
28
|
+
errors: {
|
|
29
|
+
"400": BadRequestError,
|
|
30
|
+
"401": UnauthorizedError,
|
|
31
|
+
"403": ForbiddenError,
|
|
32
|
+
"413": PayloadTooLargeError,
|
|
33
|
+
"422": UnprocessableEntityError,
|
|
34
|
+
"429": RateLimitedError,
|
|
35
|
+
default: ApiResponseError,
|
|
36
|
+
},
|
|
37
|
+
schemaKey: "generate.run",
|
|
38
|
+
options,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
2
|
+
import { TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError } from "../errors.js";
|
|
3
|
+
import type { Generation, GenerationId } from "../types.js";
|
|
4
|
+
export declare class GenerationsResource {
|
|
5
|
+
private readonly _core;
|
|
6
|
+
constructor(_core: HttpCore);
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve a generation
|
|
9
|
+
*
|
|
10
|
+
* Includes the generated files when the generation succeeded.
|
|
11
|
+
* `GET /generations/{generation_id}`
|
|
12
|
+
*/
|
|
13
|
+
retrieve(generationId: GenerationId, options?: RequestOptions): Promise<ApiResult<Generation, GenerationsRetrieveError>>;
|
|
14
|
+
/**
|
|
15
|
+
* Fetch one file from a generation
|
|
16
|
+
*
|
|
17
|
+
* Raw file content, for generations whose output was too large to inline (files_omitted true).
|
|
18
|
+
* The generation's files_index lists valid paths.
|
|
19
|
+
* `GET /generations/{generation_id}/file`
|
|
20
|
+
*/
|
|
21
|
+
retrieveFile(generationId: GenerationId, params: GenerationsRetrieveFileParams, options?: RequestOptions): Promise<ApiResult<string, GenerationsRetrieveFileError>>;
|
|
22
|
+
}
|
|
23
|
+
/** Every error `retrieve` can produce, as a discriminated union. */
|
|
24
|
+
export type GenerationsRetrieveError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
25
|
+
export interface GenerationsRetrieveFileParams {
|
|
26
|
+
/** Repo-relative path inside the generated package. */
|
|
27
|
+
path: string;
|
|
28
|
+
}
|
|
29
|
+
/** Every error `retrieveFile` can produce, as a discriminated union. */
|
|
30
|
+
export type GenerationsRetrieveFileError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
31
|
+
//# sourceMappingURL=generations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generations.d.ts","sourceRoot":"","sources":["../../src/resources/generations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE5D,qBAAa,mBAAmB;IAClB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;OAKG;IACG,QAAQ,CACZ,YAAY,EAAE,YAAY,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,UAAU,EAAE,wBAAwB,CAAC,CAAC;IAgB3D;;;;;;OAMG;IACG,YAAY,CAChB,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,6BAA6B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,4BAA4B,CAAC,CAAC;CAmB5D;AAED,oEAAoE;AACpE,MAAM,MAAM,wBAAwB,GAChC,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,6BAA6B;IAC5C,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wEAAwE;AACxE,MAAM,MAAM,4BAA4B,GACpC,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// typeship — generations resource.
|
|
2
|
+
// Generated by typeship — https://typeship.dev — do not edit by hand.
|
|
3
|
+
import { BadRequestError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError, } from "../errors.js";
|
|
4
|
+
export class GenerationsResource {
|
|
5
|
+
_core;
|
|
6
|
+
constructor(_core) {
|
|
7
|
+
this._core = _core;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Retrieve a generation
|
|
11
|
+
*
|
|
12
|
+
* Includes the generated files when the generation succeeded.
|
|
13
|
+
* `GET /generations/{generation_id}`
|
|
14
|
+
*/
|
|
15
|
+
async retrieve(generationId, options) {
|
|
16
|
+
return this._core.request({
|
|
17
|
+
method: "GET",
|
|
18
|
+
path: `/generations/${encodeURIComponent(String(generationId))}`,
|
|
19
|
+
errors: {
|
|
20
|
+
"401": UnauthorizedError,
|
|
21
|
+
"403": ForbiddenError,
|
|
22
|
+
"404": NotFoundError,
|
|
23
|
+
"429": RateLimitedError,
|
|
24
|
+
},
|
|
25
|
+
idempotent: true,
|
|
26
|
+
schemaKey: "generations.retrieve",
|
|
27
|
+
options,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Fetch one file from a generation
|
|
32
|
+
*
|
|
33
|
+
* Raw file content, for generations whose output was too large to inline (files_omitted true).
|
|
34
|
+
* The generation's files_index lists valid paths.
|
|
35
|
+
* `GET /generations/{generation_id}/file`
|
|
36
|
+
*/
|
|
37
|
+
async retrieveFile(generationId, params, options) {
|
|
38
|
+
return this._core.request({
|
|
39
|
+
method: "GET",
|
|
40
|
+
path: `/generations/${encodeURIComponent(String(generationId))}/file`,
|
|
41
|
+
query: {
|
|
42
|
+
path: params.path,
|
|
43
|
+
},
|
|
44
|
+
errors: {
|
|
45
|
+
"400": BadRequestError,
|
|
46
|
+
"401": UnauthorizedError,
|
|
47
|
+
"403": ForbiddenError,
|
|
48
|
+
"404": NotFoundError,
|
|
49
|
+
"429": RateLimitedError,
|
|
50
|
+
},
|
|
51
|
+
idempotent: true,
|
|
52
|
+
schemaKey: "generations.retrieveFile",
|
|
53
|
+
options,
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
2
|
+
import { PagePromise } from "../core/pagination.js";
|
|
3
|
+
import { TransportError, UnexpectedApiError, ValidationError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PaymentRequiredError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
4
|
+
import type { CreateProjectRequest, DeletedProject, Generation, GenerationBatch, GithubIntegrationHealth, OutputId, Project, ProjectId, UpdateProjectRequest } from "../types.js";
|
|
5
|
+
export declare class ProjectsResource {
|
|
6
|
+
private readonly _core;
|
|
7
|
+
constructor(_core: HttpCore);
|
|
8
|
+
/**
|
|
9
|
+
* List projects
|
|
10
|
+
*
|
|
11
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
12
|
+
* `GET /projects`
|
|
13
|
+
*/
|
|
14
|
+
list(params?: ProjectsListParams, options?: RequestOptions): PagePromise<Project, ProjectsListError>;
|
|
15
|
+
/**
|
|
16
|
+
* Create a project
|
|
17
|
+
*
|
|
18
|
+
* Stores a URL- or GitHub-sourced project. Free includes one stored project, every selected
|
|
19
|
+
* output, and the first 25 operations, while keeping manual and automatic regeneration, history,
|
|
20
|
+
* destination pull requests, and preview checks. Stateless POST /generate does not consume this
|
|
21
|
+
* slot. Pro adds projects and the whole spec.
|
|
22
|
+
*
|
|
23
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
24
|
+
* `POST /projects`
|
|
25
|
+
*/
|
|
26
|
+
create(body: CreateProjectRequest, params?: ProjectsCreateParams, options?: RequestOptions): Promise<ApiResult<Project, ProjectsCreateError>>;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve a project
|
|
29
|
+
* `GET /projects/{project_id}`
|
|
30
|
+
*/
|
|
31
|
+
retrieve(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<Project, ProjectsRetrieveError>>;
|
|
32
|
+
/**
|
|
33
|
+
* Delete a project
|
|
34
|
+
* `DELETE /projects/{project_id}`
|
|
35
|
+
*/
|
|
36
|
+
delete(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<DeletedProject, ProjectsDeleteError>>;
|
|
37
|
+
/**
|
|
38
|
+
* Update a project
|
|
39
|
+
* `PATCH /projects/{project_id}`
|
|
40
|
+
*/
|
|
41
|
+
update(projectId: ProjectId, body: UpdateProjectRequest, options?: RequestOptions): Promise<ApiResult<Project, ProjectsUpdateError>>;
|
|
42
|
+
/**
|
|
43
|
+
* Diagnose a project's GitHub integration
|
|
44
|
+
*
|
|
45
|
+
* Returns machine-actionable source and destination access, spec readability, optional label
|
|
46
|
+
* setup, required status names, and the latest durable webhook delivery. The console renders this
|
|
47
|
+
* same result.
|
|
48
|
+
* `GET /projects/{project_id}/github`
|
|
49
|
+
*/
|
|
50
|
+
retrieveGithubHealth(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<GithubIntegrationHealth, ProjectsRetrieveGithubHealthError>>;
|
|
51
|
+
/**
|
|
52
|
+
* List a project's generations
|
|
53
|
+
*
|
|
54
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
55
|
+
* `GET /projects/{project_id}/generations`
|
|
56
|
+
*/
|
|
57
|
+
listGenerations(projectId: ProjectId, params?: ProjectsListGenerationsParams, options?: RequestOptions): PagePromise<Generation, ProjectsListGenerationsError>;
|
|
58
|
+
/**
|
|
59
|
+
* Generate outputs and open pull requests
|
|
60
|
+
*
|
|
61
|
+
* Resolves the project's URL or repository source, generates every
|
|
62
|
+
* configured delivery package, stores each result in the project's history,
|
|
63
|
+
* and attempts to open a pull request in every configured destination.
|
|
64
|
+
* When the complete generated tree already matches a destination, no
|
|
65
|
+
* commit, branch, or pull request is created and that generation reports
|
|
66
|
+
* `pr_status: no_changes`. This is the same pipeline automatic
|
|
67
|
+
* regeneration runs after a source change.
|
|
68
|
+
* `POST /projects/{project_id}/generations`
|
|
69
|
+
*/
|
|
70
|
+
generate(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<GenerationBatch, ProjectsGenerateError>>;
|
|
71
|
+
}
|
|
72
|
+
export interface ProjectsListParams {
|
|
73
|
+
/** Maximum number of resources to return. */
|
|
74
|
+
limit?: number;
|
|
75
|
+
/** Opaque cursor from the preceding page's next_cursor. */
|
|
76
|
+
cursor?: string;
|
|
77
|
+
}
|
|
78
|
+
/** Every error `list` can produce, as a discriminated union. */
|
|
79
|
+
export type ProjectsListError = BadRequestError | UnauthorizedError | ForbiddenError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
80
|
+
export interface ProjectsCreateParams {
|
|
81
|
+
/**
|
|
82
|
+
* Uniquely identifies this creation attempt. Retrying the same request with the same key returns
|
|
83
|
+
* the original response instead of creating another project. Reusing a key with different
|
|
84
|
+
* parameters returns 409.
|
|
85
|
+
*/
|
|
86
|
+
idempotencyKey?: string;
|
|
87
|
+
}
|
|
88
|
+
/** Every error `create` can produce, as a discriminated union. */
|
|
89
|
+
export type ProjectsCreateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | ConflictError | RateLimitedError | InternalServerError | UnexpectedApiError | TransportError | ValidationError;
|
|
90
|
+
/** Every error `retrieve` can produce, as a discriminated union. */
|
|
91
|
+
export type ProjectsRetrieveError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
92
|
+
/** Every error `delete` can produce, as a discriminated union. */
|
|
93
|
+
export type ProjectsDeleteError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
94
|
+
/** Every error `update` can produce, as a discriminated union. */
|
|
95
|
+
export type ProjectsUpdateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
96
|
+
/** Every error `retrieveGithubHealth` can produce, as a discriminated union. */
|
|
97
|
+
export type ProjectsRetrieveGithubHealthError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
98
|
+
export interface ProjectsListGenerationsParams {
|
|
99
|
+
/** Maximum number of resources to return. */
|
|
100
|
+
limit?: number;
|
|
101
|
+
/** Opaque cursor from the preceding page's next_cursor. */
|
|
102
|
+
cursor?: string;
|
|
103
|
+
/** Only generations for this output. */
|
|
104
|
+
output?: OutputId;
|
|
105
|
+
}
|
|
106
|
+
/** Every error `listGenerations` can produce, as a discriminated union. */
|
|
107
|
+
export type ProjectsListGenerationsError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
108
|
+
/** Every error `generate` can produce, as a discriminated union. */
|
|
109
|
+
export type ProjectsGenerateError = UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | TransportError | ValidationError;
|
|
110
|
+
//# sourceMappingURL=projects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/resources/projects.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK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E;AAClE,MAAM,MAAM,mBAAmB,GAC3B,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,kEAAkE;AAClE,MAAM,MAAM,mBAAmB,GAC3B,eAAe,GACf,iBAAiB,GACjB,oBAAoB,GACpB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,gFAAgF;AAChF,MAAM,MAAM,iCAAiC,GACzC,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,6BAA6B;IAC5C,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED,2EAA2E;AAC3E,MAAM,MAAM,4BAA4B,GACpC,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,oEAAoE;AACpE,MAAM,MAAM,qBAAqB,GAC7B,iBAAiB,GACjB,oBAAoB,GACpB,cAAc,GACd,aAAa,GACb,wBAAwB,GACxB,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
// typeship — projects resource.
|
|
2
|
+
// Generated by typeship — https://typeship.dev — do not edit by hand.
|
|
3
|
+
import { paginate } from "../core/pagination.js";
|
|
4
|
+
import { BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PaymentRequiredError, RateLimitedError, UnauthorizedError, UnprocessableEntityError, } from "../errors.js";
|
|
5
|
+
export class ProjectsResource {
|
|
6
|
+
_core;
|
|
7
|
+
constructor(_core) {
|
|
8
|
+
this._core = _core;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* List projects
|
|
12
|
+
*
|
|
13
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
14
|
+
* `GET /projects`
|
|
15
|
+
*/
|
|
16
|
+
list(params, options) {
|
|
17
|
+
return paginate(this._core, {
|
|
18
|
+
method: "GET",
|
|
19
|
+
path: "/projects",
|
|
20
|
+
query: {
|
|
21
|
+
limit: params?.limit,
|
|
22
|
+
cursor: params?.cursor,
|
|
23
|
+
},
|
|
24
|
+
errors: {
|
|
25
|
+
"400": BadRequestError,
|
|
26
|
+
"401": UnauthorizedError,
|
|
27
|
+
"403": ForbiddenError,
|
|
28
|
+
"429": RateLimitedError,
|
|
29
|
+
},
|
|
30
|
+
idempotent: true,
|
|
31
|
+
schemaKey: "projects.list",
|
|
32
|
+
options,
|
|
33
|
+
}, {
|
|
34
|
+
style: "cursor",
|
|
35
|
+
itemsField: "data",
|
|
36
|
+
cursorParam: "cursor",
|
|
37
|
+
nextCursorField: "next_cursor",
|
|
38
|
+
hasMoreField: "has_more",
|
|
39
|
+
limitParam: "limit",
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Create a project
|
|
44
|
+
*
|
|
45
|
+
* Stores a URL- or GitHub-sourced project. Free includes one stored project, every selected
|
|
46
|
+
* output, and the first 25 operations, while keeping manual and automatic regeneration, history,
|
|
47
|
+
* destination pull requests, and preview checks. Stateless POST /generate does not consume this
|
|
48
|
+
* slot. Pro adds projects and the whole spec.
|
|
49
|
+
*
|
|
50
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
51
|
+
* `POST /projects`
|
|
52
|
+
*/
|
|
53
|
+
async create(body, params, options) {
|
|
54
|
+
return this._core.request({
|
|
55
|
+
method: "POST",
|
|
56
|
+
path: "/projects",
|
|
57
|
+
headers: {
|
|
58
|
+
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
59
|
+
},
|
|
60
|
+
body,
|
|
61
|
+
errors: {
|
|
62
|
+
"400": BadRequestError,
|
|
63
|
+
"401": UnauthorizedError,
|
|
64
|
+
"402": PaymentRequiredError,
|
|
65
|
+
"403": ForbiddenError,
|
|
66
|
+
"409": ConflictError,
|
|
67
|
+
"429": RateLimitedError,
|
|
68
|
+
"500": InternalServerError,
|
|
69
|
+
},
|
|
70
|
+
idempotencyKey: "Idempotency-Key",
|
|
71
|
+
schemaKey: "projects.create",
|
|
72
|
+
options,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Retrieve a project
|
|
77
|
+
* `GET /projects/{project_id}`
|
|
78
|
+
*/
|
|
79
|
+
async retrieve(projectId, options) {
|
|
80
|
+
return this._core.request({
|
|
81
|
+
method: "GET",
|
|
82
|
+
path: `/projects/${encodeURIComponent(String(projectId))}`,
|
|
83
|
+
errors: {
|
|
84
|
+
"401": UnauthorizedError,
|
|
85
|
+
"403": ForbiddenError,
|
|
86
|
+
"404": NotFoundError,
|
|
87
|
+
"429": RateLimitedError,
|
|
88
|
+
},
|
|
89
|
+
idempotent: true,
|
|
90
|
+
schemaKey: "projects.retrieve",
|
|
91
|
+
options,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Delete a project
|
|
96
|
+
* `DELETE /projects/{project_id}`
|
|
97
|
+
*/
|
|
98
|
+
async delete(projectId, options) {
|
|
99
|
+
return this._core.request({
|
|
100
|
+
method: "DELETE",
|
|
101
|
+
path: `/projects/${encodeURIComponent(String(projectId))}`,
|
|
102
|
+
errors: {
|
|
103
|
+
"401": UnauthorizedError,
|
|
104
|
+
"403": ForbiddenError,
|
|
105
|
+
"404": NotFoundError,
|
|
106
|
+
"429": RateLimitedError,
|
|
107
|
+
},
|
|
108
|
+
idempotent: true,
|
|
109
|
+
schemaKey: "projects.delete",
|
|
110
|
+
options,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Update a project
|
|
115
|
+
* `PATCH /projects/{project_id}`
|
|
116
|
+
*/
|
|
117
|
+
async update(projectId, body, options) {
|
|
118
|
+
return this._core.request({
|
|
119
|
+
method: "PATCH",
|
|
120
|
+
path: `/projects/${encodeURIComponent(String(projectId))}`,
|
|
121
|
+
body,
|
|
122
|
+
errors: {
|
|
123
|
+
"400": BadRequestError,
|
|
124
|
+
"401": UnauthorizedError,
|
|
125
|
+
"402": PaymentRequiredError,
|
|
126
|
+
"403": ForbiddenError,
|
|
127
|
+
"404": NotFoundError,
|
|
128
|
+
"429": RateLimitedError,
|
|
129
|
+
},
|
|
130
|
+
schemaKey: "projects.update",
|
|
131
|
+
options,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Diagnose a project's GitHub integration
|
|
136
|
+
*
|
|
137
|
+
* Returns machine-actionable source and destination access, spec readability, optional label
|
|
138
|
+
* setup, required status names, and the latest durable webhook delivery. The console renders this
|
|
139
|
+
* same result.
|
|
140
|
+
* `GET /projects/{project_id}/github`
|
|
141
|
+
*/
|
|
142
|
+
async retrieveGithubHealth(projectId, options) {
|
|
143
|
+
return this._core.request({
|
|
144
|
+
method: "GET",
|
|
145
|
+
path: `/projects/${encodeURIComponent(String(projectId))}/github`,
|
|
146
|
+
errors: {
|
|
147
|
+
"401": UnauthorizedError,
|
|
148
|
+
"403": ForbiddenError,
|
|
149
|
+
"404": NotFoundError,
|
|
150
|
+
"429": RateLimitedError,
|
|
151
|
+
},
|
|
152
|
+
idempotent: true,
|
|
153
|
+
schemaKey: "projects.retrieveGithubHealth",
|
|
154
|
+
options,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* List a project's generations
|
|
159
|
+
*
|
|
160
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
161
|
+
* `GET /projects/{project_id}/generations`
|
|
162
|
+
*/
|
|
163
|
+
listGenerations(projectId, params, options) {
|
|
164
|
+
return paginate(this._core, {
|
|
165
|
+
method: "GET",
|
|
166
|
+
path: `/projects/${encodeURIComponent(String(projectId))}/generations`,
|
|
167
|
+
query: {
|
|
168
|
+
limit: params?.limit,
|
|
169
|
+
cursor: params?.cursor,
|
|
170
|
+
output: params?.output,
|
|
171
|
+
},
|
|
172
|
+
errors: {
|
|
173
|
+
"400": BadRequestError,
|
|
174
|
+
"401": UnauthorizedError,
|
|
175
|
+
"403": ForbiddenError,
|
|
176
|
+
"404": NotFoundError,
|
|
177
|
+
"429": RateLimitedError,
|
|
178
|
+
},
|
|
179
|
+
idempotent: true,
|
|
180
|
+
schemaKey: "projects.listGenerations",
|
|
181
|
+
options,
|
|
182
|
+
}, {
|
|
183
|
+
style: "cursor",
|
|
184
|
+
itemsField: "data",
|
|
185
|
+
cursorParam: "cursor",
|
|
186
|
+
nextCursorField: "next_cursor",
|
|
187
|
+
hasMoreField: "has_more",
|
|
188
|
+
limitParam: "limit",
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Generate outputs and open pull requests
|
|
193
|
+
*
|
|
194
|
+
* Resolves the project's URL or repository source, generates every
|
|
195
|
+
* configured delivery package, stores each result in the project's history,
|
|
196
|
+
* and attempts to open a pull request in every configured destination.
|
|
197
|
+
* When the complete generated tree already matches a destination, no
|
|
198
|
+
* commit, branch, or pull request is created and that generation reports
|
|
199
|
+
* `pr_status: no_changes`. This is the same pipeline automatic
|
|
200
|
+
* regeneration runs after a source change.
|
|
201
|
+
* `POST /projects/{project_id}/generations`
|
|
202
|
+
*/
|
|
203
|
+
async generate(projectId, options) {
|
|
204
|
+
return this._core.request({
|
|
205
|
+
method: "POST",
|
|
206
|
+
path: `/projects/${encodeURIComponent(String(projectId))}/generations`,
|
|
207
|
+
errors: {
|
|
208
|
+
"401": UnauthorizedError,
|
|
209
|
+
"402": PaymentRequiredError,
|
|
210
|
+
"403": ForbiddenError,
|
|
211
|
+
"404": NotFoundError,
|
|
212
|
+
"422": UnprocessableEntityError,
|
|
213
|
+
"429": RateLimitedError,
|
|
214
|
+
"500": InternalServerError,
|
|
215
|
+
},
|
|
216
|
+
schemaKey: "projects.generate",
|
|
217
|
+
options,
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
2
|
+
import { PagePromise } from "../core/pagination.js";
|
|
3
|
+
import { TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError } from "../errors.js";
|
|
4
|
+
import type { ProjectId, SpecRevision, SpecRevisionId } from "../types.js";
|
|
5
|
+
export declare class SpecRevisionsResource {
|
|
6
|
+
private readonly _core;
|
|
7
|
+
constructor(_core: HttpCore);
|
|
8
|
+
/**
|
|
9
|
+
* List specification revisions
|
|
10
|
+
*
|
|
11
|
+
* Immutable snapshots of the exact source text this project consumed, newest first. Raw content
|
|
12
|
+
* is available from each revision's content endpoint and is never embedded in a list response.
|
|
13
|
+
*
|
|
14
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
15
|
+
* `GET /projects/{project_id}/spec_revisions`
|
|
16
|
+
*/
|
|
17
|
+
list(projectId: ProjectId, params?: SpecRevisionsListParams, options?: RequestOptions): PagePromise<SpecRevision, SpecRevisionsListError>;
|
|
18
|
+
/**
|
|
19
|
+
* Retrieve a specification revision
|
|
20
|
+
*
|
|
21
|
+
* Metadata for one immutable source snapshot. Fetch raw source text from the content endpoint so
|
|
22
|
+
* metadata responses stay small and predictable.
|
|
23
|
+
* `GET /spec_revisions/{spec_revision_id}`
|
|
24
|
+
*/
|
|
25
|
+
retrieve(specRevisionId: SpecRevisionId, options?: RequestOptions): Promise<ApiResult<SpecRevision, SpecRevisionsRetrieveError>>;
|
|
26
|
+
/**
|
|
27
|
+
* Retrieve a specification revision's raw text
|
|
28
|
+
*
|
|
29
|
+
* Returns the exact source text identified by the revision's SHA-256 digest, suitable for saving
|
|
30
|
+
* or piping directly into a diff.
|
|
31
|
+
* `GET /spec_revisions/{spec_revision_id}/content`
|
|
32
|
+
*/
|
|
33
|
+
retrieveContent(specRevisionId: SpecRevisionId, options?: RequestOptions): Promise<ApiResult<string, SpecRevisionsRetrieveContentError>>;
|
|
34
|
+
}
|
|
35
|
+
export interface SpecRevisionsListParams {
|
|
36
|
+
/** Maximum number of resources to return. */
|
|
37
|
+
limit?: number;
|
|
38
|
+
/** Opaque cursor from the preceding page's next_cursor. */
|
|
39
|
+
cursor?: string;
|
|
40
|
+
}
|
|
41
|
+
/** Every error `list` can produce, as a discriminated union. */
|
|
42
|
+
export type SpecRevisionsListError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
43
|
+
/** Every error `retrieve` can produce, as a discriminated union. */
|
|
44
|
+
export type SpecRevisionsRetrieveError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
45
|
+
/** Every error `retrieveContent` can produce, as a discriminated union. */
|
|
46
|
+
export type SpecRevisionsRetrieveContentError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
47
|
+
//# sourceMappingURL=spec-revisions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-revisions.d.ts","sourceRoot":"","sources":["../../src/resources/spec-revisions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACl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