@typeship-ax/mcp 0.10.0 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/AGENTS.md +11 -5
  2. package/README.md +16 -5
  3. package/api.json +8824 -3777
  4. package/api.md +8359 -3987
  5. package/dist/api-identity.d.ts.map +1 -1
  6. package/dist/api-identity.js +6 -1
  7. package/dist/core/http.d.ts +29 -16
  8. package/dist/core/http.d.ts.map +1 -1
  9. package/dist/core/http.js +108 -25
  10. package/dist/core/pagination.d.ts +8 -8
  11. package/dist/core/pagination.d.ts.map +1 -1
  12. package/dist/core/pagination.js +7 -16
  13. package/dist/errors.d.ts +20 -13
  14. package/dist/errors.d.ts.map +1 -1
  15. package/dist/errors.js +29 -20
  16. package/dist/index.d.ts +37 -19
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +42 -18
  19. package/dist/mcp-protocol.d.ts +10 -6
  20. package/dist/mcp-protocol.d.ts.map +1 -1
  21. package/dist/mcp-protocol.js +110 -39
  22. package/dist/mcp.d.ts.map +1 -1
  23. package/dist/mcp.js +38 -18
  24. package/dist/ops.d.ts +5 -1
  25. package/dist/ops.d.ts.map +1 -1
  26. package/dist/ops.js +42 -35
  27. package/dist/resources/api-keys.d.ts +44 -18
  28. package/dist/resources/api-keys.d.ts.map +1 -1
  29. package/dist/resources/api-keys.js +46 -14
  30. package/dist/resources/deliveries.d.ts +46 -0
  31. package/dist/resources/deliveries.d.ts.map +1 -0
  32. package/dist/resources/deliveries.js +70 -0
  33. package/dist/resources/drafts.d.ts +155 -0
  34. package/dist/resources/drafts.d.ts.map +1 -0
  35. package/dist/resources/drafts.js +230 -0
  36. package/dist/resources/files.d.ts +23 -0
  37. package/dist/resources/files.d.ts.map +1 -0
  38. package/dist/resources/files.js +38 -0
  39. package/dist/resources/generate.d.ts +49 -20
  40. package/dist/resources/generate.d.ts.map +1 -1
  41. package/dist/resources/generate.js +56 -14
  42. package/dist/resources/generations.d.ts +70 -18
  43. package/dist/resources/generations.d.ts.map +1 -1
  44. package/dist/resources/generations.js +84 -16
  45. package/dist/resources/organization.d.ts +18 -0
  46. package/dist/resources/organization.d.ts.map +1 -0
  47. package/dist/resources/organization.js +32 -0
  48. package/dist/resources/projects.d.ts +87 -124
  49. package/dist/resources/projects.d.ts.map +1 -1
  50. package/dist/resources/projects.js +70 -173
  51. package/dist/resources/publications.d.ts +46 -0
  52. package/dist/resources/publications.d.ts.map +1 -0
  53. package/dist/resources/publications.js +70 -0
  54. package/dist/resources/releases.d.ts +66 -0
  55. package/dist/resources/releases.d.ts.map +1 -0
  56. package/dist/resources/releases.js +101 -0
  57. package/dist/resources/spec-revisions.d.ts +85 -0
  58. package/dist/resources/spec-revisions.d.ts.map +1 -0
  59. package/dist/resources/spec-revisions.js +116 -0
  60. package/dist/resources/specs.d.ts +72 -0
  61. package/dist/resources/specs.d.ts.map +1 -0
  62. package/dist/resources/specs.js +107 -0
  63. package/dist/resources/targets.d.ts +85 -105
  64. package/dist/resources/targets.d.ts.map +1 -1
  65. package/dist/resources/targets.js +70 -163
  66. package/dist/schemas.d.ts.map +1 -1
  67. package/dist/schemas.js +175 -129
  68. package/dist/types.d.ts +2626 -1141
  69. package/dist/types.d.ts.map +1 -1
  70. package/dist/types.js +90 -11
  71. package/package.json +3 -3
  72. package/server.json +3 -3
  73. package/src/api-identity.ts +6 -2
  74. package/src/core/http.ts +106 -30
  75. package/src/core/pagination.ts +13 -23
  76. package/src/errors.ts +30 -20
  77. package/src/index.ts +46 -24
  78. package/src/mcp-protocol.ts +95 -38
  79. package/src/mcp.ts +34 -16
  80. package/src/ops.ts +47 -36
  81. package/src/resources/api-keys.ts +87 -19
  82. package/src/resources/deliveries.ts +139 -0
  83. package/src/resources/drafts.ts +422 -0
  84. package/src/resources/files.ts +68 -0
  85. package/src/resources/generate.ts +81 -19
  86. package/src/resources/generations.ts +167 -29
  87. package/src/resources/organization.ts +53 -0
  88. package/src/resources/projects.ts +129 -322
  89. package/src/resources/publications.ts +139 -0
  90. package/src/resources/releases.ts +199 -0
  91. package/src/resources/spec-revisions.ts +237 -0
  92. package/src/resources/specs.ts +200 -0
  93. package/src/resources/targets.ts +135 -304
  94. package/src/schemas.ts +175 -129
  95. package/src/types.ts +2793 -1177
  96. package/dist/resources/account.d.ts +0 -18
  97. package/dist/resources/account.d.ts.map +0 -1
  98. package/dist/resources/account.js +0 -27
  99. package/dist/resources/definition-revisions.d.ts +0 -58
  100. package/dist/resources/definition-revisions.d.ts.map +0 -1
  101. package/dist/resources/definition-revisions.js +0 -114
  102. package/dist/resources/definitions.d.ts +0 -35
  103. package/dist/resources/definitions.d.ts.map +0 -1
  104. package/dist/resources/definitions.js +0 -60
  105. package/src/resources/account.ts +0 -46
  106. package/src/resources/definition-revisions.ts +0 -207
  107. package/src/resources/definitions.ts +0 -122
@@ -1,18 +0,0 @@
1
- import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
2
- import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, ForbiddenError, RateLimitedError, UnauthorizedError } from "../errors.js";
3
- import type { AccountRead } from "../types.js";
4
- export declare class AccountResource {
5
- private readonly _core;
6
- constructor(_core: HttpCore);
7
- /**
8
- * The account behind the presented credentials
9
- *
10
- * Returns the account that owns the presented API key. This is also the
11
- * identity endpoint the generated typeship CLI's `whoami` calls.
12
- * `GET /me`
13
- */
14
- retrieve(options?: RequestOptions): Promise<ApiResult<AccountRead, AccountRetrieveError>>;
15
- }
16
- /** Every error `retrieve` can produce, as a discriminated union. */
17
- export type AccountRetrieveError = UnauthorizedError | ForbiddenError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
18
- //# sourceMappingURL=account.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/resources/account.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,aAAa,CAAC;AAExD,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;;OAMG;IACG,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;CAWhG;AAED,oEAAoE;AACpE,MAAM,MAAM,oBAAoB,GAC5B,iBAAiB,GACjB,cAAc,GACd,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
@@ -1,27 +0,0 @@
1
- // typeship — account resource.
2
- // Generated by typeship — https://typeship.dev — do not edit by hand.
3
- import { ForbiddenError, RateLimitedError, UnauthorizedError, } from "../errors.js";
4
- export class AccountResource {
5
- _core;
6
- constructor(_core) {
7
- this._core = _core;
8
- }
9
- /**
10
- * The account behind the presented credentials
11
- *
12
- * Returns the account that owns the presented API key. This is also the
13
- * identity endpoint the generated typeship CLI's `whoami` calls.
14
- * `GET /me`
15
- */
16
- async retrieve(options) {
17
- return this._core.request({
18
- method: "GET",
19
- path: "/me",
20
- security: [{ "apiKey": [] }],
21
- errors: { "401": UnauthorizedError, "403": ForbiddenError, "429": RateLimitedError },
22
- idempotent: true,
23
- schemaKey: "account.retrieve",
24
- options,
25
- });
26
- }
27
- }
@@ -1,58 +0,0 @@
1
- import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
2
- import { PagePromise } from "../core/pagination.js";
3
- import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError } from "../errors.js";
4
- import type { DefinitionDocumentId, DefinitionId, DefinitionRevisionId, DefinitionRevisionRead, DefinitionRevisionResponseRead } from "../types.js";
5
- export declare class DefinitionRevisionsResource {
6
- private readonly _core;
7
- constructor(_core: HttpCore);
8
- /**
9
- * List Definition Revisions
10
- *
11
- * Immutable snapshots of the complete resolved document graph this Definition observed, newest
12
- * first. Content is available from the revision and document endpoints and is never embedded in a
13
- * list response.
14
- *
15
- * Auto-paginates: `for await (const item of …)` walks every page.
16
- * `GET /definitions/{definition_id}/revisions`
17
- */
18
- list(definitionId: DefinitionId, params?: DefinitionRevisionsListParams, options?: RequestOptions): PagePromise<DefinitionRevisionRead, DefinitionRevisionsListError>;
19
- /**
20
- * Retrieve a Definition Revision
21
- *
22
- * Metadata for one immutable resolved document graph. Fetch its canonical content or individual
23
- * source documents from the content endpoints.
24
- * `GET /definition_revisions/{definition_revision_id}`
25
- */
26
- retrieve(definitionRevisionId: DefinitionRevisionId, options?: RequestOptions): Promise<ApiResult<DefinitionRevisionResponseRead, DefinitionRevisionsRetrieveError>>;
27
- /**
28
- * Retrieve a Definition Revision's canonical content
29
- *
30
- * Returns the exact canonical resolved content identified by the revision's graph digest,
31
- * suitable for saving or piping into a diff.
32
- * `GET /definition_revisions/{definition_revision_id}/content`
33
- */
34
- retrieveContent(definitionRevisionId: DefinitionRevisionId, options?: RequestOptions): Promise<ApiResult<string, DefinitionRevisionsRetrieveContentError>>;
35
- /**
36
- * Retrieve one source document from a Definition Revision
37
- * `GET /definition_revisions/{definition_revision_id}/documents/{document_id}/content`
38
- */
39
- retrieveDocumentContent(definitionRevisionId: DefinitionRevisionId, documentId: DefinitionDocumentId, options?: RequestOptions): Promise<ApiResult<string, DefinitionRevisionsRetrieveDocumentContentError>>;
40
- }
41
- export interface DefinitionRevisionsListParams {
42
- /** Maximum number of resources to return. */
43
- limit?: number;
44
- /**
45
- * Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
46
- * operation, filters, and ordering that issued it.
47
- */
48
- cursor?: string;
49
- }
50
- /** Every error `list` can produce, as a discriminated union. */
51
- export type DefinitionRevisionsListError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
52
- /** Every error `retrieve` can produce, as a discriminated union. */
53
- export type DefinitionRevisionsRetrieveError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
54
- /** Every error `retrieveContent` can produce, as a discriminated union. */
55
- export type DefinitionRevisionsRetrieveContentError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
56
- /** Every error `retrieveDocumentContent` can produce, as a discriminated union. */
57
- export type DefinitionRevisionsRetrieveDocumentContentError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
58
- //# sourceMappingURL=definition-revisions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"definition-revisions.d.ts","sourceRoot":"","sources":["../../src/resources/definition-revisions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EAEZ,oBAAoB,EAGpB,sBAAsB,EAEtB,8BAA8B,EAC/B,MAAM,aAAa,CAAC;AAErB,qBAAa,2BAA2B;IAC1B,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;;;;;OASG;IACH,IAAI,CACF,YAAY,EAAE,YAAY,EAC1B,MAAM,CAAC,EAAE,6BAA6B,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,sBAAsB,EAAE,4BAA4B,CAAC;IA6BpE;;;;;;OAMG;IACG,QAAQ,CACZ,oBAAoB,EAAE,oBAAoB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,8BAA8B,EAAE,gCAAgC,CAAC,CAAC;IAiBvF;;;;;;OAMG;IACG,eAAe,CACnB,oBAAoB,EAAE,oBAAoB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,uCAAuC,CAAC,CAAC;IAiBtE;;;OAGG;IACG,uBAAuB,CAC3B,oBAAoB,EAAE,oBAAoB,EAC1C,UAAU,EAAE,oBAAoB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,+CAA+C,CAAC,CAAC;CAgB/E;AAED,MAAM,WAAW,6BAA6B;IAC5C,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,gEAAgE;AAChE,MAAM,MAAM,4BAA4B,GACpC,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,oEAAoE;AACpE,MAAM,MAAM,gCAAgC,GACxC,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,2EAA2E;AAC3E,MAAM,MAAM,uCAAuC,GAC/C,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,mFAAmF;AACnF,MAAM,MAAM,+CAA+C,GACvD,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
@@ -1,114 +0,0 @@
1
- // typeship — definitionRevisions resource.
2
- // Generated by typeship — https://typeship.dev — do not edit by hand.
3
- import { paginate } from "../core/pagination.js";
4
- import { BadRequestError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError, } from "../errors.js";
5
- export class DefinitionRevisionsResource {
6
- _core;
7
- constructor(_core) {
8
- this._core = _core;
9
- }
10
- /**
11
- * List Definition Revisions
12
- *
13
- * Immutable snapshots of the complete resolved document graph this Definition observed, newest
14
- * first. Content is available from the revision and document endpoints and is never embedded in a
15
- * list response.
16
- *
17
- * Auto-paginates: `for await (const item of …)` walks every page.
18
- * `GET /definitions/{definition_id}/revisions`
19
- */
20
- list(definitionId, params, options) {
21
- return paginate(this._core, {
22
- method: "GET",
23
- path: `/definitions/${encodeURIComponent(String(definitionId))}/revisions`,
24
- security: [{ "apiKey": [] }],
25
- query: {
26
- limit: params?.limit,
27
- cursor: params?.cursor,
28
- },
29
- errors: {
30
- "400": BadRequestError,
31
- "401": UnauthorizedError,
32
- "403": ForbiddenError,
33
- "404": NotFoundError,
34
- "429": RateLimitedError,
35
- },
36
- idempotent: true,
37
- schemaKey: "definitionRevisions.list",
38
- options,
39
- }, {
40
- style: "cursor",
41
- itemsField: "data",
42
- cursorParam: "cursor",
43
- nextCursorField: "next_cursor",
44
- hasMoreField: "has_more",
45
- limitParam: "limit",
46
- });
47
- }
48
- /**
49
- * Retrieve a Definition Revision
50
- *
51
- * Metadata for one immutable resolved document graph. Fetch its canonical content or individual
52
- * source documents from the content endpoints.
53
- * `GET /definition_revisions/{definition_revision_id}`
54
- */
55
- async retrieve(definitionRevisionId, options) {
56
- return this._core.request({
57
- method: "GET",
58
- path: `/definition_revisions/${encodeURIComponent(String(definitionRevisionId))}`,
59
- security: [{ "apiKey": [] }],
60
- errors: {
61
- "401": UnauthorizedError,
62
- "403": ForbiddenError,
63
- "404": NotFoundError,
64
- "429": RateLimitedError,
65
- },
66
- idempotent: true,
67
- schemaKey: "definitionRevisions.retrieve",
68
- options,
69
- });
70
- }
71
- /**
72
- * Retrieve a Definition Revision's canonical content
73
- *
74
- * Returns the exact canonical resolved content identified by the revision's graph digest,
75
- * suitable for saving or piping into a diff.
76
- * `GET /definition_revisions/{definition_revision_id}/content`
77
- */
78
- async retrieveContent(definitionRevisionId, options) {
79
- return this._core.request({
80
- method: "GET",
81
- path: `/definition_revisions/${encodeURIComponent(String(definitionRevisionId))}/content`,
82
- security: [{ "apiKey": [] }],
83
- errors: {
84
- "401": UnauthorizedError,
85
- "403": ForbiddenError,
86
- "404": NotFoundError,
87
- "429": RateLimitedError,
88
- },
89
- idempotent: true,
90
- schemaKey: "definitionRevisions.retrieveContent",
91
- options,
92
- });
93
- }
94
- /**
95
- * Retrieve one source document from a Definition Revision
96
- * `GET /definition_revisions/{definition_revision_id}/documents/{document_id}/content`
97
- */
98
- async retrieveDocumentContent(definitionRevisionId, documentId, options) {
99
- return this._core.request({
100
- method: "GET",
101
- path: `/definition_revisions/${encodeURIComponent(String(definitionRevisionId))}/documents/${encodeURIComponent(String(documentId))}/content`,
102
- security: [{ "apiKey": [] }],
103
- errors: {
104
- "401": UnauthorizedError,
105
- "403": ForbiddenError,
106
- "404": NotFoundError,
107
- "429": RateLimitedError,
108
- },
109
- idempotent: true,
110
- schemaKey: "definitionRevisions.retrieveDocumentContent",
111
- options,
112
- });
113
- }
114
- }
@@ -1,35 +0,0 @@
1
- import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
2
- import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ConflictError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
3
- import type { DefinitionId, DefinitionRead, DefinitionUpdateRequest } from "../types.js";
4
- export declare class DefinitionsResource {
5
- private readonly _core;
6
- constructor(_core: HttpCore);
7
- /**
8
- * Retrieve a Definition
9
- * `GET /definitions/{definition_id}`
10
- */
11
- retrieve(definitionId: DefinitionId, options?: RequestOptions): Promise<ApiResult<DefinitionRead, DefinitionsRetrieveError>>;
12
- /**
13
- * Update and resolve a Definition
14
- *
15
- * Resolves the complete document graph and records a new immutable revision before saving.
16
- *
17
- * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
18
- * `PATCH /definitions/{definition_id}`
19
- */
20
- update(definitionId: DefinitionId, body: DefinitionUpdateRequest, params?: DefinitionsUpdateParams, options?: RequestOptions): Promise<ApiResult<DefinitionRead, DefinitionsUpdateError>>;
21
- }
22
- /** Every error `retrieve` can produce, as a discriminated union. */
23
- export type DefinitionsRetrieveError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
24
- export interface DefinitionsUpdateParams {
25
- /**
26
- * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
27
- * operation; account-less generation uses a hashed network identity. Retrying the same method,
28
- * path, query, and JSON body replays the original response. Reusing the key with changed intent
29
- * returns 409. After expiry the key starts a new write.
30
- */
31
- idempotencyKey?: string;
32
- }
33
- /** Every error `update` can produce, as a discriminated union. */
34
- export type DefinitionsUpdateError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
35
- //# sourceMappingURL=definitions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/resources/definitions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAEV,YAAY,EACZ,cAAc,EACd,uBAAuB,EACxB,MAAM,aAAa,CAAC;AAErB,qBAAa,mBAAmB;IAClB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;OAGG;IACG,QAAQ,CACZ,YAAY,EAAE,YAAY,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC;IAiB/D;;;;;;;OAOG;IACG,MAAM,CACV,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,uBAAuB,EAC7B,MAAM,CAAC,EAAE,uBAAuB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,cAAc,EAAE,sBAAsB,CAAC,CAAC;CAuB9D;AAED,oEAAoE;AACpE,MAAM,MAAM,wBAAwB,GAChC,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,uBAAuB;IACtC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,kEAAkE;AAClE,MAAM,MAAM,sBAAsB,GAC9B,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,aAAa,GACb,wBAAwB,GACxB,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
@@ -1,60 +0,0 @@
1
- // typeship — definitions resource.
2
- // Generated by typeship — https://typeship.dev — do not edit by hand.
3
- import { BadRequestError, ConflictError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError, UnprocessableEntityError, } from "../errors.js";
4
- export class DefinitionsResource {
5
- _core;
6
- constructor(_core) {
7
- this._core = _core;
8
- }
9
- /**
10
- * Retrieve a Definition
11
- * `GET /definitions/{definition_id}`
12
- */
13
- async retrieve(definitionId, options) {
14
- return this._core.request({
15
- method: "GET",
16
- path: `/definitions/${encodeURIComponent(String(definitionId))}`,
17
- security: [{ "apiKey": [] }],
18
- errors: {
19
- "401": UnauthorizedError,
20
- "403": ForbiddenError,
21
- "404": NotFoundError,
22
- "429": RateLimitedError,
23
- },
24
- idempotent: true,
25
- schemaKey: "definitions.retrieve",
26
- options,
27
- });
28
- }
29
- /**
30
- * Update and resolve a Definition
31
- *
32
- * Resolves the complete document graph and records a new immutable revision before saving.
33
- *
34
- * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
35
- * `PATCH /definitions/{definition_id}`
36
- */
37
- async update(definitionId, body, params, options) {
38
- return this._core.request({
39
- method: "PATCH",
40
- path: `/definitions/${encodeURIComponent(String(definitionId))}`,
41
- security: [{ "apiKey": [] }],
42
- headers: {
43
- "Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
44
- },
45
- body,
46
- errors: {
47
- "400": BadRequestError,
48
- "401": UnauthorizedError,
49
- "403": ForbiddenError,
50
- "404": NotFoundError,
51
- "409": ConflictError,
52
- "422": UnprocessableEntityError,
53
- "429": RateLimitedError,
54
- },
55
- idempotencyKey: "Idempotency-Key",
56
- schemaKey: "definitions.update",
57
- options,
58
- });
59
- }
60
- }
@@ -1,46 +0,0 @@
1
- // typeship — account resource.
2
- // Generated by typeship — https://typeship.dev — do not edit by hand.
3
-
4
- import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
5
- import {
6
- ResponseParseError,
7
- TransportError,
8
- UnexpectedApiError,
9
- ValidationError,
10
- ForbiddenError,
11
- RateLimitedError,
12
- UnauthorizedError,
13
- } from "../errors.js";
14
- import type { Account, AccountRead } from "../types.js";
15
-
16
- export class AccountResource {
17
- constructor(private readonly _core: HttpCore) {}
18
- /**
19
- * The account behind the presented credentials
20
- *
21
- * Returns the account that owns the presented API key. This is also the
22
- * identity endpoint the generated typeship CLI's `whoami` calls.
23
- * `GET /me`
24
- */
25
- async retrieve(options?: RequestOptions): Promise<ApiResult<AccountRead, AccountRetrieveError>> {
26
- return this._core.request<AccountRead, AccountRetrieveError>({
27
- method: "GET",
28
- path: "/me",
29
- security: [{"apiKey":[]}],
30
- errors: { "401": UnauthorizedError, "403": ForbiddenError, "429": RateLimitedError },
31
- idempotent: true,
32
- schemaKey: "account.retrieve",
33
- options,
34
- });
35
- }
36
- }
37
-
38
- /** Every error `retrieve` can produce, as a discriminated union. */
39
- export type AccountRetrieveError =
40
- | UnauthorizedError
41
- | ForbiddenError
42
- | RateLimitedError
43
- | UnexpectedApiError
44
- | ResponseParseError
45
- | TransportError
46
- | ValidationError;
@@ -1,207 +0,0 @@
1
- // typeship — definitionRevisions resource.
2
- // Generated by typeship — https://typeship.dev — do not edit by hand.
3
-
4
- import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
5
- import { paginate, PagePromise } from "../core/pagination.js";
6
- import {
7
- ResponseParseError,
8
- TransportError,
9
- UnexpectedApiError,
10
- ValidationError,
11
- BadRequestError,
12
- ForbiddenError,
13
- NotFoundError,
14
- RateLimitedError,
15
- UnauthorizedError,
16
- } from "../errors.js";
17
- import type {
18
- DefinitionDocumentId,
19
- DefinitionId,
20
- DefinitionRevision,
21
- DefinitionRevisionId,
22
- DefinitionRevisionList,
23
- DefinitionRevisionListRead,
24
- DefinitionRevisionRead,
25
- DefinitionRevisionResponse,
26
- DefinitionRevisionResponseRead,
27
- } from "../types.js";
28
-
29
- export class DefinitionRevisionsResource {
30
- constructor(private readonly _core: HttpCore) {}
31
- /**
32
- * List Definition Revisions
33
- *
34
- * Immutable snapshots of the complete resolved document graph this Definition observed, newest
35
- * first. Content is available from the revision and document endpoints and is never embedded in a
36
- * list response.
37
- *
38
- * Auto-paginates: `for await (const item of …)` walks every page.
39
- * `GET /definitions/{definition_id}/revisions`
40
- */
41
- list(
42
- definitionId: DefinitionId,
43
- params?: DefinitionRevisionsListParams,
44
- options?: RequestOptions,
45
- ): PagePromise<DefinitionRevisionRead, DefinitionRevisionsListError> {
46
- return paginate<DefinitionRevisionRead, DefinitionRevisionsListError>(this._core, {
47
- method: "GET",
48
- path: `/definitions/${encodeURIComponent(String(definitionId))}/revisions`,
49
- security: [{"apiKey":[]}],
50
- query: {
51
- limit: params?.limit,
52
- cursor: params?.cursor,
53
- },
54
- errors: {
55
- "400": BadRequestError,
56
- "401": UnauthorizedError,
57
- "403": ForbiddenError,
58
- "404": NotFoundError,
59
- "429": RateLimitedError,
60
- },
61
- idempotent: true,
62
- schemaKey: "definitionRevisions.list",
63
- options,
64
- }, {
65
- style: "cursor",
66
- itemsField: "data",
67
- cursorParam: "cursor",
68
- nextCursorField: "next_cursor",
69
- hasMoreField: "has_more",
70
- limitParam: "limit",
71
- });
72
- }
73
-
74
- /**
75
- * Retrieve a Definition Revision
76
- *
77
- * Metadata for one immutable resolved document graph. Fetch its canonical content or individual
78
- * source documents from the content endpoints.
79
- * `GET /definition_revisions/{definition_revision_id}`
80
- */
81
- async retrieve(
82
- definitionRevisionId: DefinitionRevisionId,
83
- options?: RequestOptions,
84
- ): Promise<ApiResult<DefinitionRevisionResponseRead, DefinitionRevisionsRetrieveError>> {
85
- return this._core.request<DefinitionRevisionResponseRead, DefinitionRevisionsRetrieveError>({
86
- method: "GET",
87
- path: `/definition_revisions/${encodeURIComponent(String(definitionRevisionId))}`,
88
- security: [{"apiKey":[]}],
89
- errors: {
90
- "401": UnauthorizedError,
91
- "403": ForbiddenError,
92
- "404": NotFoundError,
93
- "429": RateLimitedError,
94
- },
95
- idempotent: true,
96
- schemaKey: "definitionRevisions.retrieve",
97
- options,
98
- });
99
- }
100
-
101
- /**
102
- * Retrieve a Definition Revision's canonical content
103
- *
104
- * Returns the exact canonical resolved content identified by the revision's graph digest,
105
- * suitable for saving or piping into a diff.
106
- * `GET /definition_revisions/{definition_revision_id}/content`
107
- */
108
- async retrieveContent(
109
- definitionRevisionId: DefinitionRevisionId,
110
- options?: RequestOptions,
111
- ): Promise<ApiResult<string, DefinitionRevisionsRetrieveContentError>> {
112
- return this._core.request<string, DefinitionRevisionsRetrieveContentError>({
113
- method: "GET",
114
- path: `/definition_revisions/${encodeURIComponent(String(definitionRevisionId))}/content`,
115
- security: [{"apiKey":[]}],
116
- errors: {
117
- "401": UnauthorizedError,
118
- "403": ForbiddenError,
119
- "404": NotFoundError,
120
- "429": RateLimitedError,
121
- },
122
- idempotent: true,
123
- schemaKey: "definitionRevisions.retrieveContent",
124
- options,
125
- });
126
- }
127
-
128
- /**
129
- * Retrieve one source document from a Definition Revision
130
- * `GET /definition_revisions/{definition_revision_id}/documents/{document_id}/content`
131
- */
132
- async retrieveDocumentContent(
133
- definitionRevisionId: DefinitionRevisionId,
134
- documentId: DefinitionDocumentId,
135
- options?: RequestOptions,
136
- ): Promise<ApiResult<string, DefinitionRevisionsRetrieveDocumentContentError>> {
137
- return this._core.request<string, DefinitionRevisionsRetrieveDocumentContentError>({
138
- method: "GET",
139
- path: `/definition_revisions/${encodeURIComponent(String(definitionRevisionId))}/documents/${encodeURIComponent(String(documentId))}/content`,
140
- security: [{"apiKey":[]}],
141
- errors: {
142
- "401": UnauthorizedError,
143
- "403": ForbiddenError,
144
- "404": NotFoundError,
145
- "429": RateLimitedError,
146
- },
147
- idempotent: true,
148
- schemaKey: "definitionRevisions.retrieveDocumentContent",
149
- options,
150
- });
151
- }
152
- }
153
-
154
- export interface DefinitionRevisionsListParams {
155
- /** Maximum number of resources to return. */
156
- limit?: number;
157
- /**
158
- * Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
159
- * operation, filters, and ordering that issued it.
160
- */
161
- cursor?: string;
162
- }
163
-
164
- /** Every error `list` can produce, as a discriminated union. */
165
- export type DefinitionRevisionsListError =
166
- | BadRequestError
167
- | UnauthorizedError
168
- | ForbiddenError
169
- | NotFoundError
170
- | RateLimitedError
171
- | UnexpectedApiError
172
- | ResponseParseError
173
- | TransportError
174
- | ValidationError;
175
-
176
- /** Every error `retrieve` can produce, as a discriminated union. */
177
- export type DefinitionRevisionsRetrieveError =
178
- | UnauthorizedError
179
- | ForbiddenError
180
- | NotFoundError
181
- | RateLimitedError
182
- | UnexpectedApiError
183
- | ResponseParseError
184
- | TransportError
185
- | ValidationError;
186
-
187
- /** Every error `retrieveContent` can produce, as a discriminated union. */
188
- export type DefinitionRevisionsRetrieveContentError =
189
- | UnauthorizedError
190
- | ForbiddenError
191
- | NotFoundError
192
- | RateLimitedError
193
- | UnexpectedApiError
194
- | ResponseParseError
195
- | TransportError
196
- | ValidationError;
197
-
198
- /** Every error `retrieveDocumentContent` can produce, as a discriminated union. */
199
- export type DefinitionRevisionsRetrieveDocumentContentError =
200
- | UnauthorizedError
201
- | ForbiddenError
202
- | NotFoundError
203
- | RateLimitedError
204
- | UnexpectedApiError
205
- | ResponseParseError
206
- | TransportError
207
- | ValidationError;