@thinkai/tai-api-contract 2.251.0 → 2.252.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.
@@ -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;
@@ -32626,8 +32628,12 @@ export interface operations {
32626
32628
  getYourAiJourneyAiSpend: {
32627
32629
  parameters: {
32628
32630
  query?: {
32629
- /** @description Time range — `4w` (4 weeks), `8w` (8 weeks), or `q` (quarter, 12 weeks). */
32630
- rangeId?: "4w" | "8w" | "q";
32631
+ /** @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. */
32632
+ rangeId?: components["parameters"]["InsightsProductivityRangeId"];
32633
+ /** @description Inclusive start of a daily window (`YYYY-MM-DD`). When set with `to`, overrides `rangeId` for day-mode responses (max 180 days). */
32634
+ from?: components["parameters"]["InsightsProductivityFrom"];
32635
+ /** @description Inclusive end of a daily window (`YYYY-MM-DD`). When set with `from`, overrides `rangeId` for day-mode responses (max 180 days). */
32636
+ to?: components["parameters"]["InsightsProductivityTo"];
32631
32637
  };
32632
32638
  header?: never;
32633
32639
  path: {
@@ -32646,6 +32652,18 @@ export interface operations {
32646
32652
  "application/json": components["schemas"]["YourAiJourneyAiSpendDto"];
32647
32653
  };
32648
32654
  };
32655
+ /** @description Invalid `rangeId`, `from`, or `to` */
32656
+ 400: {
32657
+ headers: {
32658
+ [name: string]: unknown;
32659
+ };
32660
+ content: {
32661
+ "application/json": {
32662
+ /** @example invalid_query */
32663
+ error: string;
32664
+ };
32665
+ };
32666
+ };
32649
32667
  401: components["responses"]["Unauthorized"];
32650
32668
  403: components["responses"]["Forbidden"];
32651
32669
  /** @description Workspace does not exist */