@typeship-ax/cli 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 (70) hide show
  1. package/AGENTS.md +9 -4
  2. package/README.md +4 -4
  3. package/api.json +4829 -679
  4. package/api.md +387 -91
  5. package/dist/cli-agent.d.ts +5 -5
  6. package/dist/cli-agent.d.ts.map +1 -1
  7. package/dist/cli-agent.js +14 -10
  8. package/dist/cli.js +151 -75
  9. package/dist/core/http.d.ts +3 -2
  10. package/dist/core/http.d.ts.map +1 -1
  11. package/dist/core/http.js +18 -6
  12. package/dist/errors.d.ts +17 -10
  13. package/dist/errors.d.ts.map +1 -1
  14. package/dist/errors.js +24 -15
  15. package/dist/index.d.ts +7 -3
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +9 -5
  18. package/dist/ops.d.ts +4 -0
  19. package/dist/ops.d.ts.map +1 -1
  20. package/dist/ops.js +45 -35
  21. package/dist/polling-login.d.ts.map +1 -1
  22. package/dist/polling-login.js +11 -1
  23. package/dist/resources/account.d.ts +4 -4
  24. package/dist/resources/account.d.ts.map +1 -1
  25. package/dist/resources/account.js +10 -5
  26. package/dist/resources/api-keys.d.ts +40 -14
  27. package/dist/resources/api-keys.d.ts.map +1 -1
  28. package/dist/resources/api-keys.js +45 -13
  29. package/dist/resources/definition-revisions.d.ts +35 -18
  30. package/dist/resources/definition-revisions.d.ts.map +1 -1
  31. package/dist/resources/definition-revisions.js +43 -15
  32. package/dist/resources/definitions.d.ts +21 -6
  33. package/dist/resources/definitions.d.ts.map +1 -1
  34. package/dist/resources/definitions.js +16 -3
  35. package/dist/resources/generate.d.ts +44 -15
  36. package/dist/resources/generate.d.ts.map +1 -1
  37. package/dist/resources/generate.js +55 -13
  38. package/dist/resources/generations.d.ts +14 -6
  39. package/dist/resources/generations.d.ts.map +1 -1
  40. package/dist/resources/generations.js +26 -5
  41. package/dist/resources/projects.d.ts +106 -53
  42. package/dist/resources/projects.d.ts.map +1 -1
  43. package/dist/resources/projects.js +78 -31
  44. package/dist/resources/targets.d.ts +240 -40
  45. package/dist/resources/targets.d.ts.map +1 -1
  46. package/dist/resources/targets.js +307 -21
  47. package/dist/schemas.d.ts +1 -0
  48. package/dist/schemas.d.ts.map +1 -1
  49. package/dist/schemas.js +171 -111
  50. package/dist/types.d.ts +1969 -154
  51. package/dist/types.d.ts.map +1 -1
  52. package/dist/types.js +87 -3
  53. package/package.json +3 -3
  54. package/src/cli-agent.ts +17 -13
  55. package/src/cli.ts +138 -70
  56. package/src/core/http.ts +17 -6
  57. package/src/errors.ts +25 -15
  58. package/src/index.ts +9 -5
  59. package/src/ops.ts +49 -35
  60. package/src/polling-login.ts +10 -1
  61. package/src/resources/account.ts +11 -4
  62. package/src/resources/api-keys.ts +84 -13
  63. package/src/resources/definition-revisions.ts +74 -16
  64. package/src/resources/definitions.ts +28 -4
  65. package/src/resources/generate.ts +78 -13
  66. package/src/resources/generations.ts +31 -4
  67. package/src/resources/projects.ts +141 -39
  68. package/src/resources/targets.ts +561 -27
  69. package/src/schemas.ts +172 -112
  70. package/src/types.ts +2105 -154
@@ -1,7 +1,7 @@
1
1
  import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
2
2
  import { PagePromise } from "../core/pagination.js";
3
- import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PaymentRequiredError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
4
- import type { CreateProjectRequest, DeletedProjectRead, DiagnosticRemediationRead, DiagnosticRemediationRequest, DiagnosticReportRead, GenerationBatchRead, GenerationSummaryRead, ProjectId, ProjectRead, ProjectSummaryRead, RepositoryIntegrationHealthRead, TargetId, UpdateProjectRequest } from "../types.js";
3
+ import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PayloadTooLargeError, PaymentRequiredError, PreconditionFailedError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
4
+ import type { CreateProjectRequest, DeletedProjectRead, DiagnosticRemediationRead, DiagnosticRemediationRequest, DiagnosticReportRead, GenerateProjectRequest, GenerationBatchRead, GenerationSummaryRead, ProjectId, ProjectRead, ProjectSummaryRead, RepositoryIntegrationHealthRead, TargetId, UpdateProjectRequest } from "../types.js";
5
5
  export declare class ProjectsResource {
6
6
  private readonly _core;
7
7
  constructor(_core: HttpCore);
@@ -15,10 +15,11 @@ export declare class ProjectsResource {
15
15
  /**
16
16
  * Create a project
17
17
  *
18
- * Stores a URL- or GitHub-sourced project. Free includes one stored project, every selected
19
- * target, and the first 25 operations, while keeping manual and automatic regeneration, history,
20
- * destination pull requests, and preview checks. Stateless POST /generate does not consume this
21
- * slot. Pro adds projects and generates every operation in the Definition.
18
+ * Creates a Project from a URL or GitHub Definition.
19
+ *
20
+ * Free includes one saved Project, all selected Targets, and the first 25 operations per Target,
21
+ * with regeneration, history, delivery pull requests, and previews. Pro supports additional
22
+ * Projects and all operations. One-shot generation does not use a Project slot.
22
23
  *
23
24
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
24
25
  * `POST /projects`
@@ -27,36 +28,54 @@ export declare class ProjectsResource {
27
28
  /**
28
29
  * Retrieve a project
29
30
  *
30
- * Returns Project-owned fields only. List Targets separately for Target and Delivery data.
31
+ * Returns the Project's settings and Definition ID. List its Targets separately to retrieve
32
+ * Target configuration and Deliveries.
31
33
  * `GET /projects/{project_id}`
32
34
  */
33
35
  retrieve(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<ProjectRead, ProjectsRetrieveError>>;
34
36
  /**
35
37
  * Delete a project
38
+ *
39
+ * A `502` response means the Project was not deleted because its release pull requests could not
40
+ * be retired. Retry deletion to finish retiring the remaining reviews. Repeating a completed
41
+ * deletion returns `404`.
42
+ * See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
43
+ * and If-Match.
36
44
  * `DELETE /projects/{project_id}`
37
45
  */
38
- delete(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<DeletedProjectRead, ProjectsDeleteError>>;
46
+ delete(projectId: ProjectId, params?: ProjectsDeleteParams, options?: RequestOptions): Promise<ApiResult<DeletedProjectRead, ProjectsDeleteError>>;
39
47
  /**
40
48
  * Update a project
49
+ *
50
+ * Omitted fields keep their current values. A supplied config replaces the entire stored object;
51
+ * null or an empty object clears it.
52
+ * Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag
53
+ * returns 412 precondition_failed without saving.
54
+ *
55
+ * A `409 target_busy` means a Target is publishing. Retrieve the Project, wait for publication to
56
+ * finish, reconcile your update, and retry.
57
+ * A `502` response means the Project was saved, but an obsolete release pull request could not be
58
+ * retired. Retrieve the Project and retry the same update to finish retiring reviews if that
59
+ * update is still desired.
60
+ * See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
61
+ * and If-Match.
41
62
  * `PATCH /projects/{project_id}`
42
63
  */
43
- update(projectId: ProjectId, body: UpdateProjectRequest, options?: RequestOptions): Promise<ApiResult<ProjectRead, ProjectsUpdateError>>;
64
+ update(projectId: ProjectId, body: UpdateProjectRequest, params?: ProjectsUpdateParams, options?: RequestOptions): Promise<ApiResult<ProjectRead, ProjectsUpdateError>>;
44
65
  /**
45
66
  * Analyze a project's latest Definition Revision
46
67
  *
47
- * Runs deterministic OpenAPI or GraphQL authorship checks against the latest observed immutable
48
- * Definition Revision after applying the Definition's existing patches. Diagnostics group every
49
- * affected location under a stable rule. Exact patches are included only when Typeship can derive
50
- * the change without inventing API behavior.
68
+ * Checks the latest Definition Revision after applying its saved patches. Each finding groups
69
+ * affected locations under a stable rule ID. A suggested patch is included only when the
70
+ * Definition provides enough information to determine the correction.
51
71
  * `GET /projects/{project_id}/diagnostics`
52
72
  */
53
73
  retrieveDiagnostics(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<DiagnosticReportRead, ProjectsRetrieveDiagnosticsError>>;
54
74
  /**
55
75
  * Refresh a project's Diagnostics from its configured source
56
76
  *
57
- * Fetches the complete configured source, records a new immutable revision only when content
58
- * changed, and returns its Diagnostics. This does not generate targets or consume a metered
59
- * generation.
77
+ * Fetches the configured source and returns updated Diagnostics. Creates a Definition Revision
78
+ * only when the content changes. Does not generate Targets or use a metered generation.
60
79
  *
61
80
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
62
81
  * `POST /projects/{project_id}/diagnostics`
@@ -65,9 +84,11 @@ export declare class ProjectsResource {
65
84
  /**
66
85
  * Apply exact, reviewed diagnostic remediations
67
86
  *
68
- * Applies only deterministic patches. Repository sources receive an updateable source pull
69
- * request; URL sources receive project overlays. Diagnostics that require API-owner intent return
70
- * 422 and include an authoring_brief in the Diagnostic instead.
87
+ * Applies reviewed patches from Diagnostics. For a repository source, opens or updates a source
88
+ * pull request. For a URL source, saves Definition patches.
89
+ *
90
+ * Findings that need an API-owner decision return `422`. Read the finding's `authoring_brief` and
91
+ * update the source instead.
71
92
  *
72
93
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
73
94
  * `POST /projects/{project_id}/diagnostics/remediations`
@@ -76,9 +97,8 @@ export declare class ProjectsResource {
76
97
  /**
77
98
  * Diagnose a project's repository integrations
78
99
  *
79
- * Returns provider-neutral, machine-actionable source and destination access, Definition
80
- * readability, source-approval label setup, required status names, and the latest durable webhook
81
- * delivery. The Console renders this same result.
100
+ * Checks repository access, Definition readability, source-approval labels, and required checks.
101
+ * Includes the latest webhook delivery so you can investigate missing updates.
82
102
  * `GET /projects/{project_id}/integration-health`
83
103
  */
84
104
  retrieveIntegrationHealth(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<RepositoryIntegrationHealthRead, ProjectsRetrieveIntegrationHealthError>>;
@@ -90,97 +110,130 @@ export declare class ProjectsResource {
90
110
  */
91
111
  listGenerations(projectId: ProjectId, params?: ProjectsListGenerationsParams, options?: RequestOptions): PagePromise<GenerationSummaryRead, ProjectsListGenerationsError>;
92
112
  /**
93
- * Generate targets and open pull requests
113
+ * Start generation for active Targets
114
+ *
115
+ * Queues one Generation per active Target and returns their IDs. Retrieve each Generation until
116
+ * its status moves from `queued` to `running` and then `succeeded` or `failed`. `succeeded` means
117
+ * generated files are saved; check Delivery and Draft status separately for repository delivery
118
+ * and pull requests. A Target already queued or running is returned without starting another
119
+ * Generation. A matching Idempotency-Key replay returns the same Generations with their current
120
+ * statuses.
94
121
  *
95
- * Resolves the project's URL or GitHub source, generates every
96
- * configured delivery package, stores each result in the project's history,
97
- * and attempts to open a pull request in every configured destination.
98
- * When the complete generated tree already matches a destination, no
99
- * commit, branch, or pull request is created and that generation reports
100
- * `pr_status: no_changes`. This is the same pipeline automatic
101
- * regeneration runs after a source change.
122
+ * If the package already matches a destination and no Draft is open, delivery reports `pr_status:
123
+ * no_changes` without creating a commit, branch, or pull request. An existing Draft stays open.
124
+ * Automatic generation uses the same workflow.
102
125
  *
103
126
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
104
127
  * `POST /projects/{project_id}/generations`
105
128
  */
106
- generate(projectId: ProjectId, params?: ProjectsGenerateParams, options?: RequestOptions): Promise<ApiResult<GenerationBatchRead, ProjectsGenerateError>>;
129
+ generate(projectId: ProjectId, body?: GenerateProjectRequest, params?: ProjectsGenerateParams, options?: RequestOptions): Promise<ApiResult<GenerationBatchRead, ProjectsGenerateError>>;
107
130
  }
108
131
  export interface ProjectsListParams {
109
- /** Maximum number of resources to return. */
132
+ /**
133
+ * Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
134
+ * representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
135
+ * invalid_request. List query parameters must appear only once; unrecognized parameters also
136
+ * return 400.
137
+ */
110
138
  limit?: number;
111
139
  /**
112
140
  * Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
113
- * operation, filters, and ordering that issued it.
141
+ * operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
142
+ * malformed, or repeated cursors return 400 invalid_request. The page limit may change between
143
+ * requests.
114
144
  */
115
145
  cursor?: string;
116
146
  }
117
147
  /** Every error `list` can produce, as a discriminated union. */
118
- export type ProjectsListError = BadRequestError | UnauthorizedError | ForbiddenError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
148
+ export type ProjectsListError = BadRequestError | UnauthorizedError | ForbiddenError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
119
149
  export interface ProjectsCreateParams {
120
150
  /**
121
151
  * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
122
152
  * operation; account-less generation uses a hashed network identity. Retrying the same method,
123
- * path, query, and JSON body replays the original response. Reusing the key with changed intent
124
- * returns 409. After expiry the key starts a new write.
153
+ * path, query, If-Match header, and JSON body replays the original response. Reusing the key with
154
+ * changed intent returns 409. After expiry the key starts a new write.
125
155
  */
126
156
  idempotencyKey?: string;
127
157
  }
128
158
  /** Every error `create` can produce, as a discriminated union. */
129
159
  export type ProjectsCreateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
130
160
  /** Every error `retrieve` can produce, as a discriminated union. */
131
- export type ProjectsRetrieveError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
161
+ export type ProjectsRetrieveError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
162
+ export interface ProjectsDeleteParams {
163
+ /**
164
+ * ETag from a preceding response. The write applies only if the resource still has that version;
165
+ * otherwise it returns 412 precondition_failed without changes. Omit to write the current
166
+ * version. See https://typeship.dev/docs/typeship-api#conditional-writes.
167
+ */
168
+ ifMatch?: string;
169
+ }
132
170
  /** Every error `delete` can produce, as a discriminated union. */
133
- export type ProjectsDeleteError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
171
+ export type ProjectsDeleteError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | PreconditionFailedError | RateLimitedError | InternalServerError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
172
+ export interface ProjectsUpdateParams {
173
+ /**
174
+ * ETag from a preceding response. The write applies only if the resource still has that version;
175
+ * otherwise it returns 412 precondition_failed without changes. Omit to write the current
176
+ * version. See https://typeship.dev/docs/typeship-api#conditional-writes.
177
+ */
178
+ ifMatch?: string;
179
+ }
134
180
  /** Every error `update` can produce, as a discriminated union. */
135
- export type ProjectsUpdateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
181
+ export type ProjectsUpdateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | PreconditionFailedError | UnprocessableEntityError | RateLimitedError | InternalServerError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
136
182
  /** Every error `retrieveDiagnostics` can produce, as a discriminated union. */
137
- export type ProjectsRetrieveDiagnosticsError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
183
+ export type ProjectsRetrieveDiagnosticsError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
138
184
  export interface ProjectsRefreshDiagnosticsParams {
139
185
  /**
140
186
  * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
141
187
  * operation; account-less generation uses a hashed network identity. Retrying the same method,
142
- * path, query, and JSON body replays the original response. Reusing the key with changed intent
143
- * returns 409. After expiry the key starts a new write.
188
+ * path, query, If-Match header, and JSON body replays the original response. Reusing the key with
189
+ * changed intent returns 409. After expiry the key starts a new write.
144
190
  */
145
191
  idempotencyKey?: string;
146
192
  }
147
193
  /** Every error `refreshDiagnostics` can produce, as a discriminated union. */
148
- export type ProjectsRefreshDiagnosticsError = UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
194
+ export type ProjectsRefreshDiagnosticsError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
149
195
  export interface ProjectsRemediateDiagnosticsParams {
150
196
  /**
151
197
  * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
152
198
  * operation; account-less generation uses a hashed network identity. Retrying the same method,
153
- * path, query, and JSON body replays the original response. Reusing the key with changed intent
154
- * returns 409. After expiry the key starts a new write.
199
+ * path, query, If-Match header, and JSON body replays the original response. Reusing the key with
200
+ * changed intent returns 409. After expiry the key starts a new write.
155
201
  */
156
202
  idempotencyKey?: string;
157
203
  }
158
204
  /** Every error `remediateDiagnostics` can produce, as a discriminated union. */
159
- export type ProjectsRemediateDiagnosticsError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
205
+ export type ProjectsRemediateDiagnosticsError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
160
206
  /** Every error `retrieveIntegrationHealth` can produce, as a discriminated union. */
161
- export type ProjectsRetrieveIntegrationHealthError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
207
+ export type ProjectsRetrieveIntegrationHealthError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
162
208
  export interface ProjectsListGenerationsParams {
163
- /** Maximum number of resources to return. */
209
+ /**
210
+ * Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
211
+ * representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
212
+ * invalid_request. List query parameters must appear only once; unrecognized parameters also
213
+ * return 400.
214
+ */
164
215
  limit?: number;
165
216
  /**
166
217
  * Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
167
- * operation, filters, and ordering that issued it.
218
+ * operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
219
+ * malformed, or repeated cursors return 400 invalid_request. The page limit may change between
220
+ * requests.
168
221
  */
169
222
  cursor?: string;
170
223
  /** Only generations for this persisted Target. */
171
224
  targetId?: TargetId;
172
225
  }
173
226
  /** Every error `listGenerations` can produce, as a discriminated union. */
174
- export type ProjectsListGenerationsError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
227
+ export type ProjectsListGenerationsError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
175
228
  export interface ProjectsGenerateParams {
176
229
  /**
177
230
  * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
178
231
  * operation; account-less generation uses a hashed network identity. Retrying the same method,
179
- * path, query, and JSON body replays the original response. Reusing the key with changed intent
180
- * returns 409. After expiry the key starts a new write.
232
+ * path, query, If-Match header, and JSON body replays the original response. Reusing the key with
233
+ * changed intent returns 409. After expiry the key starts a new write.
181
234
  */
182
235
  idempotencyKey?: string;
183
236
  }
184
237
  /** Every error `generate` can produce, as a discriminated union. */
185
- export type ProjectsGenerateError = UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
238
+ export type ProjectsGenerateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | PayloadTooLargeError | UnprocessableEntityError | RateLimitedError | InternalServerError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
186
239
  //# sourceMappingURL=projects.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/resources/projects.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,eAAe,EACf,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EAElB,yBAAyB,EACzB,4BAA4B,EAE5B,oBAAoB,EAEpB,mBAAmB,EAInB,qBAAqB,EAErB,SAAS,EAGT,WAAW,EAEX,kBAAkB,EAElB,+BAA+B,EAC/B,QAAQ,EACR,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAErB,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;OAKG;IACH,IAAI,CACF,MAAM,CAAC,EAAE,kBAAkB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;IA4BrD;;;;;;;;;;OAUG;IACG,MAAM,CACV,IAAI,EAAE,oBAAoB,EAC1B,MAAM,CAAC,EAAE,oBAAoB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE,mBAAmB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AA4B,GACpC,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,oEAAoE;AACpE,MAAM,MAAM,qBAAqB,GAC7B,iBAAiB,GACjB,oBAAoB,GACpB,cAAc,GACd,aAAa,GACb,aAAa,GACb,wBAAwB,GACxB,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
1
+ {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/resources/projects.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,eAAe,EACf,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EAElB,yBAAyB,EACzB,4BAA4B,EAE5B,oBAAoB,EACpB,sBAAsB,EAEtB,mBAAmB,EAInB,qBAAqB,EAErB,SAAS,EAGT,WAAW,EAEX,kBAAkB,EAElB,+BAA+B,EAC/B,QAAQ,EACR,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAErB,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;OAKG;IACH,IAAI,CACF,MAAM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,7 @@
1
1
  // typeship — projects resource.
2
- // Generated by typeship — https://typeship.dev — do not edit by hand.
2
+ // Generated by typeship — https://typeship.dev
3
3
  import { paginate } from "../core/pagination.js";
4
- import { BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PaymentRequiredError, RateLimitedError, UnauthorizedError, UnprocessableEntityError, } from "../errors.js";
4
+ import { BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PayloadTooLargeError, PaymentRequiredError, PreconditionFailedError, RateLimitedError, UnauthorizedError, UnprocessableEntityError, } from "../errors.js";
5
5
  export class ProjectsResource {
6
6
  _core;
7
7
  constructor(_core) {
@@ -27,6 +27,7 @@ export class ProjectsResource {
27
27
  "401": UnauthorizedError,
28
28
  "403": ForbiddenError,
29
29
  "429": RateLimitedError,
30
+ "500": InternalServerError,
30
31
  },
31
32
  idempotent: true,
32
33
  schemaKey: "projects.list",
@@ -43,10 +44,11 @@ export class ProjectsResource {
43
44
  /**
44
45
  * Create a project
45
46
  *
46
- * Stores a URL- or GitHub-sourced project. Free includes one stored project, every selected
47
- * target, and the first 25 operations, while keeping manual and automatic regeneration, history,
48
- * destination pull requests, and preview checks. Stateless POST /generate does not consume this
49
- * slot. Pro adds projects and generates every operation in the Definition.
47
+ * Creates a Project from a URL or GitHub Definition.
48
+ *
49
+ * Free includes one saved Project, all selected Targets, and the first 25 operations per Target,
50
+ * with regeneration, history, delivery pull requests, and previews. Pro supports additional
51
+ * Projects and all operations. One-shot generation does not use a Project slot.
50
52
  *
51
53
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
52
54
  * `POST /projects`
@@ -78,7 +80,8 @@ export class ProjectsResource {
78
80
  /**
79
81
  * Retrieve a project
80
82
  *
81
- * Returns Project-owned fields only. List Targets separately for Target and Delivery data.
83
+ * Returns the Project's settings and Definition ID. List its Targets separately to retrieve
84
+ * Target configuration and Deliveries.
82
85
  * `GET /projects/{project_id}`
83
86
  */
84
87
  async retrieve(projectId, options) {
@@ -91,6 +94,7 @@ export class ProjectsResource {
91
94
  "403": ForbiddenError,
92
95
  "404": NotFoundError,
93
96
  "429": RateLimitedError,
97
+ "500": InternalServerError,
94
98
  },
95
99
  idempotent: true,
96
100
  schemaKey: "projects.retrieve",
@@ -99,18 +103,31 @@ export class ProjectsResource {
99
103
  }
100
104
  /**
101
105
  * Delete a project
106
+ *
107
+ * A `502` response means the Project was not deleted because its release pull requests could not
108
+ * be retired. Retry deletion to finish retiring the remaining reviews. Repeating a completed
109
+ * deletion returns `404`.
110
+ * See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
111
+ * and If-Match.
102
112
  * `DELETE /projects/{project_id}`
103
113
  */
104
- async delete(projectId, options) {
114
+ async delete(projectId, params, options) {
105
115
  return this._core.request({
106
116
  method: "DELETE",
107
117
  path: `/projects/${encodeURIComponent(String(projectId))}`,
108
118
  security: [{ "apiKey": [] }],
119
+ headers: {
120
+ "If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
121
+ },
109
122
  errors: {
123
+ "400": BadRequestError,
110
124
  "401": UnauthorizedError,
111
125
  "403": ForbiddenError,
112
126
  "404": NotFoundError,
127
+ "412": PreconditionFailedError,
113
128
  "429": RateLimitedError,
129
+ "500": InternalServerError,
130
+ "502": BadGatewayError,
114
131
  },
115
132
  idempotent: true,
116
133
  schemaKey: "projects.delete",
@@ -119,13 +136,29 @@ export class ProjectsResource {
119
136
  }
120
137
  /**
121
138
  * Update a project
139
+ *
140
+ * Omitted fields keep their current values. A supplied config replaces the entire stored object;
141
+ * null or an empty object clears it.
142
+ * Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag
143
+ * returns 412 precondition_failed without saving.
144
+ *
145
+ * A `409 target_busy` means a Target is publishing. Retrieve the Project, wait for publication to
146
+ * finish, reconcile your update, and retry.
147
+ * A `502` response means the Project was saved, but an obsolete release pull request could not be
148
+ * retired. Retrieve the Project and retry the same update to finish retiring reviews if that
149
+ * update is still desired.
150
+ * See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
151
+ * and If-Match.
122
152
  * `PATCH /projects/{project_id}`
123
153
  */
124
- async update(projectId, body, options) {
154
+ async update(projectId, body, params, options) {
125
155
  return this._core.request({
126
156
  method: "PATCH",
127
157
  path: `/projects/${encodeURIComponent(String(projectId))}`,
128
158
  security: [{ "apiKey": [] }],
159
+ headers: {
160
+ "If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
161
+ },
129
162
  body,
130
163
  errors: {
131
164
  "400": BadRequestError,
@@ -134,8 +167,10 @@ export class ProjectsResource {
134
167
  "403": ForbiddenError,
135
168
  "404": NotFoundError,
136
169
  "409": ConflictError,
170
+ "412": PreconditionFailedError,
137
171
  "422": UnprocessableEntityError,
138
172
  "429": RateLimitedError,
173
+ "500": InternalServerError,
139
174
  "502": BadGatewayError,
140
175
  },
141
176
  schemaKey: "projects.update",
@@ -145,10 +180,9 @@ export class ProjectsResource {
145
180
  /**
146
181
  * Analyze a project's latest Definition Revision
147
182
  *
148
- * Runs deterministic OpenAPI or GraphQL authorship checks against the latest observed immutable
149
- * Definition Revision after applying the Definition's existing patches. Diagnostics group every
150
- * affected location under a stable rule. Exact patches are included only when Typeship can derive
151
- * the change without inventing API behavior.
183
+ * Checks the latest Definition Revision after applying its saved patches. Each finding groups
184
+ * affected locations under a stable rule ID. A suggested patch is included only when the
185
+ * Definition provides enough information to determine the correction.
152
186
  * `GET /projects/{project_id}/diagnostics`
153
187
  */
154
188
  async retrieveDiagnostics(projectId, options) {
@@ -161,6 +195,7 @@ export class ProjectsResource {
161
195
  "403": ForbiddenError,
162
196
  "404": NotFoundError,
163
197
  "429": RateLimitedError,
198
+ "500": InternalServerError,
164
199
  },
165
200
  idempotent: true,
166
201
  schemaKey: "projects.retrieveDiagnostics",
@@ -170,9 +205,8 @@ export class ProjectsResource {
170
205
  /**
171
206
  * Refresh a project's Diagnostics from its configured source
172
207
  *
173
- * Fetches the complete configured source, records a new immutable revision only when content
174
- * changed, and returns its Diagnostics. This does not generate targets or consume a metered
175
- * generation.
208
+ * Fetches the configured source and returns updated Diagnostics. Creates a Definition Revision
209
+ * only when the content changes. Does not generate Targets or use a metered generation.
176
210
  *
177
211
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
178
212
  * `POST /projects/{project_id}/diagnostics`
@@ -186,12 +220,14 @@ export class ProjectsResource {
186
220
  "Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
187
221
  },
188
222
  errors: {
223
+ "400": BadRequestError,
189
224
  "401": UnauthorizedError,
190
225
  "403": ForbiddenError,
191
226
  "404": NotFoundError,
192
227
  "409": ConflictError,
193
228
  "422": UnprocessableEntityError,
194
229
  "429": RateLimitedError,
230
+ "500": InternalServerError,
195
231
  },
196
232
  idempotencyKey: "Idempotency-Key",
197
233
  schemaKey: "projects.refreshDiagnostics",
@@ -201,9 +237,11 @@ export class ProjectsResource {
201
237
  /**
202
238
  * Apply exact, reviewed diagnostic remediations
203
239
  *
204
- * Applies only deterministic patches. Repository sources receive an updateable source pull
205
- * request; URL sources receive project overlays. Diagnostics that require API-owner intent return
206
- * 422 and include an authoring_brief in the Diagnostic instead.
240
+ * Applies reviewed patches from Diagnostics. For a repository source, opens or updates a source
241
+ * pull request. For a URL source, saves Definition patches.
242
+ *
243
+ * Findings that need an API-owner decision return `422`. Read the finding's `authoring_brief` and
244
+ * update the source instead.
207
245
  *
208
246
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
209
247
  * `POST /projects/{project_id}/diagnostics/remediations`
@@ -225,6 +263,7 @@ export class ProjectsResource {
225
263
  "409": ConflictError,
226
264
  "422": UnprocessableEntityError,
227
265
  "429": RateLimitedError,
266
+ "500": InternalServerError,
228
267
  },
229
268
  idempotencyKey: "Idempotency-Key",
230
269
  schemaKey: "projects.remediateDiagnostics",
@@ -234,9 +273,8 @@ export class ProjectsResource {
234
273
  /**
235
274
  * Diagnose a project's repository integrations
236
275
  *
237
- * Returns provider-neutral, machine-actionable source and destination access, Definition
238
- * readability, source-approval label setup, required status names, and the latest durable webhook
239
- * delivery. The Console renders this same result.
276
+ * Checks repository access, Definition readability, source-approval labels, and required checks.
277
+ * Includes the latest webhook delivery so you can investigate missing updates.
240
278
  * `GET /projects/{project_id}/integration-health`
241
279
  */
242
280
  async retrieveIntegrationHealth(projectId, options) {
@@ -249,6 +287,7 @@ export class ProjectsResource {
249
287
  "403": ForbiddenError,
250
288
  "404": NotFoundError,
251
289
  "429": RateLimitedError,
290
+ "500": InternalServerError,
252
291
  },
253
292
  idempotent: true,
254
293
  schemaKey: "projects.retrieveIntegrationHealth",
@@ -277,6 +316,7 @@ export class ProjectsResource {
277
316
  "403": ForbiddenError,
278
317
  "404": NotFoundError,
279
318
  "429": RateLimitedError,
319
+ "500": InternalServerError,
280
320
  },
281
321
  idempotent: true,
282
322
  schemaKey: "projects.listGenerations",
@@ -291,20 +331,23 @@ export class ProjectsResource {
291
331
  });
292
332
  }
293
333
  /**
294
- * Generate targets and open pull requests
334
+ * Start generation for active Targets
335
+ *
336
+ * Queues one Generation per active Target and returns their IDs. Retrieve each Generation until
337
+ * its status moves from `queued` to `running` and then `succeeded` or `failed`. `succeeded` means
338
+ * generated files are saved; check Delivery and Draft status separately for repository delivery
339
+ * and pull requests. A Target already queued or running is returned without starting another
340
+ * Generation. A matching Idempotency-Key replay returns the same Generations with their current
341
+ * statuses.
295
342
  *
296
- * Resolves the project's URL or GitHub source, generates every
297
- * configured delivery package, stores each result in the project's history,
298
- * and attempts to open a pull request in every configured destination.
299
- * When the complete generated tree already matches a destination, no
300
- * commit, branch, or pull request is created and that generation reports
301
- * `pr_status: no_changes`. This is the same pipeline automatic
302
- * regeneration runs after a source change.
343
+ * If the package already matches a destination and no Draft is open, delivery reports `pr_status:
344
+ * no_changes` without creating a commit, branch, or pull request. An existing Draft stays open.
345
+ * Automatic generation uses the same workflow.
303
346
  *
304
347
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
305
348
  * `POST /projects/{project_id}/generations`
306
349
  */
307
- async generate(projectId, params, options) {
350
+ async generate(projectId, body, params, options) {
308
351
  return this._core.request({
309
352
  method: "POST",
310
353
  path: `/projects/${encodeURIComponent(String(projectId))}/generations`,
@@ -312,15 +355,19 @@ export class ProjectsResource {
312
355
  headers: {
313
356
  "Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
314
357
  },
358
+ body,
315
359
  errors: {
360
+ "400": BadRequestError,
316
361
  "401": UnauthorizedError,
317
362
  "402": PaymentRequiredError,
318
363
  "403": ForbiddenError,
319
364
  "404": NotFoundError,
320
365
  "409": ConflictError,
366
+ "413": PayloadTooLargeError,
321
367
  "422": UnprocessableEntityError,
322
368
  "429": RateLimitedError,
323
369
  "500": InternalServerError,
370
+ "502": BadGatewayError,
324
371
  },
325
372
  idempotencyKey: "Idempotency-Key",
326
373
  schemaKey: "projects.generate",