@typeship-ax/mcp 0.21.0 → 0.22.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 +15 -11
- package/README.md +22 -53
- package/api.json +9998 -10118
- package/api.md +8983 -9120
- package/dist/arguments.d.ts +47 -0
- package/dist/arguments.d.ts.map +1 -0
- package/dist/arguments.js +254 -0
- package/dist/core/http.d.ts +162 -19
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +381 -48
- package/dist/core/pagination.d.ts +42 -6
- package/dist/core/pagination.d.ts.map +1 -1
- package/dist/core/pagination.js +111 -17
- package/dist/credential-storage.d.ts +10 -3
- package/dist/credential-storage.d.ts.map +1 -1
- package/dist/credential-storage.js +15 -6
- package/dist/dates.d.ts +1 -1
- package/dist/dates.js +1 -1
- package/dist/errors.d.ts +20 -84
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +20 -108
- package/dist/fields.d.ts +29 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +101 -0
- package/dist/index.d.ts +28 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -25
- package/dist/mcp-authorization.d.ts.map +1 -1
- package/dist/mcp-authorization.js +34 -10
- package/dist/mcp-protocol.d.ts +87 -44
- package/dist/mcp-protocol.d.ts.map +1 -1
- package/dist/mcp-protocol.js +552 -478
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +127 -28
- package/dist/named-credentials.d.ts +19 -0
- package/dist/named-credentials.d.ts.map +1 -1
- package/dist/named-credentials.js +81 -1
- package/dist/oauth-request.d.ts +7 -1
- package/dist/oauth-request.d.ts.map +1 -1
- package/dist/oauth-request.js +26 -4
- package/dist/oauth-session.d.ts +13 -1
- package/dist/oauth-session.d.ts.map +1 -1
- package/dist/oauth-session.js +34 -18
- package/dist/ops.d.ts +53 -5
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +49 -40
- package/dist/resources/api-keys.d.ts +10 -7
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +10 -31
- package/dist/resources/deliveries.d.ts +88 -4
- package/dist/resources/deliveries.d.ts.map +1 -1
- package/dist/resources/deliveries.js +95 -18
- package/dist/resources/drafts.d.ts +15 -15
- package/dist/resources/drafts.d.ts.map +1 -1
- package/dist/resources/drafts.js +11 -64
- package/dist/resources/files.d.ts +4 -4
- package/dist/resources/files.d.ts.map +1 -1
- package/dist/resources/files.js +3 -12
- package/dist/resources/generations.d.ts +14 -14
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +21 -45
- package/dist/resources/organization.d.ts +4 -4
- package/dist/resources/organization.d.ts.map +1 -1
- package/dist/resources/organization.js +3 -10
- package/dist/resources/{generate.d.ts → packages.d.ts} +16 -16
- package/dist/resources/packages.d.ts.map +1 -0
- package/dist/resources/{generate.js → packages.js} +13 -29
- package/dist/resources/projects.d.ts +50 -50
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +60 -116
- package/dist/resources/releases.d.ts +21 -16
- package/dist/resources/releases.d.ts.map +1 -1
- package/dist/resources/releases.js +18 -39
- package/dist/resources/spec-revisions.d.ts +15 -6
- package/dist/resources/spec-revisions.d.ts.map +1 -1
- package/dist/resources/spec-revisions.js +6 -28
- package/dist/resources/specs.d.ts +7 -7
- package/dist/resources/specs.d.ts.map +1 -1
- package/dist/resources/specs.js +6 -34
- package/dist/resources/targets.d.ts +48 -48
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +58 -114
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +78 -76
- package/dist/search.d.ts +54 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +421 -0
- package/dist/types.d.ts +499 -339
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +18 -18
- package/dist/worker.js +2 -2
- package/package.json +5 -2
- package/server.json +5 -5
- package/src/arguments.ts +242 -0
- package/src/core/http.ts +457 -58
- package/src/core/pagination.ts +129 -18
- package/src/credential-storage.ts +16 -6
- package/src/dates.ts +1 -1
- package/src/errors.ts +46 -115
- package/src/fields.ts +91 -0
- package/src/index.ts +45 -28
- package/src/mcp-authorization.ts +29 -9
- package/src/mcp-protocol.ts +580 -428
- package/src/mcp.ts +113 -26
- package/src/named-credentials.ts +66 -1
- package/src/oauth-request.ts +32 -6
- package/src/oauth-session.ts +37 -19
- package/src/ops.ts +82 -44
- package/src/resources/api-keys.ts +34 -48
- package/src/resources/deliveries.ts +211 -30
- package/src/resources/drafts.ts +60 -107
- package/src/resources/files.ts +19 -20
- package/src/resources/generations.ts +57 -75
- package/src/resources/organization.ts +11 -16
- package/src/resources/{generate.ts → packages.ts} +43 -51
- package/src/resources/projects.ts +145 -200
- package/src/resources/releases.ts +48 -65
- package/src/resources/spec-revisions.ts +38 -47
- package/src/resources/specs.ts +39 -59
- package/src/resources/targets.ts +143 -193
- package/src/schemas.ts +78 -76
- package/src/search.ts +434 -0
- package/src/types.ts +538 -357
- package/src/worker.ts +2 -2
- package/dist/resources/generate.d.ts.map +0 -1
- package/dist/resources/publications.d.ts +0 -47
- package/dist/resources/publications.d.ts.map +0 -1
- package/dist/resources/publications.js +0 -70
- package/src/resources/publications.ts +0 -140
|
@@ -1,12 +1,36 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
1
|
+
// Typeship — targets resource.
|
|
2
|
+
// Generated by Typeship — https://typeship.dev
|
|
3
3
|
import { paginate } from "../core/pagination.js";
|
|
4
|
-
import {
|
|
4
|
+
import { PaymentRequiredError, PreconditionFailedError, } from "../errors.js";
|
|
5
5
|
export class TargetsResource {
|
|
6
6
|
_core;
|
|
7
7
|
constructor(_core) {
|
|
8
8
|
this._core = _core;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Create a Target
|
|
12
|
+
*
|
|
13
|
+
* Creates a Target with its own configuration, Deliveries, and release history. Multiple Targets
|
|
14
|
+
* can use the same generator.
|
|
15
|
+
*
|
|
16
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
17
|
+
* `POST /targets`
|
|
18
|
+
*/
|
|
19
|
+
async create(body, params, options) {
|
|
20
|
+
return this._core.requestData({
|
|
21
|
+
method: "POST",
|
|
22
|
+
path: "/targets",
|
|
23
|
+
security: [{ "apiKey": [] }],
|
|
24
|
+
headers: {
|
|
25
|
+
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
26
|
+
},
|
|
27
|
+
body,
|
|
28
|
+
errors: { "402": PaymentRequiredError },
|
|
29
|
+
idempotencyKey: "Idempotency-Key",
|
|
30
|
+
schemaKey: "targets.create",
|
|
31
|
+
options,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
10
34
|
/**
|
|
11
35
|
* List Targets
|
|
12
36
|
*
|
|
@@ -23,14 +47,6 @@ export class TargetsResource {
|
|
|
23
47
|
cursor: params?.cursor,
|
|
24
48
|
project_id: params?.projectId,
|
|
25
49
|
},
|
|
26
|
-
errors: {
|
|
27
|
-
"400": BadRequestError,
|
|
28
|
-
"401": UnauthorizedError,
|
|
29
|
-
"403": ForbiddenError,
|
|
30
|
-
"404": NotFoundError,
|
|
31
|
-
"429": RateLimitedError,
|
|
32
|
-
"500": InternalServerError,
|
|
33
|
-
},
|
|
34
50
|
idempotent: true,
|
|
35
51
|
schemaKey: "targets.list",
|
|
36
52
|
options,
|
|
@@ -43,40 +59,6 @@ export class TargetsResource {
|
|
|
43
59
|
limitParam: "limit",
|
|
44
60
|
});
|
|
45
61
|
}
|
|
46
|
-
/**
|
|
47
|
-
* Create an independently configured Target
|
|
48
|
-
*
|
|
49
|
-
* Creates a Target with its own configuration, Deliveries, and release history. Multiple Targets
|
|
50
|
-
* can use the same generator.
|
|
51
|
-
*
|
|
52
|
-
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
53
|
-
* `POST /targets`
|
|
54
|
-
*/
|
|
55
|
-
async create(body, params, options) {
|
|
56
|
-
return this._core.requestData({
|
|
57
|
-
method: "POST",
|
|
58
|
-
path: "/targets",
|
|
59
|
-
security: [{ "apiKey": [] }],
|
|
60
|
-
headers: {
|
|
61
|
-
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
62
|
-
},
|
|
63
|
-
body,
|
|
64
|
-
errors: {
|
|
65
|
-
"400": BadRequestError,
|
|
66
|
-
"401": UnauthorizedError,
|
|
67
|
-
"402": PaymentRequiredError,
|
|
68
|
-
"403": ForbiddenError,
|
|
69
|
-
"404": NotFoundError,
|
|
70
|
-
"409": ConflictError,
|
|
71
|
-
"422": UnprocessableEntityError,
|
|
72
|
-
"429": RateLimitedError,
|
|
73
|
-
"500": InternalServerError,
|
|
74
|
-
},
|
|
75
|
-
idempotencyKey: "Idempotency-Key",
|
|
76
|
-
schemaKey: "targets.create",
|
|
77
|
-
options,
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
62
|
/**
|
|
81
63
|
* Get a Target
|
|
82
64
|
* `GET /targets/{target_id}`
|
|
@@ -86,101 +68,73 @@ export class TargetsResource {
|
|
|
86
68
|
method: "GET",
|
|
87
69
|
path: `/targets/${encodeURIComponent(String(targetId))}`,
|
|
88
70
|
security: [{ "apiKey": [] }],
|
|
89
|
-
errors: {
|
|
90
|
-
"401": UnauthorizedError,
|
|
91
|
-
"403": ForbiddenError,
|
|
92
|
-
"404": NotFoundError,
|
|
93
|
-
"429": RateLimitedError,
|
|
94
|
-
"500": InternalServerError,
|
|
95
|
-
},
|
|
96
71
|
idempotent: true,
|
|
97
72
|
schemaKey: "targets.get",
|
|
98
73
|
options,
|
|
99
74
|
});
|
|
100
75
|
}
|
|
101
76
|
/**
|
|
102
|
-
*
|
|
77
|
+
* Update a Target
|
|
103
78
|
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
79
|
+
* Omitted fields keep their current values. Supplied config and checks replace their complete
|
|
80
|
+
* stored values. Change Deliveries with createDelivery, updateDelivery, and deleteDelivery.
|
|
81
|
+
* With Project auto_generate enabled, changing Target config or checks queues that Target's
|
|
82
|
+
* Generation. A queued or running Target reuses that Generation.
|
|
83
|
+
* Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag
|
|
84
|
+
* returns 412 precondition_failed without saving.
|
|
85
|
+
* Select the next version through PATCH /drafts/{draft_id} on the Target's draft_id.
|
|
107
86
|
*
|
|
87
|
+
* A `409 target_busy` means the Target is publishing; wait for it to finish. A `409
|
|
88
|
+
* delivery_conflict` means another Target owns the requested repository tree; retrieve both
|
|
89
|
+
* Targets, choose a free destination, and retry.
|
|
90
|
+
* A `502 follow_up_failed` means the update was saved, but retiring an obsolete review or
|
|
91
|
+
* regenerating the Target failed. Retrieve the Target and follow the error's retryable and
|
|
92
|
+
* suggested_action fields.
|
|
108
93
|
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
109
94
|
* and If-Match.
|
|
110
|
-
* `
|
|
95
|
+
* `PATCH /targets/{target_id}`
|
|
111
96
|
*/
|
|
112
|
-
async
|
|
97
|
+
async update(targetId, body, params, options) {
|
|
113
98
|
return this._core.requestData({
|
|
114
|
-
method: "
|
|
99
|
+
method: "PATCH",
|
|
115
100
|
path: `/targets/${encodeURIComponent(String(targetId))}`,
|
|
116
101
|
security: [{ "apiKey": [] }],
|
|
117
102
|
headers: {
|
|
118
103
|
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
119
104
|
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"403": ForbiddenError,
|
|
124
|
-
"404": NotFoundError,
|
|
125
|
-
"409": ConflictError,
|
|
126
|
-
"412": PreconditionFailedError,
|
|
127
|
-
"429": RateLimitedError,
|
|
128
|
-
"500": InternalServerError,
|
|
129
|
-
},
|
|
130
|
-
idempotent: true,
|
|
131
|
-
schemaKey: "targets.delete",
|
|
105
|
+
body,
|
|
106
|
+
errors: { "402": PaymentRequiredError, "412": PreconditionFailedError },
|
|
107
|
+
schemaKey: "targets.update",
|
|
132
108
|
options,
|
|
133
109
|
});
|
|
134
110
|
}
|
|
135
111
|
/**
|
|
136
|
-
*
|
|
112
|
+
* Delete a Target
|
|
137
113
|
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* Target's Generation. A queued or running Target reuses that Generation.
|
|
142
|
-
* Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag
|
|
143
|
-
* returns 412 precondition_failed without saving.
|
|
144
|
-
* Select the next version through PATCH /drafts/{draft_id} on the Target's draft_id.
|
|
114
|
+
* Deletes a Target with no Generation history, release history, or active Draft. A `409
|
|
115
|
+
* resource_has_dependencies` means one of those resources still depends on it. Retrieve the
|
|
116
|
+
* Target, disable it instead, or resolve the dependency before retrying.
|
|
145
117
|
*
|
|
146
|
-
* A `409 target_busy` means the Target is publishing; wait for it to finish. A `409
|
|
147
|
-
* delivery_conflict` means another Target owns the requested repository tree; retrieve both
|
|
148
|
-
* Targets, choose a free destination, and retry.
|
|
149
|
-
* A `502 follow_up_failed` means the update was saved, but retiring an obsolete review or
|
|
150
|
-
* regenerating the Target failed. Retrieve the Target and follow the error's retryable and
|
|
151
|
-
* suggested_action fields.
|
|
152
118
|
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
153
119
|
* and If-Match.
|
|
154
|
-
* `
|
|
120
|
+
* `DELETE /targets/{target_id}`
|
|
155
121
|
*/
|
|
156
|
-
async
|
|
122
|
+
async delete(targetId, params, options) {
|
|
157
123
|
return this._core.requestData({
|
|
158
|
-
method: "
|
|
124
|
+
method: "DELETE",
|
|
159
125
|
path: `/targets/${encodeURIComponent(String(targetId))}`,
|
|
160
126
|
security: [{ "apiKey": [] }],
|
|
161
127
|
headers: {
|
|
162
128
|
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
163
129
|
},
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
"401": UnauthorizedError,
|
|
168
|
-
"402": PaymentRequiredError,
|
|
169
|
-
"403": ForbiddenError,
|
|
170
|
-
"404": NotFoundError,
|
|
171
|
-
"409": ConflictError,
|
|
172
|
-
"412": PreconditionFailedError,
|
|
173
|
-
"422": UnprocessableEntityError,
|
|
174
|
-
"429": RateLimitedError,
|
|
175
|
-
"500": InternalServerError,
|
|
176
|
-
"502": BadGatewayError,
|
|
177
|
-
},
|
|
178
|
-
schemaKey: "targets.update",
|
|
130
|
+
errors: { "412": PreconditionFailedError },
|
|
131
|
+
idempotent: true,
|
|
132
|
+
schemaKey: "targets.delete",
|
|
179
133
|
options,
|
|
180
134
|
});
|
|
181
135
|
}
|
|
182
136
|
/**
|
|
183
|
-
* Adopt a
|
|
137
|
+
* Adopt a package release
|
|
184
138
|
*
|
|
185
139
|
* Checks the repository tag, package metadata, and registry artifact, then records the package as
|
|
186
140
|
* an Imported latest release. Opens the first Typeship Draft at the next major version; review it
|
|
@@ -198,16 +152,6 @@ export class TargetsResource {
|
|
|
198
152
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
199
153
|
},
|
|
200
154
|
body,
|
|
201
|
-
errors: {
|
|
202
|
-
"400": BadRequestError,
|
|
203
|
-
"401": UnauthorizedError,
|
|
204
|
-
"403": ForbiddenError,
|
|
205
|
-
"404": NotFoundError,
|
|
206
|
-
"409": ConflictError,
|
|
207
|
-
"422": UnprocessableEntityError,
|
|
208
|
-
"429": RateLimitedError,
|
|
209
|
-
"500": InternalServerError,
|
|
210
|
-
},
|
|
211
155
|
idempotencyKey: "Idempotency-Key",
|
|
212
156
|
schemaKey: "targets.adopt",
|
|
213
157
|
options,
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,CA2CpE,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CA2KxC,CAAC"}
|