@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.
@@ -595,7 +595,7 @@ export interface paths {
595
595
  /**
596
596
  * Test one source connection (does not persist)
597
597
  * @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.
598
- * 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`.
598
+ * 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.
599
599
  * **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: "..." }`.
600
600
  */
601
601
  post: operations["postTenantSourceTest"];
@@ -4105,6 +4105,38 @@ export interface components {
4105
4105
  /** @description PagerDuty user email when known from the last successful verify. */
4106
4106
  userEmail?: string;
4107
4107
  };
4108
+ /** @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. */
4109
+ JiraSourceDto: {
4110
+ /** @enum {string} */
4111
+ type: "jira";
4112
+ /** @description Jira Cloud site URL (e.g. `https://your-domain.atlassian.net`). */
4113
+ baseUrl: string;
4114
+ /** @description Atlassian account email used with the API token. */
4115
+ email: string;
4116
+ /** @description Atlassian API token (write-only on PUT; preferred). */
4117
+ apiToken?: string;
4118
+ /** @description Deprecated write-only alias for `apiToken`. Accepted for backward compatibility; normalized to `apiToken` and never returned on GET `/config`. */
4119
+ api_key?: string;
4120
+ /** @description Optional display name from a successful connection test (echo-after-test). */
4121
+ userName?: string;
4122
+ /** @description Optional Atlassian account id from a successful connection test. */
4123
+ accountId?: string;
4124
+ };
4125
+ /** @description Redacted Jira source returned by `GET /workspaces/{workspaceId}/config`. Raw API token is never returned. */
4126
+ JiraSourceConfigDto: {
4127
+ /** @enum {string} */
4128
+ type: "jira";
4129
+ /** @description Whether an API token is stored for this workspace. */
4130
+ hasToken: boolean;
4131
+ /** @description Configured Jira Cloud site URL. */
4132
+ baseUrl: string;
4133
+ /** @description Atlassian account email associated with the stored token. */
4134
+ email: string;
4135
+ /** @description Display name when known from the last successful verify. */
4136
+ userName?: string;
4137
+ /** @description Atlassian account id when known from the last successful verify. */
4138
+ accountId?: string;
4139
+ };
4108
4140
  /**
4109
4141
  * @description The agent execution account used for Agentic Foundation runs (readiness scanner + fix queue). Exactly one is active per workspace.
4110
4142
  * - `thinkai_platform_cursor`: ThinkAI platform Cursor key (Cursor Agent CLI) — opt-in, never default.
@@ -4123,7 +4155,7 @@ export interface components {
4123
4155
  claudeModel?: string | null;
4124
4156
  };
4125
4157
  WorkspaceConfigDto: {
4126
- 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"])[];
4158
+ 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"])[];
4127
4159
  orgChart?: components["schemas"]["ScoringOrgChartDto"] | null;
4128
4160
  /** @enum {string|null} */
4129
4161
  region?: "us" | "eu" | "me" | null;
@@ -4158,11 +4190,11 @@ export interface components {
4158
4190
  executionKeyValid?: boolean | null;
4159
4191
  /** @description Error detail when `executionKeyValid` is false. */
4160
4192
  executionKeyError?: string | null;
4161
- /** @description Present for New Relic or Grafana verify success — authenticated user name. */
4193
+ /** @description Present for New Relic, Grafana, PagerDuty, or Jira verify success — authenticated user name. */
4162
4194
  userName?: string;
4163
4195
  /** @description Present for New Relic verify success — resolved account display name. */
4164
4196
  accountName?: string;
4165
- /** @description Present for New Relic verify success — resolved account ID. */
4197
+ /** @description Present for New Relic or Jira verify success — resolved account ID. */
4166
4198
  accountId?: string;
4167
4199
  /** @description Present for Grafana verify success — resolved organization name. */
4168
4200
  orgName?: string;
@@ -8253,6 +8285,8 @@ export type SonarQubeRepoMappingValidateRowDto = components['schemas']['SonarQub
8253
8285
  export type SonarQubeRepoMappingsValidateResponseDto = components['schemas']['SonarQubeRepoMappingsValidateResponseDto'];
8254
8286
  export type PagerDutySourceDto = components['schemas']['PagerDutySourceDto'];
8255
8287
  export type PagerDutySourceConfigDto = components['schemas']['PagerDutySourceConfigDto'];
8288
+ export type JiraSourceDto = components['schemas']['JiraSourceDto'];
8289
+ export type JiraSourceConfigDto = components['schemas']['JiraSourceConfigDto'];
8256
8290
  export type AgentExecutionProviderDto = components['schemas']['AgentExecutionProviderDto'];
8257
8291
  export type PutCodeIntelligenceSettingsDto = components['schemas']['PutCodeIntelligenceSettingsDto'];
8258
8292
  export type WorkspaceConfigDto = components['schemas']['WorkspaceConfigDto'];
@@ -10219,7 +10253,7 @@ export interface operations {
10219
10253
  requestBody: {
10220
10254
  content: {
10221
10255
  "application/json": {
10222
- 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"])[];
10256
+ 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"])[];
10223
10257
  };
10224
10258
  };
10225
10259
  };
@@ -10273,7 +10307,7 @@ export interface operations {
10273
10307
  };
10274
10308
  requestBody: {
10275
10309
  content: {
10276
- "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"];
10310
+ "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"];
10277
10311
  };
10278
10312
  };
10279
10313
  responses: {