@thinkai/tai-api-contract 2.95.0 → 2.96.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.
@@ -1,7 +1,7 @@
1
1
  openapi: 3.0.3
2
2
  info:
3
3
  title: ThinkAI API
4
- version: 2.95.0
4
+ version: 2.96.0
5
5
  description: >
6
6
  Contract surface for the AI Driven SDLC backend used by ThinkAI.
7
7
  Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
@@ -1550,6 +1550,7 @@ paths:
1550
1550
  - $ref: "#/components/schemas/GrafanaSourceDto"
1551
1551
  - $ref: "#/components/schemas/SonarQubeSourceDto"
1552
1552
  - $ref: "#/components/schemas/PagerDutySourceDto"
1553
+ - $ref: "#/components/schemas/JiraSourceDto"
1553
1554
  - $ref: "#/components/schemas/TenantSourceEntryDto"
1554
1555
  examples:
1555
1556
  cursorAndJira:
@@ -1645,6 +1646,8 @@ paths:
1645
1646
  required; optional `branch`) calls `GET {baseUrl}/api/measures/component` with a Bearer
1646
1647
  token. Other types report `{ success: false, error: "unsupported_type" }`. Documented
1647
1648
  `error` codes for AI tool verifiers: `invalid_token`, `rate_limited`, `network_error`.
1649
+ `jira` (`baseUrl`, `email`, `apiToken` or legacy `api_key`) calls
1650
+ `GET {baseUrl}/rest/api/3/myself` with Basic auth.
1648
1651
 
1649
1652
  **Typical outcomes:** Malformed body, missing `type`, invalid `type`, or missing required fields for the
1650
1653
  declared type → `400` with `{ error: "..." }`. Well-formed body with bad credentials or unreachable
@@ -1668,6 +1671,7 @@ paths:
1668
1671
  - $ref: "#/components/schemas/GrafanaSourceDto"
1669
1672
  - $ref: "#/components/schemas/SonarQubeSourceDto"
1670
1673
  - $ref: "#/components/schemas/PagerDutySourceDto"
1674
+ - $ref: "#/components/schemas/JiraSourceDto"
1671
1675
  - $ref: "#/components/schemas/TenantSourceEntryDto"
1672
1676
  examples:
1673
1677
  cursorValid:
@@ -10201,6 +10205,73 @@ components:
10201
10205
  type: string
10202
10206
  description: PagerDuty user email when known from the last successful verify.
10203
10207
 
10208
+ JiraSourceDto:
10209
+ type: object
10210
+ description: >
10211
+ Jira Cloud source for `PUT /workspaces/{workspaceId}/sources` and
10212
+ `POST /workspaces/{workspaceId}/sources/test`. Uses Atlassian Cloud email + API token
10213
+ (Basic auth). Provide `apiToken` (preferred) or legacy write-only `api_key`; the server
10214
+ normalizes `api_key` to `apiToken` on write.
10215
+ required: [type, baseUrl, email]
10216
+ additionalProperties: false
10217
+ properties:
10218
+ type:
10219
+ type: string
10220
+ enum: [jira]
10221
+ baseUrl:
10222
+ type: string
10223
+ minLength: 1
10224
+ description: Jira Cloud site URL (e.g. `https://your-domain.atlassian.net`).
10225
+ email:
10226
+ type: string
10227
+ minLength: 1
10228
+ description: Atlassian account email used with the API token.
10229
+ apiToken:
10230
+ type: string
10231
+ minLength: 1
10232
+ maxLength: 512
10233
+ description: Atlassian API token (write-only on PUT; preferred).
10234
+ api_key:
10235
+ type: string
10236
+ minLength: 1
10237
+ maxLength: 512
10238
+ description: >
10239
+ Deprecated write-only alias for `apiToken`. Accepted for backward compatibility;
10240
+ normalized to `apiToken` and never returned on GET `/config`.
10241
+ userName:
10242
+ type: string
10243
+ description: Optional display name from a successful connection test (echo-after-test).
10244
+ accountId:
10245
+ type: string
10246
+ description: Optional Atlassian account id from a successful connection test.
10247
+
10248
+ JiraSourceConfigDto:
10249
+ type: object
10250
+ description: >
10251
+ Redacted Jira source returned by `GET /workspaces/{workspaceId}/config`.
10252
+ Raw API token is never returned.
10253
+ required: [type, hasToken, baseUrl, email]
10254
+ additionalProperties: false
10255
+ properties:
10256
+ type:
10257
+ type: string
10258
+ enum: [jira]
10259
+ hasToken:
10260
+ type: boolean
10261
+ description: Whether an API token is stored for this workspace.
10262
+ baseUrl:
10263
+ type: string
10264
+ description: Configured Jira Cloud site URL.
10265
+ email:
10266
+ type: string
10267
+ description: Atlassian account email associated with the stored token.
10268
+ userName:
10269
+ type: string
10270
+ description: Display name when known from the last successful verify.
10271
+ accountId:
10272
+ type: string
10273
+ description: Atlassian account id when known from the last successful verify.
10274
+
10204
10275
  AgentExecutionProviderDto:
10205
10276
  type: string
10206
10277
  description: >
@@ -10252,6 +10323,7 @@ components:
10252
10323
  - $ref: "#/components/schemas/GrafanaSourceConfigDto"
10253
10324
  - $ref: "#/components/schemas/SonarQubeSourceConfigDto"
10254
10325
  - $ref: "#/components/schemas/PagerDutySourceConfigDto"
10326
+ - $ref: "#/components/schemas/JiraSourceConfigDto"
10255
10327
  - $ref: "#/components/schemas/TenantSourceEntryDto"
10256
10328
  orgChart:
10257
10329
  nullable: true
@@ -10329,13 +10401,13 @@ components:
10329
10401
  description: Error detail when `executionKeyValid` is false.
10330
10402
  userName:
10331
10403
  type: string
10332
- description: Present for New Relic or Grafana verify success — authenticated user name.
10404
+ description: Present for New Relic, Grafana, PagerDuty, or Jira verify success — authenticated user name.
10333
10405
  accountName:
10334
10406
  type: string
10335
10407
  description: Present for New Relic verify success — resolved account display name.
10336
10408
  accountId:
10337
10409
  type: string
10338
- description: Present for New Relic verify success — resolved account ID.
10410
+ description: Present for New Relic or Jira verify success — resolved account ID.
10339
10411
  orgName:
10340
10412
  type: string
10341
10413
  description: Present for Grafana verify success — resolved organization name.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.95.0",
3
+ "version": "2.96.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -596,7 +596,7 @@ export interface paths {
596
596
  /**
597
597
  * Test one source connection (does not persist)
598
598
  * @description Verify a source's credentials without persisting them. Always returns 200 — upstream auth, rate-limit, and network failures surface as `{ success: false, error }` so the SPA can render an inline error.
599
- * Registered AI tools are verified end-to-end: `cursor` (Admin API key in `token` and/or execution key in `executionToken`; at least one must be present). Execution-only tests validate the key against the Cloud Agents API (`GET /v1/me`, with `GET /v1/models` fallback for service accounts) and return `executionKeyValid` / `executionKeyError` without calling the Admin API on `token`. Malformed cursor entries return `400` with `code: invalid_source_entry`. `claude` (Anthropic Admin API at `https://api.anthropic.com`, `X-Api-Key` with an organization Admin API key `sk-ant-admin...`). `sonarqube` (`baseUrl`, `token`, `projectKey` required; optional `branch`) calls `GET {baseUrl}/api/measures/component` with a Bearer token. Other types report `{ success: false, error: "unsupported_type" }`. Documented `error` codes for AI tool verifiers: `invalid_token`, `rate_limited`, `network_error`.
599
+ * Registered AI tools are verified end-to-end: `cursor` (Admin API key in `token` and/or execution key in `executionToken`; at least one must be present). Execution-only tests validate the key against the Cloud Agents API (`GET /v1/me`, with `GET /v1/models` fallback for service accounts) and return `executionKeyValid` / `executionKeyError` without calling the Admin API on `token`. Malformed cursor entries return `400` with `code: invalid_source_entry`. `claude` (Anthropic Admin API at `https://api.anthropic.com`, `X-Api-Key` with an organization Admin API key `sk-ant-admin...`). `sonarqube` (`baseUrl`, `token`, `projectKey` required; optional `branch`) calls `GET {baseUrl}/api/measures/component` with a Bearer token. Other types report `{ success: false, error: "unsupported_type" }`. Documented `error` codes for AI tool verifiers: `invalid_token`, `rate_limited`, `network_error`. `jira` (`baseUrl`, `email`, `apiToken` or legacy `api_key`) calls `GET {baseUrl}/rest/api/3/myself` with Basic auth.
600
600
  * **Typical outcomes:** Malformed body, missing `type`, invalid `type`, or missing required fields for the declared type → `400` with `{ error: "..." }`. Well-formed body with bad credentials or unreachable service → `200` with `{ success: false, error: "..." }`.
601
601
  */
602
602
  post: operations["postTenantSourceTest"];
@@ -4106,6 +4106,38 @@ export interface components {
4106
4106
  /** @description PagerDuty user email when known from the last successful verify. */
4107
4107
  userEmail?: string;
4108
4108
  };
4109
+ /** @description Jira Cloud source for `PUT /workspaces/{workspaceId}/sources` and `POST /workspaces/{workspaceId}/sources/test`. Uses Atlassian Cloud email + API token (Basic auth). Provide `apiToken` (preferred) or legacy write-only `api_key`; the server normalizes `api_key` to `apiToken` on write. */
4110
+ JiraSourceDto: {
4111
+ /** @enum {string} */
4112
+ type: "jira";
4113
+ /** @description Jira Cloud site URL (e.g. `https://your-domain.atlassian.net`). */
4114
+ baseUrl: string;
4115
+ /** @description Atlassian account email used with the API token. */
4116
+ email: string;
4117
+ /** @description Atlassian API token (write-only on PUT; preferred). */
4118
+ apiToken?: string;
4119
+ /** @description Deprecated write-only alias for `apiToken`. Accepted for backward compatibility; normalized to `apiToken` and never returned on GET `/config`. */
4120
+ api_key?: string;
4121
+ /** @description Optional display name from a successful connection test (echo-after-test). */
4122
+ userName?: string;
4123
+ /** @description Optional Atlassian account id from a successful connection test. */
4124
+ accountId?: string;
4125
+ };
4126
+ /** @description Redacted Jira source returned by `GET /workspaces/{workspaceId}/config`. Raw API token is never returned. */
4127
+ JiraSourceConfigDto: {
4128
+ /** @enum {string} */
4129
+ type: "jira";
4130
+ /** @description Whether an API token is stored for this workspace. */
4131
+ hasToken: boolean;
4132
+ /** @description Configured Jira Cloud site URL. */
4133
+ baseUrl: string;
4134
+ /** @description Atlassian account email associated with the stored token. */
4135
+ email: string;
4136
+ /** @description Display name when known from the last successful verify. */
4137
+ userName?: string;
4138
+ /** @description Atlassian account id when known from the last successful verify. */
4139
+ accountId?: string;
4140
+ };
4109
4141
  /**
4110
4142
  * @description The agent execution account used for Agentic Foundation runs (readiness scanner + fix queue). Exactly one is active per workspace.
4111
4143
  * - `thinkai_platform_cursor`: ThinkAI platform Cursor key (Cursor Agent CLI) — opt-in, never default.
@@ -4124,7 +4156,7 @@ export interface components {
4124
4156
  claudeModel?: string | null;
4125
4157
  };
4126
4158
  WorkspaceConfigDto: {
4127
- sources: (components["schemas"]["CursorSourceConfigDto"] | components["schemas"]["ClaudeSourceConfigDto"] | components["schemas"]["CodeIntelligenceSourceConfigDto"] | components["schemas"]["NewRelicSourceConfigDto"] | components["schemas"]["PrometheusSourceConfigDto"] | components["schemas"]["GrafanaSourceConfigDto"] | components["schemas"]["SonarQubeSourceConfigDto"] | components["schemas"]["PagerDutySourceConfigDto"] | components["schemas"]["TenantSourceEntryDto"])[];
4159
+ sources: (components["schemas"]["CursorSourceConfigDto"] | components["schemas"]["ClaudeSourceConfigDto"] | components["schemas"]["CodeIntelligenceSourceConfigDto"] | components["schemas"]["NewRelicSourceConfigDto"] | components["schemas"]["PrometheusSourceConfigDto"] | components["schemas"]["GrafanaSourceConfigDto"] | components["schemas"]["SonarQubeSourceConfigDto"] | components["schemas"]["PagerDutySourceConfigDto"] | components["schemas"]["JiraSourceConfigDto"] | components["schemas"]["TenantSourceEntryDto"])[];
4128
4160
  orgChart?: components["schemas"]["ScoringOrgChartDto"] | null;
4129
4161
  /** @enum {string|null} */
4130
4162
  region?: "us" | "eu" | "me" | null;
@@ -4159,11 +4191,11 @@ export interface components {
4159
4191
  executionKeyValid?: boolean | null;
4160
4192
  /** @description Error detail when `executionKeyValid` is false. */
4161
4193
  executionKeyError?: string | null;
4162
- /** @description Present for New Relic or Grafana verify success — authenticated user name. */
4194
+ /** @description Present for New Relic, Grafana, PagerDuty, or Jira verify success — authenticated user name. */
4163
4195
  userName?: string;
4164
4196
  /** @description Present for New Relic verify success — resolved account display name. */
4165
4197
  accountName?: string;
4166
- /** @description Present for New Relic verify success — resolved account ID. */
4198
+ /** @description Present for New Relic or Jira verify success — resolved account ID. */
4167
4199
  accountId?: string;
4168
4200
  /** @description Present for Grafana verify success — resolved organization name. */
4169
4201
  orgName?: string;
@@ -8254,6 +8286,8 @@ export type SonarQubeRepoMappingValidateRowDto = components['schemas']['SonarQub
8254
8286
  export type SonarQubeRepoMappingsValidateResponseDto = components['schemas']['SonarQubeRepoMappingsValidateResponseDto'];
8255
8287
  export type PagerDutySourceDto = components['schemas']['PagerDutySourceDto'];
8256
8288
  export type PagerDutySourceConfigDto = components['schemas']['PagerDutySourceConfigDto'];
8289
+ export type JiraSourceDto = components['schemas']['JiraSourceDto'];
8290
+ export type JiraSourceConfigDto = components['schemas']['JiraSourceConfigDto'];
8257
8291
  export type AgentExecutionProviderDto = components['schemas']['AgentExecutionProviderDto'];
8258
8292
  export type PutCodeIntelligenceSettingsDto = components['schemas']['PutCodeIntelligenceSettingsDto'];
8259
8293
  export type WorkspaceConfigDto = components['schemas']['WorkspaceConfigDto'];
@@ -10220,7 +10254,7 @@ export interface operations {
10220
10254
  requestBody: {
10221
10255
  content: {
10222
10256
  "application/json": {
10223
- sources: (components["schemas"]["CursorSourcePatchDto"] | components["schemas"]["CursorSourceDto"] | components["schemas"]["ClaudeSourcePatchDto"] | components["schemas"]["ClaudeSourceDto"] | components["schemas"]["CodeIntelligenceSourcePatchDto"] | components["schemas"]["NewRelicSourceDto"] | components["schemas"]["PrometheusSourceDto"] | components["schemas"]["GrafanaSourceDto"] | components["schemas"]["SonarQubeSourceDto"] | components["schemas"]["PagerDutySourceDto"] | components["schemas"]["TenantSourceEntryDto"])[];
10257
+ sources: (components["schemas"]["CursorSourcePatchDto"] | components["schemas"]["CursorSourceDto"] | components["schemas"]["ClaudeSourcePatchDto"] | components["schemas"]["ClaudeSourceDto"] | components["schemas"]["CodeIntelligenceSourcePatchDto"] | components["schemas"]["NewRelicSourceDto"] | components["schemas"]["PrometheusSourceDto"] | components["schemas"]["GrafanaSourceDto"] | components["schemas"]["SonarQubeSourceDto"] | components["schemas"]["PagerDutySourceDto"] | components["schemas"]["JiraSourceDto"] | components["schemas"]["TenantSourceEntryDto"])[];
10224
10258
  };
10225
10259
  };
10226
10260
  };
@@ -10274,7 +10308,7 @@ export interface operations {
10274
10308
  };
10275
10309
  requestBody: {
10276
10310
  content: {
10277
- "application/json": components["schemas"]["CursorSourcePatchDto"] | components["schemas"]["CursorSourceDto"] | components["schemas"]["ClaudeSourcePatchDto"] | components["schemas"]["ClaudeSourceDto"] | components["schemas"]["CodeIntelligenceSourcePatchDto"] | components["schemas"]["NewRelicSourceDto"] | components["schemas"]["PrometheusSourceDto"] | components["schemas"]["GrafanaSourceDto"] | components["schemas"]["SonarQubeSourceDto"] | components["schemas"]["PagerDutySourceDto"] | components["schemas"]["TenantSourceEntryDto"];
10311
+ "application/json": components["schemas"]["CursorSourcePatchDto"] | components["schemas"]["CursorSourceDto"] | components["schemas"]["ClaudeSourcePatchDto"] | components["schemas"]["ClaudeSourceDto"] | components["schemas"]["CodeIntelligenceSourcePatchDto"] | components["schemas"]["NewRelicSourceDto"] | components["schemas"]["PrometheusSourceDto"] | components["schemas"]["GrafanaSourceDto"] | components["schemas"]["SonarQubeSourceDto"] | components["schemas"]["PagerDutySourceDto"] | components["schemas"]["JiraSourceDto"] | components["schemas"]["TenantSourceEntryDto"];
10278
10312
  };
10279
10313
  };
10280
10314
  responses: {