@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,7 +1,7 @@
|
|
|
1
1
|
// typeship — projects resource.
|
|
2
|
-
// Generated by typeship — https://typeship.dev
|
|
2
|
+
// Generated by typeship — https://typeship.dev
|
|
3
3
|
|
|
4
|
-
import { HttpCore, type
|
|
4
|
+
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
5
5
|
import { paginate, PagePromise } from "../core/pagination.js";
|
|
6
6
|
import {
|
|
7
7
|
ResponseParseError,
|
|
@@ -14,7 +14,9 @@ import {
|
|
|
14
14
|
ForbiddenError,
|
|
15
15
|
InternalServerError,
|
|
16
16
|
NotFoundError,
|
|
17
|
+
PayloadTooLargeError,
|
|
17
18
|
PaymentRequiredError,
|
|
19
|
+
PreconditionFailedError,
|
|
18
20
|
RateLimitedError,
|
|
19
21
|
UnauthorizedError,
|
|
20
22
|
UnprocessableEntityError,
|
|
@@ -23,17 +25,9 @@ import type {
|
|
|
23
25
|
CreateProjectRequest,
|
|
24
26
|
DeletedProject,
|
|
25
27
|
DeletedProjectRead,
|
|
26
|
-
|
|
27
|
-
DiagnosticRemediationRead,
|
|
28
|
-
DiagnosticRemediationRequest,
|
|
29
|
-
DiagnosticReport,
|
|
30
|
-
DiagnosticReportRead,
|
|
28
|
+
GenerateProjectRequest,
|
|
31
29
|
GenerationBatch,
|
|
32
30
|
GenerationBatchRead,
|
|
33
|
-
GenerationList,
|
|
34
|
-
GenerationListRead,
|
|
35
|
-
GenerationSummary,
|
|
36
|
-
GenerationSummaryRead,
|
|
37
31
|
Project,
|
|
38
32
|
ProjectId,
|
|
39
33
|
ProjectList,
|
|
@@ -41,9 +35,6 @@ import type {
|
|
|
41
35
|
ProjectRead,
|
|
42
36
|
ProjectSummary,
|
|
43
37
|
ProjectSummaryRead,
|
|
44
|
-
RepositoryIntegrationHealth,
|
|
45
|
-
RepositoryIntegrationHealthRead,
|
|
46
|
-
TargetId,
|
|
47
38
|
UpdateProjectRequest,
|
|
48
39
|
} from "../types.js";
|
|
49
40
|
|
|
@@ -72,6 +63,7 @@ export class ProjectsResource {
|
|
|
72
63
|
"401": UnauthorizedError,
|
|
73
64
|
"403": ForbiddenError,
|
|
74
65
|
"429": RateLimitedError,
|
|
66
|
+
"500": InternalServerError,
|
|
75
67
|
},
|
|
76
68
|
idempotent: true,
|
|
77
69
|
schemaKey: "projects.list",
|
|
@@ -89,10 +81,12 @@ export class ProjectsResource {
|
|
|
89
81
|
/**
|
|
90
82
|
* Create a project
|
|
91
83
|
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
84
|
+
* Creates a Project from a URL or GitHub Spec.
|
|
85
|
+
* Automatic generation is enabled by default for a saved Project.
|
|
86
|
+
*
|
|
87
|
+
* Free includes one saved Project, all selected Targets, and the first 25 operations per Target,
|
|
88
|
+
* with regeneration, history, delivery pull requests, and previews. Pro supports additional
|
|
89
|
+
* Projects and all operations. One-shot generation does not use a Project slot.
|
|
96
90
|
*
|
|
97
91
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
98
92
|
* `POST /projects`
|
|
@@ -101,8 +95,8 @@ export class ProjectsResource {
|
|
|
101
95
|
body: CreateProjectRequest,
|
|
102
96
|
params?: ProjectsCreateParams,
|
|
103
97
|
options?: RequestOptions,
|
|
104
|
-
): Promise<
|
|
105
|
-
return this._core.
|
|
98
|
+
): Promise<ProjectRead> {
|
|
99
|
+
return this._core.requestData<ProjectRead, ProjectsCreateError>({
|
|
106
100
|
method: "POST",
|
|
107
101
|
path: "/projects",
|
|
108
102
|
security: [{"apiKey":[]}],
|
|
@@ -127,16 +121,14 @@ export class ProjectsResource {
|
|
|
127
121
|
}
|
|
128
122
|
|
|
129
123
|
/**
|
|
130
|
-
*
|
|
124
|
+
* Get a project
|
|
131
125
|
*
|
|
132
|
-
* Returns Project
|
|
126
|
+
* Returns the Project's settings and Spec ID. List its Targets separately to retrieve Target
|
|
127
|
+
* configuration and Deliveries.
|
|
133
128
|
* `GET /projects/{project_id}`
|
|
134
129
|
*/
|
|
135
|
-
async
|
|
136
|
-
|
|
137
|
-
options?: RequestOptions,
|
|
138
|
-
): Promise<ApiResult<ProjectRead, ProjectsRetrieveError>> {
|
|
139
|
-
return this._core.request<ProjectRead, ProjectsRetrieveError>({
|
|
130
|
+
async get(projectId: ProjectId, options?: RequestOptions): Promise<ProjectRead> {
|
|
131
|
+
return this._core.requestData<ProjectRead, ProjectsGetError>({
|
|
140
132
|
method: "GET",
|
|
141
133
|
path: `/projects/${encodeURIComponent(String(projectId))}`,
|
|
142
134
|
security: [{"apiKey":[]}],
|
|
@@ -145,30 +137,45 @@ export class ProjectsResource {
|
|
|
145
137
|
"403": ForbiddenError,
|
|
146
138
|
"404": NotFoundError,
|
|
147
139
|
"429": RateLimitedError,
|
|
140
|
+
"500": InternalServerError,
|
|
148
141
|
},
|
|
149
142
|
idempotent: true,
|
|
150
|
-
schemaKey: "projects.
|
|
143
|
+
schemaKey: "projects.get",
|
|
151
144
|
options,
|
|
152
145
|
});
|
|
153
146
|
}
|
|
154
147
|
|
|
155
148
|
/**
|
|
156
149
|
* Delete a project
|
|
150
|
+
*
|
|
151
|
+
* A `502` response means the Project was not deleted because its release pull requests could not
|
|
152
|
+
* be retired. Retry deletion to finish retiring the remaining reviews. Repeating a completed
|
|
153
|
+
* deletion returns `404`.
|
|
154
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
155
|
+
* and If-Match.
|
|
157
156
|
* `DELETE /projects/{project_id}`
|
|
158
157
|
*/
|
|
159
158
|
async delete(
|
|
160
159
|
projectId: ProjectId,
|
|
160
|
+
params?: ProjectsDeleteParams,
|
|
161
161
|
options?: RequestOptions,
|
|
162
|
-
): Promise<
|
|
163
|
-
return this._core.
|
|
162
|
+
): Promise<DeletedProjectRead> {
|
|
163
|
+
return this._core.requestData<DeletedProjectRead, ProjectsDeleteError>({
|
|
164
164
|
method: "DELETE",
|
|
165
165
|
path: `/projects/${encodeURIComponent(String(projectId))}`,
|
|
166
166
|
security: [{"apiKey":[]}],
|
|
167
|
+
headers: {
|
|
168
|
+
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
169
|
+
},
|
|
167
170
|
errors: {
|
|
171
|
+
"400": BadRequestError,
|
|
168
172
|
"401": UnauthorizedError,
|
|
169
173
|
"403": ForbiddenError,
|
|
170
174
|
"404": NotFoundError,
|
|
175
|
+
"412": PreconditionFailedError,
|
|
171
176
|
"429": RateLimitedError,
|
|
177
|
+
"500": InternalServerError,
|
|
178
|
+
"502": BadGatewayError,
|
|
172
179
|
},
|
|
173
180
|
idempotent: true,
|
|
174
181
|
schemaKey: "projects.delete",
|
|
@@ -178,17 +185,36 @@ export class ProjectsResource {
|
|
|
178
185
|
|
|
179
186
|
/**
|
|
180
187
|
* Update a project
|
|
188
|
+
*
|
|
189
|
+
* Omitted fields keep their current values. A supplied config replaces the entire stored object;
|
|
190
|
+
* null or an empty object clears it.
|
|
191
|
+
* With auto_generate enabled, changing shared config queues a Generation for each Target whose
|
|
192
|
+
* effective config changes. A queued or running Target reuses that Generation.
|
|
193
|
+
* Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag
|
|
194
|
+
* returns 412 precondition_failed without saving.
|
|
195
|
+
*
|
|
196
|
+
* A `409 target_busy` means a Target is publishing. Retrieve the Project, wait for publishing to
|
|
197
|
+
* finish, reconcile your update, and retry.
|
|
198
|
+
* A `502` response means the Project was saved, but an obsolete release pull request could not be
|
|
199
|
+
* retired. Retrieve the Project and retry the same update to finish retiring reviews if that
|
|
200
|
+
* update is still desired.
|
|
201
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
202
|
+
* and If-Match.
|
|
181
203
|
* `PATCH /projects/{project_id}`
|
|
182
204
|
*/
|
|
183
205
|
async update(
|
|
184
206
|
projectId: ProjectId,
|
|
185
207
|
body: UpdateProjectRequest,
|
|
208
|
+
params?: ProjectsUpdateParams,
|
|
186
209
|
options?: RequestOptions,
|
|
187
|
-
): Promise<
|
|
188
|
-
return this._core.
|
|
210
|
+
): Promise<ProjectRead> {
|
|
211
|
+
return this._core.requestData<ProjectRead, ProjectsUpdateError>({
|
|
189
212
|
method: "PATCH",
|
|
190
213
|
path: `/projects/${encodeURIComponent(String(projectId))}`,
|
|
191
214
|
security: [{"apiKey":[]}],
|
|
215
|
+
headers: {
|
|
216
|
+
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
217
|
+
},
|
|
192
218
|
body,
|
|
193
219
|
errors: {
|
|
194
220
|
"400": BadRequestError,
|
|
@@ -197,8 +223,10 @@ export class ProjectsResource {
|
|
|
197
223
|
"403": ForbiddenError,
|
|
198
224
|
"404": NotFoundError,
|
|
199
225
|
"409": ConflictError,
|
|
226
|
+
"412": PreconditionFailedError,
|
|
200
227
|
"422": UnprocessableEntityError,
|
|
201
228
|
"429": RateLimitedError,
|
|
229
|
+
"500": InternalServerError,
|
|
202
230
|
"502": BadGatewayError,
|
|
203
231
|
},
|
|
204
232
|
schemaKey: "projects.update",
|
|
@@ -207,212 +235,48 @@ export class ProjectsResource {
|
|
|
207
235
|
}
|
|
208
236
|
|
|
209
237
|
/**
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
* Runs deterministic OpenAPI or GraphQL authorship checks against the latest observed immutable
|
|
213
|
-
* Definition Revision after applying the Definition's existing patches. Diagnostics group every
|
|
214
|
-
* affected location under a stable rule. Exact patches are included only when Typeship can derive
|
|
215
|
-
* the change without inventing API behavior.
|
|
216
|
-
* `GET /projects/{project_id}/diagnostics`
|
|
217
|
-
*/
|
|
218
|
-
async retrieveDiagnostics(
|
|
219
|
-
projectId: ProjectId,
|
|
220
|
-
options?: RequestOptions,
|
|
221
|
-
): Promise<ApiResult<DiagnosticReportRead, ProjectsRetrieveDiagnosticsError>> {
|
|
222
|
-
return this._core.request<DiagnosticReportRead, ProjectsRetrieveDiagnosticsError>({
|
|
223
|
-
method: "GET",
|
|
224
|
-
path: `/projects/${encodeURIComponent(String(projectId))}/diagnostics`,
|
|
225
|
-
security: [{"apiKey":[]}],
|
|
226
|
-
errors: {
|
|
227
|
-
"401": UnauthorizedError,
|
|
228
|
-
"403": ForbiddenError,
|
|
229
|
-
"404": NotFoundError,
|
|
230
|
-
"429": RateLimitedError,
|
|
231
|
-
},
|
|
232
|
-
idempotent: true,
|
|
233
|
-
schemaKey: "projects.retrieveDiagnostics",
|
|
234
|
-
options,
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* Refresh a project's Diagnostics from its configured source
|
|
238
|
+
* Start generation for active Targets
|
|
240
239
|
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
* A
|
|
246
|
-
*
|
|
247
|
-
*/
|
|
248
|
-
async refreshDiagnostics(
|
|
249
|
-
projectId: ProjectId,
|
|
250
|
-
params?: ProjectsRefreshDiagnosticsParams,
|
|
251
|
-
options?: RequestOptions,
|
|
252
|
-
): Promise<ApiResult<DiagnosticReportRead, ProjectsRefreshDiagnosticsError>> {
|
|
253
|
-
return this._core.request<DiagnosticReportRead, ProjectsRefreshDiagnosticsError>({
|
|
254
|
-
method: "POST",
|
|
255
|
-
path: `/projects/${encodeURIComponent(String(projectId))}/diagnostics`,
|
|
256
|
-
security: [{"apiKey":[]}],
|
|
257
|
-
headers: {
|
|
258
|
-
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
259
|
-
},
|
|
260
|
-
errors: {
|
|
261
|
-
"401": UnauthorizedError,
|
|
262
|
-
"403": ForbiddenError,
|
|
263
|
-
"404": NotFoundError,
|
|
264
|
-
"409": ConflictError,
|
|
265
|
-
"422": UnprocessableEntityError,
|
|
266
|
-
"429": RateLimitedError,
|
|
267
|
-
},
|
|
268
|
-
idempotencyKey: "Idempotency-Key",
|
|
269
|
-
schemaKey: "projects.refreshDiagnostics",
|
|
270
|
-
options,
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Apply exact, reviewed diagnostic remediations
|
|
276
|
-
*
|
|
277
|
-
* Applies only deterministic patches. Repository sources receive an updateable source pull
|
|
278
|
-
* request; URL sources receive project overlays. Diagnostics that require API-owner intent return
|
|
279
|
-
* 422 and include an authoring_brief in the Diagnostic instead.
|
|
280
|
-
*
|
|
281
|
-
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
282
|
-
* `POST /projects/{project_id}/diagnostics/remediations`
|
|
283
|
-
*/
|
|
284
|
-
async remediateDiagnostics(
|
|
285
|
-
projectId: ProjectId,
|
|
286
|
-
body: DiagnosticRemediationRequest,
|
|
287
|
-
params?: ProjectsRemediateDiagnosticsParams,
|
|
288
|
-
options?: RequestOptions,
|
|
289
|
-
): Promise<ApiResult<DiagnosticRemediationRead, ProjectsRemediateDiagnosticsError>> {
|
|
290
|
-
return this._core.request<DiagnosticRemediationRead, ProjectsRemediateDiagnosticsError>({
|
|
291
|
-
method: "POST",
|
|
292
|
-
path: `/projects/${encodeURIComponent(String(projectId))}/diagnostics/remediations`,
|
|
293
|
-
security: [{"apiKey":[]}],
|
|
294
|
-
headers: {
|
|
295
|
-
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
296
|
-
},
|
|
297
|
-
body,
|
|
298
|
-
errors: {
|
|
299
|
-
"400": BadRequestError,
|
|
300
|
-
"401": UnauthorizedError,
|
|
301
|
-
"403": ForbiddenError,
|
|
302
|
-
"404": NotFoundError,
|
|
303
|
-
"409": ConflictError,
|
|
304
|
-
"422": UnprocessableEntityError,
|
|
305
|
-
"429": RateLimitedError,
|
|
306
|
-
},
|
|
307
|
-
idempotencyKey: "Idempotency-Key",
|
|
308
|
-
schemaKey: "projects.remediateDiagnostics",
|
|
309
|
-
options,
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
* Diagnose a project's repository integrations
|
|
315
|
-
*
|
|
316
|
-
* Returns provider-neutral, machine-actionable source and destination access, Definition
|
|
317
|
-
* readability, source-approval label setup, required status names, and the latest durable webhook
|
|
318
|
-
* delivery. The Console renders this same result.
|
|
319
|
-
* `GET /projects/{project_id}/integration-health`
|
|
320
|
-
*/
|
|
321
|
-
async retrieveIntegrationHealth(
|
|
322
|
-
projectId: ProjectId,
|
|
323
|
-
options?: RequestOptions,
|
|
324
|
-
): Promise<ApiResult<RepositoryIntegrationHealthRead, ProjectsRetrieveIntegrationHealthError>> {
|
|
325
|
-
return this._core.request<RepositoryIntegrationHealthRead, ProjectsRetrieveIntegrationHealthError>({
|
|
326
|
-
method: "GET",
|
|
327
|
-
path: `/projects/${encodeURIComponent(String(projectId))}/integration-health`,
|
|
328
|
-
security: [{"apiKey":[]}],
|
|
329
|
-
errors: {
|
|
330
|
-
"401": UnauthorizedError,
|
|
331
|
-
"403": ForbiddenError,
|
|
332
|
-
"404": NotFoundError,
|
|
333
|
-
"429": RateLimitedError,
|
|
334
|
-
},
|
|
335
|
-
idempotent: true,
|
|
336
|
-
schemaKey: "projects.retrieveIntegrationHealth",
|
|
337
|
-
options,
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* List a project's generations
|
|
343
|
-
*
|
|
344
|
-
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
345
|
-
* `GET /projects/{project_id}/generations`
|
|
346
|
-
*/
|
|
347
|
-
listGenerations(
|
|
348
|
-
projectId: ProjectId,
|
|
349
|
-
params?: ProjectsListGenerationsParams,
|
|
350
|
-
options?: RequestOptions,
|
|
351
|
-
): PagePromise<GenerationSummaryRead, ProjectsListGenerationsError> {
|
|
352
|
-
return paginate<GenerationSummaryRead, ProjectsListGenerationsError>(this._core, {
|
|
353
|
-
method: "GET",
|
|
354
|
-
path: `/projects/${encodeURIComponent(String(projectId))}/generations`,
|
|
355
|
-
security: [{"apiKey":[]}],
|
|
356
|
-
query: {
|
|
357
|
-
limit: params?.limit,
|
|
358
|
-
cursor: params?.cursor,
|
|
359
|
-
target_id: params?.targetId,
|
|
360
|
-
},
|
|
361
|
-
errors: {
|
|
362
|
-
"400": BadRequestError,
|
|
363
|
-
"401": UnauthorizedError,
|
|
364
|
-
"403": ForbiddenError,
|
|
365
|
-
"404": NotFoundError,
|
|
366
|
-
"429": RateLimitedError,
|
|
367
|
-
},
|
|
368
|
-
idempotent: true,
|
|
369
|
-
schemaKey: "projects.listGenerations",
|
|
370
|
-
options,
|
|
371
|
-
}, {
|
|
372
|
-
style: "cursor",
|
|
373
|
-
itemsField: "data",
|
|
374
|
-
cursorParam: "cursor",
|
|
375
|
-
nextCursorField: "next_cursor",
|
|
376
|
-
hasMoreField: "has_more",
|
|
377
|
-
limitParam: "limit",
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
* Generate targets and open pull requests
|
|
240
|
+
* Queues one Generation per active Target and returns their IDs. Retrieve each Generation until
|
|
241
|
+
* its status moves from `queued` to `running` and then `completed` or `failed`. `completed` means
|
|
242
|
+
* generated files are saved; check Delivery and Draft status separately for repository delivery
|
|
243
|
+
* and pull requests. A Target already queued or running is returned without starting another
|
|
244
|
+
* Generation. A matching Idempotency-Key replay returns the same Generations with their current
|
|
245
|
+
* statuses.
|
|
383
246
|
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
* When the complete generated tree already matches a destination, no
|
|
388
|
-
* commit, branch, or pull request is created and that generation reports
|
|
389
|
-
* `pr_status: no_changes`. This is the same pipeline automatic
|
|
390
|
-
* regeneration runs after a source change.
|
|
247
|
+
* If the package already matches a destination and no Draft is open, delivery creates no commit,
|
|
248
|
+
* branch, or pull request. An existing Draft stays open. Automatic generation uses the same
|
|
249
|
+
* workflow.
|
|
391
250
|
*
|
|
392
251
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
393
|
-
* `POST /projects/{project_id}/
|
|
252
|
+
* `POST /projects/{project_id}/generate`
|
|
394
253
|
*/
|
|
395
254
|
async generate(
|
|
396
255
|
projectId: ProjectId,
|
|
256
|
+
body?: GenerateProjectRequest,
|
|
397
257
|
params?: ProjectsGenerateParams,
|
|
398
258
|
options?: RequestOptions,
|
|
399
|
-
): Promise<
|
|
400
|
-
return this._core.
|
|
259
|
+
): Promise<GenerationBatchRead> {
|
|
260
|
+
return this._core.requestData<GenerationBatchRead, ProjectsGenerateError>({
|
|
401
261
|
method: "POST",
|
|
402
|
-
path: `/projects/${encodeURIComponent(String(projectId))}/
|
|
262
|
+
path: `/projects/${encodeURIComponent(String(projectId))}/generate`,
|
|
403
263
|
security: [{"apiKey":[]}],
|
|
404
264
|
headers: {
|
|
405
265
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
406
266
|
},
|
|
267
|
+
body,
|
|
407
268
|
errors: {
|
|
269
|
+
"400": BadRequestError,
|
|
408
270
|
"401": UnauthorizedError,
|
|
409
271
|
"402": PaymentRequiredError,
|
|
410
272
|
"403": ForbiddenError,
|
|
411
273
|
"404": NotFoundError,
|
|
412
274
|
"409": ConflictError,
|
|
275
|
+
"413": PayloadTooLargeError,
|
|
413
276
|
"422": UnprocessableEntityError,
|
|
414
277
|
"429": RateLimitedError,
|
|
415
278
|
"500": InternalServerError,
|
|
279
|
+
"502": BadGatewayError,
|
|
416
280
|
},
|
|
417
281
|
idempotencyKey: "Idempotency-Key",
|
|
418
282
|
schemaKey: "projects.generate",
|
|
@@ -422,21 +286,29 @@ export class ProjectsResource {
|
|
|
422
286
|
}
|
|
423
287
|
|
|
424
288
|
export interface ProjectsListParams {
|
|
425
|
-
/**
|
|
289
|
+
/**
|
|
290
|
+
* Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
|
|
291
|
+
* representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
|
|
292
|
+
* invalid_request. List query parameters must appear only once; unrecognized parameters also
|
|
293
|
+
* return 400.
|
|
294
|
+
*/
|
|
426
295
|
limit?: number;
|
|
427
296
|
/**
|
|
428
|
-
* Opaque cursor from the preceding page's next_cursor. Valid only for the same
|
|
429
|
-
* operation, filters, and ordering that issued it.
|
|
297
|
+
* Opaque cursor from the preceding page's next_cursor. Valid only for the same organization,
|
|
298
|
+
* operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
|
|
299
|
+
* malformed, or repeated cursors return 400 invalid_request. The page limit may change between
|
|
300
|
+
* requests.
|
|
430
301
|
*/
|
|
431
302
|
cursor?: string;
|
|
432
303
|
}
|
|
433
304
|
|
|
434
|
-
/**
|
|
305
|
+
/** Typed errors `list` can throw. */
|
|
435
306
|
export type ProjectsListError =
|
|
436
307
|
| BadRequestError
|
|
437
308
|
| UnauthorizedError
|
|
438
309
|
| ForbiddenError
|
|
439
310
|
| RateLimitedError
|
|
311
|
+
| InternalServerError
|
|
440
312
|
| UnexpectedApiError
|
|
441
313
|
| ResponseParseError
|
|
442
314
|
| TransportError
|
|
@@ -444,15 +316,15 @@ export type ProjectsListError =
|
|
|
444
316
|
|
|
445
317
|
export interface ProjectsCreateParams {
|
|
446
318
|
/**
|
|
447
|
-
* Identifies one logical write for 24 hours. The key is scoped to the authenticated
|
|
448
|
-
* operation;
|
|
449
|
-
* path, query, and JSON body replays the original response. Reusing
|
|
450
|
-
* returns 409. After expiry the key starts a new write.
|
|
319
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
|
|
320
|
+
* and operation; generation without an organization uses a hashed network identity. Retrying the
|
|
321
|
+
* same method, path, query, If-Match header, and JSON body replays the original response. Reusing
|
|
322
|
+
* the key with changed intent returns 409. After expiry the key starts a new write.
|
|
451
323
|
*/
|
|
452
324
|
idempotencyKey?: string;
|
|
453
325
|
}
|
|
454
326
|
|
|
455
|
-
/**
|
|
327
|
+
/** Typed errors `create` can throw. */
|
|
456
328
|
export type ProjectsCreateError =
|
|
457
329
|
| BadRequestError
|
|
458
330
|
| UnauthorizedError
|
|
@@ -467,132 +339,64 @@ export type ProjectsCreateError =
|
|
|
467
339
|
| TransportError
|
|
468
340
|
| ValidationError;
|
|
469
341
|
|
|
470
|
-
/**
|
|
471
|
-
export type
|
|
472
|
-
| UnauthorizedError
|
|
473
|
-
| ForbiddenError
|
|
474
|
-
| NotFoundError
|
|
475
|
-
| RateLimitedError
|
|
476
|
-
| UnexpectedApiError
|
|
477
|
-
| ResponseParseError
|
|
478
|
-
| TransportError
|
|
479
|
-
| ValidationError;
|
|
480
|
-
|
|
481
|
-
/** Every error `delete` can produce, as a discriminated union. */
|
|
482
|
-
export type ProjectsDeleteError =
|
|
483
|
-
| UnauthorizedError
|
|
484
|
-
| ForbiddenError
|
|
485
|
-
| NotFoundError
|
|
486
|
-
| RateLimitedError
|
|
487
|
-
| UnexpectedApiError
|
|
488
|
-
| ResponseParseError
|
|
489
|
-
| TransportError
|
|
490
|
-
| ValidationError;
|
|
491
|
-
|
|
492
|
-
/** Every error `update` can produce, as a discriminated union. */
|
|
493
|
-
export type ProjectsUpdateError =
|
|
494
|
-
| BadRequestError
|
|
495
|
-
| UnauthorizedError
|
|
496
|
-
| PaymentRequiredError
|
|
497
|
-
| ForbiddenError
|
|
498
|
-
| NotFoundError
|
|
499
|
-
| ConflictError
|
|
500
|
-
| UnprocessableEntityError
|
|
501
|
-
| RateLimitedError
|
|
502
|
-
| BadGatewayError
|
|
503
|
-
| UnexpectedApiError
|
|
504
|
-
| ResponseParseError
|
|
505
|
-
| TransportError
|
|
506
|
-
| ValidationError;
|
|
507
|
-
|
|
508
|
-
/** Every error `retrieveDiagnostics` can produce, as a discriminated union. */
|
|
509
|
-
export type ProjectsRetrieveDiagnosticsError =
|
|
342
|
+
/** Typed errors `get` can throw. */
|
|
343
|
+
export type ProjectsGetError =
|
|
510
344
|
| UnauthorizedError
|
|
511
345
|
| ForbiddenError
|
|
512
346
|
| NotFoundError
|
|
513
347
|
| RateLimitedError
|
|
348
|
+
| InternalServerError
|
|
514
349
|
| UnexpectedApiError
|
|
515
350
|
| ResponseParseError
|
|
516
351
|
| TransportError
|
|
517
352
|
| ValidationError;
|
|
518
353
|
|
|
519
|
-
export interface
|
|
354
|
+
export interface ProjectsDeleteParams {
|
|
520
355
|
/**
|
|
521
|
-
*
|
|
522
|
-
*
|
|
523
|
-
*
|
|
524
|
-
* returns 409. After expiry the key starts a new write.
|
|
356
|
+
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
357
|
+
* otherwise it returns 412 precondition_failed without changes. Omit to write the current
|
|
358
|
+
* version. See https://typeship.dev/docs/typeship-api#conditional-writes.
|
|
525
359
|
*/
|
|
526
|
-
|
|
360
|
+
ifMatch?: string;
|
|
527
361
|
}
|
|
528
362
|
|
|
529
|
-
/**
|
|
530
|
-
export type
|
|
363
|
+
/** Typed errors `delete` can throw. */
|
|
364
|
+
export type ProjectsDeleteError =
|
|
365
|
+
| BadRequestError
|
|
531
366
|
| UnauthorizedError
|
|
532
367
|
| ForbiddenError
|
|
533
368
|
| NotFoundError
|
|
534
|
-
|
|
|
535
|
-
| UnprocessableEntityError
|
|
369
|
+
| PreconditionFailedError
|
|
536
370
|
| RateLimitedError
|
|
371
|
+
| InternalServerError
|
|
372
|
+
| BadGatewayError
|
|
537
373
|
| UnexpectedApiError
|
|
538
374
|
| ResponseParseError
|
|
539
375
|
| TransportError
|
|
540
376
|
| ValidationError;
|
|
541
377
|
|
|
542
|
-
export interface
|
|
378
|
+
export interface ProjectsUpdateParams {
|
|
543
379
|
/**
|
|
544
|
-
*
|
|
545
|
-
*
|
|
546
|
-
*
|
|
547
|
-
* returns 409. After expiry the key starts a new write.
|
|
380
|
+
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
381
|
+
* otherwise it returns 412 precondition_failed without changes. Omit to write the current
|
|
382
|
+
* version. See https://typeship.dev/docs/typeship-api#conditional-writes.
|
|
548
383
|
*/
|
|
549
|
-
|
|
384
|
+
ifMatch?: string;
|
|
550
385
|
}
|
|
551
386
|
|
|
552
|
-
/**
|
|
553
|
-
export type
|
|
387
|
+
/** Typed errors `update` can throw. */
|
|
388
|
+
export type ProjectsUpdateError =
|
|
554
389
|
| BadRequestError
|
|
555
390
|
| UnauthorizedError
|
|
391
|
+
| PaymentRequiredError
|
|
556
392
|
| ForbiddenError
|
|
557
393
|
| NotFoundError
|
|
558
394
|
| ConflictError
|
|
395
|
+
| PreconditionFailedError
|
|
559
396
|
| UnprocessableEntityError
|
|
560
397
|
| RateLimitedError
|
|
561
|
-
|
|
|
562
|
-
|
|
|
563
|
-
| TransportError
|
|
564
|
-
| ValidationError;
|
|
565
|
-
|
|
566
|
-
/** Every error `retrieveIntegrationHealth` can produce, as a discriminated union. */
|
|
567
|
-
export type ProjectsRetrieveIntegrationHealthError =
|
|
568
|
-
| UnauthorizedError
|
|
569
|
-
| ForbiddenError
|
|
570
|
-
| NotFoundError
|
|
571
|
-
| RateLimitedError
|
|
572
|
-
| UnexpectedApiError
|
|
573
|
-
| ResponseParseError
|
|
574
|
-
| TransportError
|
|
575
|
-
| ValidationError;
|
|
576
|
-
|
|
577
|
-
export interface ProjectsListGenerationsParams {
|
|
578
|
-
/** Maximum number of resources to return. */
|
|
579
|
-
limit?: number;
|
|
580
|
-
/**
|
|
581
|
-
* Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
|
|
582
|
-
* operation, filters, and ordering that issued it.
|
|
583
|
-
*/
|
|
584
|
-
cursor?: string;
|
|
585
|
-
/** Only generations for this persisted Target. */
|
|
586
|
-
targetId?: TargetId;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
/** Every error `listGenerations` can produce, as a discriminated union. */
|
|
590
|
-
export type ProjectsListGenerationsError =
|
|
591
|
-
| BadRequestError
|
|
592
|
-
| UnauthorizedError
|
|
593
|
-
| ForbiddenError
|
|
594
|
-
| NotFoundError
|
|
595
|
-
| RateLimitedError
|
|
398
|
+
| InternalServerError
|
|
399
|
+
| BadGatewayError
|
|
596
400
|
| UnexpectedApiError
|
|
597
401
|
| ResponseParseError
|
|
598
402
|
| TransportError
|
|
@@ -600,24 +404,27 @@ export type ProjectsListGenerationsError =
|
|
|
600
404
|
|
|
601
405
|
export interface ProjectsGenerateParams {
|
|
602
406
|
/**
|
|
603
|
-
* Identifies one logical write for 24 hours. The key is scoped to the authenticated
|
|
604
|
-
* operation;
|
|
605
|
-
* path, query, and JSON body replays the original response. Reusing
|
|
606
|
-
* returns 409. After expiry the key starts a new write.
|
|
407
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
|
|
408
|
+
* and operation; generation without an organization uses a hashed network identity. Retrying the
|
|
409
|
+
* same method, path, query, If-Match header, and JSON body replays the original response. Reusing
|
|
410
|
+
* the key with changed intent returns 409. After expiry the key starts a new write.
|
|
607
411
|
*/
|
|
608
412
|
idempotencyKey?: string;
|
|
609
413
|
}
|
|
610
414
|
|
|
611
|
-
/**
|
|
415
|
+
/** Typed errors `generate` can throw. */
|
|
612
416
|
export type ProjectsGenerateError =
|
|
417
|
+
| BadRequestError
|
|
613
418
|
| UnauthorizedError
|
|
614
419
|
| PaymentRequiredError
|
|
615
420
|
| ForbiddenError
|
|
616
421
|
| NotFoundError
|
|
617
422
|
| ConflictError
|
|
423
|
+
| PayloadTooLargeError
|
|
618
424
|
| UnprocessableEntityError
|
|
619
425
|
| RateLimitedError
|
|
620
426
|
| InternalServerError
|
|
427
|
+
| BadGatewayError
|
|
621
428
|
| UnexpectedApiError
|
|
622
429
|
| ResponseParseError
|
|
623
430
|
| TransportError
|