@thinkai/tai-api-contract 2.119.0 → 2.122.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.
@@ -1109,6 +1109,26 @@ export interface paths {
1109
1109
  patch?: never;
1110
1110
  trace?: never;
1111
1111
  };
1112
+ "/workspaces/{workspaceId}/ingest/sdlc/rollups/rebuild": {
1113
+ parameters: {
1114
+ query?: never;
1115
+ header?: never;
1116
+ path?: never;
1117
+ cookie?: never;
1118
+ };
1119
+ get?: never;
1120
+ put?: never;
1121
+ /**
1122
+ * Rebuild SDLC DORA/CI daily rollups for a day range
1123
+ * @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
+ */
1125
+ post: operations["rebuildSdlcRollups"];
1126
+ delete?: never;
1127
+ options?: never;
1128
+ head?: never;
1129
+ patch?: never;
1130
+ trace?: never;
1131
+ };
1112
1132
  "/workspaces/{workspaceId}/insights/sdlc/overview": {
1113
1133
  parameters: {
1114
1134
  query?: never;
@@ -1629,7 +1649,7 @@ export interface paths {
1629
1649
  put?: never;
1630
1650
  /**
1631
1651
  * Refresh AI tool integration snapshots
1632
- * @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.
1652
+ * @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.
1633
1653
  */
1634
1654
  post: operations["refreshWorkspaceAiTool"];
1635
1655
  delete?: never;
@@ -7736,6 +7756,8 @@ export interface components {
7736
7756
  /** Format: int64 */
7737
7757
  staleForMs?: number | null;
7738
7758
  isStale?: boolean;
7759
+ /** @enum {string|null} */
7760
+ staleReason?: "sync_age" | "data_lag" | "both" | null;
7739
7761
  };
7740
7762
  IngestCoverageSdlcDetailDto: {
7741
7763
  components?: components["schemas"]["IngestCoverageSdlcComponentDto"][];
@@ -7766,6 +7788,8 @@ export interface components {
7766
7788
  staleForMs?: number | null;
7767
7789
  isStale: boolean;
7768
7790
  dataLagDays?: number | null;
7791
+ /** @enum {string|null} */
7792
+ staleReason?: "sync_age" | "data_lag" | "both" | null;
7769
7793
  gaps?: components["schemas"]["IngestCoverageGapDto"][];
7770
7794
  missingCount?: number | null;
7771
7795
  lastRun?: components["schemas"]["IngestCoverageLastRunDto"];
@@ -12997,6 +13021,93 @@ export interface operations {
12997
13021
  };
12998
13022
  };
12999
13023
  };
13024
+ rebuildSdlcRollups: {
13025
+ parameters: {
13026
+ query: {
13027
+ /** @description Inclusive UTC start day (`YYYY-MM-DD`). */
13028
+ from: string;
13029
+ /** @description Inclusive UTC end day (`YYYY-MM-DD`). */
13030
+ to: string;
13031
+ };
13032
+ header?: never;
13033
+ path: {
13034
+ workspaceId: components["parameters"]["WorkspaceId"];
13035
+ };
13036
+ cookie?: never;
13037
+ };
13038
+ requestBody?: never;
13039
+ responses: {
13040
+ /** @description Rebuild completed */
13041
+ 200: {
13042
+ headers: {
13043
+ [name: string]: unknown;
13044
+ };
13045
+ content: {
13046
+ /**
13047
+ * @example {
13048
+ * "ok": true,
13049
+ * "rollupRows": 42
13050
+ * }
13051
+ */
13052
+ "application/json": {
13053
+ /** @enum {boolean} */
13054
+ ok: true;
13055
+ rollupRows: number;
13056
+ };
13057
+ };
13058
+ };
13059
+ /** @description Invalid range. Stable `error` codes: `invalid_day_range` (missing pair, bad calendar date, or from > to) and `range_too_large` (more than 90 days). */
13060
+ 400: {
13061
+ headers: {
13062
+ [name: string]: unknown;
13063
+ };
13064
+ content: {
13065
+ "application/json": {
13066
+ /** @enum {boolean} */
13067
+ ok: false;
13068
+ /** @enum {string} */
13069
+ error: "invalid_day_range" | "range_too_large";
13070
+ };
13071
+ };
13072
+ };
13073
+ 401: components["responses"]["Unauthorized"];
13074
+ 403: components["responses"]["Forbidden"];
13075
+ /** @description Feature off or no dashboard metrics source. Stable `error` codes: `feature_off`, `no_source`. */
13076
+ 404: {
13077
+ headers: {
13078
+ [name: string]: unknown;
13079
+ };
13080
+ content: {
13081
+ "application/json": {
13082
+ /** @enum {boolean} */
13083
+ ok: false;
13084
+ /** @enum {string} */
13085
+ error: "feature_off" | "no_source";
13086
+ };
13087
+ };
13088
+ };
13089
+ /** @description Rebuild already in progress */
13090
+ 409: {
13091
+ headers: {
13092
+ [name: string]: unknown;
13093
+ };
13094
+ content: {
13095
+ /**
13096
+ * @example {
13097
+ * "ok": false,
13098
+ * "error": "already_in_progress"
13099
+ * }
13100
+ */
13101
+ "application/json": {
13102
+ /** @enum {boolean} */
13103
+ ok: false;
13104
+ /** @enum {string} */
13105
+ error: "already_in_progress";
13106
+ };
13107
+ };
13108
+ };
13109
+ };
13110
+ };
13000
13111
  getSdlcInsightsOverview: {
13001
13112
  parameters: {
13002
13113
  query?: {
@@ -14415,6 +14526,10 @@ export interface operations {
14415
14526
  query?: {
14416
14527
  /** @description Force a full history re-sync instead of the incremental window (Enterprise: 6 months; Team: `spendHistoryDays`-day daily-usage window; Cursor: spend/model/daily backfill reset over `spendHistoryDays`). Truthy only for `true` or `1`. */
14417
14528
  full?: "true" | "1";
14529
+ /** @description Inclusive UTC start day (`YYYY-MM-DD`) for a targeted re-ingest window. Must be paired with `to`. Mutually exclusive with `full`. Clamped to the configured retention floor (`spendHistoryDays`). Cursor also re-ingests spend/model daily for the window; Claude Enterprise model/product/engagement paths are not day-range scoped. */
14530
+ from?: string;
14531
+ /** @description Inclusive UTC end day (`YYYY-MM-DD`) for a targeted re-ingest window. Must be paired with `from`. Mutually exclusive with `full`. */
14532
+ to?: string;
14418
14533
  };
14419
14534
  header?: never;
14420
14535
  path: {
@@ -14434,6 +14549,15 @@ export interface operations {
14434
14549
  "application/json": components["schemas"]["AiToolRefreshResponseDto"];
14435
14550
  };
14436
14551
  };
14552
+ /** @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
+ 400: {
14554
+ headers: {
14555
+ [name: string]: unknown;
14556
+ };
14557
+ content: {
14558
+ "application/json": components["schemas"]["AiToolRefreshResponseDto"];
14559
+ };
14560
+ };
14437
14561
  401: components["responses"]["Unauthorized"];
14438
14562
  403: components["responses"]["Forbidden"];
14439
14563
  /** @description Provider source missing for this workspace */