@typeship-ax/mcp 0.8.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 +66 -9
- package/api.json +1617 -712
- package/api.md +8292 -382
- 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 +17 -2
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +78 -17
- 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/docs.d.ts +25 -0
- package/dist/docs.d.ts.map +1 -1
- package/dist/docs.js +144 -0
- package/dist/errors.d.ts +18 -10
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +24 -14
- package/dist/index.d.ts +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -4
- 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 +51 -2
- package/dist/mcp-protocol.d.ts.map +1 -1
- package/dist/mcp-protocol.js +249 -37
- package/dist/mcp.d.ts +21 -3
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +185 -68
- 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 +14 -1
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +30 -30
- package/dist/resources/account.d.ts +2 -2
- package/dist/resources/account.d.ts.map +1 -1
- package/dist/resources/account.js +1 -0
- package/dist/resources/api-keys.d.ts +3 -3
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +2 -0
- package/dist/resources/definition-revisions.d.ts +5 -5
- package/dist/resources/definition-revisions.d.ts.map +1 -1
- package/dist/resources/definition-revisions.js +4 -0
- package/dist/resources/definitions.d.ts +15 -4
- package/dist/resources/definitions.d.ts.map +1 -1
- package/dist/resources/definitions.js +11 -2
- package/dist/resources/generate.d.ts +14 -3
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +10 -2
- package/dist/resources/generations.d.ts +3 -3
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +2 -0
- package/dist/resources/projects.d.ts +56 -20
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +40 -4
- package/dist/resources/targets.d.ts +20 -9
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +14 -1
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +38 -22
- package/dist/types.d.ts +385 -119
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +11 -0
- 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 +88 -19
- package/src/credential-storage.ts +183 -0
- package/src/docs.ts +138 -0
- package/src/errors.ts +26 -15
- package/src/index.ts +29 -4
- package/src/mcp-authorization.ts +211 -0
- package/src/mcp-protocol.ts +287 -38
- package/src/mcp.ts +186 -72
- 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 +44 -31
- package/src/resources/account.ts +3 -0
- package/src/resources/api-keys.ts +5 -0
- package/src/resources/definition-revisions.ts +9 -0
- package/src/resources/definitions.ts +25 -0
- package/src/resources/generate.ts +23 -0
- package/src/resources/generations.ts +5 -0
- package/src/resources/projects.ts +95 -7
- package/src/resources/targets.ts +32 -0
- package/src/schemas.ts +38 -22
- package/src/types.ts +404 -119
- package/src/worker.ts +4 -4
package/src/resources/account.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
5
5
|
import {
|
|
6
|
+
ResponseParseError,
|
|
6
7
|
TransportError,
|
|
7
8
|
UnexpectedApiError,
|
|
8
9
|
ValidationError,
|
|
@@ -25,6 +26,7 @@ export class AccountResource {
|
|
|
25
26
|
return this._core.request<AccountRead, AccountRetrieveError>({
|
|
26
27
|
method: "GET",
|
|
27
28
|
path: "/me",
|
|
29
|
+
security: [{"apiKey":[]}],
|
|
28
30
|
errors: { "401": UnauthorizedError, "403": ForbiddenError, "429": RateLimitedError },
|
|
29
31
|
idempotent: true,
|
|
30
32
|
schemaKey: "account.retrieve",
|
|
@@ -39,5 +41,6 @@ export type AccountRetrieveError =
|
|
|
39
41
|
| ForbiddenError
|
|
40
42
|
| RateLimitedError
|
|
41
43
|
| UnexpectedApiError
|
|
44
|
+
| ResponseParseError
|
|
42
45
|
| TransportError
|
|
43
46
|
| ValidationError;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
5
5
|
import { paginate, PagePromise } from "../core/pagination.js";
|
|
6
6
|
import {
|
|
7
|
+
ResponseParseError,
|
|
7
8
|
TransportError,
|
|
8
9
|
UnexpectedApiError,
|
|
9
10
|
ValidationError,
|
|
@@ -37,6 +38,7 @@ export class ApiKeysResource {
|
|
|
37
38
|
return paginate<ApiKeyRead, ApiKeysListError>(this._core, {
|
|
38
39
|
method: "GET",
|
|
39
40
|
path: "/api_keys",
|
|
41
|
+
security: [{"apiKey":[]}],
|
|
40
42
|
query: {
|
|
41
43
|
limit: params?.limit,
|
|
42
44
|
cursor: params?.cursor,
|
|
@@ -76,6 +78,7 @@ export class ApiKeysResource {
|
|
|
76
78
|
return this._core.request<ApiKeyResponseRead, ApiKeysRevokeError>({
|
|
77
79
|
method: "DELETE",
|
|
78
80
|
path: `/api_keys/${encodeURIComponent(String(apiKeyId))}`,
|
|
81
|
+
security: [{"apiKey":[]}],
|
|
79
82
|
errors: {
|
|
80
83
|
"401": UnauthorizedError,
|
|
81
84
|
"403": ForbiddenError,
|
|
@@ -106,6 +109,7 @@ export type ApiKeysListError =
|
|
|
106
109
|
| ForbiddenError
|
|
107
110
|
| RateLimitedError
|
|
108
111
|
| UnexpectedApiError
|
|
112
|
+
| ResponseParseError
|
|
109
113
|
| TransportError
|
|
110
114
|
| ValidationError;
|
|
111
115
|
|
|
@@ -116,5 +120,6 @@ export type ApiKeysRevokeError =
|
|
|
116
120
|
| NotFoundError
|
|
117
121
|
| RateLimitedError
|
|
118
122
|
| UnexpectedApiError
|
|
123
|
+
| ResponseParseError
|
|
119
124
|
| TransportError
|
|
120
125
|
| ValidationError;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
5
5
|
import { paginate, PagePromise } from "../core/pagination.js";
|
|
6
6
|
import {
|
|
7
|
+
ResponseParseError,
|
|
7
8
|
TransportError,
|
|
8
9
|
UnexpectedApiError,
|
|
9
10
|
ValidationError,
|
|
@@ -45,6 +46,7 @@ export class DefinitionRevisionsResource {
|
|
|
45
46
|
return paginate<DefinitionRevisionRead, DefinitionRevisionsListError>(this._core, {
|
|
46
47
|
method: "GET",
|
|
47
48
|
path: `/definitions/${encodeURIComponent(String(definitionId))}/revisions`,
|
|
49
|
+
security: [{"apiKey":[]}],
|
|
48
50
|
query: {
|
|
49
51
|
limit: params?.limit,
|
|
50
52
|
cursor: params?.cursor,
|
|
@@ -83,6 +85,7 @@ export class DefinitionRevisionsResource {
|
|
|
83
85
|
return this._core.request<DefinitionRevisionResponseRead, DefinitionRevisionsRetrieveError>({
|
|
84
86
|
method: "GET",
|
|
85
87
|
path: `/definition_revisions/${encodeURIComponent(String(definitionRevisionId))}`,
|
|
88
|
+
security: [{"apiKey":[]}],
|
|
86
89
|
errors: {
|
|
87
90
|
"401": UnauthorizedError,
|
|
88
91
|
"403": ForbiddenError,
|
|
@@ -109,6 +112,7 @@ export class DefinitionRevisionsResource {
|
|
|
109
112
|
return this._core.request<string, DefinitionRevisionsRetrieveContentError>({
|
|
110
113
|
method: "GET",
|
|
111
114
|
path: `/definition_revisions/${encodeURIComponent(String(definitionRevisionId))}/content`,
|
|
115
|
+
security: [{"apiKey":[]}],
|
|
112
116
|
errors: {
|
|
113
117
|
"401": UnauthorizedError,
|
|
114
118
|
"403": ForbiddenError,
|
|
@@ -133,6 +137,7 @@ export class DefinitionRevisionsResource {
|
|
|
133
137
|
return this._core.request<string, DefinitionRevisionsRetrieveDocumentContentError>({
|
|
134
138
|
method: "GET",
|
|
135
139
|
path: `/definition_revisions/${encodeURIComponent(String(definitionRevisionId))}/documents/${encodeURIComponent(String(documentId))}/content`,
|
|
140
|
+
security: [{"apiKey":[]}],
|
|
136
141
|
errors: {
|
|
137
142
|
"401": UnauthorizedError,
|
|
138
143
|
"403": ForbiddenError,
|
|
@@ -164,6 +169,7 @@ export type DefinitionRevisionsListError =
|
|
|
164
169
|
| NotFoundError
|
|
165
170
|
| RateLimitedError
|
|
166
171
|
| UnexpectedApiError
|
|
172
|
+
| ResponseParseError
|
|
167
173
|
| TransportError
|
|
168
174
|
| ValidationError;
|
|
169
175
|
|
|
@@ -174,6 +180,7 @@ export type DefinitionRevisionsRetrieveError =
|
|
|
174
180
|
| NotFoundError
|
|
175
181
|
| RateLimitedError
|
|
176
182
|
| UnexpectedApiError
|
|
183
|
+
| ResponseParseError
|
|
177
184
|
| TransportError
|
|
178
185
|
| ValidationError;
|
|
179
186
|
|
|
@@ -184,6 +191,7 @@ export type DefinitionRevisionsRetrieveContentError =
|
|
|
184
191
|
| NotFoundError
|
|
185
192
|
| RateLimitedError
|
|
186
193
|
| UnexpectedApiError
|
|
194
|
+
| ResponseParseError
|
|
187
195
|
| TransportError
|
|
188
196
|
| ValidationError;
|
|
189
197
|
|
|
@@ -194,5 +202,6 @@ export type DefinitionRevisionsRetrieveDocumentContentError =
|
|
|
194
202
|
| NotFoundError
|
|
195
203
|
| RateLimitedError
|
|
196
204
|
| UnexpectedApiError
|
|
205
|
+
| ResponseParseError
|
|
197
206
|
| TransportError
|
|
198
207
|
| ValidationError;
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
5
5
|
import {
|
|
6
|
+
ResponseParseError,
|
|
6
7
|
TransportError,
|
|
7
8
|
UnexpectedApiError,
|
|
8
9
|
ValidationError,
|
|
9
10
|
BadRequestError,
|
|
11
|
+
ConflictError,
|
|
10
12
|
ForbiddenError,
|
|
11
13
|
NotFoundError,
|
|
12
14
|
RateLimitedError,
|
|
@@ -33,6 +35,7 @@ export class DefinitionsResource {
|
|
|
33
35
|
return this._core.request<DefinitionRead, DefinitionsRetrieveError>({
|
|
34
36
|
method: "GET",
|
|
35
37
|
path: `/definitions/${encodeURIComponent(String(definitionId))}`,
|
|
38
|
+
security: [{"apiKey":[]}],
|
|
36
39
|
errors: {
|
|
37
40
|
"401": UnauthorizedError,
|
|
38
41
|
"403": ForbiddenError,
|
|
@@ -49,25 +52,34 @@ export class DefinitionsResource {
|
|
|
49
52
|
* Update and resolve a Definition
|
|
50
53
|
*
|
|
51
54
|
* Resolves the complete document graph and records a new immutable revision before saving.
|
|
55
|
+
*
|
|
56
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
52
57
|
* `PATCH /definitions/{definition_id}`
|
|
53
58
|
*/
|
|
54
59
|
async update(
|
|
55
60
|
definitionId: DefinitionId,
|
|
56
61
|
body: DefinitionUpdateRequest,
|
|
62
|
+
params?: DefinitionsUpdateParams,
|
|
57
63
|
options?: RequestOptions,
|
|
58
64
|
): Promise<ApiResult<DefinitionRead, DefinitionsUpdateError>> {
|
|
59
65
|
return this._core.request<DefinitionRead, DefinitionsUpdateError>({
|
|
60
66
|
method: "PATCH",
|
|
61
67
|
path: `/definitions/${encodeURIComponent(String(definitionId))}`,
|
|
68
|
+
security: [{"apiKey":[]}],
|
|
69
|
+
headers: {
|
|
70
|
+
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
71
|
+
},
|
|
62
72
|
body,
|
|
63
73
|
errors: {
|
|
64
74
|
"400": BadRequestError,
|
|
65
75
|
"401": UnauthorizedError,
|
|
66
76
|
"403": ForbiddenError,
|
|
67
77
|
"404": NotFoundError,
|
|
78
|
+
"409": ConflictError,
|
|
68
79
|
"422": UnprocessableEntityError,
|
|
69
80
|
"429": RateLimitedError,
|
|
70
81
|
},
|
|
82
|
+
idempotencyKey: "Idempotency-Key",
|
|
71
83
|
schemaKey: "definitions.update",
|
|
72
84
|
options,
|
|
73
85
|
});
|
|
@@ -81,17 +93,30 @@ export type DefinitionsRetrieveError =
|
|
|
81
93
|
| NotFoundError
|
|
82
94
|
| RateLimitedError
|
|
83
95
|
| UnexpectedApiError
|
|
96
|
+
| ResponseParseError
|
|
84
97
|
| TransportError
|
|
85
98
|
| ValidationError;
|
|
86
99
|
|
|
100
|
+
export interface DefinitionsUpdateParams {
|
|
101
|
+
/**
|
|
102
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
|
|
103
|
+
* operation; account-less generation uses a hashed network identity. Retrying the same method,
|
|
104
|
+
* path, query, and JSON body replays the original response. Reusing the key with changed intent
|
|
105
|
+
* returns 409. After expiry the key starts a new write.
|
|
106
|
+
*/
|
|
107
|
+
idempotencyKey?: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
87
110
|
/** Every error `update` can produce, as a discriminated union. */
|
|
88
111
|
export type DefinitionsUpdateError =
|
|
89
112
|
| BadRequestError
|
|
90
113
|
| UnauthorizedError
|
|
91
114
|
| ForbiddenError
|
|
92
115
|
| NotFoundError
|
|
116
|
+
| ConflictError
|
|
93
117
|
| UnprocessableEntityError
|
|
94
118
|
| RateLimitedError
|
|
95
119
|
| UnexpectedApiError
|
|
120
|
+
| ResponseParseError
|
|
96
121
|
| TransportError
|
|
97
122
|
| ValidationError;
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
5
5
|
import {
|
|
6
|
+
ResponseParseError,
|
|
6
7
|
TransportError,
|
|
7
8
|
UnexpectedApiError,
|
|
8
9
|
ValidationError,
|
|
9
10
|
ApiResponseError,
|
|
10
11
|
BadRequestError,
|
|
12
|
+
ConflictError,
|
|
11
13
|
ForbiddenError,
|
|
12
14
|
PayloadTooLargeError,
|
|
13
15
|
RateLimitedError,
|
|
@@ -30,40 +32,61 @@ export class GenerateResource {
|
|
|
30
32
|
* the first 25 operations and
|
|
31
33
|
* paid plans generate the complete Definition. A present but invalid key is a
|
|
32
34
|
* 401, not a downgrade to anonymous.
|
|
35
|
+
*
|
|
36
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
33
37
|
* `POST /generate`
|
|
34
38
|
*/
|
|
35
39
|
async run(
|
|
36
40
|
body: GenerateRequest,
|
|
41
|
+
params?: GenerateRunParams,
|
|
37
42
|
options?: RequestOptions,
|
|
38
43
|
): Promise<ApiResult<GenerationResultRead, GenerateRunError>> {
|
|
39
44
|
return this._core.request<GenerationResultRead, GenerateRunError>({
|
|
40
45
|
method: "POST",
|
|
41
46
|
path: "/generate",
|
|
47
|
+
security: [{},{"apiKey":[]}],
|
|
48
|
+
headers: {
|
|
49
|
+
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
50
|
+
},
|
|
42
51
|
body,
|
|
43
52
|
errors: {
|
|
44
53
|
"400": BadRequestError,
|
|
45
54
|
"401": UnauthorizedError,
|
|
46
55
|
"403": ForbiddenError,
|
|
56
|
+
"409": ConflictError,
|
|
47
57
|
"413": PayloadTooLargeError,
|
|
48
58
|
"422": UnprocessableEntityError,
|
|
49
59
|
"429": RateLimitedError,
|
|
50
60
|
default: ApiResponseError,
|
|
51
61
|
},
|
|
62
|
+
idempotencyKey: "Idempotency-Key",
|
|
52
63
|
schemaKey: "generate.run",
|
|
53
64
|
options,
|
|
54
65
|
});
|
|
55
66
|
}
|
|
56
67
|
}
|
|
57
68
|
|
|
69
|
+
export interface GenerateRunParams {
|
|
70
|
+
/**
|
|
71
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
|
|
72
|
+
* operation; account-less generation uses a hashed network identity. Retrying the same method,
|
|
73
|
+
* path, query, and JSON body replays the original response. Reusing the key with changed intent
|
|
74
|
+
* returns 409. After expiry the key starts a new write.
|
|
75
|
+
*/
|
|
76
|
+
idempotencyKey?: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
58
79
|
/** Every error `run` can produce, as a discriminated union. */
|
|
59
80
|
export type GenerateRunError =
|
|
60
81
|
| BadRequestError
|
|
61
82
|
| UnauthorizedError
|
|
62
83
|
| ForbiddenError
|
|
84
|
+
| ConflictError
|
|
63
85
|
| PayloadTooLargeError
|
|
64
86
|
| UnprocessableEntityError
|
|
65
87
|
| RateLimitedError
|
|
66
88
|
| ApiResponseError
|
|
67
89
|
| UnexpectedApiError
|
|
90
|
+
| ResponseParseError
|
|
68
91
|
| TransportError
|
|
69
92
|
| ValidationError;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
5
5
|
import {
|
|
6
|
+
ResponseParseError,
|
|
6
7
|
TransportError,
|
|
7
8
|
UnexpectedApiError,
|
|
8
9
|
ValidationError,
|
|
@@ -29,6 +30,7 @@ export class GenerationsResource {
|
|
|
29
30
|
return this._core.request<GenerationResponseRead, GenerationsRetrieveError>({
|
|
30
31
|
method: "GET",
|
|
31
32
|
path: `/generations/${encodeURIComponent(String(generationId))}`,
|
|
33
|
+
security: [{"apiKey":[]}],
|
|
32
34
|
errors: {
|
|
33
35
|
"401": UnauthorizedError,
|
|
34
36
|
"403": ForbiddenError,
|
|
@@ -56,6 +58,7 @@ export class GenerationsResource {
|
|
|
56
58
|
return this._core.request<string, GenerationsRetrieveFileError>({
|
|
57
59
|
method: "GET",
|
|
58
60
|
path: `/generations/${encodeURIComponent(String(generationId))}/file`,
|
|
61
|
+
security: [{"apiKey":[]}],
|
|
59
62
|
query: {
|
|
60
63
|
path: params.path,
|
|
61
64
|
},
|
|
@@ -80,6 +83,7 @@ export type GenerationsRetrieveError =
|
|
|
80
83
|
| NotFoundError
|
|
81
84
|
| RateLimitedError
|
|
82
85
|
| UnexpectedApiError
|
|
86
|
+
| ResponseParseError
|
|
83
87
|
| TransportError
|
|
84
88
|
| ValidationError;
|
|
85
89
|
|
|
@@ -96,5 +100,6 @@ export type GenerationsRetrieveFileError =
|
|
|
96
100
|
| NotFoundError
|
|
97
101
|
| RateLimitedError
|
|
98
102
|
| UnexpectedApiError
|
|
103
|
+
| ResponseParseError
|
|
99
104
|
| TransportError
|
|
100
105
|
| ValidationError;
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
5
5
|
import { paginate, PagePromise } from "../core/pagination.js";
|
|
6
6
|
import {
|
|
7
|
+
ResponseParseError,
|
|
7
8
|
TransportError,
|
|
8
9
|
UnexpectedApiError,
|
|
9
10
|
ValidationError,
|
|
11
|
+
BadGatewayError,
|
|
10
12
|
BadRequestError,
|
|
11
13
|
ConflictError,
|
|
12
14
|
ForbiddenError,
|
|
@@ -26,12 +28,12 @@ import type {
|
|
|
26
28
|
DiagnosticRemediationRequest,
|
|
27
29
|
DiagnosticReport,
|
|
28
30
|
DiagnosticReportRead,
|
|
29
|
-
Generation,
|
|
30
31
|
GenerationBatch,
|
|
31
32
|
GenerationBatchRead,
|
|
32
33
|
GenerationList,
|
|
33
34
|
GenerationListRead,
|
|
34
|
-
|
|
35
|
+
GenerationSummary,
|
|
36
|
+
GenerationSummaryRead,
|
|
35
37
|
Project,
|
|
36
38
|
ProjectId,
|
|
37
39
|
ProjectList,
|
|
@@ -60,6 +62,7 @@ export class ProjectsResource {
|
|
|
60
62
|
return paginate<ProjectSummaryRead, ProjectsListError>(this._core, {
|
|
61
63
|
method: "GET",
|
|
62
64
|
path: "/projects",
|
|
65
|
+
security: [{"apiKey":[]}],
|
|
63
66
|
query: {
|
|
64
67
|
limit: params?.limit,
|
|
65
68
|
cursor: params?.cursor,
|
|
@@ -102,6 +105,7 @@ export class ProjectsResource {
|
|
|
102
105
|
return this._core.request<ProjectRead, ProjectsCreateError>({
|
|
103
106
|
method: "POST",
|
|
104
107
|
path: "/projects",
|
|
108
|
+
security: [{"apiKey":[]}],
|
|
105
109
|
headers: {
|
|
106
110
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
107
111
|
},
|
|
@@ -124,6 +128,8 @@ export class ProjectsResource {
|
|
|
124
128
|
|
|
125
129
|
/**
|
|
126
130
|
* Retrieve a project
|
|
131
|
+
*
|
|
132
|
+
* Returns Project-owned fields only. List Targets separately for Target and Delivery data.
|
|
127
133
|
* `GET /projects/{project_id}`
|
|
128
134
|
*/
|
|
129
135
|
async retrieve(
|
|
@@ -133,6 +139,7 @@ export class ProjectsResource {
|
|
|
133
139
|
return this._core.request<ProjectRead, ProjectsRetrieveError>({
|
|
134
140
|
method: "GET",
|
|
135
141
|
path: `/projects/${encodeURIComponent(String(projectId))}`,
|
|
142
|
+
security: [{"apiKey":[]}],
|
|
136
143
|
errors: {
|
|
137
144
|
"401": UnauthorizedError,
|
|
138
145
|
"403": ForbiddenError,
|
|
@@ -156,6 +163,7 @@ export class ProjectsResource {
|
|
|
156
163
|
return this._core.request<DeletedProjectRead, ProjectsDeleteError>({
|
|
157
164
|
method: "DELETE",
|
|
158
165
|
path: `/projects/${encodeURIComponent(String(projectId))}`,
|
|
166
|
+
security: [{"apiKey":[]}],
|
|
159
167
|
errors: {
|
|
160
168
|
"401": UnauthorizedError,
|
|
161
169
|
"403": ForbiddenError,
|
|
@@ -180,6 +188,7 @@ export class ProjectsResource {
|
|
|
180
188
|
return this._core.request<ProjectRead, ProjectsUpdateError>({
|
|
181
189
|
method: "PATCH",
|
|
182
190
|
path: `/projects/${encodeURIComponent(String(projectId))}`,
|
|
191
|
+
security: [{"apiKey":[]}],
|
|
183
192
|
body,
|
|
184
193
|
errors: {
|
|
185
194
|
"400": BadRequestError,
|
|
@@ -187,8 +196,10 @@ export class ProjectsResource {
|
|
|
187
196
|
"402": PaymentRequiredError,
|
|
188
197
|
"403": ForbiddenError,
|
|
189
198
|
"404": NotFoundError,
|
|
199
|
+
"409": ConflictError,
|
|
190
200
|
"422": UnprocessableEntityError,
|
|
191
201
|
"429": RateLimitedError,
|
|
202
|
+
"502": BadGatewayError,
|
|
192
203
|
},
|
|
193
204
|
schemaKey: "projects.update",
|
|
194
205
|
options,
|
|
@@ -211,6 +222,7 @@ export class ProjectsResource {
|
|
|
211
222
|
return this._core.request<DiagnosticReportRead, ProjectsRetrieveDiagnosticsError>({
|
|
212
223
|
method: "GET",
|
|
213
224
|
path: `/projects/${encodeURIComponent(String(projectId))}/diagnostics`,
|
|
225
|
+
security: [{"apiKey":[]}],
|
|
214
226
|
errors: {
|
|
215
227
|
"401": UnauthorizedError,
|
|
216
228
|
"403": ForbiddenError,
|
|
@@ -229,22 +241,31 @@ export class ProjectsResource {
|
|
|
229
241
|
* Fetches the complete configured source, records a new immutable revision only when content
|
|
230
242
|
* changed, and returns its Diagnostics. This does not generate targets or consume a metered
|
|
231
243
|
* generation.
|
|
244
|
+
*
|
|
245
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
232
246
|
* `POST /projects/{project_id}/diagnostics`
|
|
233
247
|
*/
|
|
234
248
|
async refreshDiagnostics(
|
|
235
249
|
projectId: ProjectId,
|
|
250
|
+
params?: ProjectsRefreshDiagnosticsParams,
|
|
236
251
|
options?: RequestOptions,
|
|
237
252
|
): Promise<ApiResult<DiagnosticReportRead, ProjectsRefreshDiagnosticsError>> {
|
|
238
253
|
return this._core.request<DiagnosticReportRead, ProjectsRefreshDiagnosticsError>({
|
|
239
254
|
method: "POST",
|
|
240
255
|
path: `/projects/${encodeURIComponent(String(projectId))}/diagnostics`,
|
|
256
|
+
security: [{"apiKey":[]}],
|
|
257
|
+
headers: {
|
|
258
|
+
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
259
|
+
},
|
|
241
260
|
errors: {
|
|
242
261
|
"401": UnauthorizedError,
|
|
243
262
|
"403": ForbiddenError,
|
|
244
263
|
"404": NotFoundError,
|
|
264
|
+
"409": ConflictError,
|
|
245
265
|
"422": UnprocessableEntityError,
|
|
246
266
|
"429": RateLimitedError,
|
|
247
267
|
},
|
|
268
|
+
idempotencyKey: "Idempotency-Key",
|
|
248
269
|
schemaKey: "projects.refreshDiagnostics",
|
|
249
270
|
options,
|
|
250
271
|
});
|
|
@@ -256,25 +277,34 @@ export class ProjectsResource {
|
|
|
256
277
|
* Applies only deterministic patches. Repository sources receive an updateable source pull
|
|
257
278
|
* request; URL sources receive project overlays. Diagnostics that require API-owner intent return
|
|
258
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.
|
|
259
282
|
* `POST /projects/{project_id}/diagnostics/remediations`
|
|
260
283
|
*/
|
|
261
284
|
async remediateDiagnostics(
|
|
262
285
|
projectId: ProjectId,
|
|
263
286
|
body: DiagnosticRemediationRequest,
|
|
287
|
+
params?: ProjectsRemediateDiagnosticsParams,
|
|
264
288
|
options?: RequestOptions,
|
|
265
289
|
): Promise<ApiResult<DiagnosticRemediationRead, ProjectsRemediateDiagnosticsError>> {
|
|
266
290
|
return this._core.request<DiagnosticRemediationRead, ProjectsRemediateDiagnosticsError>({
|
|
267
291
|
method: "POST",
|
|
268
292
|
path: `/projects/${encodeURIComponent(String(projectId))}/diagnostics/remediations`,
|
|
293
|
+
security: [{"apiKey":[]}],
|
|
294
|
+
headers: {
|
|
295
|
+
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
296
|
+
},
|
|
269
297
|
body,
|
|
270
298
|
errors: {
|
|
271
299
|
"400": BadRequestError,
|
|
272
300
|
"401": UnauthorizedError,
|
|
273
301
|
"403": ForbiddenError,
|
|
274
302
|
"404": NotFoundError,
|
|
303
|
+
"409": ConflictError,
|
|
275
304
|
"422": UnprocessableEntityError,
|
|
276
305
|
"429": RateLimitedError,
|
|
277
306
|
},
|
|
307
|
+
idempotencyKey: "Idempotency-Key",
|
|
278
308
|
schemaKey: "projects.remediateDiagnostics",
|
|
279
309
|
options,
|
|
280
310
|
});
|
|
@@ -295,6 +325,7 @@ export class ProjectsResource {
|
|
|
295
325
|
return this._core.request<RepositoryIntegrationHealthRead, ProjectsRetrieveIntegrationHealthError>({
|
|
296
326
|
method: "GET",
|
|
297
327
|
path: `/projects/${encodeURIComponent(String(projectId))}/integration-health`,
|
|
328
|
+
security: [{"apiKey":[]}],
|
|
298
329
|
errors: {
|
|
299
330
|
"401": UnauthorizedError,
|
|
300
331
|
"403": ForbiddenError,
|
|
@@ -317,10 +348,11 @@ export class ProjectsResource {
|
|
|
317
348
|
projectId: ProjectId,
|
|
318
349
|
params?: ProjectsListGenerationsParams,
|
|
319
350
|
options?: RequestOptions,
|
|
320
|
-
): PagePromise<
|
|
321
|
-
return paginate<
|
|
351
|
+
): PagePromise<GenerationSummaryRead, ProjectsListGenerationsError> {
|
|
352
|
+
return paginate<GenerationSummaryRead, ProjectsListGenerationsError>(this._core, {
|
|
322
353
|
method: "GET",
|
|
323
354
|
path: `/projects/${encodeURIComponent(String(projectId))}/generations`,
|
|
355
|
+
security: [{"apiKey":[]}],
|
|
324
356
|
query: {
|
|
325
357
|
limit: params?.limit,
|
|
326
358
|
cursor: params?.cursor,
|
|
@@ -356,24 +388,33 @@ export class ProjectsResource {
|
|
|
356
388
|
* commit, branch, or pull request is created and that generation reports
|
|
357
389
|
* `pr_status: no_changes`. This is the same pipeline automatic
|
|
358
390
|
* regeneration runs after a source change.
|
|
391
|
+
*
|
|
392
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
359
393
|
* `POST /projects/{project_id}/generations`
|
|
360
394
|
*/
|
|
361
395
|
async generate(
|
|
362
396
|
projectId: ProjectId,
|
|
397
|
+
params?: ProjectsGenerateParams,
|
|
363
398
|
options?: RequestOptions,
|
|
364
399
|
): Promise<ApiResult<GenerationBatchRead, ProjectsGenerateError>> {
|
|
365
400
|
return this._core.request<GenerationBatchRead, ProjectsGenerateError>({
|
|
366
401
|
method: "POST",
|
|
367
402
|
path: `/projects/${encodeURIComponent(String(projectId))}/generations`,
|
|
403
|
+
security: [{"apiKey":[]}],
|
|
404
|
+
headers: {
|
|
405
|
+
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
406
|
+
},
|
|
368
407
|
errors: {
|
|
369
408
|
"401": UnauthorizedError,
|
|
370
409
|
"402": PaymentRequiredError,
|
|
371
410
|
"403": ForbiddenError,
|
|
372
411
|
"404": NotFoundError,
|
|
412
|
+
"409": ConflictError,
|
|
373
413
|
"422": UnprocessableEntityError,
|
|
374
414
|
"429": RateLimitedError,
|
|
375
415
|
"500": InternalServerError,
|
|
376
416
|
},
|
|
417
|
+
idempotencyKey: "Idempotency-Key",
|
|
377
418
|
schemaKey: "projects.generate",
|
|
378
419
|
options,
|
|
379
420
|
});
|
|
@@ -397,14 +438,16 @@ export type ProjectsListError =
|
|
|
397
438
|
| ForbiddenError
|
|
398
439
|
| RateLimitedError
|
|
399
440
|
| UnexpectedApiError
|
|
441
|
+
| ResponseParseError
|
|
400
442
|
| TransportError
|
|
401
443
|
| ValidationError;
|
|
402
444
|
|
|
403
445
|
export interface ProjectsCreateParams {
|
|
404
446
|
/**
|
|
405
|
-
*
|
|
406
|
-
*
|
|
407
|
-
*
|
|
447
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
|
|
448
|
+
* operation; account-less generation uses a hashed network identity. Retrying the same method,
|
|
449
|
+
* path, query, and JSON body replays the original response. Reusing the key with changed intent
|
|
450
|
+
* returns 409. After expiry the key starts a new write.
|
|
408
451
|
*/
|
|
409
452
|
idempotencyKey?: string;
|
|
410
453
|
}
|
|
@@ -420,6 +463,7 @@ export type ProjectsCreateError =
|
|
|
420
463
|
| RateLimitedError
|
|
421
464
|
| InternalServerError
|
|
422
465
|
| UnexpectedApiError
|
|
466
|
+
| ResponseParseError
|
|
423
467
|
| TransportError
|
|
424
468
|
| ValidationError;
|
|
425
469
|
|
|
@@ -430,6 +474,7 @@ export type ProjectsRetrieveError =
|
|
|
430
474
|
| NotFoundError
|
|
431
475
|
| RateLimitedError
|
|
432
476
|
| UnexpectedApiError
|
|
477
|
+
| ResponseParseError
|
|
433
478
|
| TransportError
|
|
434
479
|
| ValidationError;
|
|
435
480
|
|
|
@@ -440,6 +485,7 @@ export type ProjectsDeleteError =
|
|
|
440
485
|
| NotFoundError
|
|
441
486
|
| RateLimitedError
|
|
442
487
|
| UnexpectedApiError
|
|
488
|
+
| ResponseParseError
|
|
443
489
|
| TransportError
|
|
444
490
|
| ValidationError;
|
|
445
491
|
|
|
@@ -450,9 +496,12 @@ export type ProjectsUpdateError =
|
|
|
450
496
|
| PaymentRequiredError
|
|
451
497
|
| ForbiddenError
|
|
452
498
|
| NotFoundError
|
|
499
|
+
| ConflictError
|
|
453
500
|
| UnprocessableEntityError
|
|
454
501
|
| RateLimitedError
|
|
502
|
+
| BadGatewayError
|
|
455
503
|
| UnexpectedApiError
|
|
504
|
+
| ResponseParseError
|
|
456
505
|
| TransportError
|
|
457
506
|
| ValidationError;
|
|
458
507
|
|
|
@@ -463,29 +512,54 @@ export type ProjectsRetrieveDiagnosticsError =
|
|
|
463
512
|
| NotFoundError
|
|
464
513
|
| RateLimitedError
|
|
465
514
|
| UnexpectedApiError
|
|
515
|
+
| ResponseParseError
|
|
466
516
|
| TransportError
|
|
467
517
|
| ValidationError;
|
|
468
518
|
|
|
519
|
+
export interface ProjectsRefreshDiagnosticsParams {
|
|
520
|
+
/**
|
|
521
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
|
|
522
|
+
* operation; account-less generation uses a hashed network identity. Retrying the same method,
|
|
523
|
+
* path, query, and JSON body replays the original response. Reusing the key with changed intent
|
|
524
|
+
* returns 409. After expiry the key starts a new write.
|
|
525
|
+
*/
|
|
526
|
+
idempotencyKey?: string;
|
|
527
|
+
}
|
|
528
|
+
|
|
469
529
|
/** Every error `refreshDiagnostics` can produce, as a discriminated union. */
|
|
470
530
|
export type ProjectsRefreshDiagnosticsError =
|
|
471
531
|
| UnauthorizedError
|
|
472
532
|
| ForbiddenError
|
|
473
533
|
| NotFoundError
|
|
534
|
+
| ConflictError
|
|
474
535
|
| UnprocessableEntityError
|
|
475
536
|
| RateLimitedError
|
|
476
537
|
| UnexpectedApiError
|
|
538
|
+
| ResponseParseError
|
|
477
539
|
| TransportError
|
|
478
540
|
| ValidationError;
|
|
479
541
|
|
|
542
|
+
export interface ProjectsRemediateDiagnosticsParams {
|
|
543
|
+
/**
|
|
544
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
|
|
545
|
+
* operation; account-less generation uses a hashed network identity. Retrying the same method,
|
|
546
|
+
* path, query, and JSON body replays the original response. Reusing the key with changed intent
|
|
547
|
+
* returns 409. After expiry the key starts a new write.
|
|
548
|
+
*/
|
|
549
|
+
idempotencyKey?: string;
|
|
550
|
+
}
|
|
551
|
+
|
|
480
552
|
/** Every error `remediateDiagnostics` can produce, as a discriminated union. */
|
|
481
553
|
export type ProjectsRemediateDiagnosticsError =
|
|
482
554
|
| BadRequestError
|
|
483
555
|
| UnauthorizedError
|
|
484
556
|
| ForbiddenError
|
|
485
557
|
| NotFoundError
|
|
558
|
+
| ConflictError
|
|
486
559
|
| UnprocessableEntityError
|
|
487
560
|
| RateLimitedError
|
|
488
561
|
| UnexpectedApiError
|
|
562
|
+
| ResponseParseError
|
|
489
563
|
| TransportError
|
|
490
564
|
| ValidationError;
|
|
491
565
|
|
|
@@ -496,6 +570,7 @@ export type ProjectsRetrieveIntegrationHealthError =
|
|
|
496
570
|
| NotFoundError
|
|
497
571
|
| RateLimitedError
|
|
498
572
|
| UnexpectedApiError
|
|
573
|
+
| ResponseParseError
|
|
499
574
|
| TransportError
|
|
500
575
|
| ValidationError;
|
|
501
576
|
|
|
@@ -519,18 +594,31 @@ export type ProjectsListGenerationsError =
|
|
|
519
594
|
| NotFoundError
|
|
520
595
|
| RateLimitedError
|
|
521
596
|
| UnexpectedApiError
|
|
597
|
+
| ResponseParseError
|
|
522
598
|
| TransportError
|
|
523
599
|
| ValidationError;
|
|
524
600
|
|
|
601
|
+
export interface ProjectsGenerateParams {
|
|
602
|
+
/**
|
|
603
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
|
|
604
|
+
* operation; account-less generation uses a hashed network identity. Retrying the same method,
|
|
605
|
+
* path, query, and JSON body replays the original response. Reusing the key with changed intent
|
|
606
|
+
* returns 409. After expiry the key starts a new write.
|
|
607
|
+
*/
|
|
608
|
+
idempotencyKey?: string;
|
|
609
|
+
}
|
|
610
|
+
|
|
525
611
|
/** Every error `generate` can produce, as a discriminated union. */
|
|
526
612
|
export type ProjectsGenerateError =
|
|
527
613
|
| UnauthorizedError
|
|
528
614
|
| PaymentRequiredError
|
|
529
615
|
| ForbiddenError
|
|
530
616
|
| NotFoundError
|
|
617
|
+
| ConflictError
|
|
531
618
|
| UnprocessableEntityError
|
|
532
619
|
| RateLimitedError
|
|
533
620
|
| InternalServerError
|
|
534
621
|
| UnexpectedApiError
|
|
622
|
+
| ResponseParseError
|
|
535
623
|
| TransportError
|
|
536
624
|
| ValidationError;
|