@typeship-ax/mcp 0.19.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 (103) hide show
  1. package/AGENTS.md +3 -3
  2. package/README.md +1 -1
  3. package/api.json +7440 -6316
  4. package/api.md +7856 -6638
  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 +26 -14
  8. package/dist/core/http.d.ts.map +1 -1
  9. package/dist/core/http.js +90 -19
  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 +4 -4
  14. package/dist/errors.d.ts.map +1 -1
  15. package/dist/errors.js +7 -7
  16. package/dist/index.d.ts +33 -19
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +37 -17
  19. package/dist/mcp-protocol.js +2 -2
  20. package/dist/mcp.d.ts.map +1 -1
  21. package/dist/mcp.js +6 -5
  22. package/dist/ops.d.ts +1 -1
  23. package/dist/ops.d.ts.map +1 -1
  24. package/dist/ops.js +39 -42
  25. package/dist/resources/api-keys.d.ts +10 -10
  26. package/dist/resources/api-keys.d.ts.map +1 -1
  27. package/dist/resources/api-keys.js +6 -6
  28. package/dist/resources/deliveries.d.ts +46 -0
  29. package/dist/resources/deliveries.d.ts.map +1 -0
  30. package/dist/resources/deliveries.js +70 -0
  31. package/dist/resources/drafts.d.ts +155 -0
  32. package/dist/resources/drafts.d.ts.map +1 -0
  33. package/dist/resources/drafts.js +230 -0
  34. package/dist/resources/files.d.ts +23 -0
  35. package/dist/resources/files.d.ts.map +1 -0
  36. package/dist/resources/files.js +38 -0
  37. package/dist/resources/generate.d.ts +14 -14
  38. package/dist/resources/generate.d.ts.map +1 -1
  39. package/dist/resources/generate.js +7 -7
  40. package/dist/resources/generations.d.ts +65 -21
  41. package/dist/resources/generations.d.ts.map +1 -1
  42. package/dist/resources/generations.js +67 -20
  43. package/dist/resources/organization.d.ts +18 -0
  44. package/dist/resources/organization.d.ts.map +1 -0
  45. package/dist/resources/{account.js → organization.js} +10 -10
  46. package/dist/resources/projects.d.ts +36 -126
  47. package/dist/resources/projects.d.ts.map +1 -1
  48. package/dist/resources/projects.js +21 -171
  49. package/dist/resources/publications.d.ts +46 -0
  50. package/dist/resources/publications.d.ts.map +1 -0
  51. package/dist/resources/publications.js +70 -0
  52. package/dist/resources/releases.d.ts +66 -0
  53. package/dist/resources/releases.d.ts.map +1 -0
  54. package/dist/resources/releases.js +101 -0
  55. package/dist/resources/spec-revisions.d.ts +85 -0
  56. package/dist/resources/spec-revisions.d.ts.map +1 -0
  57. package/dist/resources/spec-revisions.js +116 -0
  58. package/dist/resources/specs.d.ts +72 -0
  59. package/dist/resources/specs.d.ts.map +1 -0
  60. package/dist/resources/specs.js +107 -0
  61. package/dist/resources/targets.d.ts +42 -262
  62. package/dist/resources/targets.d.ts.map +1 -1
  63. package/dist/resources/targets.js +28 -407
  64. package/dist/schemas.d.ts.map +1 -1
  65. package/dist/schemas.js +143 -149
  66. package/dist/types.d.ts +1281 -1611
  67. package/dist/types.d.ts.map +1 -1
  68. package/dist/types.js +44 -49
  69. package/package.json +1 -1
  70. package/server.json +2 -2
  71. package/src/api-identity.ts +6 -2
  72. package/src/core/http.ts +89 -24
  73. package/src/core/pagination.ts +13 -23
  74. package/src/errors.ts +7 -7
  75. package/src/index.ts +41 -23
  76. package/src/mcp-protocol.ts +2 -2
  77. package/src/mcp.ts +7 -6
  78. package/src/ops.ts +40 -43
  79. package/src/resources/api-keys.ts +13 -16
  80. package/src/resources/deliveries.ts +139 -0
  81. package/src/resources/drafts.ts +422 -0
  82. package/src/resources/files.ts +68 -0
  83. package/src/resources/generate.ts +16 -19
  84. package/src/resources/generations.ts +146 -35
  85. package/src/resources/{account.ts → organization.ts} +14 -14
  86. package/src/resources/projects.ts +42 -337
  87. package/src/resources/publications.ts +139 -0
  88. package/src/resources/releases.ts +199 -0
  89. package/src/resources/spec-revisions.ts +237 -0
  90. package/src/resources/specs.ts +200 -0
  91. package/src/resources/targets.ts +57 -760
  92. package/src/schemas.ts +143 -149
  93. package/src/types.ts +1357 -1692
  94. package/dist/resources/account.d.ts +0 -18
  95. package/dist/resources/account.d.ts.map +0 -1
  96. package/dist/resources/definition-revisions.d.ts +0 -75
  97. package/dist/resources/definition-revisions.d.ts.map +0 -1
  98. package/dist/resources/definition-revisions.js +0 -142
  99. package/dist/resources/definitions.d.ts +0 -50
  100. package/dist/resources/definitions.d.ts.map +0 -1
  101. package/dist/resources/definitions.js +0 -73
  102. package/src/resources/definition-revisions.ts +0 -265
  103. package/src/resources/definitions.ts +0 -146
@@ -0,0 +1,68 @@
1
+ // typeship — files resource.
2
+ // Generated by typeship — https://typeship.dev
3
+
4
+ import { HttpCore, type RequestOptions } from "../core/http.js";
5
+ import {
6
+ ResponseParseError,
7
+ TransportError,
8
+ UnexpectedApiError,
9
+ ValidationError,
10
+ BadRequestError,
11
+ ForbiddenError,
12
+ InternalServerError,
13
+ NotFoundError,
14
+ RateLimitedError,
15
+ UnauthorizedError,
16
+ } from "../errors.js";
17
+ import type { FileId, FileResponse, FileResponseRead } from "../types.js";
18
+
19
+ export class FilesResource {
20
+ constructor(private readonly _core: HttpCore) {}
21
+ /**
22
+ * Get a file
23
+ *
24
+ * Returns one bounded chunk of an immutable file: at most 24 KiB, as UTF-8 text or, for binary
25
+ * bytes, base64. When next_cursor is not null, repeat the request with cursor and concatenate the
26
+ * chunks in order. A file ID always returns the same bytes.
27
+ * `GET /files/{file_id}`
28
+ */
29
+ async get(fileId: FileId, params?: FilesGetParams, options?: RequestOptions): Promise<FileResponseRead> {
30
+ return this._core.requestData<FileResponseRead, FilesGetError>({
31
+ method: "GET",
32
+ path: `/files/${encodeURIComponent(String(fileId))}`,
33
+ security: [{"apiKey":[]}],
34
+ query: {
35
+ cursor: params?.cursor,
36
+ },
37
+ errors: {
38
+ "400": BadRequestError,
39
+ "401": UnauthorizedError,
40
+ "403": ForbiddenError,
41
+ "404": NotFoundError,
42
+ "429": RateLimitedError,
43
+ "500": InternalServerError,
44
+ },
45
+ idempotent: true,
46
+ schemaKey: "files.get",
47
+ options,
48
+ });
49
+ }
50
+ }
51
+
52
+ export interface FilesGetParams {
53
+ /** next_cursor from the preceding chunk of this file. */
54
+ cursor?: string;
55
+ }
56
+
57
+ /** Typed errors `get` can throw. */
58
+ export type FilesGetError =
59
+ | BadRequestError
60
+ | UnauthorizedError
61
+ | ForbiddenError
62
+ | NotFoundError
63
+ | RateLimitedError
64
+ | InternalServerError
65
+ | UnexpectedApiError
66
+ | ResponseParseError
67
+ | TransportError
68
+ | ValidationError;
@@ -1,7 +1,7 @@
1
1
  // typeship — generate resource.
2
2
  // Generated by typeship — https://typeship.dev
3
3
 
4
- import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
4
+ import { HttpCore, type RequestOptions } from "../core/http.js";
5
5
  import {
6
6
  ResponseParseError,
7
7
  TransportError,
@@ -23,7 +23,7 @@ import type { GenerateRequest, GenerationResult, GenerationResultRead } from "..
23
23
  export class GenerateResource {
24
24
  constructor(private readonly _core: HttpCore) {}
25
25
  /**
26
- * Generate one package from a Definition
26
+ * Generate one package from a Spec
27
27
  *
28
28
  * Returns one generated package without creating a Project.
29
29
  *
@@ -33,12 +33,12 @@ export class GenerateResource {
33
33
  * Use `download.url` to save the complete ZIP, verify `download.sha256`, and extract it into an
34
34
  * empty directory. The link expires at `download.expires_at` and grants access to anyone who has
35
35
  * it. CLI, MCP, and SDK calls supply an idempotency key automatically. Agents should request
36
- * `fields=["download","meta","warnings","limits","claim"]` to keep the MCP result compact; files
37
- * can exceed the response limit. Download the ZIP instead of repeating generation to retrieve
38
- * omitted files.
36
+ * `fields=["download","coverage","warnings","claim"]` to keep the MCP result compact; files can
37
+ * exceed the response limit. Download the ZIP instead of repeating generation to retrieve omitted
38
+ * files.
39
39
  *
40
40
  * Anonymous and Free requests include the first 25 operations. Paid plans include all operations.
41
- * Anonymous requests are rate limited by IP address. Check `limits` for omitted operations; an
41
+ * Anonymous requests are rate limited by IP address. Check `coverage` for omitted operations; an
42
42
  * invalid API key returns `401`.
43
43
  *
44
44
  * An anonymous URL request without source headers may return `claim.url`. Sign in through that
@@ -51,8 +51,8 @@ export class GenerateResource {
51
51
  body: GenerateRequest,
52
52
  params?: GenerateRunParams,
53
53
  options?: RequestOptions,
54
- ): Promise<ApiResult<GenerationResultRead, GenerateRunError>> {
55
- return this._core.request<GenerationResultRead, GenerateRunError>({
54
+ ): Promise<GenerationResultRead> {
55
+ return this._core.requestData<GenerationResultRead, GenerateRunError>({
56
56
  method: "POST",
57
57
  path: "/generate",
58
58
  security: [{},{"apiKey":[]}],
@@ -90,11 +90,8 @@ export class GenerateResource {
90
90
  * creates a new download.
91
91
  * `GET /generate/download`
92
92
  */
93
- async downloadPackage(
94
- params: GenerateDownloadPackageParams,
95
- options?: RequestOptions,
96
- ): Promise<ApiResult<Blob, GenerateDownloadPackageError>> {
97
- return this._core.request<Blob, GenerateDownloadPackageError>({
93
+ async downloadPackage(params: GenerateDownloadPackageParams, options?: RequestOptions): Promise<Blob> {
94
+ return this._core.requestData<Blob, GenerateDownloadPackageError>({
98
95
  method: "GET",
99
96
  path: "/generate/download",
100
97
  security: [{}],
@@ -116,15 +113,15 @@ export class GenerateResource {
116
113
 
117
114
  export interface GenerateRunParams {
118
115
  /**
119
- * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
120
- * operation; account-less generation uses a hashed network identity. Retrying the same method,
121
- * path, query, If-Match header, and JSON body replays the original response. Reusing the key with
122
- * changed intent returns 409. After expiry the key starts a new write.
116
+ * Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
117
+ * and operation; generation without an organization uses a hashed network identity. Retrying the
118
+ * same method, path, query, If-Match header, and JSON body replays the original response. Reusing
119
+ * the key with changed intent returns 409. After expiry the key starts a new write.
123
120
  */
124
121
  idempotencyKey?: string;
125
122
  }
126
123
 
127
- /** Every error `run` can produce, as a discriminated union. */
124
+ /** Typed errors `run` can throw. */
128
125
  export type GenerateRunError =
129
126
  | BadRequestError
130
127
  | UnauthorizedError
@@ -145,7 +142,7 @@ export interface GenerateDownloadPackageParams {
145
142
  token: string;
146
143
  }
147
144
 
148
- /** Every error `downloadPackage` can produce, as a discriminated union. */
145
+ /** Typed errors `downloadPackage` can throw. */
149
146
  export type GenerateDownloadPackageError =
150
147
  | BadRequestError
151
148
  | NotFoundError
@@ -1,7 +1,8 @@
1
1
  // typeship — generations resource.
2
2
  // Generated by typeship — https://typeship.dev
3
3
 
4
- import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
4
+ import { HttpCore, type RequestOptions } from "../core/http.js";
5
+ import { paginate, PagePromise } from "../core/pagination.js";
5
6
  import {
6
7
  ResponseParseError,
7
8
  TransportError,
@@ -14,24 +15,77 @@ import {
14
15
  RateLimitedError,
15
16
  UnauthorizedError,
16
17
  } from "../errors.js";
17
- import type { GenerationId, GenerationResponse, GenerationResponseRead } from "../types.js";
18
+ import type {
19
+ FileList,
20
+ FileListRead,
21
+ FileModel,
22
+ FileModelRead,
23
+ GenerationId,
24
+ GenerationList,
25
+ GenerationListRead,
26
+ GenerationResponse,
27
+ GenerationResponseRead,
28
+ GenerationStatus,
29
+ GenerationSummary,
30
+ GenerationSummaryRead,
31
+ ProjectId,
32
+ TargetId,
33
+ } from "../types.js";
18
34
 
19
35
  export class GenerationsResource {
20
36
  constructor(private readonly _core: HttpCore) {}
21
37
  /**
22
- * Retrieve a generation
38
+ * List generations
23
39
  *
24
- * Returns the current Generation status. `queued` and `running` mean generation is still in
25
- * progress. `succeeded` means generated files are saved, not that repository delivery or a Draft
26
- * is complete. Successful results include files, or a file index when the package is too large to
27
- * inline.
28
- * `GET /generations/{generation_id}`
40
+ * Auto-paginates: `for await (const item of …)` walks every page.
41
+ * `GET /generations`
29
42
  */
30
- async retrieve(
31
- generationId: GenerationId,
43
+ list(
44
+ params?: GenerationsListParams,
32
45
  options?: RequestOptions,
33
- ): Promise<ApiResult<GenerationResponseRead, GenerationsRetrieveError>> {
34
- return this._core.request<GenerationResponseRead, GenerationsRetrieveError>({
46
+ ): PagePromise<GenerationSummaryRead, GenerationsListError> {
47
+ return paginate<GenerationSummaryRead, GenerationsListError>(this._core, {
48
+ method: "GET",
49
+ path: "/generations",
50
+ security: [{"apiKey":[]}],
51
+ query: {
52
+ limit: params?.limit,
53
+ cursor: params?.cursor,
54
+ project_id: params?.projectId,
55
+ target_id: params?.targetId,
56
+ status: params?.status,
57
+ },
58
+ errors: {
59
+ "400": BadRequestError,
60
+ "401": UnauthorizedError,
61
+ "403": ForbiddenError,
62
+ "404": NotFoundError,
63
+ "429": RateLimitedError,
64
+ "500": InternalServerError,
65
+ },
66
+ idempotent: true,
67
+ schemaKey: "generations.list",
68
+ options,
69
+ }, {
70
+ style: "cursor",
71
+ itemsField: "data",
72
+ cursorParam: "cursor",
73
+ nextCursorField: "next_cursor",
74
+ hasMoreField: "has_more",
75
+ limitParam: "limit",
76
+ });
77
+ }
78
+
79
+ /**
80
+ * Get a generation
81
+ *
82
+ * Returns the status of that Generation. `queued` and `running` mean generation is still in
83
+ * progress. `completed` means generated files are saved, not that repository delivery or a Draft
84
+ * is complete. List its files with listGenerationFiles and read each with getFile.
85
+ * `GET /generations/{generation_id}`
86
+ */
87
+ async get(generationId: GenerationId, options?: RequestOptions): Promise<GenerationResponseRead> {
88
+ return this._core.requestData<GenerationResponseRead, GenerationsGetError>({
35
89
  method: "GET",
36
90
  path: `/generations/${encodeURIComponent(String(generationId))}`,
37
91
  security: [{"apiKey":[]}],
@@ -43,29 +97,31 @@ export class GenerationsResource {
43
97
  "500": InternalServerError,
44
98
  },
45
99
  idempotent: true,
46
- schemaKey: "generations.retrieve",
100
+ schemaKey: "generations.get",
47
101
  options,
48
102
  });
49
103
  }
50
104
 
51
105
  /**
52
- * Fetch one file from a generation
106
+ * List a Generation's files
53
107
  *
54
- * Returns one file's raw content. Use a path from `files_index` when the Generation reports
55
- * `files_omitted: true`.
56
- * `GET /generations/{generation_id}/file`
108
+ * Lists the generated package's files, ordered by path. Read content with getFile.
109
+ *
110
+ * Auto-paginates: `for await (const item of …)` walks every page.
111
+ * `GET /generations/{generation_id}/files`
57
112
  */
58
- async retrieveFile(
113
+ listFiles(
59
114
  generationId: GenerationId,
60
- params: GenerationsRetrieveFileParams,
115
+ params?: GenerationsListFilesParams,
61
116
  options?: RequestOptions,
62
- ): Promise<ApiResult<string, GenerationsRetrieveFileError>> {
63
- return this._core.request<string, GenerationsRetrieveFileError>({
117
+ ): PagePromise<FileModelRead, GenerationsListFilesError> {
118
+ return paginate<FileModelRead, GenerationsListFilesError>(this._core, {
64
119
  method: "GET",
65
- path: `/generations/${encodeURIComponent(String(generationId))}/file`,
120
+ path: `/generations/${encodeURIComponent(String(generationId))}/files`,
66
121
  security: [{"apiKey":[]}],
67
122
  query: {
68
- path: params.path,
123
+ limit: params?.limit,
124
+ cursor: params?.cursor,
69
125
  },
70
126
  errors: {
71
127
  "400": BadRequestError,
@@ -76,8 +132,15 @@ export class GenerationsResource {
76
132
  "500": InternalServerError,
77
133
  },
78
134
  idempotent: true,
79
- schemaKey: "generations.retrieveFile",
135
+ schemaKey: "generations.listFiles",
80
136
  options,
137
+ }, {
138
+ style: "cursor",
139
+ itemsField: "data",
140
+ cursorParam: "cursor",
141
+ nextCursorField: "next_cursor",
142
+ hasMoreField: "has_more",
143
+ limitParam: "limit",
81
144
  });
82
145
  }
83
146
 
@@ -85,15 +148,15 @@ export class GenerationsResource {
85
148
  async wait(
86
149
  generationId: GenerationId,
87
150
  options: RequestOptions & { intervalMs?: number; waitTimeoutMs?: number } = {},
88
- ): Promise<ApiResult<GenerationResponseRead, GenerationsRetrieveError>> {
89
- const { intervalMs = 1_000, waitTimeoutMs = 600_000, ...requestOptions } = options;
151
+ ): Promise<GenerationResponseRead> {
152
+ const { intervalMs = 3_000, waitTimeoutMs = 600_000, ...requestOptions } = options;
90
153
  const deadline = Date.now() + waitTimeoutMs;
91
154
  while (true) {
92
155
  if (requestOptions.signal?.aborted) {
93
156
  throw requestOptions.signal.reason ?? new Error("Generation wait aborted.");
94
157
  }
95
- const result = await this.retrieve(generationId, requestOptions);
96
- if (!result.ok || (result.data.status !== "queued" && result.data.status !== "running")) return result;
158
+ const result = await this.get(generationId, requestOptions);
159
+ if (result.status !== "queued" && result.status !== "running") return result;
97
160
  if (Date.now() >= deadline) throw new Error("Timed out waiting for Generation " + generationId + ".");
98
161
  await new Promise<void>((resolve) =>
99
162
  setTimeout(resolve, Math.min(intervalMs, deadline - Date.now())));
@@ -101,8 +164,44 @@ export class GenerationsResource {
101
164
  }
102
165
  }
103
166
 
104
- /** Every error `retrieve` can produce, as a discriminated union. */
105
- export type GenerationsRetrieveError =
167
+ export interface GenerationsListParams {
168
+ /**
169
+ * Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
170
+ * representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
171
+ * invalid_request. List query parameters must appear only once; unrecognized parameters also
172
+ * return 400.
173
+ */
174
+ limit?: number;
175
+ /**
176
+ * Opaque cursor from the preceding page's next_cursor. Valid only for the same organization,
177
+ * operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
178
+ * malformed, or repeated cursors return 400 invalid_request. The page limit may change between
179
+ * requests.
180
+ */
181
+ cursor?: string;
182
+ /** Only Generations in this Project. */
183
+ projectId?: ProjectId;
184
+ /** Only Generations of this Target. */
185
+ targetId?: TargetId;
186
+ /** Only Generations with this status. */
187
+ status?: GenerationStatus;
188
+ }
189
+
190
+ /** Typed errors `list` can throw. */
191
+ export type GenerationsListError =
192
+ | BadRequestError
193
+ | UnauthorizedError
194
+ | ForbiddenError
195
+ | NotFoundError
196
+ | RateLimitedError
197
+ | InternalServerError
198
+ | UnexpectedApiError
199
+ | ResponseParseError
200
+ | TransportError
201
+ | ValidationError;
202
+
203
+ /** Typed errors `get` can throw. */
204
+ export type GenerationsGetError =
106
205
  | UnauthorizedError
107
206
  | ForbiddenError
108
207
  | NotFoundError
@@ -113,13 +212,25 @@ export type GenerationsRetrieveError =
113
212
  | TransportError
114
213
  | ValidationError;
115
214
 
116
- export interface GenerationsRetrieveFileParams {
117
- /** Repo-relative path inside the generated package. */
118
- path: string;
215
+ export interface GenerationsListFilesParams {
216
+ /**
217
+ * Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
218
+ * representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
219
+ * invalid_request. List query parameters must appear only once; unrecognized parameters also
220
+ * return 400.
221
+ */
222
+ limit?: number;
223
+ /**
224
+ * Opaque cursor from the preceding page's next_cursor. Valid only for the same organization,
225
+ * operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
226
+ * malformed, or repeated cursors return 400 invalid_request. The page limit may change between
227
+ * requests.
228
+ */
229
+ cursor?: string;
119
230
  }
120
231
 
121
- /** Every error `retrieveFile` can produce, as a discriminated union. */
122
- export type GenerationsRetrieveFileError =
232
+ /** Typed errors `listFiles` can throw. */
233
+ export type GenerationsListFilesError =
123
234
  | BadRequestError
124
235
  | UnauthorizedError
125
236
  | ForbiddenError
@@ -1,7 +1,7 @@
1
- // typeship — account resource.
1
+ // typeship — organization resource.
2
2
  // Generated by typeship — https://typeship.dev
3
3
 
4
- import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
4
+ import { HttpCore, type RequestOptions } from "../core/http.js";
5
5
  import {
6
6
  ResponseParseError,
7
7
  TransportError,
@@ -12,21 +12,21 @@ import {
12
12
  RateLimitedError,
13
13
  UnauthorizedError,
14
14
  } from "../errors.js";
15
- import type { Account, AccountRead } from "../types.js";
15
+ import type { Organization, OrganizationRead } from "../types.js";
16
16
 
17
- export class AccountResource {
17
+ export class OrganizationResource {
18
18
  constructor(private readonly _core: HttpCore) {}
19
19
  /**
20
- * The account behind the presented credentials
20
+ * The organization behind the presented credentials
21
21
  *
22
- * Returns the account associated with your credential. The Typeship CLI uses this endpoint for
23
- * `whoami`.
24
- * `GET /me`
22
+ * Returns the organization associated with your credential. The Typeship CLI uses this endpoint
23
+ * for `whoami`.
24
+ * `GET /organization`
25
25
  */
26
- async retrieve(options?: RequestOptions): Promise<ApiResult<AccountRead, AccountRetrieveError>> {
27
- return this._core.request<AccountRead, AccountRetrieveError>({
26
+ async get(options?: RequestOptions): Promise<OrganizationRead> {
27
+ return this._core.requestData<OrganizationRead, OrganizationGetError>({
28
28
  method: "GET",
29
- path: "/me",
29
+ path: "/organization",
30
30
  security: [{"apiKey":[]}],
31
31
  errors: {
32
32
  "401": UnauthorizedError,
@@ -35,14 +35,14 @@ export class AccountResource {
35
35
  "500": InternalServerError,
36
36
  },
37
37
  idempotent: true,
38
- schemaKey: "account.retrieve",
38
+ schemaKey: "organization.get",
39
39
  options,
40
40
  });
41
41
  }
42
42
  }
43
43
 
44
- /** Every error `retrieve` can produce, as a discriminated union. */
45
- export type AccountRetrieveError =
44
+ /** Typed errors `get` can throw. */
45
+ export type OrganizationGetError =
46
46
  | UnauthorizedError
47
47
  | ForbiddenError
48
48
  | RateLimitedError