@thinkai/tai-api-contract 2.93.0 → 2.95.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.
@@ -605,6 +605,44 @@ export interface paths {
605
605
  patch?: never;
606
606
  trace?: never;
607
607
  };
608
+ "/workspaces/{workspaceId}/integrations/sonarqube/repo-mappings": {
609
+ parameters: {
610
+ query?: never;
611
+ header?: never;
612
+ path?: never;
613
+ cookie?: never;
614
+ };
615
+ /** List SonarQube repo to project key mappings */
616
+ get: operations["listSonarQubeRepoMappings"];
617
+ /**
618
+ * Replace SonarQube repo mappings (full list)
619
+ * @description Replaces all SonarQube repo→projectKey rows for the workspace. Validate rows in the UI before save; optional `POST .../validate` probes keys with the workspace token.
620
+ */
621
+ put: operations["putSonarQubeRepoMappings"];
622
+ post?: never;
623
+ delete?: never;
624
+ options?: never;
625
+ head?: never;
626
+ patch?: never;
627
+ trace?: never;
628
+ };
629
+ "/workspaces/{workspaceId}/integrations/sonarqube/repo-mappings/validate": {
630
+ parameters: {
631
+ query?: never;
632
+ header?: never;
633
+ path?: never;
634
+ cookie?: never;
635
+ };
636
+ get?: never;
637
+ put?: never;
638
+ /** Validate SonarQube mapping rows against the workspace token */
639
+ post: operations["validateSonarQubeRepoMappings"];
640
+ delete?: never;
641
+ options?: never;
642
+ head?: never;
643
+ patch?: never;
644
+ trace?: never;
645
+ };
608
646
  "/workspaces/{workspaceId}/sources/{type}": {
609
647
  parameters: {
610
648
  query?: never;
@@ -2132,8 +2170,8 @@ export interface paths {
2132
2170
  /**
2133
2171
  * Export repository readiness issues as Markdown
2134
2172
  * @description Download outstanding readiness issues for one repository as a Markdown (`.md`) attachment for local IDE workflows. Reuses the same scorecard as `GET .../readiness/repos/{repoId}` (issues plus optional remediation from `criteriaDetails`).
2135
- * The Markdown is grouped **by readiness dimension** (catalog order). Each dimension section lists matching issues sorted by severity. Issue sections include severity in the heading and do not emit per-issue `Fix status` / `Fix tier` lines. Default filter is outstanding issues (`open` + `pr-pending`). Optional query params narrow the set. When `includeCriteria` is true (default), each issue includes a Remediation section from the matching criterion when available. Timestamps use the optional `timeZone` query (IANA; default `UTC`).
2136
- * The response sets `Content-Disposition: attachment` with filename `readiness-issues-{providerSlug}-{date}.md`.
2173
+ * The Markdown is grouped **by readiness dimension** (catalog order). Each dimension section lists matching issues sorted by severity. Issue sections include severity in the heading, export format version, issue/rubric metadata, agent workflow, and agent instructions from the rubric when available. Default filter is outstanding issues (`open` + `pr-pending`). Optional query params narrow the set. When `includeCriteria` is true (default), each issue also includes criterion summary/status in metadata and remediation from `criteriaDetails` when it differs from agent instructions. Agent workflow and rubric agent instructions are emitted regardless of `includeCriteria`. Timestamps use the optional `timeZone` query (IANA; default `UTC`).
2174
+ * The response sets `Content-Disposition: attachment` with filename `readiness-remediations-{providerSlug}-{date}.md`.
2137
2175
  */
2138
2176
  get: operations["exportReadinessRepoIssuesMarkdown"];
2139
2177
  put?: never;
@@ -3990,17 +4028,17 @@ export interface components {
3990
4028
  orgId?: string;
3991
4029
  orgName?: string;
3992
4030
  };
3993
- /** @description SonarQube source for workspace sources PUT and connection test. Every field is re-submitted on each save; `token` is never round-tripped from `GET` workspace config. */
4031
+ /** @description SonarQube source for workspace sources PUT and connection test. Credentials only — per-repository Sonar project keys are configured via repo mappings. Every field is re-submitted on each save; `token` is never round-tripped from `GET` workspace config. */
3994
4032
  SonarQubeSourceDto: {
3995
4033
  /** @enum {string} */
3996
4034
  type: "sonarqube";
3997
- /** @description SonarQube server URL, e.g. https://sonarqube.example.com. */
4035
+ /** @description SonarQube server URL, e.g. https://sonarcloud.io or https://sonarqube.example.com. */
3998
4036
  baseUrl: string;
3999
- /** @description User or project analysis token (write-only on PUT). Literal tokens are encrypted at rest. Operator-managed secrets may use an `env:VAR` reference (resolved at runtime / batch poll), matching other non-AI-tool sources. */
4037
+ /** @description User or project analysis token (write-only on PUT). Literal tokens are encrypted at rest. Operator-managed secrets may use an `env:VAR` reference (resolved at runtime), matching other non-AI-tool sources. */
4000
4038
  token: string;
4001
- /** @description SonarQube project key (component key). */
4002
- projectKey: string;
4003
- /** @description Optional branch name for branch-scoped measures. */
4039
+ /** @description SonarCloud organization key (required for project search on SonarCloud). */
4040
+ organization?: string;
4041
+ /** @description Optional workspace default branch fallback for per-repo Sonar probes. */
4004
4042
  branch?: string;
4005
4043
  };
4006
4044
  /** @description Redacted SonarQube source returned by GET workspace config. */
@@ -4009,9 +4047,38 @@ export interface components {
4009
4047
  type: "sonarqube";
4010
4048
  hasToken: boolean;
4011
4049
  baseUrl: string;
4050
+ organization?: string;
4051
+ branch?: string;
4052
+ };
4053
+ SonarQubeRepoMappingDto: {
4054
+ /** @description Repository slug (`owner/repo`) in the workspace catalog. */
4055
+ providerSlug: string;
4012
4056
  projectKey: string;
4057
+ /** @description Optional branch override for Sonar API calls for this repo. */
4013
4058
  branch?: string;
4014
4059
  };
4060
+ SonarQubeRepoMappingRowDto: components["schemas"]["SonarQubeRepoMappingDto"] & {
4061
+ /** Format: uuid */
4062
+ repoId: string;
4063
+ /** Format: date-time */
4064
+ updatedAt: string;
4065
+ };
4066
+ SonarQubeRepoMappingsPutDto: {
4067
+ mappings: components["schemas"]["SonarQubeRepoMappingDto"][];
4068
+ };
4069
+ SonarQubeRepoMappingsListDto: {
4070
+ mappings: components["schemas"]["SonarQubeRepoMappingRowDto"][];
4071
+ };
4072
+ SonarQubeRepoMappingValidateRowDto: {
4073
+ providerSlug: string;
4074
+ projectKey: string;
4075
+ branch?: string;
4076
+ ok: boolean;
4077
+ error?: string;
4078
+ };
4079
+ SonarQubeRepoMappingsValidateResponseDto: {
4080
+ results: components["schemas"]["SonarQubeRepoMappingValidateRowDto"][];
4081
+ };
4015
4082
  /** @description PagerDuty incident monitoring source for `PUT /workspaces/{workspaceId}/sources` and `POST /workspaces/{workspaceId}/sources/test`. Requires a REST API v2 token (an "API Access Key" from PagerDuty → **Integrations → API Access Keys**). */
4016
4083
  PagerDutySourceDto: {
4017
4084
  /** @enum {string} */
@@ -4177,6 +4244,16 @@ export interface components {
4177
4244
  };
4178
4245
  /** @description Nested metric groups; see TypeScript `DashboardProductivityMetricsDto` in @thinkai/tai-api-contract. */
4179
4246
  DashboardProductivityMetricsDto: {
4247
+ velocity?: {
4248
+ mergedPrCount?: number;
4249
+ shipWeightSum?: number;
4250
+ totalShipWeight?: number;
4251
+ /** @description GitHub merged PR ledger rows in the metrics window still awaiting ship-weight scoring (omit when zero). */
4252
+ shipWeightPendingCount?: number;
4253
+ } & {
4254
+ [key: string]: unknown;
4255
+ };
4256
+ } & {
4180
4257
  [key: string]: unknown;
4181
4258
  };
4182
4259
  DashboardProductivityDto: {
@@ -8168,6 +8245,12 @@ export type GrafanaSourceDto = components['schemas']['GrafanaSourceDto'];
8168
8245
  export type GrafanaSourceConfigDto = components['schemas']['GrafanaSourceConfigDto'];
8169
8246
  export type SonarQubeSourceDto = components['schemas']['SonarQubeSourceDto'];
8170
8247
  export type SonarQubeSourceConfigDto = components['schemas']['SonarQubeSourceConfigDto'];
8248
+ export type SonarQubeRepoMappingDto = components['schemas']['SonarQubeRepoMappingDto'];
8249
+ export type SonarQubeRepoMappingRowDto = components['schemas']['SonarQubeRepoMappingRowDto'];
8250
+ export type SonarQubeRepoMappingsPutDto = components['schemas']['SonarQubeRepoMappingsPutDto'];
8251
+ export type SonarQubeRepoMappingsListDto = components['schemas']['SonarQubeRepoMappingsListDto'];
8252
+ export type SonarQubeRepoMappingValidateRowDto = components['schemas']['SonarQubeRepoMappingValidateRowDto'];
8253
+ export type SonarQubeRepoMappingsValidateResponseDto = components['schemas']['SonarQubeRepoMappingsValidateResponseDto'];
8171
8254
  export type PagerDutySourceDto = components['schemas']['PagerDutySourceDto'];
8172
8255
  export type PagerDutySourceConfigDto = components['schemas']['PagerDutySourceConfigDto'];
8173
8256
  export type AgentExecutionProviderDto = components['schemas']['AgentExecutionProviderDto'];
@@ -10228,6 +10311,100 @@ export interface operations {
10228
10311
  };
10229
10312
  };
10230
10313
  };
10314
+ listSonarQubeRepoMappings: {
10315
+ parameters: {
10316
+ query?: never;
10317
+ header?: never;
10318
+ path: {
10319
+ workspaceId: components["parameters"]["WorkspaceId"];
10320
+ };
10321
+ cookie?: never;
10322
+ };
10323
+ requestBody?: never;
10324
+ responses: {
10325
+ /** @description Mappings for repos in this workspace */
10326
+ 200: {
10327
+ headers: {
10328
+ [name: string]: unknown;
10329
+ };
10330
+ content: {
10331
+ "application/json": components["schemas"]["SonarQubeRepoMappingsListDto"];
10332
+ };
10333
+ };
10334
+ 401: components["responses"]["Unauthorized"];
10335
+ 403: components["responses"]["Forbidden"];
10336
+ };
10337
+ };
10338
+ putSonarQubeRepoMappings: {
10339
+ parameters: {
10340
+ query?: never;
10341
+ header?: never;
10342
+ path: {
10343
+ workspaceId: components["parameters"]["WorkspaceId"];
10344
+ };
10345
+ cookie?: never;
10346
+ };
10347
+ requestBody: {
10348
+ content: {
10349
+ "application/json": components["schemas"]["SonarQubeRepoMappingsPutDto"];
10350
+ };
10351
+ };
10352
+ responses: {
10353
+ /** @description Mappings saved */
10354
+ 200: {
10355
+ headers: {
10356
+ [name: string]: unknown;
10357
+ };
10358
+ content: {
10359
+ "application/json": components["schemas"]["SonarQubeRepoMappingsListDto"];
10360
+ };
10361
+ };
10362
+ /** @description Unknown repo slug or invalid body */
10363
+ 400: {
10364
+ headers: {
10365
+ [name: string]: unknown;
10366
+ };
10367
+ content?: never;
10368
+ };
10369
+ 401: components["responses"]["Unauthorized"];
10370
+ 403: components["responses"]["Forbidden"];
10371
+ };
10372
+ };
10373
+ validateSonarQubeRepoMappings: {
10374
+ parameters: {
10375
+ query?: never;
10376
+ header?: never;
10377
+ path: {
10378
+ workspaceId: components["parameters"]["WorkspaceId"];
10379
+ };
10380
+ cookie?: never;
10381
+ };
10382
+ requestBody: {
10383
+ content: {
10384
+ "application/json": components["schemas"]["SonarQubeRepoMappingsPutDto"];
10385
+ };
10386
+ };
10387
+ responses: {
10388
+ /** @description Per-row probe results */
10389
+ 200: {
10390
+ headers: {
10391
+ [name: string]: unknown;
10392
+ };
10393
+ content: {
10394
+ "application/json": components["schemas"]["SonarQubeRepoMappingsValidateResponseDto"];
10395
+ };
10396
+ };
10397
+ 401: components["responses"]["Unauthorized"];
10398
+ 403: components["responses"]["Forbidden"];
10399
+ /** @description SonarQube source not configured */
10400
+ 503: {
10401
+ headers: {
10402
+ [name: string]: unknown;
10403
+ };
10404
+ content?: never;
10405
+ };
10406
+ };
10407
+ };
10231
10408
  deleteSourceByType: {
10232
10409
  parameters: {
10233
10410
  query?: never;
@@ -14115,7 +14292,7 @@ export interface operations {
14115
14292
  fixStatus?: "open" | "pr-pending" | "fixed";
14116
14293
  dimensionId?: components["schemas"]["ReadinessDimensionId"];
14117
14294
  severity?: "critical" | "high" | "medium" | "low";
14118
- /** @description Include remediation from criteriaDetails (default true). */
14295
+ /** @description When true (default), include criterion summary/status in issue metadata and remediation from `criteriaDetails` (plus inline scan remediation paragraphs). Agent workflow and rubric agent instructions are always included. When false, omit criterion-derived metadata and criterion remediation only. */
14119
14296
  includeCriteria?: boolean;
14120
14297
  /** @description IANA time zone for human-readable `Last analyzed` / `Exported` timestamps and the calendar date in the attachment filename (e.g. `Europe/Berlin`). Defaults to `UTC`. */
14121
14298
  timeZone?: string;