@thinkai/tai-api-contract 2.251.0 → 2.253.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.
@@ -5803,7 +5803,7 @@ export interface paths {
5803
5803
  };
5804
5804
  /**
5805
5805
  * Secondary dashboard panels bootstrap payload
5806
- * @description Returns readiness aggregate, merged PR trends (8-week default window), aggregated teams (8-week default window), and agentic foundation dashboard in one response. Nested payloads reuse the same builders and caches as their dedicated routes.
5806
+ * @description Returns readiness aggregate, merged PR trends, aggregated teams, and agentic foundation dashboard in one response. Productivity nested payloads use the same builders and caches as their dedicated routes. Default productivity window is `30d` when `rangeId` is omitted.
5807
5807
  */
5808
5808
  get: operations["getYourAiJourneyDashboardSecondary"];
5809
5809
  put?: never;
@@ -5948,6 +5948,8 @@ export interface paths {
5948
5948
  /**
5949
5949
  * AI tool spend and usage aggregated by week and provider
5950
5950
  * @description Returns token usage and spend aggregated from connected AI tool sources (e.g. Cursor) over the requested range, broken down by week and provider. Covers issue #274. Results are cached for 60 seconds.
5951
+ *
5952
+ * The window is selected like the Productivity and AI usage insights routes: daily presets (`7d`, `30d`, `90d`, `180d`), a custom `cr:YYYY-MM-DD:YYYY-MM-DD` range, explicit `from`/`to` day bounds (max 180 days), or legacy weekly ranges (`4w`, `8w`, `q`, `12w`, `16w`). Totals, active users and provider rows are scoped to the day window (or to the calendar weeks for a weekly range); spend counts every billing cycle that overlaps the window. `weeks` lists the calendar weeks overlapping the window, so the weekly strip keeps working for any range. `windowStart`/`windowEnd` are the day-window bounds for daily ranges and the first/last week bucket bounds for weekly ranges. Unsupported values return `400` (previously they silently fell back to `4w`).
5951
5953
  */
5952
5954
  get: operations["getYourAiJourneyAiSpend"];
5953
5955
  put?: never;
@@ -32333,7 +32335,10 @@ export interface operations {
32333
32335
  };
32334
32336
  getYourAiJourneyDashboardSecondary: {
32335
32337
  parameters: {
32336
- query?: never;
32338
+ query?: {
32339
+ /** @description Productivity insights time range. Daily windows: `7d`, `30d`, `90d`, `180d`, or custom `cr:YYYY-MM-DD:YYYY-MM-DD`. Weekly legacy: `4w`, `8w`, `q` (12 weeks), `12w`, `16w`. Omit when using explicit `from`/`to` day bounds. */
32340
+ rangeId?: components["parameters"]["InsightsProductivityRangeId"];
32341
+ };
32337
32342
  header?: never;
32338
32343
  path: {
32339
32344
  workspaceId: components["parameters"]["WorkspaceId"];
@@ -32626,8 +32631,12 @@ export interface operations {
32626
32631
  getYourAiJourneyAiSpend: {
32627
32632
  parameters: {
32628
32633
  query?: {
32629
- /** @description Time range — `4w` (4 weeks), `8w` (8 weeks), or `q` (quarter, 12 weeks). */
32630
- rangeId?: "4w" | "8w" | "q";
32634
+ /** @description Productivity insights time range. Daily windows: `7d`, `30d`, `90d`, `180d`, or custom `cr:YYYY-MM-DD:YYYY-MM-DD`. Weekly legacy: `4w`, `8w`, `q` (12 weeks), `12w`, `16w`. Omit when using explicit `from`/`to` day bounds. */
32635
+ rangeId?: components["parameters"]["InsightsProductivityRangeId"];
32636
+ /** @description Inclusive start of a daily window (`YYYY-MM-DD`). When set with `to`, overrides `rangeId` for day-mode responses (max 180 days). */
32637
+ from?: components["parameters"]["InsightsProductivityFrom"];
32638
+ /** @description Inclusive end of a daily window (`YYYY-MM-DD`). When set with `from`, overrides `rangeId` for day-mode responses (max 180 days). */
32639
+ to?: components["parameters"]["InsightsProductivityTo"];
32631
32640
  };
32632
32641
  header?: never;
32633
32642
  path: {
@@ -32646,6 +32655,18 @@ export interface operations {
32646
32655
  "application/json": components["schemas"]["YourAiJourneyAiSpendDto"];
32647
32656
  };
32648
32657
  };
32658
+ /** @description Invalid `rangeId`, `from`, or `to` */
32659
+ 400: {
32660
+ headers: {
32661
+ [name: string]: unknown;
32662
+ };
32663
+ content: {
32664
+ "application/json": {
32665
+ /** @example invalid_query */
32666
+ error: string;
32667
+ };
32668
+ };
32669
+ };
32649
32670
  401: components["responses"]["Unauthorized"];
32650
32671
  403: components["responses"]["Forbidden"];
32651
32672
  /** @description Workspace does not exist */