@thinkai/tai-api-contract 2.122.0 → 2.124.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.122.0
4
+ version: 2.124.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}/...`.
@@ -3127,9 +3127,11 @@ paths:
3127
3127
  summary: Rebuild SDLC DORA/CI daily rollups for a day range
3128
3128
  operationId: rebuildSdlcRollups
3129
3129
  description: >
3130
- Rebuilds DORA/CI daily rollups for this workspace from stored dashboard
3130
+ Queues a rebuild of DORA/CI daily rollups for this workspace from stored dashboard
3131
3131
  productivity history for the inclusive `from`/`to` UTC day range (max 90 days).
3132
- Does not re-pull GitHub. Returns 409 when another rebuild holds the advisory lock.
3132
+ Does not re-pull GitHub. Returns immediately with `{ ok: true }` while the rebuild
3133
+ runs under an advisory lock; ingest-coverage reports `sdlc_github` as `in_progress`
3134
+ until the lock is released. Returns 409 when another rebuild holds the advisory lock.
3133
3135
  parameters:
3134
3136
  - $ref: "#/components/parameters/WorkspaceId"
3135
3137
  - name: from
@@ -3148,12 +3150,12 @@ paths:
3148
3150
  format: date
3149
3151
  responses:
3150
3152
  "200":
3151
- description: Rebuild completed
3153
+ description: Rebuild accepted and running asynchronously
3152
3154
  content:
3153
3155
  application/json:
3154
3156
  schema:
3155
3157
  type: object
3156
- required: [ok, rollupRows]
3158
+ required: [ok]
3157
3159
  properties:
3158
3160
  ok:
3159
3161
  type: boolean
@@ -3161,9 +3163,11 @@ paths:
3161
3163
  rollupRows:
3162
3164
  type: integer
3163
3165
  minimum: 0
3166
+ description: >
3167
+ Optional. Omitted when the rebuild is queued asynchronously
3168
+ (current behavior).
3164
3169
  example:
3165
3170
  ok: true
3166
- rollupRows: 42
3167
3171
  "400":
3168
3172
  description: >
3169
3173
  Invalid range. Stable `error` codes: `invalid_day_range` (missing pair,
@@ -4543,8 +4547,11 @@ paths:
4543
4547
  summary: Refresh AI tool integration snapshots
4544
4548
  operationId: refreshWorkspaceAiTool
4545
4549
  description: >
4546
- Provider-agnostic refresh. Returns 409 when an advisory-lock refresh is already in progress.
4547
- On upstream auth/rate/network failures, returns `200` with `{ ok:false, error }` so the SPA can render inline error.
4550
+ Provider-agnostic refresh. Queues work for `ai-tool-refresher` and returns immediately
4551
+ with `{ ok: true }` when accepted. Progress is visible via ingest-coverage
4552
+ (`ai.refreshInProgress`) and the provider status endpoint while the on-demand flag
4553
+ (or advisory lock) is held. Returns 409 when an advisory-lock refresh is already in
4554
+ progress. Returns 404 when the provider source is missing.
4548
4555
  Pass `full=true` to force a full re-sync that re-pulls the full history instead of the
4549
4556
  incremental window, used to backfill historical months. Provider-specific behavior:
4550
4557
  Claude Enterprise re-pulls six calendar months of daily usage; Claude Team widens its
@@ -4601,7 +4608,9 @@ paths:
4601
4608
  format: date
4602
4609
  responses:
4603
4610
  "200":
4604
- description: Refresh result
4611
+ description: >
4612
+ Refresh accepted and queued for `ai-tool-refresher`. Upstream auth/rate/network
4613
+ failures are reported later via refresh status / ingest-coverage, not on this response.
4605
4614
  content:
4606
4615
  application/json:
4607
4616
  schema:
@@ -4609,13 +4618,12 @@ paths:
4609
4618
  examples:
4610
4619
  ok:
4611
4620
  value: { ok: true }
4612
- invalid_token:
4613
- value: { ok: false, error: "invalid_token" }
4614
4621
  "400":
4615
4622
  description: >
4616
- Invalid request — day-range validation failed. Stable `error` codes:
4617
- `invalid_day_range` (missing pair, bad calendar date, or from > to) and
4618
- `full_and_day_range_conflict` (`full` combined with `from`/`to`).
4623
+ Invalid request. Stable `error` codes: `invalid_day_range` (missing pair,
4624
+ bad calendar date, or from > to), `full_and_day_range_conflict` (`full`
4625
+ combined with `from`/`to`), and `invalid_provider` (path provider is not
4626
+ a supported AI-tool integration id).
4619
4627
  content:
4620
4628
  application/json:
4621
4629
  schema:
@@ -4625,6 +4633,8 @@ paths:
4625
4633
  value: { ok: false, error: "invalid_day_range" }
4626
4634
  full_and_day_range_conflict:
4627
4635
  value: { ok: false, error: "full_and_day_range_conflict" }
4636
+ invalid_provider:
4637
+ value: { ok: false, error: "invalid_provider" }
4628
4638
  "401":
4629
4639
  $ref: "#/components/responses/Unauthorized"
4630
4640
  "403":
@@ -4639,7 +4649,9 @@ paths:
4639
4649
  ok: false
4640
4650
  error: "no_source"
4641
4651
  "409":
4642
- description: Refresh already in progress
4652
+ description: >
4653
+ Refresh already in progress — advisory lock held, or an on-demand refresh
4654
+ is already queued for this workspace/provider.
4643
4655
  content:
4644
4656
  application/json:
4645
4657
  schema:
@@ -17748,6 +17760,9 @@ components:
17748
17760
  - hris.zelt.sync_started
17749
17761
  - hris.zelt.sync_completed
17750
17762
  - hris.zelt.sync_failed
17763
+ - hris.hibob.sync_started
17764
+ - hris.hibob.sync_completed
17765
+ - hris.hibob.sync_failed
17751
17766
  - hris.sync_started
17752
17767
  - hris.sync_completed
17753
17768
  - hris.sync_failed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.122.0",
3
+ "version": "2.124.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1121,7 +1121,7 @@ export interface paths {
1121
1121
  put?: never;
1122
1122
  /**
1123
1123
  * Rebuild SDLC DORA/CI daily rollups for a day range
1124
- * @description Rebuilds DORA/CI daily rollups for this workspace from stored dashboard productivity history for the inclusive `from`/`to` UTC day range (max 90 days). Does not re-pull GitHub. Returns 409 when another rebuild holds the advisory lock.
1124
+ * @description Queues a rebuild of DORA/CI daily rollups for this workspace from stored dashboard productivity history for the inclusive `from`/`to` UTC day range (max 90 days). Does not re-pull GitHub. Returns immediately with `{ ok: true }` while the rebuild runs under an advisory lock; ingest-coverage reports `sdlc_github` as `in_progress` until the lock is released. Returns 409 when another rebuild holds the advisory lock.
1125
1125
  */
1126
1126
  post: operations["rebuildSdlcRollups"];
1127
1127
  delete?: never;
@@ -1650,7 +1650,7 @@ export interface paths {
1650
1650
  put?: never;
1651
1651
  /**
1652
1652
  * Refresh AI tool integration snapshots
1653
- * @description Provider-agnostic refresh. Returns 409 when an advisory-lock refresh is already in progress. On upstream auth/rate/network failures, returns `200` with `{ ok:false, error }` so the SPA can render inline error. Pass `full=true` to force a full re-sync that re-pulls the full history instead of the incremental window, used to backfill historical months. Provider-specific behavior: Claude Enterprise re-pulls six calendar months of daily usage; Claude Team widens its daily-usage window to the configured history depth (`spendHistoryDays`, default 180 days); Cursor resets its spend/model/daily backfill cursors so the full `spendHistoryDays` window re-ingests from the retention floor even when the backfill was already complete. Omitted/false performs a normal incremental refresh. Pass `from` and `to` (UTC `YYYY-MM-DD`) together to re-ingest only that inclusive day range without resetting incremental watermarks; mutually exclusive with `full`. Day-range behavior is provider-specific: all providers re-pull generic daily usage for the window (Cursor does this via the spend-daily path instead of a duplicate top-level poll); Cursor additionally re-ingests spend/model daily for the window without resetting backfill cursors. Claude Enterprise model/product/engagement ingest paths are not day-range scoped and continue to use their normal refresh windows.
1653
+ * @description Provider-agnostic refresh. Queues work for `ai-tool-refresher` and returns immediately with `{ ok: true }` when accepted. Progress is visible via ingest-coverage (`ai.refreshInProgress`) and the provider status endpoint while the on-demand flag (or advisory lock) is held. Returns 409 when an advisory-lock refresh is already in progress. Returns 404 when the provider source is missing. Pass `full=true` to force a full re-sync that re-pulls the full history instead of the incremental window, used to backfill historical months. Provider-specific behavior: Claude Enterprise re-pulls six calendar months of daily usage; Claude Team widens its daily-usage window to the configured history depth (`spendHistoryDays`, default 180 days); Cursor resets its spend/model/daily backfill cursors so the full `spendHistoryDays` window re-ingests from the retention floor even when the backfill was already complete. Omitted/false performs a normal incremental refresh. Pass `from` and `to` (UTC `YYYY-MM-DD`) together to re-ingest only that inclusive day range without resetting incremental watermarks; mutually exclusive with `full`. Day-range behavior is provider-specific: all providers re-pull generic daily usage for the window (Cursor does this via the spend-daily path instead of a duplicate top-level poll); Cursor additionally re-ingests spend/model daily for the window without resetting backfill cursors. Claude Enterprise model/product/engagement ingest paths are not day-range scoped and continue to use their normal refresh windows.
1654
1654
  */
1655
1655
  post: operations["refreshWorkspaceAiTool"];
1656
1656
  delete?: never;
@@ -7620,7 +7620,7 @@ export interface components {
7620
7620
  * @description Type of workspace lifecycle event.
7621
7621
  * @enum {string}
7622
7622
  */
7623
- ActivityLogEventTypeDto: "repo.added" | "repo.removed" | "repo.readded" | "integration.github.added" | "integration.github.updated" | "integration.github.removed" | "integration.github.permissions_changed" | "integration.github.repo_added" | "integration.github.repo_removed" | "fix.requested" | "fix.generating" | "fix.pr_created" | "fix.merged" | "fix.failed" | "readiness.scan_started" | "readiness.scan_completed" | "readiness.scan_failed" | "readiness.scan_partial" | "code_insights.design_run_started" | "integrations.agent_execution.provider_changed" | "integrations.repo_eligibility.overrides_changed" | "integrations.repo_eligibility.languages_refresh_requested" | "integrations.cursor.platform_key_enabled" | "integrations.cursor.platform_key_disabled" | "member.invited" | "member.invite_accepted" | "member.invite_rejected" | "member.role_changed" | "member.removed" | "hris.personio.sync_started" | "hris.personio.sync_completed" | "hris.personio.sync_failed" | "hris.zenhr.sync_started" | "hris.zenhr.sync_completed" | "hris.zenhr.sync_failed" | "hris.zelt.sync_started" | "hris.zelt.sync_completed" | "hris.zelt.sync_failed" | "hris.sync_started" | "hris.sync_completed" | "hris.sync_failed" | "repo.sync_skipped" | "integrations.cursor.execution_key.added" | "integrations.cursor.execution_key.updated" | "integrations.cursor.execution_key.removed" | "integrations.cursor.execution_key.check_failed" | "integrations.cursor.admin_key.added" | "integrations.cursor.admin_key.updated" | "integrations.cursor.admin_key.removed" | "integrations.claude.execution_key.added" | "integrations.claude.execution_key.updated" | "integrations.claude.execution_key.removed" | "integrations.claude.execution_key.check_failed" | "integrations.claude.admin_key.added" | "integrations.claude.admin_key.updated" | "integrations.claude.admin_key.removed" | "integrations.claude.analytics_key.added" | "integrations.claude.analytics_key.updated" | "integrations.claude.analytics_key.removed" | "integrations.code_intelligence.settings_changed" | "integrations.code_intelligence.execution_key.added" | "integrations.code_intelligence.execution_key.updated" | "integrations.code_intelligence.execution_key.removed" | "integrations.code_intelligence.execution_key.check_failed" | "readiness.scan_precheck_failed" | "productivity.ingest.completed" | "productivity.ingest.failed" | "productivity.ingest.skipped" | "productivity.ingest.repo_skipped" | "productivity.ingest.coverage_gap_detected" | "integrations.newrelic.added" | "integrations.newrelic.removed" | "integrations.newrelic.sync_completed" | "integrations.newrelic.sync_failed" | "integrations.prometheus.added" | "integrations.prometheus.removed" | "integrations.prometheus.sync_completed" | "integrations.prometheus.sync_failed" | "integrations.grafana.added" | "integrations.grafana.removed" | "integrations.grafana.sync_completed" | "integrations.grafana.sync_failed" | "integrations.zelt.added" | "integrations.zelt.removed";
7623
+ ActivityLogEventTypeDto: "repo.added" | "repo.removed" | "repo.readded" | "integration.github.added" | "integration.github.updated" | "integration.github.removed" | "integration.github.permissions_changed" | "integration.github.repo_added" | "integration.github.repo_removed" | "fix.requested" | "fix.generating" | "fix.pr_created" | "fix.merged" | "fix.failed" | "readiness.scan_started" | "readiness.scan_completed" | "readiness.scan_failed" | "readiness.scan_partial" | "code_insights.design_run_started" | "integrations.agent_execution.provider_changed" | "integrations.repo_eligibility.overrides_changed" | "integrations.repo_eligibility.languages_refresh_requested" | "integrations.cursor.platform_key_enabled" | "integrations.cursor.platform_key_disabled" | "member.invited" | "member.invite_accepted" | "member.invite_rejected" | "member.role_changed" | "member.removed" | "hris.personio.sync_started" | "hris.personio.sync_completed" | "hris.personio.sync_failed" | "hris.zenhr.sync_started" | "hris.zenhr.sync_completed" | "hris.zenhr.sync_failed" | "hris.zelt.sync_started" | "hris.zelt.sync_completed" | "hris.zelt.sync_failed" | "hris.hibob.sync_started" | "hris.hibob.sync_completed" | "hris.hibob.sync_failed" | "hris.sync_started" | "hris.sync_completed" | "hris.sync_failed" | "repo.sync_skipped" | "integrations.cursor.execution_key.added" | "integrations.cursor.execution_key.updated" | "integrations.cursor.execution_key.removed" | "integrations.cursor.execution_key.check_failed" | "integrations.cursor.admin_key.added" | "integrations.cursor.admin_key.updated" | "integrations.cursor.admin_key.removed" | "integrations.claude.execution_key.added" | "integrations.claude.execution_key.updated" | "integrations.claude.execution_key.removed" | "integrations.claude.execution_key.check_failed" | "integrations.claude.admin_key.added" | "integrations.claude.admin_key.updated" | "integrations.claude.admin_key.removed" | "integrations.claude.analytics_key.added" | "integrations.claude.analytics_key.updated" | "integrations.claude.analytics_key.removed" | "integrations.code_intelligence.settings_changed" | "integrations.code_intelligence.execution_key.added" | "integrations.code_intelligence.execution_key.updated" | "integrations.code_intelligence.execution_key.removed" | "integrations.code_intelligence.execution_key.check_failed" | "readiness.scan_precheck_failed" | "productivity.ingest.completed" | "productivity.ingest.failed" | "productivity.ingest.skipped" | "productivity.ingest.repo_skipped" | "productivity.ingest.coverage_gap_detected" | "integrations.newrelic.added" | "integrations.newrelic.removed" | "integrations.newrelic.sync_completed" | "integrations.newrelic.sync_failed" | "integrations.prometheus.added" | "integrations.prometheus.removed" | "integrations.prometheus.sync_completed" | "integrations.prometheus.sync_failed" | "integrations.grafana.added" | "integrations.grafana.removed" | "integrations.grafana.sync_completed" | "integrations.grafana.sync_failed" | "integrations.zelt.added" | "integrations.zelt.removed";
7624
7624
  ActivityLogActorDto: {
7625
7625
  /** Format: uuid */
7626
7626
  userId: string;
@@ -13038,7 +13038,7 @@ export interface operations {
13038
13038
  };
13039
13039
  requestBody?: never;
13040
13040
  responses: {
13041
- /** @description Rebuild completed */
13041
+ /** @description Rebuild accepted and running asynchronously */
13042
13042
  200: {
13043
13043
  headers: {
13044
13044
  [name: string]: unknown;
@@ -13046,14 +13046,14 @@ export interface operations {
13046
13046
  content: {
13047
13047
  /**
13048
13048
  * @example {
13049
- * "ok": true,
13050
- * "rollupRows": 42
13049
+ * "ok": true
13051
13050
  * }
13052
13051
  */
13053
13052
  "application/json": {
13054
13053
  /** @enum {boolean} */
13055
13054
  ok: true;
13056
- rollupRows: number;
13055
+ /** @description Optional. Omitted when the rebuild is queued asynchronously (current behavior). */
13056
+ rollupRows?: number;
13057
13057
  };
13058
13058
  };
13059
13059
  };
@@ -14541,7 +14541,7 @@ export interface operations {
14541
14541
  };
14542
14542
  requestBody?: never;
14543
14543
  responses: {
14544
- /** @description Refresh result */
14544
+ /** @description Refresh accepted and queued for `ai-tool-refresher`. Upstream auth/rate/network failures are reported later via refresh status / ingest-coverage, not on this response. */
14545
14545
  200: {
14546
14546
  headers: {
14547
14547
  [name: string]: unknown;
@@ -14550,7 +14550,7 @@ export interface operations {
14550
14550
  "application/json": components["schemas"]["AiToolRefreshResponseDto"];
14551
14551
  };
14552
14552
  };
14553
- /** @description Invalid request — day-range validation failed. Stable `error` codes: `invalid_day_range` (missing pair, bad calendar date, or from > to) and `full_and_day_range_conflict` (`full` combined with `from`/`to`). */
14553
+ /** @description Invalid request. Stable `error` codes: `invalid_day_range` (missing pair, bad calendar date, or from > to), `full_and_day_range_conflict` (`full` combined with `from`/`to`), and `invalid_provider` (path provider is not a supported AI-tool integration id). */
14554
14554
  400: {
14555
14555
  headers: {
14556
14556
  [name: string]: unknown;
@@ -14576,7 +14576,7 @@ export interface operations {
14576
14576
  "application/json": components["schemas"]["AiToolRefreshResponseDto"];
14577
14577
  };
14578
14578
  };
14579
- /** @description Refresh already in progress */
14579
+ /** @description Refresh already in progress — advisory lock held, or an on-demand refresh is already queued for this workspace/provider. */
14580
14580
  409: {
14581
14581
  headers: {
14582
14582
  [name: string]: unknown;