@typeship-ax/mcp 0.6.0 → 0.9.1
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 +31 -0
- package/README.md +67 -10
- package/api.json +6735 -3243
- package/api.md +8537 -248
- package/dist/api-identity.d.ts +40 -0
- package/dist/api-identity.d.ts.map +1 -0
- package/dist/api-identity.js +128 -0
- package/dist/auth-profiles.d.ts +30 -0
- package/dist/auth-profiles.d.ts.map +1 -0
- package/dist/auth-profiles.js +138 -0
- package/dist/core/http.d.ts +21 -92
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +143 -221
- package/dist/core/pagination.d.ts.map +1 -1
- package/dist/core/pagination.js +6 -34
- package/dist/credential-storage.d.ts +24 -0
- package/dist/credential-storage.d.ts.map +1 -0
- package/dist/credential-storage.js +207 -0
- package/dist/dates.d.ts +0 -2
- package/dist/dates.d.ts.map +1 -1
- package/dist/dates.js +0 -1
- package/dist/docs.d.ts +36 -0
- package/dist/docs.d.ts.map +1 -0
- package/dist/docs.js +258 -0
- package/dist/errors.d.ts +42 -34
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +30 -20
- package/dist/index.d.ts +27 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -14
- package/dist/mcp-authorization.d.ts +52 -0
- package/dist/mcp-authorization.d.ts.map +1 -0
- package/dist/mcp-authorization.js +232 -0
- package/dist/mcp-protocol.d.ts +69 -25
- package/dist/mcp-protocol.d.ts.map +1 -1
- package/dist/mcp-protocol.js +386 -138
- package/dist/mcp.d.ts +21 -3
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +199 -85
- package/dist/named-credentials.d.ts +21 -0
- package/dist/named-credentials.d.ts.map +1 -0
- package/dist/named-credentials.js +86 -0
- package/dist/oauth-request.d.ts +21 -0
- package/dist/oauth-request.d.ts.map +1 -0
- package/dist/oauth-request.js +119 -0
- package/dist/oauth-session.d.ts +106 -0
- package/dist/oauth-session.d.ts.map +1 -0
- package/dist/oauth-session.js +244 -0
- package/dist/ops.d.ts +18 -0
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +31 -17
- package/dist/resources/account.d.ts +4 -4
- package/dist/resources/account.d.ts.map +1 -1
- package/dist/resources/account.js +1 -0
- package/dist/resources/api-keys.d.ts +13 -8
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +5 -1
- package/dist/resources/definition-revisions.d.ts +58 -0
- package/dist/resources/definition-revisions.d.ts.map +1 -0
- package/dist/resources/definition-revisions.js +114 -0
- package/dist/resources/definitions.d.ts +35 -0
- package/dist/resources/definitions.d.ts.map +1 -0
- package/dist/resources/definitions.js +60 -0
- package/dist/resources/generate.d.ts +18 -7
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +13 -5
- package/dist/resources/generations.d.ts +6 -6
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +3 -1
- package/dist/resources/projects.d.ts +111 -35
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +125 -15
- package/dist/resources/targets.d.ts +97 -0
- package/dist/resources/targets.d.ts.map +1 -0
- package/dist/resources/targets.js +197 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +135 -62
- package/dist/types.d.ts +2072 -267
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +20 -3
- package/dist/worker.js +4 -4
- package/package.json +11 -1
- package/server.json +42 -0
- package/src/api-identity.ts +98 -0
- package/src/auth-profiles.ts +114 -0
- package/src/core/http.ts +156 -305
- package/src/core/pagination.ts +6 -30
- package/src/credential-storage.ts +183 -0
- package/src/dates.ts +0 -1
- package/src/docs.ts +239 -0
- package/src/errors.ts +52 -41
- package/src/index.ts +49 -14
- package/src/mcp-authorization.ts +211 -0
- package/src/mcp-protocol.ts +432 -133
- package/src/mcp.ts +204 -90
- package/src/named-credentials.ts +74 -0
- package/src/oauth-request.ts +90 -0
- package/src/oauth-session.ts +258 -0
- package/src/ops.ts +56 -17
- package/src/resources/account.ts +6 -3
- package/src/resources/api-keys.ts +27 -7
- package/src/resources/definition-revisions.ts +207 -0
- package/src/resources/definitions.ts +122 -0
- package/src/resources/generate.ts +29 -6
- package/src/resources/generations.ts +9 -4
- package/src/resources/projects.ts +274 -41
- package/src/resources/targets.ts +378 -0
- package/src/schemas.ts +135 -62
- package/src/types.ts +2273 -322
- package/src/worker.ts +4 -4
- package/dist/resources/spec-revisions.d.ts +0 -47
- package/dist/resources/spec-revisions.d.ts.map +0 -1
- package/dist/resources/spec-revisions.js +0 -90
- package/src/resources/spec-revisions.ts +0 -150
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// typeship — targets resource.
|
|
2
|
+
// Generated by typeship — https://typeship.dev — do not edit by hand.
|
|
3
|
+
import { paginate } from "../core/pagination.js";
|
|
4
|
+
import { BadRequestError, ConflictError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError, UnprocessableEntityError, } from "../errors.js";
|
|
5
|
+
export class TargetsResource {
|
|
6
|
+
_core;
|
|
7
|
+
constructor(_core) {
|
|
8
|
+
this._core = _core;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* List a project's Targets
|
|
12
|
+
*
|
|
13
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
14
|
+
* `GET /projects/{project_id}/targets`
|
|
15
|
+
*/
|
|
16
|
+
list(projectId, params, options) {
|
|
17
|
+
return paginate(this._core, {
|
|
18
|
+
method: "GET",
|
|
19
|
+
path: `/projects/${encodeURIComponent(String(projectId))}/targets`,
|
|
20
|
+
security: [{ "apiKey": [] }],
|
|
21
|
+
query: {
|
|
22
|
+
limit: params?.limit,
|
|
23
|
+
cursor: params?.cursor,
|
|
24
|
+
},
|
|
25
|
+
errors: {
|
|
26
|
+
"400": BadRequestError,
|
|
27
|
+
"401": UnauthorizedError,
|
|
28
|
+
"403": ForbiddenError,
|
|
29
|
+
"404": NotFoundError,
|
|
30
|
+
"429": RateLimitedError,
|
|
31
|
+
},
|
|
32
|
+
idempotent: true,
|
|
33
|
+
schemaKey: "targets.list",
|
|
34
|
+
options,
|
|
35
|
+
}, {
|
|
36
|
+
style: "cursor",
|
|
37
|
+
itemsField: "data",
|
|
38
|
+
cursorParam: "cursor",
|
|
39
|
+
nextCursorField: "next_cursor",
|
|
40
|
+
hasMoreField: "has_more",
|
|
41
|
+
limitParam: "limit",
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Create an independently configured Target
|
|
46
|
+
*
|
|
47
|
+
* Several Targets may use the same generator with distinct configuration, Deliveries, and release
|
|
48
|
+
* streams.
|
|
49
|
+
*
|
|
50
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
51
|
+
* `POST /projects/{project_id}/targets`
|
|
52
|
+
*/
|
|
53
|
+
async create(projectId, body, params, options) {
|
|
54
|
+
return this._core.request({
|
|
55
|
+
method: "POST",
|
|
56
|
+
path: `/projects/${encodeURIComponent(String(projectId))}/targets`,
|
|
57
|
+
security: [{ "apiKey": [] }],
|
|
58
|
+
headers: {
|
|
59
|
+
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
60
|
+
},
|
|
61
|
+
body,
|
|
62
|
+
errors: {
|
|
63
|
+
"400": BadRequestError,
|
|
64
|
+
"401": UnauthorizedError,
|
|
65
|
+
"403": ForbiddenError,
|
|
66
|
+
"404": NotFoundError,
|
|
67
|
+
"409": ConflictError,
|
|
68
|
+
"422": UnprocessableEntityError,
|
|
69
|
+
"429": RateLimitedError,
|
|
70
|
+
},
|
|
71
|
+
idempotencyKey: "Idempotency-Key",
|
|
72
|
+
schemaKey: "targets.create",
|
|
73
|
+
options,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Retrieve a Target
|
|
78
|
+
* `GET /targets/{target_id}`
|
|
79
|
+
*/
|
|
80
|
+
async retrieve(targetId, options) {
|
|
81
|
+
return this._core.request({
|
|
82
|
+
method: "GET",
|
|
83
|
+
path: `/targets/${encodeURIComponent(String(targetId))}`,
|
|
84
|
+
security: [{ "apiKey": [] }],
|
|
85
|
+
errors: {
|
|
86
|
+
"401": UnauthorizedError,
|
|
87
|
+
"403": ForbiddenError,
|
|
88
|
+
"404": NotFoundError,
|
|
89
|
+
"429": RateLimitedError,
|
|
90
|
+
},
|
|
91
|
+
idempotent: true,
|
|
92
|
+
schemaKey: "targets.retrieve",
|
|
93
|
+
options,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Delete an unused Target
|
|
98
|
+
*
|
|
99
|
+
* Targets with Generation or release history, or an active release candidate, must be disabled
|
|
100
|
+
* instead.
|
|
101
|
+
* `DELETE /targets/{target_id}`
|
|
102
|
+
*/
|
|
103
|
+
async delete(targetId, options) {
|
|
104
|
+
return this._core.request({
|
|
105
|
+
method: "DELETE",
|
|
106
|
+
path: `/targets/${encodeURIComponent(String(targetId))}`,
|
|
107
|
+
security: [{ "apiKey": [] }],
|
|
108
|
+
errors: {
|
|
109
|
+
"401": UnauthorizedError,
|
|
110
|
+
"403": ForbiddenError,
|
|
111
|
+
"404": NotFoundError,
|
|
112
|
+
"409": ConflictError,
|
|
113
|
+
"429": RateLimitedError,
|
|
114
|
+
},
|
|
115
|
+
idempotent: true,
|
|
116
|
+
schemaKey: "targets.delete",
|
|
117
|
+
options,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Update a Target, its Deliveries, or its next reviewed version
|
|
122
|
+
* `PATCH /targets/{target_id}`
|
|
123
|
+
*/
|
|
124
|
+
async update(targetId, body, options) {
|
|
125
|
+
return this._core.request({
|
|
126
|
+
method: "PATCH",
|
|
127
|
+
path: `/targets/${encodeURIComponent(String(targetId))}`,
|
|
128
|
+
security: [{ "apiKey": [] }],
|
|
129
|
+
body,
|
|
130
|
+
errors: {
|
|
131
|
+
"400": BadRequestError,
|
|
132
|
+
"401": UnauthorizedError,
|
|
133
|
+
"403": ForbiddenError,
|
|
134
|
+
"404": NotFoundError,
|
|
135
|
+
"409": ConflictError,
|
|
136
|
+
"422": UnprocessableEntityError,
|
|
137
|
+
"429": RateLimitedError,
|
|
138
|
+
},
|
|
139
|
+
schemaKey: "targets.update",
|
|
140
|
+
options,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* List immutable releases for a Target
|
|
145
|
+
*
|
|
146
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
147
|
+
* `GET /targets/{target_id}/releases`
|
|
148
|
+
*/
|
|
149
|
+
listReleases(targetId, params, options) {
|
|
150
|
+
return paginate(this._core, {
|
|
151
|
+
method: "GET",
|
|
152
|
+
path: `/targets/${encodeURIComponent(String(targetId))}/releases`,
|
|
153
|
+
security: [{ "apiKey": [] }],
|
|
154
|
+
query: {
|
|
155
|
+
limit: params?.limit,
|
|
156
|
+
cursor: params?.cursor,
|
|
157
|
+
},
|
|
158
|
+
errors: {
|
|
159
|
+
"400": BadRequestError,
|
|
160
|
+
"401": UnauthorizedError,
|
|
161
|
+
"403": ForbiddenError,
|
|
162
|
+
"404": NotFoundError,
|
|
163
|
+
"429": RateLimitedError,
|
|
164
|
+
},
|
|
165
|
+
idempotent: true,
|
|
166
|
+
schemaKey: "targets.listReleases",
|
|
167
|
+
options,
|
|
168
|
+
}, {
|
|
169
|
+
style: "cursor",
|
|
170
|
+
itemsField: "data",
|
|
171
|
+
cursorParam: "cursor",
|
|
172
|
+
nextCursorField: "next_cursor",
|
|
173
|
+
hasMoreField: "has_more",
|
|
174
|
+
limitParam: "limit",
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Retrieve an immutable Target release
|
|
179
|
+
* `GET /target_releases/{target_release_id}`
|
|
180
|
+
*/
|
|
181
|
+
async retrieveRelease(targetReleaseId, options) {
|
|
182
|
+
return this._core.request({
|
|
183
|
+
method: "GET",
|
|
184
|
+
path: `/target_releases/${encodeURIComponent(String(targetReleaseId))}`,
|
|
185
|
+
security: [{ "apiKey": [] }],
|
|
186
|
+
errors: {
|
|
187
|
+
"401": UnauthorizedError,
|
|
188
|
+
"403": ForbiddenError,
|
|
189
|
+
"404": NotFoundError,
|
|
190
|
+
"429": RateLimitedError,
|
|
191
|
+
},
|
|
192
|
+
idempotent: true,
|
|
193
|
+
schemaKey: "targets.retrieveRelease",
|
|
194
|
+
options,
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
}
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"
|
|
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,CA+BpE,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CA0HxC,CAAC"}
|