@thinkai/tai-api-contract 2.250.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;
@@ -15996,6 +15998,8 @@ export interface components {
15996
15998
  GithubRepoSort: "name" | "updatedAt";
15997
15999
  /** @description Sort direction for the nested installation repo list. */
15998
16000
  GithubRepoOrder: "asc" | "desc";
16001
+ /** @description Case-insensitive substring filter on repository `fullName`, `name`, or `language`, applied before `repoLimit`/`repoOffset` paging (for both top-level `repos` and each installation's `repos`). Empty or whitespace-only values are treated as unfiltered. */
16002
+ GithubRepoSearch: string;
15999
16003
  };
16000
16004
  requestBodies: never;
16001
16005
  headers: never;
@@ -16866,6 +16870,7 @@ export type ParameterGithubRepoLimit = components['parameters']['GithubRepoLimit
16866
16870
  export type ParameterGithubRepoOffset = components['parameters']['GithubRepoOffset'];
16867
16871
  export type ParameterGithubRepoSort = components['parameters']['GithubRepoSort'];
16868
16872
  export type ParameterGithubRepoOrder = components['parameters']['GithubRepoOrder'];
16873
+ export type ParameterGithubRepoSearch = components['parameters']['GithubRepoSearch'];
16869
16874
  export type $defs = Record<string, never>;
16870
16875
  export interface operations {
16871
16876
  adminDeleteUser: {
@@ -24132,6 +24137,8 @@ export interface operations {
24132
24137
  repoSort?: components["parameters"]["GithubRepoSort"];
24133
24138
  /** @description Sort direction for the nested installation repo list. */
24134
24139
  repoOrder?: components["parameters"]["GithubRepoOrder"];
24140
+ /** @description Case-insensitive substring filter on repository `fullName`, `name`, or `language`, applied before `repoLimit`/`repoOffset` paging (for both top-level `repos` and each installation's `repos`). Empty or whitespace-only values are treated as unfiltered. */
24141
+ search?: components["parameters"]["GithubRepoSearch"];
24135
24142
  };
24136
24143
  header?: never;
24137
24144
  path: {
@@ -24150,6 +24157,15 @@ export interface operations {
24150
24157
  "application/json": components["schemas"]["GithubInstallationStatusDto"];
24151
24158
  };
24152
24159
  };
24160
+ /** @description Invalid `repoLimit`, `repoOffset`, `repoSort`, `repoOrder`, or `search` query parameter */
24161
+ 400: {
24162
+ headers: {
24163
+ [name: string]: unknown;
24164
+ };
24165
+ content: {
24166
+ "application/json": components["schemas"]["ErrorMessageDto"];
24167
+ };
24168
+ };
24153
24169
  401: components["responses"]["Unauthorized"];
24154
24170
  403: components["responses"]["Forbidden"];
24155
24171
  /** @description Workspace does not exist or malformed workspaceId */
@@ -32612,8 +32628,12 @@ export interface operations {
32612
32628
  getYourAiJourneyAiSpend: {
32613
32629
  parameters: {
32614
32630
  query?: {
32615
- /** @description Time range — `4w` (4 weeks), `8w` (8 weeks), or `q` (quarter, 12 weeks). */
32616
- 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"];
32617
32637
  };
32618
32638
  header?: never;
32619
32639
  path: {
@@ -32632,6 +32652,18 @@ export interface operations {
32632
32652
  "application/json": components["schemas"]["YourAiJourneyAiSpendDto"];
32633
32653
  };
32634
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
+ };
32635
32667
  401: components["responses"]["Unauthorized"];
32636
32668
  403: components["responses"]["Forbidden"];
32637
32669
  /** @description Workspace does not exist */