@thinkai/tai-api-contract 2.246.0 → 2.247.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.246.0
4
+ version: 2.247.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}/...`.
@@ -5010,8 +5010,14 @@ paths:
5010
5010
  summary: AI usage & spend insights — key insights panel
5011
5011
  description: >
5012
5012
  Narrative insight cards for the Measure **Key insights** panel on `/phase-c/c7`
5013
- (AI Usage & Spend). Derived from scoped AI-tool usage/spend snapshots and
5014
- productivity metrics for the selected filters and range.
5013
+ (AI Usage & Spend) and Report Center exports. Derived from scoped AI-tool usage/spend
5014
+ snapshots and productivity metrics for the selected filters and range. By default,
5015
+ usage-vs-throughput narratives compare recent complete buckets against the selected
5016
+ period's own average (dropping the trailing edge bucket) without fetching the prior
5017
+ window. Pass `compareToPrior=1` (or `true`) to compare against the previous
5018
+ equal-length window when at least half of prior PR and usage buckets have activity
5019
+ (falling back to period-average phrasing otherwise). Displayed percent moves cap at
5020
+ `>999%`.
5015
5021
  operationId: getAiUsageSpendKeyInsights
5016
5022
  parameters:
5017
5023
  - $ref: "#/components/parameters/WorkspaceId"
@@ -5032,6 +5038,18 @@ paths:
5032
5038
  schema:
5033
5039
  type: string
5034
5040
  format: date-time
5041
+ - name: compareToPrior
5042
+ in: query
5043
+ required: false
5044
+ description: >
5045
+ When `"1"` or `"true"`, compares the selected window against the previous
5046
+ equal-length window when at least half of prior PR and usage buckets have activity;
5047
+ falls back to the selected-period comparison otherwise. Omit (default) to compare
5048
+ recent complete buckets against the selected period's own average without fetching
5049
+ the prior window.
5050
+ schema:
5051
+ type: string
5052
+ enum: ["1", "true", "0", "false"]
5035
5053
  responses:
5036
5054
  "200":
5037
5055
  description: Key insight cards for the AI usage & spend panel
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.246.0",
3
+ "version": "2.247.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1670,7 +1670,7 @@ export interface paths {
1670
1670
  };
1671
1671
  /**
1672
1672
  * AI usage & spend insights — key insights panel
1673
- * @description Narrative insight cards for the Measure **Key insights** panel on `/phase-c/c7` (AI Usage & Spend). Derived from scoped AI-tool usage/spend snapshots and productivity metrics for the selected filters and range.
1673
+ * @description Narrative insight cards for the Measure **Key insights** panel on `/phase-c/c7` (AI Usage & Spend) and Report Center exports. Derived from scoped AI-tool usage/spend snapshots and productivity metrics for the selected filters and range. By default, usage-vs-throughput narratives compare recent complete buckets against the selected period's own average (dropping the trailing edge bucket) without fetching the prior window. Pass `compareToPrior=1` (or `true`) to compare against the previous equal-length window when at least half of prior PR and usage buckets have activity (falling back to period-average phrasing otherwise). Displayed percent moves cap at `>999%`.
1674
1674
  */
1675
1675
  get: operations["getAiUsageSpendKeyInsights"];
1676
1676
  put?: never;
@@ -21716,6 +21716,8 @@ export interface operations {
21716
21716
  team?: string;
21717
21717
  /** @description ISO timestamp for the end of the last weekly bucket; omit for current week. */
21718
21718
  windowEnd?: string;
21719
+ /** @description When `"1"` or `"true"`, compares the selected window against the previous equal-length window when at least half of prior PR and usage buckets have activity; falls back to the selected-period comparison otherwise. Omit (default) to compare recent complete buckets against the selected period's own average without fetching the prior window. */
21720
+ compareToPrior?: "1" | "true" | "0" | "false";
21719
21721
  };
21720
21722
  header?: never;
21721
21723
  path: {