@typeship-ax/mcp 0.10.0 → 0.20.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/AGENTS.md +11 -5
- package/README.md +16 -5
- package/api.json +8824 -3777
- package/api.md +8359 -3987
- package/dist/api-identity.d.ts.map +1 -1
- package/dist/api-identity.js +6 -1
- package/dist/core/http.d.ts +29 -16
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +108 -25
- package/dist/core/pagination.d.ts +8 -8
- package/dist/core/pagination.d.ts.map +1 -1
- package/dist/core/pagination.js +7 -16
- package/dist/errors.d.ts +20 -13
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +29 -20
- package/dist/index.d.ts +37 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -18
- package/dist/mcp-protocol.d.ts +10 -6
- package/dist/mcp-protocol.d.ts.map +1 -1
- package/dist/mcp-protocol.js +110 -39
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +38 -18
- package/dist/ops.d.ts +5 -1
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +42 -35
- package/dist/resources/api-keys.d.ts +44 -18
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +46 -14
- package/dist/resources/deliveries.d.ts +46 -0
- package/dist/resources/deliveries.d.ts.map +1 -0
- package/dist/resources/deliveries.js +70 -0
- package/dist/resources/drafts.d.ts +155 -0
- package/dist/resources/drafts.d.ts.map +1 -0
- package/dist/resources/drafts.js +230 -0
- package/dist/resources/files.d.ts +23 -0
- package/dist/resources/files.d.ts.map +1 -0
- package/dist/resources/files.js +38 -0
- package/dist/resources/generate.d.ts +49 -20
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +56 -14
- package/dist/resources/generations.d.ts +70 -18
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +84 -16
- package/dist/resources/organization.d.ts +18 -0
- package/dist/resources/organization.d.ts.map +1 -0
- package/dist/resources/organization.js +32 -0
- package/dist/resources/projects.d.ts +87 -124
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +70 -173
- package/dist/resources/publications.d.ts +46 -0
- package/dist/resources/publications.d.ts.map +1 -0
- package/dist/resources/publications.js +70 -0
- package/dist/resources/releases.d.ts +66 -0
- package/dist/resources/releases.d.ts.map +1 -0
- package/dist/resources/releases.js +101 -0
- package/dist/resources/spec-revisions.d.ts +85 -0
- package/dist/resources/spec-revisions.d.ts.map +1 -0
- package/dist/resources/spec-revisions.js +116 -0
- package/dist/resources/specs.d.ts +72 -0
- package/dist/resources/specs.d.ts.map +1 -0
- package/dist/resources/specs.js +107 -0
- package/dist/resources/targets.d.ts +85 -105
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +70 -163
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +175 -129
- package/dist/types.d.ts +2626 -1141
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +90 -11
- package/package.json +3 -3
- package/server.json +3 -3
- package/src/api-identity.ts +6 -2
- package/src/core/http.ts +106 -30
- package/src/core/pagination.ts +13 -23
- package/src/errors.ts +30 -20
- package/src/index.ts +46 -24
- package/src/mcp-protocol.ts +95 -38
- package/src/mcp.ts +34 -16
- package/src/ops.ts +47 -36
- package/src/resources/api-keys.ts +87 -19
- package/src/resources/deliveries.ts +139 -0
- package/src/resources/drafts.ts +422 -0
- package/src/resources/files.ts +68 -0
- package/src/resources/generate.ts +81 -19
- package/src/resources/generations.ts +167 -29
- package/src/resources/organization.ts +53 -0
- package/src/resources/projects.ts +129 -322
- package/src/resources/publications.ts +139 -0
- package/src/resources/releases.ts +199 -0
- package/src/resources/spec-revisions.ts +237 -0
- package/src/resources/specs.ts +200 -0
- package/src/resources/targets.ts +135 -304
- package/src/schemas.ts +175 -129
- package/src/types.ts +2793 -1177
- package/dist/resources/account.d.ts +0 -18
- package/dist/resources/account.d.ts.map +0 -1
- package/dist/resources/account.js +0 -27
- package/dist/resources/definition-revisions.d.ts +0 -58
- package/dist/resources/definition-revisions.d.ts.map +0 -1
- package/dist/resources/definition-revisions.js +0 -114
- package/dist/resources/definitions.d.ts +0 -35
- package/dist/resources/definitions.d.ts.map +0 -1
- package/dist/resources/definitions.js +0 -60
- package/src/resources/account.ts +0 -46
- package/src/resources/definition-revisions.ts +0 -207
- package/src/resources/definitions.ts +0 -122
|
@@ -1,19 +1,60 @@
|
|
|
1
1
|
// typeship — generations resource.
|
|
2
|
-
// Generated by typeship — https://typeship.dev
|
|
3
|
-
import {
|
|
2
|
+
// Generated by typeship — https://typeship.dev
|
|
3
|
+
import { paginate } from "../core/pagination.js";
|
|
4
|
+
import { BadRequestError, ForbiddenError, InternalServerError, NotFoundError, RateLimitedError, UnauthorizedError, } from "../errors.js";
|
|
4
5
|
export class GenerationsResource {
|
|
5
6
|
_core;
|
|
6
7
|
constructor(_core) {
|
|
7
8
|
this._core = _core;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
|
-
*
|
|
11
|
+
* List generations
|
|
11
12
|
*
|
|
12
|
-
*
|
|
13
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
14
|
+
* `GET /generations`
|
|
15
|
+
*/
|
|
16
|
+
list(params, options) {
|
|
17
|
+
return paginate(this._core, {
|
|
18
|
+
method: "GET",
|
|
19
|
+
path: "/generations",
|
|
20
|
+
security: [{ "apiKey": [] }],
|
|
21
|
+
query: {
|
|
22
|
+
limit: params?.limit,
|
|
23
|
+
cursor: params?.cursor,
|
|
24
|
+
project_id: params?.projectId,
|
|
25
|
+
target_id: params?.targetId,
|
|
26
|
+
status: params?.status,
|
|
27
|
+
},
|
|
28
|
+
errors: {
|
|
29
|
+
"400": BadRequestError,
|
|
30
|
+
"401": UnauthorizedError,
|
|
31
|
+
"403": ForbiddenError,
|
|
32
|
+
"404": NotFoundError,
|
|
33
|
+
"429": RateLimitedError,
|
|
34
|
+
"500": InternalServerError,
|
|
35
|
+
},
|
|
36
|
+
idempotent: true,
|
|
37
|
+
schemaKey: "generations.list",
|
|
38
|
+
options,
|
|
39
|
+
}, {
|
|
40
|
+
style: "cursor",
|
|
41
|
+
itemsField: "data",
|
|
42
|
+
cursorParam: "cursor",
|
|
43
|
+
nextCursorField: "next_cursor",
|
|
44
|
+
hasMoreField: "has_more",
|
|
45
|
+
limitParam: "limit",
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Get a generation
|
|
50
|
+
*
|
|
51
|
+
* Returns the status of that Generation. `queued` and `running` mean generation is still in
|
|
52
|
+
* progress. `completed` means generated files are saved, not that repository delivery or a Draft
|
|
53
|
+
* is complete. List its files with listGenerationFiles and read each with getFile.
|
|
13
54
|
* `GET /generations/{generation_id}`
|
|
14
55
|
*/
|
|
15
|
-
async
|
|
16
|
-
return this._core.
|
|
56
|
+
async get(generationId, options) {
|
|
57
|
+
return this._core.requestData({
|
|
17
58
|
method: "GET",
|
|
18
59
|
path: `/generations/${encodeURIComponent(String(generationId))}`,
|
|
19
60
|
security: [{ "apiKey": [] }],
|
|
@@ -22,26 +63,29 @@ export class GenerationsResource {
|
|
|
22
63
|
"403": ForbiddenError,
|
|
23
64
|
"404": NotFoundError,
|
|
24
65
|
"429": RateLimitedError,
|
|
66
|
+
"500": InternalServerError,
|
|
25
67
|
},
|
|
26
68
|
idempotent: true,
|
|
27
|
-
schemaKey: "generations.
|
|
69
|
+
schemaKey: "generations.get",
|
|
28
70
|
options,
|
|
29
71
|
});
|
|
30
72
|
}
|
|
31
73
|
/**
|
|
32
|
-
*
|
|
74
|
+
* List a Generation's files
|
|
33
75
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* `
|
|
76
|
+
* Lists the generated package's files, ordered by path. Read content with getFile.
|
|
77
|
+
*
|
|
78
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
79
|
+
* `GET /generations/{generation_id}/files`
|
|
37
80
|
*/
|
|
38
|
-
|
|
39
|
-
return this._core
|
|
81
|
+
listFiles(generationId, params, options) {
|
|
82
|
+
return paginate(this._core, {
|
|
40
83
|
method: "GET",
|
|
41
|
-
path: `/generations/${encodeURIComponent(String(generationId))}/
|
|
84
|
+
path: `/generations/${encodeURIComponent(String(generationId))}/files`,
|
|
42
85
|
security: [{ "apiKey": [] }],
|
|
43
86
|
query: {
|
|
44
|
-
|
|
87
|
+
limit: params?.limit,
|
|
88
|
+
cursor: params?.cursor,
|
|
45
89
|
},
|
|
46
90
|
errors: {
|
|
47
91
|
"400": BadRequestError,
|
|
@@ -49,10 +93,34 @@ export class GenerationsResource {
|
|
|
49
93
|
"403": ForbiddenError,
|
|
50
94
|
"404": NotFoundError,
|
|
51
95
|
"429": RateLimitedError,
|
|
96
|
+
"500": InternalServerError,
|
|
52
97
|
},
|
|
53
98
|
idempotent: true,
|
|
54
|
-
schemaKey: "generations.
|
|
99
|
+
schemaKey: "generations.listFiles",
|
|
55
100
|
options,
|
|
101
|
+
}, {
|
|
102
|
+
style: "cursor",
|
|
103
|
+
itemsField: "data",
|
|
104
|
+
cursorParam: "cursor",
|
|
105
|
+
nextCursorField: "next_cursor",
|
|
106
|
+
hasMoreField: "has_more",
|
|
107
|
+
limitParam: "limit",
|
|
56
108
|
});
|
|
57
109
|
}
|
|
110
|
+
/** Poll until files are generated or the Generation fails. */
|
|
111
|
+
async wait(generationId, options = {}) {
|
|
112
|
+
const { intervalMs = 3_000, waitTimeoutMs = 600_000, ...requestOptions } = options;
|
|
113
|
+
const deadline = Date.now() + waitTimeoutMs;
|
|
114
|
+
while (true) {
|
|
115
|
+
if (requestOptions.signal?.aborted) {
|
|
116
|
+
throw requestOptions.signal.reason ?? new Error("Generation wait aborted.");
|
|
117
|
+
}
|
|
118
|
+
const result = await this.get(generationId, requestOptions);
|
|
119
|
+
if (result.status !== "queued" && result.status !== "running")
|
|
120
|
+
return result;
|
|
121
|
+
if (Date.now() >= deadline)
|
|
122
|
+
throw new Error("Timed out waiting for Generation " + generationId + ".");
|
|
123
|
+
await new Promise((resolve) => setTimeout(resolve, Math.min(intervalMs, deadline - Date.now())));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
58
126
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
2
|
+
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, ForbiddenError, InternalServerError, RateLimitedError, UnauthorizedError } from "../errors.js";
|
|
3
|
+
import type { OrganizationRead } from "../types.js";
|
|
4
|
+
export declare class OrganizationResource {
|
|
5
|
+
private readonly _core;
|
|
6
|
+
constructor(_core: HttpCore);
|
|
7
|
+
/**
|
|
8
|
+
* The organization behind the presented credentials
|
|
9
|
+
*
|
|
10
|
+
* Returns the organization associated with your credential. The Typeship CLI uses this endpoint
|
|
11
|
+
* for `whoami`.
|
|
12
|
+
* `GET /organization`
|
|
13
|
+
*/
|
|
14
|
+
get(options?: RequestOptions): Promise<OrganizationRead>;
|
|
15
|
+
}
|
|
16
|
+
/** Typed errors `get` can throw. */
|
|
17
|
+
export type OrganizationGetError = UnauthorizedError | ForbiddenError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
18
|
+
//# sourceMappingURL=organization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../src/resources/organization.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAgB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAElE,qBAAa,oBAAoB;IACnB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;;OAMG;IACG,GAAG,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAgB/D;AAED,oCAAoC;AACpC,MAAM,MAAM,oBAAoB,GAC5B,iBAAiB,GACjB,cAAc,GACd,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// typeship — organization resource.
|
|
2
|
+
// Generated by typeship — https://typeship.dev
|
|
3
|
+
import { ForbiddenError, InternalServerError, RateLimitedError, UnauthorizedError, } from "../errors.js";
|
|
4
|
+
export class OrganizationResource {
|
|
5
|
+
_core;
|
|
6
|
+
constructor(_core) {
|
|
7
|
+
this._core = _core;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The organization behind the presented credentials
|
|
11
|
+
*
|
|
12
|
+
* Returns the organization associated with your credential. The Typeship CLI uses this endpoint
|
|
13
|
+
* for `whoami`.
|
|
14
|
+
* `GET /organization`
|
|
15
|
+
*/
|
|
16
|
+
async get(options) {
|
|
17
|
+
return this._core.requestData({
|
|
18
|
+
method: "GET",
|
|
19
|
+
path: "/organization",
|
|
20
|
+
security: [{ "apiKey": [] }],
|
|
21
|
+
errors: {
|
|
22
|
+
"401": UnauthorizedError,
|
|
23
|
+
"403": ForbiddenError,
|
|
24
|
+
"429": RateLimitedError,
|
|
25
|
+
"500": InternalServerError,
|
|
26
|
+
},
|
|
27
|
+
idempotent: true,
|
|
28
|
+
schemaKey: "organization.get",
|
|
29
|
+
options,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { HttpCore, type
|
|
1
|
+
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
2
2
|
import { PagePromise } from "../core/pagination.js";
|
|
3
|
-
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PaymentRequiredError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
4
|
-
import type { CreateProjectRequest, DeletedProjectRead,
|
|
3
|
+
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PayloadTooLargeError, PaymentRequiredError, PreconditionFailedError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
4
|
+
import type { CreateProjectRequest, DeletedProjectRead, GenerateProjectRequest, GenerationBatchRead, ProjectId, ProjectRead, ProjectSummaryRead, UpdateProjectRequest } from "../types.js";
|
|
5
5
|
export declare class ProjectsResource {
|
|
6
6
|
private readonly _core;
|
|
7
7
|
constructor(_core: HttpCore);
|
|
@@ -15,172 +15,135 @@ export declare class ProjectsResource {
|
|
|
15
15
|
/**
|
|
16
16
|
* Create a project
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
18
|
+
* Creates a Project from a URL or GitHub Spec.
|
|
19
|
+
* Automatic generation is enabled by default for a saved Project.
|
|
20
|
+
*
|
|
21
|
+
* Free includes one saved Project, all selected Targets, and the first 25 operations per Target,
|
|
22
|
+
* with regeneration, history, delivery pull requests, and previews. Pro supports additional
|
|
23
|
+
* Projects and all operations. One-shot generation does not use a Project slot.
|
|
22
24
|
*
|
|
23
25
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
24
26
|
* `POST /projects`
|
|
25
27
|
*/
|
|
26
|
-
create(body: CreateProjectRequest, params?: ProjectsCreateParams, options?: RequestOptions): Promise<
|
|
28
|
+
create(body: CreateProjectRequest, params?: ProjectsCreateParams, options?: RequestOptions): Promise<ProjectRead>;
|
|
27
29
|
/**
|
|
28
|
-
*
|
|
30
|
+
* Get a project
|
|
29
31
|
*
|
|
30
|
-
* Returns Project
|
|
32
|
+
* Returns the Project's settings and Spec ID. List its Targets separately to retrieve Target
|
|
33
|
+
* configuration and Deliveries.
|
|
31
34
|
* `GET /projects/{project_id}`
|
|
32
35
|
*/
|
|
33
|
-
|
|
36
|
+
get(projectId: ProjectId, options?: RequestOptions): Promise<ProjectRead>;
|
|
34
37
|
/**
|
|
35
38
|
* Delete a project
|
|
39
|
+
*
|
|
40
|
+
* A `502` response means the Project was not deleted because its release pull requests could not
|
|
41
|
+
* be retired. Retry deletion to finish retiring the remaining reviews. Repeating a completed
|
|
42
|
+
* deletion returns `404`.
|
|
43
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
44
|
+
* and If-Match.
|
|
36
45
|
* `DELETE /projects/{project_id}`
|
|
37
46
|
*/
|
|
38
|
-
delete(projectId: ProjectId, options?: RequestOptions): Promise<
|
|
47
|
+
delete(projectId: ProjectId, params?: ProjectsDeleteParams, options?: RequestOptions): Promise<DeletedProjectRead>;
|
|
39
48
|
/**
|
|
40
49
|
* Update a project
|
|
41
|
-
* `PATCH /projects/{project_id}`
|
|
42
|
-
*/
|
|
43
|
-
update(projectId: ProjectId, body: UpdateProjectRequest, options?: RequestOptions): Promise<ApiResult<ProjectRead, ProjectsUpdateError>>;
|
|
44
|
-
/**
|
|
45
|
-
* Analyze a project's latest Definition Revision
|
|
46
|
-
*
|
|
47
|
-
* Runs deterministic OpenAPI or GraphQL authorship checks against the latest observed immutable
|
|
48
|
-
* Definition Revision after applying the Definition's existing patches. Diagnostics group every
|
|
49
|
-
* affected location under a stable rule. Exact patches are included only when Typeship can derive
|
|
50
|
-
* the change without inventing API behavior.
|
|
51
|
-
* `GET /projects/{project_id}/diagnostics`
|
|
52
|
-
*/
|
|
53
|
-
retrieveDiagnostics(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<DiagnosticReportRead, ProjectsRetrieveDiagnosticsError>>;
|
|
54
|
-
/**
|
|
55
|
-
* Refresh a project's Diagnostics from its configured source
|
|
56
50
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*/
|
|
64
|
-
refreshDiagnostics(projectId: ProjectId, params?: ProjectsRefreshDiagnosticsParams, options?: RequestOptions): Promise<ApiResult<DiagnosticReportRead, ProjectsRefreshDiagnosticsError>>;
|
|
65
|
-
/**
|
|
66
|
-
* Apply exact, reviewed diagnostic remediations
|
|
67
|
-
*
|
|
68
|
-
* Applies only deterministic patches. Repository sources receive an updateable source pull
|
|
69
|
-
* request; URL sources receive project overlays. Diagnostics that require API-owner intent return
|
|
70
|
-
* 422 and include an authoring_brief in the Diagnostic instead.
|
|
71
|
-
*
|
|
72
|
-
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
73
|
-
* `POST /projects/{project_id}/diagnostics/remediations`
|
|
74
|
-
*/
|
|
75
|
-
remediateDiagnostics(projectId: ProjectId, body: DiagnosticRemediationRequest, params?: ProjectsRemediateDiagnosticsParams, options?: RequestOptions): Promise<ApiResult<DiagnosticRemediationRead, ProjectsRemediateDiagnosticsError>>;
|
|
76
|
-
/**
|
|
77
|
-
* Diagnose a project's repository integrations
|
|
51
|
+
* Omitted fields keep their current values. A supplied config replaces the entire stored object;
|
|
52
|
+
* null or an empty object clears it.
|
|
53
|
+
* With auto_generate enabled, changing shared config queues a Generation for each Target whose
|
|
54
|
+
* effective config changes. A queued or running Target reuses that Generation.
|
|
55
|
+
* Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag
|
|
56
|
+
* returns 412 precondition_failed without saving.
|
|
78
57
|
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
58
|
+
* A `409 target_busy` means a Target is publishing. Retrieve the Project, wait for publishing to
|
|
59
|
+
* finish, reconcile your update, and retry.
|
|
60
|
+
* A `502` response means the Project was saved, but an obsolete release pull request could not be
|
|
61
|
+
* retired. Retrieve the Project and retry the same update to finish retiring reviews if that
|
|
62
|
+
* update is still desired.
|
|
63
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
64
|
+
* and If-Match.
|
|
65
|
+
* `PATCH /projects/{project_id}`
|
|
83
66
|
*/
|
|
84
|
-
|
|
67
|
+
update(projectId: ProjectId, body: UpdateProjectRequest, params?: ProjectsUpdateParams, options?: RequestOptions): Promise<ProjectRead>;
|
|
85
68
|
/**
|
|
86
|
-
*
|
|
69
|
+
* Start generation for active Targets
|
|
87
70
|
*
|
|
88
|
-
*
|
|
89
|
-
* `
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
*
|
|
71
|
+
* Queues one Generation per active Target and returns their IDs. Retrieve each Generation until
|
|
72
|
+
* its status moves from `queued` to `running` and then `completed` or `failed`. `completed` means
|
|
73
|
+
* generated files are saved; check Delivery and Draft status separately for repository delivery
|
|
74
|
+
* and pull requests. A Target already queued or running is returned without starting another
|
|
75
|
+
* Generation. A matching Idempotency-Key replay returns the same Generations with their current
|
|
76
|
+
* statuses.
|
|
94
77
|
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
* When the complete generated tree already matches a destination, no
|
|
99
|
-
* commit, branch, or pull request is created and that generation reports
|
|
100
|
-
* `pr_status: no_changes`. This is the same pipeline automatic
|
|
101
|
-
* regeneration runs after a source change.
|
|
78
|
+
* If the package already matches a destination and no Draft is open, delivery creates no commit,
|
|
79
|
+
* branch, or pull request. An existing Draft stays open. Automatic generation uses the same
|
|
80
|
+
* workflow.
|
|
102
81
|
*
|
|
103
82
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
104
|
-
* `POST /projects/{project_id}/
|
|
83
|
+
* `POST /projects/{project_id}/generate`
|
|
105
84
|
*/
|
|
106
|
-
generate(projectId: ProjectId, params?: ProjectsGenerateParams, options?: RequestOptions): Promise<
|
|
85
|
+
generate(projectId: ProjectId, body?: GenerateProjectRequest, params?: ProjectsGenerateParams, options?: RequestOptions): Promise<GenerationBatchRead>;
|
|
107
86
|
}
|
|
108
87
|
export interface ProjectsListParams {
|
|
109
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
|
|
90
|
+
* representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
|
|
91
|
+
* invalid_request. List query parameters must appear only once; unrecognized parameters also
|
|
92
|
+
* return 400.
|
|
93
|
+
*/
|
|
110
94
|
limit?: number;
|
|
111
95
|
/**
|
|
112
|
-
* Opaque cursor from the preceding page's next_cursor. Valid only for the same
|
|
113
|
-
* operation, filters, and ordering that issued it.
|
|
96
|
+
* Opaque cursor from the preceding page's next_cursor. Valid only for the same organization,
|
|
97
|
+
* operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
|
|
98
|
+
* malformed, or repeated cursors return 400 invalid_request. The page limit may change between
|
|
99
|
+
* requests.
|
|
114
100
|
*/
|
|
115
101
|
cursor?: string;
|
|
116
102
|
}
|
|
117
|
-
/**
|
|
118
|
-
export type ProjectsListError = BadRequestError | UnauthorizedError | ForbiddenError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
103
|
+
/** Typed errors `list` can throw. */
|
|
104
|
+
export type ProjectsListError = BadRequestError | UnauthorizedError | ForbiddenError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
119
105
|
export interface ProjectsCreateParams {
|
|
120
106
|
/**
|
|
121
|
-
* Identifies one logical write for 24 hours. The key is scoped to the authenticated
|
|
122
|
-
* operation;
|
|
123
|
-
* path, query, and JSON body replays the original response. Reusing
|
|
124
|
-
* returns 409. After expiry the key starts a new write.
|
|
107
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
|
|
108
|
+
* and operation; generation without an organization uses a hashed network identity. Retrying the
|
|
109
|
+
* same method, path, query, If-Match header, and JSON body replays the original response. Reusing
|
|
110
|
+
* the key with changed intent returns 409. After expiry the key starts a new write.
|
|
125
111
|
*/
|
|
126
112
|
idempotencyKey?: string;
|
|
127
113
|
}
|
|
128
|
-
/**
|
|
114
|
+
/** Typed errors `create` can throw. */
|
|
129
115
|
export type ProjectsCreateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
130
|
-
/**
|
|
131
|
-
export type
|
|
132
|
-
|
|
133
|
-
export type ProjectsDeleteError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
134
|
-
/** Every error `update` can produce, as a discriminated union. */
|
|
135
|
-
export type ProjectsUpdateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
136
|
-
/** Every error `retrieveDiagnostics` can produce, as a discriminated union. */
|
|
137
|
-
export type ProjectsRetrieveDiagnosticsError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
138
|
-
export interface ProjectsRefreshDiagnosticsParams {
|
|
116
|
+
/** Typed errors `get` can throw. */
|
|
117
|
+
export type ProjectsGetError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
118
|
+
export interface ProjectsDeleteParams {
|
|
139
119
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
* returns 409. After expiry the key starts a new write.
|
|
120
|
+
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
121
|
+
* otherwise it returns 412 precondition_failed without changes. Omit to write the current
|
|
122
|
+
* version. See https://typeship.dev/docs/typeship-api#conditional-writes.
|
|
144
123
|
*/
|
|
145
|
-
|
|
124
|
+
ifMatch?: string;
|
|
146
125
|
}
|
|
147
|
-
/**
|
|
148
|
-
export type
|
|
149
|
-
export interface
|
|
126
|
+
/** Typed errors `delete` can throw. */
|
|
127
|
+
export type ProjectsDeleteError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | PreconditionFailedError | RateLimitedError | InternalServerError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
128
|
+
export interface ProjectsUpdateParams {
|
|
150
129
|
/**
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
* returns 409. After expiry the key starts a new write.
|
|
130
|
+
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
131
|
+
* otherwise it returns 412 precondition_failed without changes. Omit to write the current
|
|
132
|
+
* version. See https://typeship.dev/docs/typeship-api#conditional-writes.
|
|
155
133
|
*/
|
|
156
|
-
|
|
157
|
-
}
|
|
158
|
-
/** Every error `remediateDiagnostics` can produce, as a discriminated union. */
|
|
159
|
-
export type ProjectsRemediateDiagnosticsError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
160
|
-
/** Every error `retrieveIntegrationHealth` can produce, as a discriminated union. */
|
|
161
|
-
export type ProjectsRetrieveIntegrationHealthError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
162
|
-
export interface ProjectsListGenerationsParams {
|
|
163
|
-
/** Maximum number of resources to return. */
|
|
164
|
-
limit?: number;
|
|
165
|
-
/**
|
|
166
|
-
* Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
|
|
167
|
-
* operation, filters, and ordering that issued it.
|
|
168
|
-
*/
|
|
169
|
-
cursor?: string;
|
|
170
|
-
/** Only generations for this persisted Target. */
|
|
171
|
-
targetId?: TargetId;
|
|
134
|
+
ifMatch?: string;
|
|
172
135
|
}
|
|
173
|
-
/**
|
|
174
|
-
export type
|
|
136
|
+
/** Typed errors `update` can throw. */
|
|
137
|
+
export type ProjectsUpdateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | PreconditionFailedError | UnprocessableEntityError | RateLimitedError | InternalServerError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
175
138
|
export interface ProjectsGenerateParams {
|
|
176
139
|
/**
|
|
177
|
-
* Identifies one logical write for 24 hours. The key is scoped to the authenticated
|
|
178
|
-
* operation;
|
|
179
|
-
* path, query, and JSON body replays the original response. Reusing
|
|
180
|
-
* returns 409. After expiry the key starts a new write.
|
|
140
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
|
|
141
|
+
* and operation; generation without an organization uses a hashed network identity. Retrying the
|
|
142
|
+
* same method, path, query, If-Match header, and JSON body replays the original response. Reusing
|
|
143
|
+
* the key with changed intent returns 409. After expiry the key starts a new write.
|
|
181
144
|
*/
|
|
182
145
|
idempotencyKey?: string;
|
|
183
146
|
}
|
|
184
|
-
/**
|
|
185
|
-
export type ProjectsGenerateError = UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
147
|
+
/** Typed errors `generate` can throw. */
|
|
148
|
+
export type ProjectsGenerateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | PayloadTooLargeError | UnprocessableEntityError | RateLimitedError | InternalServerError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
186
149
|
//# sourceMappingURL=projects.d.ts.map
|
|
@@ -1 +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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