@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,7 +1,7 @@
|
|
|
1
1
|
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
2
2
|
import { PagePromise } from "../core/pagination.js";
|
|
3
|
-
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError,
|
|
4
|
-
import type { ApiKeyRead, ApiKeyResponseRead } from "../types.js";
|
|
3
|
+
import { RateLimitError, ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError, NotFoundError, PreconditionFailedError, ServerError, UnauthorizedError } from "../errors.js";
|
|
4
|
+
import type { ApiKeyRead, ApiKeyResponseRead, ErrorModelRead } from "../types.js";
|
|
5
5
|
export declare class ApiKeysResource {
|
|
6
6
|
private readonly _core;
|
|
7
7
|
constructor(_core: HttpCore);
|
|
@@ -25,13 +25,14 @@ export declare class ApiKeysResource {
|
|
|
25
25
|
/**
|
|
26
26
|
* Revoke an API key
|
|
27
27
|
*
|
|
28
|
-
* Revokes a key.
|
|
28
|
+
* Revokes a key immediately. The key stays listed with `status: revoked`. Repeating the request
|
|
29
|
+
* returns the same result.
|
|
29
30
|
*
|
|
30
31
|
* With OAuth, members can revoke their own keys; organization admins can revoke any key.
|
|
31
32
|
* Organization API keys can revoke any key in their organization.
|
|
32
33
|
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
33
34
|
* and If-Match.
|
|
34
|
-
* `
|
|
35
|
+
* `POST /api-keys/{api_key_id}/revoke`
|
|
35
36
|
*/
|
|
36
37
|
revoke(apiKeyId: string, params?: ApiKeysRevokeParams, options?: RequestOptions): Promise<ApiKeyResponseRead>;
|
|
37
38
|
}
|
|
@@ -51,11 +52,13 @@ export interface ApiKeysListParams {
|
|
|
51
52
|
* change between requests.
|
|
52
53
|
*/
|
|
53
54
|
cursor?: string;
|
|
55
|
+
/** Only keys with this status. */
|
|
56
|
+
status?: "active" | "revoked";
|
|
54
57
|
}
|
|
55
58
|
/** Typed errors `list` can throw. */
|
|
56
|
-
export type ApiKeysListError = BadRequestError | UnauthorizedError | ForbiddenError |
|
|
59
|
+
export type ApiKeysListError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
57
60
|
/** Typed errors `get` can throw. */
|
|
58
|
-
export type ApiKeysGetError = UnauthorizedError | ForbiddenError | NotFoundError |
|
|
61
|
+
export type ApiKeysGetError = UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
59
62
|
export interface ApiKeysRevokeParams {
|
|
60
63
|
/**
|
|
61
64
|
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
@@ -65,5 +68,5 @@ export interface ApiKeysRevokeParams {
|
|
|
65
68
|
ifMatch?: string;
|
|
66
69
|
}
|
|
67
70
|
/** Typed errors `revoke` can throw. */
|
|
68
|
-
export type ApiKeysRevokeError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | PreconditionFailedError |
|
|
71
|
+
export type ApiKeysRevokeError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | PreconditionFailedError | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
69
72
|
//# sourceMappingURL=api-keys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../src/resources/api-keys.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../src/resources/api-keys.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,uBAAuB,EACvB,WAAW,EACX,iBAA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c,CAAC,GAC9B,WAAW,CAAC,cAAc,CAAC,GAC3B,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,uCAAuC;AACvC,MAAM,MAAM,kBAAkB,GAC1B,eAAe,CAAC,cAAc,CAAC,GAC/B,iBAAiB,CAAC,cAAc,CAAC,GACjC,cAAc,CAAC,cAAc,CAAC,GAC9B,aAAa,CAAC,cAAc,CAAC,GAC7B,uBAAuB,GACvB,cAAc,CAAC,cAAc,CAAC,GAC9B,WAAW,CAAC,cAAc,CAAC,GAC3B,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
1
|
+
// Typeship — apiKeys resource.
|
|
2
|
+
// Generated by Typeship — https://typeship.dev
|
|
3
3
|
import { paginate } from "../core/pagination.js";
|
|
4
|
-
import {
|
|
4
|
+
import { PreconditionFailedError, } from "../errors.js";
|
|
5
5
|
export class ApiKeysResource {
|
|
6
6
|
_core;
|
|
7
7
|
constructor(_core) {
|
|
@@ -24,13 +24,7 @@ export class ApiKeysResource {
|
|
|
24
24
|
query: {
|
|
25
25
|
limit: params?.limit,
|
|
26
26
|
cursor: params?.cursor,
|
|
27
|
-
|
|
28
|
-
errors: {
|
|
29
|
-
"400": BadRequestError,
|
|
30
|
-
"401": UnauthorizedError,
|
|
31
|
-
"403": ForbiddenError,
|
|
32
|
-
"429": RateLimitedError,
|
|
33
|
-
"500": InternalServerError,
|
|
27
|
+
status: params?.status,
|
|
34
28
|
},
|
|
35
29
|
idempotent: true,
|
|
36
30
|
schemaKey: "apiKeys.list",
|
|
@@ -55,13 +49,6 @@ export class ApiKeysResource {
|
|
|
55
49
|
method: "GET",
|
|
56
50
|
path: `/api-keys/${encodeURIComponent(String(apiKeyId))}`,
|
|
57
51
|
security: [{ "apiKey": [] }],
|
|
58
|
-
errors: {
|
|
59
|
-
"401": UnauthorizedError,
|
|
60
|
-
"403": ForbiddenError,
|
|
61
|
-
"404": NotFoundError,
|
|
62
|
-
"429": RateLimitedError,
|
|
63
|
-
"500": InternalServerError,
|
|
64
|
-
},
|
|
65
52
|
idempotent: true,
|
|
66
53
|
schemaKey: "apiKeys.get",
|
|
67
54
|
options,
|
|
@@ -70,32 +57,24 @@ export class ApiKeysResource {
|
|
|
70
57
|
/**
|
|
71
58
|
* Revoke an API key
|
|
72
59
|
*
|
|
73
|
-
* Revokes a key.
|
|
60
|
+
* Revokes a key immediately. The key stays listed with `status: revoked`. Repeating the request
|
|
61
|
+
* returns the same result.
|
|
74
62
|
*
|
|
75
63
|
* With OAuth, members can revoke their own keys; organization admins can revoke any key.
|
|
76
64
|
* Organization API keys can revoke any key in their organization.
|
|
77
65
|
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
78
66
|
* and If-Match.
|
|
79
|
-
* `
|
|
67
|
+
* `POST /api-keys/{api_key_id}/revoke`
|
|
80
68
|
*/
|
|
81
69
|
async revoke(apiKeyId, params, options) {
|
|
82
70
|
return this._core.requestData({
|
|
83
|
-
method: "
|
|
84
|
-
path: `/api-keys/${encodeURIComponent(String(apiKeyId))}`,
|
|
71
|
+
method: "POST",
|
|
72
|
+
path: `/api-keys/${encodeURIComponent(String(apiKeyId))}/revoke`,
|
|
85
73
|
security: [{ "apiKey": [] }],
|
|
86
74
|
headers: {
|
|
87
75
|
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
88
76
|
},
|
|
89
|
-
errors: {
|
|
90
|
-
"400": BadRequestError,
|
|
91
|
-
"401": UnauthorizedError,
|
|
92
|
-
"403": ForbiddenError,
|
|
93
|
-
"404": NotFoundError,
|
|
94
|
-
"412": PreconditionFailedError,
|
|
95
|
-
"429": RateLimitedError,
|
|
96
|
-
"500": InternalServerError,
|
|
97
|
-
},
|
|
98
|
-
idempotent: true,
|
|
77
|
+
errors: { "412": PreconditionFailedError },
|
|
99
78
|
schemaKey: "apiKeys.revoke",
|
|
100
79
|
options,
|
|
101
80
|
});
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
2
2
|
import { PagePromise } from "../core/pagination.js";
|
|
3
|
-
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError,
|
|
4
|
-
import type { DeliveryId, DeliveryRead, DeliveryResponseRead, TargetId } from "../types.js";
|
|
3
|
+
import { RateLimitError, ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ConflictError, ForbiddenError, NotFoundError, PreconditionFailedError, ServerError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
4
|
+
import type { DeletedDeliveryRead, DeliveryCreateRequest, DeliveryId, DeliveryRead, DeliveryResponseRead, DeliveryUpdateRequest, ErrorModelRead, TargetId } from "../types.js";
|
|
5
5
|
export declare class DeliveriesResource {
|
|
6
6
|
private readonly _core;
|
|
7
7
|
constructor(_core: HttpCore);
|
|
8
|
+
/**
|
|
9
|
+
* Create a Delivery
|
|
10
|
+
*
|
|
11
|
+
* Adds a repository or hosted MCP Delivery to a Target. A Target has at most one Delivery of each
|
|
12
|
+
* type; a `409 delivery_exists` means it already has one, so update that Delivery instead.
|
|
13
|
+
* With Project auto_generate enabled, adding a Delivery queues the Target's Generation. A queued
|
|
14
|
+
* or running Target reuses that Generation.
|
|
15
|
+
*
|
|
16
|
+
* A `409 delivery_conflict` means another Target owns the requested repository directory. A `409
|
|
17
|
+
* target_busy` means the Target is publishing; wait for it to finish.
|
|
18
|
+
* A `502 follow_up_failed` means the Delivery was saved, but retiring an obsolete review or
|
|
19
|
+
* regenerating the Target failed. Get the Delivery and follow the error's retryable and
|
|
20
|
+
* suggested_action fields.
|
|
21
|
+
*
|
|
22
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
23
|
+
* `POST /deliveries`
|
|
24
|
+
*/
|
|
25
|
+
create(body: DeliveryCreateRequest, params?: DeliveriesCreateParams, options?: RequestOptions): Promise<DeliveryResponseRead>;
|
|
8
26
|
/**
|
|
9
27
|
* List Deliveries
|
|
10
28
|
*
|
|
@@ -20,7 +38,53 @@ export declare class DeliveriesResource {
|
|
|
20
38
|
* `GET /deliveries/{delivery_id}`
|
|
21
39
|
*/
|
|
22
40
|
get(deliveryId: DeliveryId, options?: RequestOptions): Promise<DeliveryResponseRead>;
|
|
41
|
+
/**
|
|
42
|
+
* Update a Delivery
|
|
43
|
+
*
|
|
44
|
+
* Replaces a repository Delivery's settings. Omitted optional settings reset to their defaults.
|
|
45
|
+
* Hosted MCP Deliveries have no settings to update.
|
|
46
|
+
* With Project auto_generate enabled, changing a Delivery queues the Target's Generation. A
|
|
47
|
+
* queued or running Target reuses that Generation.
|
|
48
|
+
* Omitting If-Match applies the update to the current Delivery; with If-Match, a stale ETag
|
|
49
|
+
* returns 412 precondition_failed without saving.
|
|
50
|
+
*
|
|
51
|
+
* A `409 delivery_conflict` means another Target owns the requested repository directory. A `409
|
|
52
|
+
* target_busy` means the Target is publishing; wait for it to finish.
|
|
53
|
+
* A `502 follow_up_failed` means the Delivery was saved, but retiring an obsolete review or
|
|
54
|
+
* regenerating the Target failed. Get the Delivery and follow the error's retryable and
|
|
55
|
+
* suggested_action fields.
|
|
56
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
57
|
+
* and If-Match.
|
|
58
|
+
* `PATCH /deliveries/{delivery_id}`
|
|
59
|
+
*/
|
|
60
|
+
update(deliveryId: DeliveryId, body: DeliveryUpdateRequest, params?: DeliveriesUpdateParams, options?: RequestOptions): Promise<DeliveryResponseRead>;
|
|
61
|
+
/**
|
|
62
|
+
* Delete a Delivery
|
|
63
|
+
*
|
|
64
|
+
* Removes a Delivery from its Target. Removing a repository Delivery retires the Target's open
|
|
65
|
+
* Draft pull request; removing a hosted MCP Delivery stops serving its URL. Recreating the type
|
|
66
|
+
* later allocates a new ID and, for hosted MCP, a new URL.
|
|
67
|
+
*
|
|
68
|
+
* A `409 target_busy` means the Target is publishing; wait for it to finish. A `502
|
|
69
|
+
* follow_up_failed` means the Delivery was removed, but retiring an obsolete review or
|
|
70
|
+
* regenerating the Target failed.
|
|
71
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
72
|
+
* and If-Match.
|
|
73
|
+
* `DELETE /deliveries/{delivery_id}`
|
|
74
|
+
*/
|
|
75
|
+
delete(deliveryId: DeliveryId, params?: DeliveriesDeleteParams, options?: RequestOptions): Promise<DeletedDeliveryRead>;
|
|
76
|
+
}
|
|
77
|
+
export interface DeliveriesCreateParams {
|
|
78
|
+
/**
|
|
79
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
|
|
80
|
+
* and operation; generation without an organization uses a hashed network identity. Retrying the
|
|
81
|
+
* same method, path, query, If-Match header, and JSON body replays the original response. Reusing
|
|
82
|
+
* the key with changed intent returns 409. After expiry the key starts a new write.
|
|
83
|
+
*/
|
|
84
|
+
idempotencyKey?: string;
|
|
23
85
|
}
|
|
86
|
+
/** Typed errors `create` can throw. */
|
|
87
|
+
export type DeliveriesCreateError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | UnprocessableEntityError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
24
88
|
export interface DeliveriesListParams {
|
|
25
89
|
/**
|
|
26
90
|
* Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
|
|
@@ -41,7 +105,27 @@ export interface DeliveriesListParams {
|
|
|
41
105
|
targetId?: TargetId;
|
|
42
106
|
}
|
|
43
107
|
/** Typed errors `list` can throw. */
|
|
44
|
-
export type DeliveriesListError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError |
|
|
108
|
+
export type DeliveriesListError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
45
109
|
/** Typed errors `get` can throw. */
|
|
46
|
-
export type DeliveriesGetError = UnauthorizedError | ForbiddenError | NotFoundError |
|
|
110
|
+
export type DeliveriesGetError = UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
111
|
+
export interface DeliveriesUpdateParams {
|
|
112
|
+
/**
|
|
113
|
+
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
114
|
+
* otherwise it returns 412 precondition_failed without changes. Omit to write the current
|
|
115
|
+
* version. See https://typeship.dev/docs/typeship-api#conditional-writes.
|
|
116
|
+
*/
|
|
117
|
+
ifMatch?: string;
|
|
118
|
+
}
|
|
119
|
+
/** Typed errors `update` can throw. */
|
|
120
|
+
export type DeliveriesUpdateError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | PreconditionFailedError | UnprocessableEntityError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
121
|
+
export interface DeliveriesDeleteParams {
|
|
122
|
+
/**
|
|
123
|
+
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
124
|
+
* otherwise it returns 412 precondition_failed without changes. Omit to write the current
|
|
125
|
+
* version. See https://typeship.dev/docs/typeship-api#conditional-writes.
|
|
126
|
+
*/
|
|
127
|
+
ifMatch?: string;
|
|
128
|
+
}
|
|
129
|
+
/** Typed errors `delete` can throw. */
|
|
130
|
+
export type DeliveriesDeleteError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | PreconditionFailedError | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
47
131
|
//# sourceMappingURL=deliveries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deliveries.d.ts","sourceRoot":"","sources":["../../src/resources/deliveries.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"deliveries.d.ts","sourceRoot":"","sources":["../../src/resources/deliveries.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,aAAa,EACb,uBAAuB,EACvB,WAAW,EACX,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAEV,mBAAmB,EAEnB,qBAAqB,EACrB,UAAU,EAGV,YAAY,EAEZ,oBAAoB,EACpB,qBAAqB,EAErB,cAAc,EACd,QAAQ,EACT,MAAM,aAAa,CAAC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Ac,GACd,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,uCAAuC;AACvC,MAAM,MAAM,qBAAqB,GAC7B,eAAe,CAAC,cAAc,CAAC,GAC/B,iBAAiB,CAAC,cAAc,CAAC,GACjC,cAAc,CAAC,cAAc,CAAC,GAC9B,aAAa,CAAC,cAAc,CAAC,GAC7B,aAAa,CAAC,cAAc,CAAC,GAC7B,uBAAuB,GACvB,cAAc,CAAC,cAAc,CAAC,GAC9B,WAAW,CAAC,cAAc,CAAC,GAC3B,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -1,12 +1,43 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
1
|
+
// Typeship — deliveries resource.
|
|
2
|
+
// Generated by Typeship — https://typeship.dev
|
|
3
3
|
import { paginate } from "../core/pagination.js";
|
|
4
|
-
import {
|
|
4
|
+
import { PreconditionFailedError, } from "../errors.js";
|
|
5
5
|
export class DeliveriesResource {
|
|
6
6
|
_core;
|
|
7
7
|
constructor(_core) {
|
|
8
8
|
this._core = _core;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* Create a Delivery
|
|
12
|
+
*
|
|
13
|
+
* Adds a repository or hosted MCP Delivery to a Target. A Target has at most one Delivery of each
|
|
14
|
+
* type; a `409 delivery_exists` means it already has one, so update that Delivery instead.
|
|
15
|
+
* With Project auto_generate enabled, adding a Delivery queues the Target's Generation. A queued
|
|
16
|
+
* or running Target reuses that Generation.
|
|
17
|
+
*
|
|
18
|
+
* A `409 delivery_conflict` means another Target owns the requested repository directory. A `409
|
|
19
|
+
* target_busy` means the Target is publishing; wait for it to finish.
|
|
20
|
+
* A `502 follow_up_failed` means the Delivery was saved, but retiring an obsolete review or
|
|
21
|
+
* regenerating the Target failed. Get the Delivery and follow the error's retryable and
|
|
22
|
+
* suggested_action fields.
|
|
23
|
+
*
|
|
24
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
25
|
+
* `POST /deliveries`
|
|
26
|
+
*/
|
|
27
|
+
async create(body, params, options) {
|
|
28
|
+
return this._core.requestData({
|
|
29
|
+
method: "POST",
|
|
30
|
+
path: "/deliveries",
|
|
31
|
+
security: [{ "apiKey": [] }],
|
|
32
|
+
headers: {
|
|
33
|
+
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
34
|
+
},
|
|
35
|
+
body,
|
|
36
|
+
idempotencyKey: "Idempotency-Key",
|
|
37
|
+
schemaKey: "deliveries.create",
|
|
38
|
+
options,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
10
41
|
/**
|
|
11
42
|
* List Deliveries
|
|
12
43
|
*
|
|
@@ -23,14 +54,6 @@ export class DeliveriesResource {
|
|
|
23
54
|
cursor: params?.cursor,
|
|
24
55
|
target_id: params?.targetId,
|
|
25
56
|
},
|
|
26
|
-
errors: {
|
|
27
|
-
"400": BadRequestError,
|
|
28
|
-
"401": UnauthorizedError,
|
|
29
|
-
"403": ForbiddenError,
|
|
30
|
-
"404": NotFoundError,
|
|
31
|
-
"429": RateLimitedError,
|
|
32
|
-
"500": InternalServerError,
|
|
33
|
-
},
|
|
34
57
|
idempotent: true,
|
|
35
58
|
schemaKey: "deliveries.list",
|
|
36
59
|
options,
|
|
@@ -55,16 +78,70 @@ export class DeliveriesResource {
|
|
|
55
78
|
method: "GET",
|
|
56
79
|
path: `/deliveries/${encodeURIComponent(String(deliveryId))}`,
|
|
57
80
|
security: [{ "apiKey": [] }],
|
|
58
|
-
errors: {
|
|
59
|
-
"401": UnauthorizedError,
|
|
60
|
-
"403": ForbiddenError,
|
|
61
|
-
"404": NotFoundError,
|
|
62
|
-
"429": RateLimitedError,
|
|
63
|
-
"500": InternalServerError,
|
|
64
|
-
},
|
|
65
81
|
idempotent: true,
|
|
66
82
|
schemaKey: "deliveries.get",
|
|
67
83
|
options,
|
|
68
84
|
});
|
|
69
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Update a Delivery
|
|
88
|
+
*
|
|
89
|
+
* Replaces a repository Delivery's settings. Omitted optional settings reset to their defaults.
|
|
90
|
+
* Hosted MCP Deliveries have no settings to update.
|
|
91
|
+
* With Project auto_generate enabled, changing a Delivery queues the Target's Generation. A
|
|
92
|
+
* queued or running Target reuses that Generation.
|
|
93
|
+
* Omitting If-Match applies the update to the current Delivery; with If-Match, a stale ETag
|
|
94
|
+
* returns 412 precondition_failed without saving.
|
|
95
|
+
*
|
|
96
|
+
* A `409 delivery_conflict` means another Target owns the requested repository directory. A `409
|
|
97
|
+
* target_busy` means the Target is publishing; wait for it to finish.
|
|
98
|
+
* A `502 follow_up_failed` means the Delivery was saved, but retiring an obsolete review or
|
|
99
|
+
* regenerating the Target failed. Get the Delivery and follow the error's retryable and
|
|
100
|
+
* suggested_action fields.
|
|
101
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
102
|
+
* and If-Match.
|
|
103
|
+
* `PATCH /deliveries/{delivery_id}`
|
|
104
|
+
*/
|
|
105
|
+
async update(deliveryId, body, params, options) {
|
|
106
|
+
return this._core.requestData({
|
|
107
|
+
method: "PATCH",
|
|
108
|
+
path: `/deliveries/${encodeURIComponent(String(deliveryId))}`,
|
|
109
|
+
security: [{ "apiKey": [] }],
|
|
110
|
+
headers: {
|
|
111
|
+
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
112
|
+
},
|
|
113
|
+
body,
|
|
114
|
+
errors: { "412": PreconditionFailedError },
|
|
115
|
+
schemaKey: "deliveries.update",
|
|
116
|
+
options,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Delete a Delivery
|
|
121
|
+
*
|
|
122
|
+
* Removes a Delivery from its Target. Removing a repository Delivery retires the Target's open
|
|
123
|
+
* Draft pull request; removing a hosted MCP Delivery stops serving its URL. Recreating the type
|
|
124
|
+
* later allocates a new ID and, for hosted MCP, a new URL.
|
|
125
|
+
*
|
|
126
|
+
* A `409 target_busy` means the Target is publishing; wait for it to finish. A `502
|
|
127
|
+
* follow_up_failed` means the Delivery was removed, but retiring an obsolete review or
|
|
128
|
+
* regenerating the Target failed.
|
|
129
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
130
|
+
* and If-Match.
|
|
131
|
+
* `DELETE /deliveries/{delivery_id}`
|
|
132
|
+
*/
|
|
133
|
+
async delete(deliveryId, params, options) {
|
|
134
|
+
return this._core.requestData({
|
|
135
|
+
method: "DELETE",
|
|
136
|
+
path: `/deliveries/${encodeURIComponent(String(deliveryId))}`,
|
|
137
|
+
security: [{ "apiKey": [] }],
|
|
138
|
+
headers: {
|
|
139
|
+
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
140
|
+
},
|
|
141
|
+
errors: { "412": PreconditionFailedError },
|
|
142
|
+
idempotent: true,
|
|
143
|
+
schemaKey: "deliveries.delete",
|
|
144
|
+
options,
|
|
145
|
+
});
|
|
146
|
+
}
|
|
70
147
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
2
2
|
import { PagePromise } from "../core/pagination.js";
|
|
3
|
-
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError,
|
|
4
|
-
import type { DraftFileRead, DraftId, DraftRead, DraftRecoverRequest, DraftResolveRequest, DraftResponseRead, DraftStatus, DraftUpdateRequest, TargetId } from "../types.js";
|
|
3
|
+
import { RateLimitError, ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ConflictError, ForbiddenError, NotFoundError, PreconditionFailedError, ServerError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
4
|
+
import type { DraftFileRead, DraftId, DraftRead, DraftRecoverRequest, DraftResolveRequest, DraftResponseRead, DraftStatus, DraftUpdateRequest, ErrorModelRead, TargetId } from "../types.js";
|
|
5
5
|
export declare class DraftsResource {
|
|
6
6
|
private readonly _core;
|
|
7
7
|
constructor(_core: HttpCore);
|
|
@@ -19,14 +19,14 @@ export declare class DraftsResource {
|
|
|
19
19
|
* Get a Draft
|
|
20
20
|
*
|
|
21
21
|
* Returns the Draft's status. An open Draft also reports its typed reason when action is
|
|
22
|
-
* required, next version and its source,
|
|
23
|
-
* carries an `ETag`; send it in `If-Match` when
|
|
24
|
-
* version selection.
|
|
22
|
+
* required, next version and its source, compatibility and version assessment, blocking errors,
|
|
23
|
+
* checks, and conflict counts. The response carries an `ETag`; send it in `If-Match` when
|
|
24
|
+
* updating the Draft to avoid changing a newer version selection.
|
|
25
25
|
* `GET /drafts/{draft_id}`
|
|
26
26
|
*/
|
|
27
27
|
get(draftId: DraftId, options?: RequestOptions): Promise<DraftResponseRead>;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Update a Draft
|
|
30
30
|
*
|
|
31
31
|
* Checks your version choice against the required version bump, then regenerates the existing
|
|
32
32
|
* Draft pull request.
|
|
@@ -49,7 +49,7 @@ export declare class DraftsResource {
|
|
|
49
49
|
*/
|
|
50
50
|
update(draftId: DraftId, body: DraftUpdateRequest, params?: DraftsUpdateParams, options?: RequestOptions): Promise<DraftResponseRead>;
|
|
51
51
|
/**
|
|
52
|
-
* List
|
|
52
|
+
* List a Draft's files
|
|
53
53
|
*
|
|
54
54
|
* Lists the Draft's files that differ from the last merged package or need a conflict decision,
|
|
55
55
|
* ordered by path, without file content. Each conflict names its kind, the saved decision, and
|
|
@@ -64,7 +64,7 @@ export declare class DraftsResource {
|
|
|
64
64
|
*/
|
|
65
65
|
listFiles(draftId: DraftId, params?: DraftsListFilesParams, options?: RequestOptions): PagePromise<DraftFileRead, DraftsListFilesError>;
|
|
66
66
|
/**
|
|
67
|
-
* Resolve
|
|
67
|
+
* Resolve Draft conflicts
|
|
68
68
|
*
|
|
69
69
|
* Resolves conflicts on the Draft's head_sha: keep yours or generated, or supply final content as
|
|
70
70
|
* text or, for binary files, base64. Choosing generated for a customized path replaces it with
|
|
@@ -78,7 +78,7 @@ export declare class DraftsResource {
|
|
|
78
78
|
*/
|
|
79
79
|
resolve(draftId: DraftId, body: DraftResolveRequest, options?: RequestOptions): Promise<DraftResponseRead>;
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* Recover a Draft's history
|
|
82
82
|
*
|
|
83
83
|
* When the Draft has status `action_required` and reason `history_rewritten`, review affected
|
|
84
84
|
* files with `listDraftFiles` and `filter=history`, then approve with the Draft's
|
|
@@ -112,9 +112,9 @@ export interface DraftsListParams {
|
|
|
112
112
|
status?: DraftStatus;
|
|
113
113
|
}
|
|
114
114
|
/** Typed errors `list` can throw. */
|
|
115
|
-
export type DraftsListError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError |
|
|
115
|
+
export type DraftsListError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
116
116
|
/** Typed errors `get` can throw. */
|
|
117
|
-
export type DraftsGetError = UnauthorizedError | ForbiddenError | NotFoundError |
|
|
117
|
+
export type DraftsGetError = UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
118
118
|
export interface DraftsUpdateParams {
|
|
119
119
|
/**
|
|
120
120
|
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
@@ -124,7 +124,7 @@ export interface DraftsUpdateParams {
|
|
|
124
124
|
ifMatch?: string;
|
|
125
125
|
}
|
|
126
126
|
/** Typed errors `update` can throw. */
|
|
127
|
-
export type DraftsUpdateError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | PreconditionFailedError | UnprocessableEntityError |
|
|
127
|
+
export type DraftsUpdateError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | PreconditionFailedError | UnprocessableEntityError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
128
128
|
export interface DraftsListFilesParams {
|
|
129
129
|
/**
|
|
130
130
|
* conflicted: conflicts only. customized: files that differ from the last merged package.
|
|
@@ -149,9 +149,9 @@ export interface DraftsListFilesParams {
|
|
|
149
149
|
cursor?: string;
|
|
150
150
|
}
|
|
151
151
|
/** Typed errors `listFiles` can throw. */
|
|
152
|
-
export type DraftsListFilesError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError |
|
|
152
|
+
export type DraftsListFilesError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
153
153
|
/** Typed errors `resolve` can throw. */
|
|
154
|
-
export type DraftsResolveError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError |
|
|
154
|
+
export type DraftsResolveError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
155
155
|
/** Typed errors `recover` can throw. */
|
|
156
|
-
export type DraftsRecoverError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError |
|
|
156
|
+
export type DraftsRecoverError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
157
157
|
//# sourceMappingURL=drafts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drafts.d.ts","sourceRoot":"","sources":["../../src/resources/drafts.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"drafts.d.ts","sourceRoot":"","sources":["../../src/resources/drafts.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,aAAa,EACb,uBAAuB,EACvB,WAAW,EACX,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAKV,aAAa,EACb,OAAO,EAGP,SAAS,EACT,mBAAmB,EACnB,mBAAmB,EAEnB,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAElB,cAAc,EACd,QAAQ,EACT,MAAM,aAAa,CAAC;AAErB,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QA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