@typeship-ax/mcp 0.19.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 +3 -3
- package/README.md +1 -1
- package/api.json +7440 -6316
- package/api.md +7856 -6638
- package/dist/api-identity.d.ts.map +1 -1
- package/dist/api-identity.js +6 -1
- package/dist/core/http.d.ts +26 -14
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +90 -19
- 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 +4 -4
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +7 -7
- package/dist/index.d.ts +33 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +37 -17
- package/dist/mcp-protocol.js +2 -2
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +6 -5
- package/dist/ops.d.ts +1 -1
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +39 -42
- package/dist/resources/api-keys.d.ts +10 -10
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +6 -6
- 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 +14 -14
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +7 -7
- package/dist/resources/generations.d.ts +65 -21
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +67 -20
- package/dist/resources/organization.d.ts +18 -0
- package/dist/resources/organization.d.ts.map +1 -0
- package/dist/resources/{account.js → organization.js} +10 -10
- package/dist/resources/projects.d.ts +36 -126
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +21 -171
- 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 +42 -262
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +28 -407
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +143 -149
- package/dist/types.d.ts +1281 -1611
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +44 -49
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/api-identity.ts +6 -2
- package/src/core/http.ts +89 -24
- package/src/core/pagination.ts +13 -23
- package/src/errors.ts +7 -7
- package/src/index.ts +41 -23
- package/src/mcp-protocol.ts +2 -2
- package/src/mcp.ts +7 -6
- package/src/ops.ts +40 -43
- package/src/resources/api-keys.ts +13 -16
- 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 +16 -19
- package/src/resources/generations.ts +146 -35
- package/src/resources/{account.ts → organization.ts} +14 -14
- package/src/resources/projects.ts +42 -337
- 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 +57 -760
- package/src/schemas.ts +143 -149
- package/src/types.ts +1357 -1692
- package/dist/resources/account.d.ts +0 -18
- package/dist/resources/account.d.ts.map +0 -1
- package/dist/resources/definition-revisions.d.ts +0 -75
- package/dist/resources/definition-revisions.d.ts.map +0 -1
- package/dist/resources/definition-revisions.js +0 -142
- package/dist/resources/definitions.d.ts +0 -50
- package/dist/resources/definitions.d.ts.map +0 -1
- package/dist/resources/definitions.js +0 -73
- package/src/resources/definition-revisions.ts +0 -265
- package/src/resources/definitions.ts +0 -146
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// typeship — projects resource.
|
|
2
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,
|
|
@@ -25,18 +25,9 @@ import type {
|
|
|
25
25
|
CreateProjectRequest,
|
|
26
26
|
DeletedProject,
|
|
27
27
|
DeletedProjectRead,
|
|
28
|
-
DiagnosticRemediation,
|
|
29
|
-
DiagnosticRemediationRead,
|
|
30
|
-
DiagnosticRemediationRequest,
|
|
31
|
-
DiagnosticReport,
|
|
32
|
-
DiagnosticReportRead,
|
|
33
28
|
GenerateProjectRequest,
|
|
34
29
|
GenerationBatch,
|
|
35
30
|
GenerationBatchRead,
|
|
36
|
-
GenerationList,
|
|
37
|
-
GenerationListRead,
|
|
38
|
-
GenerationSummary,
|
|
39
|
-
GenerationSummaryRead,
|
|
40
31
|
Project,
|
|
41
32
|
ProjectId,
|
|
42
33
|
ProjectList,
|
|
@@ -44,9 +35,6 @@ import type {
|
|
|
44
35
|
ProjectRead,
|
|
45
36
|
ProjectSummary,
|
|
46
37
|
ProjectSummaryRead,
|
|
47
|
-
RepositoryIntegrationHealth,
|
|
48
|
-
RepositoryIntegrationHealthRead,
|
|
49
|
-
TargetId,
|
|
50
38
|
UpdateProjectRequest,
|
|
51
39
|
} from "../types.js";
|
|
52
40
|
|
|
@@ -93,7 +81,8 @@ export class ProjectsResource {
|
|
|
93
81
|
/**
|
|
94
82
|
* Create a project
|
|
95
83
|
*
|
|
96
|
-
* Creates a Project from a URL or GitHub
|
|
84
|
+
* Creates a Project from a URL or GitHub Spec.
|
|
85
|
+
* Automatic generation is enabled by default for a saved Project.
|
|
97
86
|
*
|
|
98
87
|
* Free includes one saved Project, all selected Targets, and the first 25 operations per Target,
|
|
99
88
|
* with regeneration, history, delivery pull requests, and previews. Pro supports additional
|
|
@@ -106,8 +95,8 @@ export class ProjectsResource {
|
|
|
106
95
|
body: CreateProjectRequest,
|
|
107
96
|
params?: ProjectsCreateParams,
|
|
108
97
|
options?: RequestOptions,
|
|
109
|
-
): Promise<
|
|
110
|
-
return this._core.
|
|
98
|
+
): Promise<ProjectRead> {
|
|
99
|
+
return this._core.requestData<ProjectRead, ProjectsCreateError>({
|
|
111
100
|
method: "POST",
|
|
112
101
|
path: "/projects",
|
|
113
102
|
security: [{"apiKey":[]}],
|
|
@@ -132,17 +121,14 @@ export class ProjectsResource {
|
|
|
132
121
|
}
|
|
133
122
|
|
|
134
123
|
/**
|
|
135
|
-
*
|
|
124
|
+
* Get a project
|
|
136
125
|
*
|
|
137
|
-
* Returns the Project's settings and
|
|
138
|
-
*
|
|
126
|
+
* Returns the Project's settings and Spec ID. List its Targets separately to retrieve Target
|
|
127
|
+
* configuration and Deliveries.
|
|
139
128
|
* `GET /projects/{project_id}`
|
|
140
129
|
*/
|
|
141
|
-
async
|
|
142
|
-
|
|
143
|
-
options?: RequestOptions,
|
|
144
|
-
): Promise<ApiResult<ProjectRead, ProjectsRetrieveError>> {
|
|
145
|
-
return this._core.request<ProjectRead, ProjectsRetrieveError>({
|
|
130
|
+
async get(projectId: ProjectId, options?: RequestOptions): Promise<ProjectRead> {
|
|
131
|
+
return this._core.requestData<ProjectRead, ProjectsGetError>({
|
|
146
132
|
method: "GET",
|
|
147
133
|
path: `/projects/${encodeURIComponent(String(projectId))}`,
|
|
148
134
|
security: [{"apiKey":[]}],
|
|
@@ -154,7 +140,7 @@ export class ProjectsResource {
|
|
|
154
140
|
"500": InternalServerError,
|
|
155
141
|
},
|
|
156
142
|
idempotent: true,
|
|
157
|
-
schemaKey: "projects.
|
|
143
|
+
schemaKey: "projects.get",
|
|
158
144
|
options,
|
|
159
145
|
});
|
|
160
146
|
}
|
|
@@ -173,8 +159,8 @@ export class ProjectsResource {
|
|
|
173
159
|
projectId: ProjectId,
|
|
174
160
|
params?: ProjectsDeleteParams,
|
|
175
161
|
options?: RequestOptions,
|
|
176
|
-
): Promise<
|
|
177
|
-
return this._core.
|
|
162
|
+
): Promise<DeletedProjectRead> {
|
|
163
|
+
return this._core.requestData<DeletedProjectRead, ProjectsDeleteError>({
|
|
178
164
|
method: "DELETE",
|
|
179
165
|
path: `/projects/${encodeURIComponent(String(projectId))}`,
|
|
180
166
|
security: [{"apiKey":[]}],
|
|
@@ -202,10 +188,12 @@ export class ProjectsResource {
|
|
|
202
188
|
*
|
|
203
189
|
* Omitted fields keep their current values. A supplied config replaces the entire stored object;
|
|
204
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.
|
|
205
193
|
* Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag
|
|
206
194
|
* returns 412 precondition_failed without saving.
|
|
207
195
|
*
|
|
208
|
-
* A `409 target_busy` means a Target is publishing. Retrieve the Project, wait for
|
|
196
|
+
* A `409 target_busy` means a Target is publishing. Retrieve the Project, wait for publishing to
|
|
209
197
|
* finish, reconcile your update, and retry.
|
|
210
198
|
* A `502` response means the Project was saved, but an obsolete release pull request could not be
|
|
211
199
|
* retired. Retrieve the Project and retry the same update to finish retiring reviews if that
|
|
@@ -219,8 +207,8 @@ export class ProjectsResource {
|
|
|
219
207
|
body: UpdateProjectRequest,
|
|
220
208
|
params?: ProjectsUpdateParams,
|
|
221
209
|
options?: RequestOptions,
|
|
222
|
-
): Promise<
|
|
223
|
-
return this._core.
|
|
210
|
+
): Promise<ProjectRead> {
|
|
211
|
+
return this._core.requestData<ProjectRead, ProjectsUpdateError>({
|
|
224
212
|
method: "PATCH",
|
|
225
213
|
path: `/projects/${encodeURIComponent(String(projectId))}`,
|
|
226
214
|
security: [{"apiKey":[]}],
|
|
@@ -246,209 +234,32 @@ export class ProjectsResource {
|
|
|
246
234
|
});
|
|
247
235
|
}
|
|
248
236
|
|
|
249
|
-
/**
|
|
250
|
-
* Analyze a project's latest Definition Revision
|
|
251
|
-
*
|
|
252
|
-
* Checks the latest Definition Revision after applying its saved patches. Each finding groups
|
|
253
|
-
* affected locations under a stable rule ID. A suggested patch is included only when the
|
|
254
|
-
* Definition provides enough information to determine the correction.
|
|
255
|
-
* `GET /projects/{project_id}/diagnostics`
|
|
256
|
-
*/
|
|
257
|
-
async retrieveDiagnostics(
|
|
258
|
-
projectId: ProjectId,
|
|
259
|
-
options?: RequestOptions,
|
|
260
|
-
): Promise<ApiResult<DiagnosticReportRead, ProjectsRetrieveDiagnosticsError>> {
|
|
261
|
-
return this._core.request<DiagnosticReportRead, ProjectsRetrieveDiagnosticsError>({
|
|
262
|
-
method: "GET",
|
|
263
|
-
path: `/projects/${encodeURIComponent(String(projectId))}/diagnostics`,
|
|
264
|
-
security: [{"apiKey":[]}],
|
|
265
|
-
errors: {
|
|
266
|
-
"401": UnauthorizedError,
|
|
267
|
-
"403": ForbiddenError,
|
|
268
|
-
"404": NotFoundError,
|
|
269
|
-
"429": RateLimitedError,
|
|
270
|
-
"500": InternalServerError,
|
|
271
|
-
},
|
|
272
|
-
idempotent: true,
|
|
273
|
-
schemaKey: "projects.retrieveDiagnostics",
|
|
274
|
-
options,
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* Refresh a project's Diagnostics from its configured source
|
|
280
|
-
*
|
|
281
|
-
* Fetches the configured source and returns updated Diagnostics. Creates a Definition Revision
|
|
282
|
-
* only when the content changes. Does not generate Targets or use a metered generation.
|
|
283
|
-
*
|
|
284
|
-
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
285
|
-
* `POST /projects/{project_id}/diagnostics`
|
|
286
|
-
*/
|
|
287
|
-
async refreshDiagnostics(
|
|
288
|
-
projectId: ProjectId,
|
|
289
|
-
params?: ProjectsRefreshDiagnosticsParams,
|
|
290
|
-
options?: RequestOptions,
|
|
291
|
-
): Promise<ApiResult<DiagnosticReportRead, ProjectsRefreshDiagnosticsError>> {
|
|
292
|
-
return this._core.request<DiagnosticReportRead, ProjectsRefreshDiagnosticsError>({
|
|
293
|
-
method: "POST",
|
|
294
|
-
path: `/projects/${encodeURIComponent(String(projectId))}/diagnostics`,
|
|
295
|
-
security: [{"apiKey":[]}],
|
|
296
|
-
headers: {
|
|
297
|
-
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
298
|
-
},
|
|
299
|
-
errors: {
|
|
300
|
-
"400": BadRequestError,
|
|
301
|
-
"401": UnauthorizedError,
|
|
302
|
-
"403": ForbiddenError,
|
|
303
|
-
"404": NotFoundError,
|
|
304
|
-
"409": ConflictError,
|
|
305
|
-
"422": UnprocessableEntityError,
|
|
306
|
-
"429": RateLimitedError,
|
|
307
|
-
"500": InternalServerError,
|
|
308
|
-
},
|
|
309
|
-
idempotencyKey: "Idempotency-Key",
|
|
310
|
-
schemaKey: "projects.refreshDiagnostics",
|
|
311
|
-
options,
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
/**
|
|
316
|
-
* Apply exact, reviewed diagnostic remediations
|
|
317
|
-
*
|
|
318
|
-
* Applies reviewed patches from Diagnostics. For a repository source, opens or updates a source
|
|
319
|
-
* pull request. For a URL source, saves Definition patches.
|
|
320
|
-
*
|
|
321
|
-
* Findings that need an API-owner decision return `422`. Read the finding's `authoring_brief` and
|
|
322
|
-
* update the source instead.
|
|
323
|
-
*
|
|
324
|
-
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
325
|
-
* `POST /projects/{project_id}/diagnostics/remediations`
|
|
326
|
-
*/
|
|
327
|
-
async remediateDiagnostics(
|
|
328
|
-
projectId: ProjectId,
|
|
329
|
-
body: DiagnosticRemediationRequest,
|
|
330
|
-
params?: ProjectsRemediateDiagnosticsParams,
|
|
331
|
-
options?: RequestOptions,
|
|
332
|
-
): Promise<ApiResult<DiagnosticRemediationRead, ProjectsRemediateDiagnosticsError>> {
|
|
333
|
-
return this._core.request<DiagnosticRemediationRead, ProjectsRemediateDiagnosticsError>({
|
|
334
|
-
method: "POST",
|
|
335
|
-
path: `/projects/${encodeURIComponent(String(projectId))}/diagnostics/remediations`,
|
|
336
|
-
security: [{"apiKey":[]}],
|
|
337
|
-
headers: {
|
|
338
|
-
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
339
|
-
},
|
|
340
|
-
body,
|
|
341
|
-
errors: {
|
|
342
|
-
"400": BadRequestError,
|
|
343
|
-
"401": UnauthorizedError,
|
|
344
|
-
"403": ForbiddenError,
|
|
345
|
-
"404": NotFoundError,
|
|
346
|
-
"409": ConflictError,
|
|
347
|
-
"422": UnprocessableEntityError,
|
|
348
|
-
"429": RateLimitedError,
|
|
349
|
-
"500": InternalServerError,
|
|
350
|
-
},
|
|
351
|
-
idempotencyKey: "Idempotency-Key",
|
|
352
|
-
schemaKey: "projects.remediateDiagnostics",
|
|
353
|
-
options,
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* Diagnose a project's repository integrations
|
|
359
|
-
*
|
|
360
|
-
* Checks repository access, Definition readability, source-approval labels, and required checks.
|
|
361
|
-
* Includes the latest webhook delivery so you can investigate missing updates.
|
|
362
|
-
* `GET /projects/{project_id}/integration-health`
|
|
363
|
-
*/
|
|
364
|
-
async retrieveIntegrationHealth(
|
|
365
|
-
projectId: ProjectId,
|
|
366
|
-
options?: RequestOptions,
|
|
367
|
-
): Promise<ApiResult<RepositoryIntegrationHealthRead, ProjectsRetrieveIntegrationHealthError>> {
|
|
368
|
-
return this._core.request<RepositoryIntegrationHealthRead, ProjectsRetrieveIntegrationHealthError>({
|
|
369
|
-
method: "GET",
|
|
370
|
-
path: `/projects/${encodeURIComponent(String(projectId))}/integration-health`,
|
|
371
|
-
security: [{"apiKey":[]}],
|
|
372
|
-
errors: {
|
|
373
|
-
"401": UnauthorizedError,
|
|
374
|
-
"403": ForbiddenError,
|
|
375
|
-
"404": NotFoundError,
|
|
376
|
-
"429": RateLimitedError,
|
|
377
|
-
"500": InternalServerError,
|
|
378
|
-
},
|
|
379
|
-
idempotent: true,
|
|
380
|
-
schemaKey: "projects.retrieveIntegrationHealth",
|
|
381
|
-
options,
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* List a project's generations
|
|
387
|
-
*
|
|
388
|
-
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
389
|
-
* `GET /projects/{project_id}/generations`
|
|
390
|
-
*/
|
|
391
|
-
listGenerations(
|
|
392
|
-
projectId: ProjectId,
|
|
393
|
-
params?: ProjectsListGenerationsParams,
|
|
394
|
-
options?: RequestOptions,
|
|
395
|
-
): PagePromise<GenerationSummaryRead, ProjectsListGenerationsError> {
|
|
396
|
-
return paginate<GenerationSummaryRead, ProjectsListGenerationsError>(this._core, {
|
|
397
|
-
method: "GET",
|
|
398
|
-
path: `/projects/${encodeURIComponent(String(projectId))}/generations`,
|
|
399
|
-
security: [{"apiKey":[]}],
|
|
400
|
-
query: {
|
|
401
|
-
limit: params?.limit,
|
|
402
|
-
cursor: params?.cursor,
|
|
403
|
-
target_id: params?.targetId,
|
|
404
|
-
},
|
|
405
|
-
errors: {
|
|
406
|
-
"400": BadRequestError,
|
|
407
|
-
"401": UnauthorizedError,
|
|
408
|
-
"403": ForbiddenError,
|
|
409
|
-
"404": NotFoundError,
|
|
410
|
-
"429": RateLimitedError,
|
|
411
|
-
"500": InternalServerError,
|
|
412
|
-
},
|
|
413
|
-
idempotent: true,
|
|
414
|
-
schemaKey: "projects.listGenerations",
|
|
415
|
-
options,
|
|
416
|
-
}, {
|
|
417
|
-
style: "cursor",
|
|
418
|
-
itemsField: "data",
|
|
419
|
-
cursorParam: "cursor",
|
|
420
|
-
nextCursorField: "next_cursor",
|
|
421
|
-
hasMoreField: "has_more",
|
|
422
|
-
limitParam: "limit",
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
|
|
426
237
|
/**
|
|
427
238
|
* Start generation for active Targets
|
|
428
239
|
*
|
|
429
240
|
* Queues one Generation per active Target and returns their IDs. Retrieve each Generation until
|
|
430
|
-
* its status moves from `queued` to `running` and then `
|
|
241
|
+
* its status moves from `queued` to `running` and then `completed` or `failed`. `completed` means
|
|
431
242
|
* generated files are saved; check Delivery and Draft status separately for repository delivery
|
|
432
243
|
* and pull requests. A Target already queued or running is returned without starting another
|
|
433
244
|
* Generation. A matching Idempotency-Key replay returns the same Generations with their current
|
|
434
245
|
* statuses.
|
|
435
246
|
*
|
|
436
|
-
* If the package already matches a destination and no Draft is open, delivery
|
|
437
|
-
*
|
|
438
|
-
*
|
|
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.
|
|
439
250
|
*
|
|
440
251
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
441
|
-
* `POST /projects/{project_id}/
|
|
252
|
+
* `POST /projects/{project_id}/generate`
|
|
442
253
|
*/
|
|
443
254
|
async generate(
|
|
444
255
|
projectId: ProjectId,
|
|
445
256
|
body?: GenerateProjectRequest,
|
|
446
257
|
params?: ProjectsGenerateParams,
|
|
447
258
|
options?: RequestOptions,
|
|
448
|
-
): Promise<
|
|
449
|
-
return this._core.
|
|
259
|
+
): Promise<GenerationBatchRead> {
|
|
260
|
+
return this._core.requestData<GenerationBatchRead, ProjectsGenerateError>({
|
|
450
261
|
method: "POST",
|
|
451
|
-
path: `/projects/${encodeURIComponent(String(projectId))}/
|
|
262
|
+
path: `/projects/${encodeURIComponent(String(projectId))}/generate`,
|
|
452
263
|
security: [{"apiKey":[]}],
|
|
453
264
|
headers: {
|
|
454
265
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
@@ -483,7 +294,7 @@ export interface ProjectsListParams {
|
|
|
483
294
|
*/
|
|
484
295
|
limit?: number;
|
|
485
296
|
/**
|
|
486
|
-
* Opaque cursor from the preceding page's next_cursor. Valid only for the same
|
|
297
|
+
* Opaque cursor from the preceding page's next_cursor. Valid only for the same organization,
|
|
487
298
|
* operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
|
|
488
299
|
* malformed, or repeated cursors return 400 invalid_request. The page limit may change between
|
|
489
300
|
* requests.
|
|
@@ -491,7 +302,7 @@ export interface ProjectsListParams {
|
|
|
491
302
|
cursor?: string;
|
|
492
303
|
}
|
|
493
304
|
|
|
494
|
-
/**
|
|
305
|
+
/** Typed errors `list` can throw. */
|
|
495
306
|
export type ProjectsListError =
|
|
496
307
|
| BadRequestError
|
|
497
308
|
| UnauthorizedError
|
|
@@ -505,15 +316,15 @@ export type ProjectsListError =
|
|
|
505
316
|
|
|
506
317
|
export interface ProjectsCreateParams {
|
|
507
318
|
/**
|
|
508
|
-
* Identifies one logical write for 24 hours. The key is scoped to the authenticated
|
|
509
|
-
* operation;
|
|
510
|
-
* path, query, If-Match header, and JSON body replays the original response. Reusing
|
|
511
|
-
* changed intent 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.
|
|
512
323
|
*/
|
|
513
324
|
idempotencyKey?: string;
|
|
514
325
|
}
|
|
515
326
|
|
|
516
|
-
/**
|
|
327
|
+
/** Typed errors `create` can throw. */
|
|
517
328
|
export type ProjectsCreateError =
|
|
518
329
|
| BadRequestError
|
|
519
330
|
| UnauthorizedError
|
|
@@ -528,8 +339,8 @@ export type ProjectsCreateError =
|
|
|
528
339
|
| TransportError
|
|
529
340
|
| ValidationError;
|
|
530
341
|
|
|
531
|
-
/**
|
|
532
|
-
export type
|
|
342
|
+
/** Typed errors `get` can throw. */
|
|
343
|
+
export type ProjectsGetError =
|
|
533
344
|
| UnauthorizedError
|
|
534
345
|
| ForbiddenError
|
|
535
346
|
| NotFoundError
|
|
@@ -549,7 +360,7 @@ export interface ProjectsDeleteParams {
|
|
|
549
360
|
ifMatch?: string;
|
|
550
361
|
}
|
|
551
362
|
|
|
552
|
-
/**
|
|
363
|
+
/** Typed errors `delete` can throw. */
|
|
553
364
|
export type ProjectsDeleteError =
|
|
554
365
|
| BadRequestError
|
|
555
366
|
| UnauthorizedError
|
|
@@ -573,7 +384,7 @@ export interface ProjectsUpdateParams {
|
|
|
573
384
|
ifMatch?: string;
|
|
574
385
|
}
|
|
575
386
|
|
|
576
|
-
/**
|
|
387
|
+
/** Typed errors `update` can throw. */
|
|
577
388
|
export type ProjectsUpdateError =
|
|
578
389
|
| BadRequestError
|
|
579
390
|
| UnauthorizedError
|
|
@@ -591,123 +402,17 @@ export type ProjectsUpdateError =
|
|
|
591
402
|
| TransportError
|
|
592
403
|
| ValidationError;
|
|
593
404
|
|
|
594
|
-
/** Every error `retrieveDiagnostics` can produce, as a discriminated union. */
|
|
595
|
-
export type ProjectsRetrieveDiagnosticsError =
|
|
596
|
-
| UnauthorizedError
|
|
597
|
-
| ForbiddenError
|
|
598
|
-
| NotFoundError
|
|
599
|
-
| RateLimitedError
|
|
600
|
-
| InternalServerError
|
|
601
|
-
| UnexpectedApiError
|
|
602
|
-
| ResponseParseError
|
|
603
|
-
| TransportError
|
|
604
|
-
| ValidationError;
|
|
605
|
-
|
|
606
|
-
export interface ProjectsRefreshDiagnosticsParams {
|
|
607
|
-
/**
|
|
608
|
-
* Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
|
|
609
|
-
* operation; account-less generation uses a hashed network identity. Retrying the same method,
|
|
610
|
-
* path, query, If-Match header, and JSON body replays the original response. Reusing the key with
|
|
611
|
-
* changed intent returns 409. After expiry the key starts a new write.
|
|
612
|
-
*/
|
|
613
|
-
idempotencyKey?: string;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
/** Every error `refreshDiagnostics` can produce, as a discriminated union. */
|
|
617
|
-
export type ProjectsRefreshDiagnosticsError =
|
|
618
|
-
| BadRequestError
|
|
619
|
-
| UnauthorizedError
|
|
620
|
-
| ForbiddenError
|
|
621
|
-
| NotFoundError
|
|
622
|
-
| ConflictError
|
|
623
|
-
| UnprocessableEntityError
|
|
624
|
-
| RateLimitedError
|
|
625
|
-
| InternalServerError
|
|
626
|
-
| UnexpectedApiError
|
|
627
|
-
| ResponseParseError
|
|
628
|
-
| TransportError
|
|
629
|
-
| ValidationError;
|
|
630
|
-
|
|
631
|
-
export interface ProjectsRemediateDiagnosticsParams {
|
|
632
|
-
/**
|
|
633
|
-
* Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
|
|
634
|
-
* operation; account-less generation uses a hashed network identity. Retrying the same method,
|
|
635
|
-
* path, query, If-Match header, and JSON body replays the original response. Reusing the key with
|
|
636
|
-
* changed intent returns 409. After expiry the key starts a new write.
|
|
637
|
-
*/
|
|
638
|
-
idempotencyKey?: string;
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
/** Every error `remediateDiagnostics` can produce, as a discriminated union. */
|
|
642
|
-
export type ProjectsRemediateDiagnosticsError =
|
|
643
|
-
| BadRequestError
|
|
644
|
-
| UnauthorizedError
|
|
645
|
-
| ForbiddenError
|
|
646
|
-
| NotFoundError
|
|
647
|
-
| ConflictError
|
|
648
|
-
| UnprocessableEntityError
|
|
649
|
-
| RateLimitedError
|
|
650
|
-
| InternalServerError
|
|
651
|
-
| UnexpectedApiError
|
|
652
|
-
| ResponseParseError
|
|
653
|
-
| TransportError
|
|
654
|
-
| ValidationError;
|
|
655
|
-
|
|
656
|
-
/** Every error `retrieveIntegrationHealth` can produce, as a discriminated union. */
|
|
657
|
-
export type ProjectsRetrieveIntegrationHealthError =
|
|
658
|
-
| UnauthorizedError
|
|
659
|
-
| ForbiddenError
|
|
660
|
-
| NotFoundError
|
|
661
|
-
| RateLimitedError
|
|
662
|
-
| InternalServerError
|
|
663
|
-
| UnexpectedApiError
|
|
664
|
-
| ResponseParseError
|
|
665
|
-
| TransportError
|
|
666
|
-
| ValidationError;
|
|
667
|
-
|
|
668
|
-
export interface ProjectsListGenerationsParams {
|
|
669
|
-
/**
|
|
670
|
-
* Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
|
|
671
|
-
* representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
|
|
672
|
-
* invalid_request. List query parameters must appear only once; unrecognized parameters also
|
|
673
|
-
* return 400.
|
|
674
|
-
*/
|
|
675
|
-
limit?: number;
|
|
676
|
-
/**
|
|
677
|
-
* Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
|
|
678
|
-
* operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
|
|
679
|
-
* malformed, or repeated cursors return 400 invalid_request. The page limit may change between
|
|
680
|
-
* requests.
|
|
681
|
-
*/
|
|
682
|
-
cursor?: string;
|
|
683
|
-
/** Only generations for this persisted Target. */
|
|
684
|
-
targetId?: TargetId;
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
/** Every error `listGenerations` can produce, as a discriminated union. */
|
|
688
|
-
export type ProjectsListGenerationsError =
|
|
689
|
-
| BadRequestError
|
|
690
|
-
| UnauthorizedError
|
|
691
|
-
| ForbiddenError
|
|
692
|
-
| NotFoundError
|
|
693
|
-
| RateLimitedError
|
|
694
|
-
| InternalServerError
|
|
695
|
-
| UnexpectedApiError
|
|
696
|
-
| ResponseParseError
|
|
697
|
-
| TransportError
|
|
698
|
-
| ValidationError;
|
|
699
|
-
|
|
700
405
|
export interface ProjectsGenerateParams {
|
|
701
406
|
/**
|
|
702
|
-
* Identifies one logical write for 24 hours. The key is scoped to the authenticated
|
|
703
|
-
* operation;
|
|
704
|
-
* path, query, If-Match header, and JSON body replays the original response. Reusing
|
|
705
|
-
* changed intent 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.
|
|
706
411
|
*/
|
|
707
412
|
idempotencyKey?: string;
|
|
708
413
|
}
|
|
709
414
|
|
|
710
|
-
/**
|
|
415
|
+
/** Typed errors `generate` can throw. */
|
|
711
416
|
export type ProjectsGenerateError =
|
|
712
417
|
| BadRequestError
|
|
713
418
|
| UnauthorizedError
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
// typeship — publications resource.
|
|
2
|
+
// Generated by typeship — https://typeship.dev
|
|
3
|
+
|
|
4
|
+
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
5
|
+
import { paginate, PagePromise } from "../core/pagination.js";
|
|
6
|
+
import {
|
|
7
|
+
ResponseParseError,
|
|
8
|
+
TransportError,
|
|
9
|
+
UnexpectedApiError,
|
|
10
|
+
ValidationError,
|
|
11
|
+
BadRequestError,
|
|
12
|
+
ForbiddenError,
|
|
13
|
+
InternalServerError,
|
|
14
|
+
NotFoundError,
|
|
15
|
+
RateLimitedError,
|
|
16
|
+
UnauthorizedError,
|
|
17
|
+
} from "../errors.js";
|
|
18
|
+
import type {
|
|
19
|
+
Publication,
|
|
20
|
+
PublicationId,
|
|
21
|
+
PublicationList,
|
|
22
|
+
PublicationListRead,
|
|
23
|
+
PublicationRead,
|
|
24
|
+
PublicationResponse,
|
|
25
|
+
PublicationResponseRead,
|
|
26
|
+
ReleaseId,
|
|
27
|
+
} from "../types.js";
|
|
28
|
+
|
|
29
|
+
export class PublicationsResource {
|
|
30
|
+
constructor(private readonly _core: HttpCore) {}
|
|
31
|
+
/**
|
|
32
|
+
* List publications
|
|
33
|
+
*
|
|
34
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
35
|
+
* `GET /publications`
|
|
36
|
+
*/
|
|
37
|
+
list(
|
|
38
|
+
params?: PublicationsListParams,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): PagePromise<PublicationRead, PublicationsListError> {
|
|
41
|
+
return paginate<PublicationRead, PublicationsListError>(this._core, {
|
|
42
|
+
method: "GET",
|
|
43
|
+
path: "/publications",
|
|
44
|
+
security: [{"apiKey":[]}],
|
|
45
|
+
query: {
|
|
46
|
+
limit: params?.limit,
|
|
47
|
+
cursor: params?.cursor,
|
|
48
|
+
release_id: params?.releaseId,
|
|
49
|
+
},
|
|
50
|
+
errors: {
|
|
51
|
+
"400": BadRequestError,
|
|
52
|
+
"401": UnauthorizedError,
|
|
53
|
+
"403": ForbiddenError,
|
|
54
|
+
"404": NotFoundError,
|
|
55
|
+
"429": RateLimitedError,
|
|
56
|
+
"500": InternalServerError,
|
|
57
|
+
},
|
|
58
|
+
idempotent: true,
|
|
59
|
+
schemaKey: "publications.list",
|
|
60
|
+
options,
|
|
61
|
+
}, {
|
|
62
|
+
style: "cursor",
|
|
63
|
+
itemsField: "data",
|
|
64
|
+
cursorParam: "cursor",
|
|
65
|
+
nextCursorField: "next_cursor",
|
|
66
|
+
hasMoreField: "has_more",
|
|
67
|
+
limitParam: "limit",
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Get publishing status
|
|
73
|
+
*
|
|
74
|
+
* Returns the registry publishing status for a release. A status in another organization returns
|
|
75
|
+
* 404 not_found.
|
|
76
|
+
* `GET /publications/{publication_id}`
|
|
77
|
+
*/
|
|
78
|
+
async get(publicationId: PublicationId, options?: RequestOptions): Promise<PublicationResponseRead> {
|
|
79
|
+
return this._core.requestData<PublicationResponseRead, PublicationsGetError>({
|
|
80
|
+
method: "GET",
|
|
81
|
+
path: `/publications/${encodeURIComponent(String(publicationId))}`,
|
|
82
|
+
security: [{"apiKey":[]}],
|
|
83
|
+
errors: {
|
|
84
|
+
"401": UnauthorizedError,
|
|
85
|
+
"403": ForbiddenError,
|
|
86
|
+
"404": NotFoundError,
|
|
87
|
+
"429": RateLimitedError,
|
|
88
|
+
"500": InternalServerError,
|
|
89
|
+
},
|
|
90
|
+
idempotent: true,
|
|
91
|
+
schemaKey: "publications.get",
|
|
92
|
+
options,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface PublicationsListParams {
|
|
98
|
+
/**
|
|
99
|
+
* Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
|
|
100
|
+
* representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
|
|
101
|
+
* invalid_request. List query parameters must appear only once; unrecognized parameters also
|
|
102
|
+
* return 400.
|
|
103
|
+
*/
|
|
104
|
+
limit?: number;
|
|
105
|
+
/**
|
|
106
|
+
* Opaque cursor from the preceding page's next_cursor. Valid only for the same organization,
|
|
107
|
+
* operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
|
|
108
|
+
* malformed, or repeated cursors return 400 invalid_request. The page limit may change between
|
|
109
|
+
* requests.
|
|
110
|
+
*/
|
|
111
|
+
cursor?: string;
|
|
112
|
+
/** Only publications of this release. */
|
|
113
|
+
releaseId?: ReleaseId;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** Typed errors `list` can throw. */
|
|
117
|
+
export type PublicationsListError =
|
|
118
|
+
| BadRequestError
|
|
119
|
+
| UnauthorizedError
|
|
120
|
+
| ForbiddenError
|
|
121
|
+
| NotFoundError
|
|
122
|
+
| RateLimitedError
|
|
123
|
+
| InternalServerError
|
|
124
|
+
| UnexpectedApiError
|
|
125
|
+
| ResponseParseError
|
|
126
|
+
| TransportError
|
|
127
|
+
| ValidationError;
|
|
128
|
+
|
|
129
|
+
/** Typed errors `get` can throw. */
|
|
130
|
+
export type PublicationsGetError =
|
|
131
|
+
| UnauthorizedError
|
|
132
|
+
| ForbiddenError
|
|
133
|
+
| NotFoundError
|
|
134
|
+
| RateLimitedError
|
|
135
|
+
| InternalServerError
|
|
136
|
+
| UnexpectedApiError
|
|
137
|
+
| ResponseParseError
|
|
138
|
+
| TransportError
|
|
139
|
+
| ValidationError;
|