@thinkai/tai-api-contract 2.8.6 → 2.9.1

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.8.4
4
+ version: 2.9.1
5
5
  description: >
6
6
  Contract surface for the AI Driven SDLC backend used by ThinkAI.
7
7
  Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
@@ -1868,6 +1868,54 @@ paths:
1868
1868
  "403":
1869
1869
  $ref: "#/components/responses/Forbidden"
1870
1870
 
1871
+ /workspaces/{workspaceId}/integrations/ai-tool/{provider}/spend-daily:
1872
+ get:
1873
+ tags: [Integrations]
1874
+ summary: List AI-tool daily spend (historic Cursor filtered-usage rollup)
1875
+ operationId: getWorkspaceAiToolSpendDaily
1876
+ parameters:
1877
+ - $ref: "#/components/parameters/WorkspaceId"
1878
+ - name: provider
1879
+ in: path
1880
+ required: true
1881
+ schema:
1882
+ type: string
1883
+ enum: [cursor, claude]
1884
+ - name: from
1885
+ in: query
1886
+ required: false
1887
+ schema:
1888
+ type: string
1889
+ format: date
1890
+ - name: to
1891
+ in: query
1892
+ required: false
1893
+ schema:
1894
+ type: string
1895
+ format: date
1896
+ - name: externalId
1897
+ in: query
1898
+ required: false
1899
+ schema:
1900
+ type: string
1901
+ responses:
1902
+ "200":
1903
+ description: Daily spend rows
1904
+ content:
1905
+ application/json:
1906
+ schema:
1907
+ type: object
1908
+ required: [rows]
1909
+ properties:
1910
+ rows:
1911
+ type: array
1912
+ items:
1913
+ $ref: "#/components/schemas/AiToolSpendDailyRowDto"
1914
+ "401":
1915
+ $ref: "#/components/responses/Unauthorized"
1916
+ "403":
1917
+ $ref: "#/components/responses/Forbidden"
1918
+
1871
1919
  /workspaces/{workspaceId}/integrations/ai-tool/{provider}/status:
1872
1920
  get:
1873
1921
  tags: [Integrations]
@@ -3142,6 +3190,74 @@ paths:
3142
3190
  schema:
3143
3191
  $ref: "#/components/schemas/ErrorMessageDto"
3144
3192
 
3193
+ /workspaces/{workspaceId}/cursor/platform-key-consent:
3194
+ put:
3195
+ tags: [Integrations]
3196
+ summary: Enable or disable ThinkAI platform Cursor key opt-in
3197
+ description: >
3198
+ Explicitly enable or disable use of ThinkAI's platform Cursor execution key for readiness
3199
+ scans. When enabled and the workspace has no `executionToken` configured, the platform key
3200
+ is used and tracked for billing. Requires workspace editor or admin role.
3201
+ operationId: putCursorPlatformKeyConsent
3202
+ parameters:
3203
+ - $ref: "#/components/parameters/WorkspaceId"
3204
+ requestBody:
3205
+ required: true
3206
+ content:
3207
+ application/json:
3208
+ schema:
3209
+ type: object
3210
+ required: [enabled]
3211
+ properties:
3212
+ enabled:
3213
+ type: boolean
3214
+ description: >
3215
+ true to opt in to ThinkAI platform Cursor key (additional cost applies);
3216
+ false to opt out.
3217
+ responses:
3218
+ "200":
3219
+ description: Consent updated
3220
+ content:
3221
+ application/json:
3222
+ schema:
3223
+ type: object
3224
+ required: [ok]
3225
+ properties:
3226
+ ok:
3227
+ type: boolean
3228
+ "400":
3229
+ description: Invalid request body
3230
+ content:
3231
+ application/json:
3232
+ schema:
3233
+ $ref: "#/components/schemas/ErrorMessageDto"
3234
+ "401":
3235
+ $ref: "#/components/responses/Unauthorized"
3236
+ "403":
3237
+ $ref: "#/components/responses/Forbidden"
3238
+
3239
+ /workspaces/{workspaceId}/readiness/cursor-key-usage:
3240
+ get:
3241
+ tags: [RepositoryReadiness]
3242
+ summary: Get Cursor key usage stats for this workspace
3243
+ description: >
3244
+ Returns per-workspace counts of readiness runs that used the ThinkAI platform Cursor key
3245
+ vs. the workspace's own execution key. Member-level access.
3246
+ operationId: getCursorKeyUsage
3247
+ parameters:
3248
+ - $ref: "#/components/parameters/WorkspaceId"
3249
+ responses:
3250
+ "200":
3251
+ description: Cursor key usage stats
3252
+ content:
3253
+ application/json:
3254
+ schema:
3255
+ $ref: "#/components/schemas/CursorKeyUsageDto"
3256
+ "401":
3257
+ $ref: "#/components/responses/Unauthorized"
3258
+ "403":
3259
+ $ref: "#/components/responses/Forbidden"
3260
+
3145
3261
  /workspaces/{workspaceId}/squad:
3146
3262
  get:
3147
3263
  tags: [SquadProjects]
@@ -4125,11 +4241,13 @@ components:
4125
4241
  CursorSourceDto:
4126
4242
  type: object
4127
4243
  description: >
4128
- Cursor (AI Tools) source entry for `PUT /workspaces/{workspaceId}/sources`
4129
- and `POST /workspaces/{workspaceId}/sources/test`. The `token` field
4130
- carries a literal Cursor API key on writes; reads from
4131
- `GET /workspaces/{workspaceId}/config` redact it to `***`.
4132
- Runtime calls use the Cursor Admin API at `https://api.cursor.com` (HTTP Basic); do not rely on `baseUrl`.
4244
+ Cursor source entry for `PUT /workspaces/{workspaceId}/sources`
4245
+ and `POST /workspaces/{workspaceId}/sources/test`.
4246
+ Two distinct keys: Admin API key (`token`) for insights sync;
4247
+ Execution key (`executionToken`) for readiness scanner and Agent CLI.
4248
+ On writes both fields accept literal key values; reads from
4249
+ `GET /workspaces/{workspaceId}/config` return a `CursorSourceConfigDto`
4250
+ shape (`hasToken` / `hasExecutionToken` booleans) — raw values are never returned.
4133
4251
  required: [type, token]
4134
4252
  additionalProperties: false
4135
4253
  properties:
@@ -4140,7 +4258,18 @@ components:
4140
4258
  type: string
4141
4259
  minLength: 1
4142
4260
  maxLength: 256
4143
- description: Cursor API key (literal). Whitespace and `env:` prefix are rejected.
4261
+ description: >
4262
+ Cursor Admin API key (literal). Used for seats/spend/usage insights sync only.
4263
+ Whitespace and `env:` prefix are rejected.
4264
+ executionToken:
4265
+ type: string
4266
+ minLength: 1
4267
+ maxLength: 256
4268
+ description: >
4269
+ Cursor execution key (literal). Used for the readiness scanner and Agent CLI.
4270
+ This is a Cursor user API key or service account key — NOT the Admin API key.
4271
+ Omit if using the ThinkAI platform key (requires `cursorPlatformKeyEnabled` on the workspace).
4272
+ Whitespace and `env:` prefix are rejected.
4144
4273
  baseUrl:
4145
4274
  type: string
4146
4275
  deprecated: true
@@ -4149,6 +4278,28 @@ components:
4149
4278
  and always uses the Cursor Admin API host. Kept so older clients can submit payloads unchanged.
4150
4279
  default: "https://api.cursor.com"
4151
4280
 
4281
+ CursorSourceConfigDto:
4282
+ type: object
4283
+ description: >
4284
+ Redacted Cursor source returned by `GET /workspaces/{workspaceId}/config`.
4285
+ `hasToken` and `hasExecutionToken` indicate which keys are stored.
4286
+ Raw values are never returned.
4287
+ required: [type, hasToken, hasExecutionToken]
4288
+ additionalProperties: false
4289
+ properties:
4290
+ type:
4291
+ type: string
4292
+ enum: [cursor]
4293
+ hasToken:
4294
+ type: boolean
4295
+ description: Whether the Admin API key (`token`) is stored for this workspace.
4296
+ hasExecutionToken:
4297
+ type: boolean
4298
+ description: >
4299
+ Whether the execution key is stored. If false and `cursorPlatformKeyEnabled` is true
4300
+ in `WorkspaceConfigDto`, the platform key will be used for readiness runs
4301
+ (additional cost applies).
4302
+
4152
4303
  ClaudeSourceDto:
4153
4304
  type: object
4154
4305
  description: >
@@ -4188,6 +4339,12 @@ components:
4188
4339
  type: string
4189
4340
  nullable: true
4190
4341
  enum: [us, eu, me]
4342
+ cursorPlatformKeyEnabled:
4343
+ type: boolean
4344
+ description: >
4345
+ When true, readiness runs may use the ThinkAI platform Cursor key if this
4346
+ workspace has no `executionToken` configured. Additional cost applies.
4347
+ Requires explicit opt-in via `PUT /workspaces/{workspaceId}/cursor/platform-key-consent`.
4191
4348
 
4192
4349
  TestConnectionResponseDto:
4193
4350
  type: object
@@ -4197,6 +4354,35 @@ components:
4197
4354
  type: boolean
4198
4355
  error:
4199
4356
  type: string
4357
+ executionKeyValid:
4358
+ type: boolean
4359
+ nullable: true
4360
+ description: >
4361
+ Present when `executionToken` was included in the test request.
4362
+ `true` = key passed save-time validation (format + not-admin-key check).
4363
+ `false` = key failed validation (see `executionKeyError` for detail).
4364
+ `null` = `executionToken` was not provided.
4365
+ executionKeyError:
4366
+ type: string
4367
+ nullable: true
4368
+ description: Error detail when `executionKeyValid` is false.
4369
+
4370
+ CursorKeyUsageDto:
4371
+ type: object
4372
+ required: [platformKeyRunsThisMonth, platformKeyRunsTotal, workspaceKeyRunsTotal]
4373
+ properties:
4374
+ platformKeyRunsThisMonth:
4375
+ type: integer
4376
+ minimum: 0
4377
+ description: Readiness runs this calendar month that used the ThinkAI platform Cursor key.
4378
+ platformKeyRunsTotal:
4379
+ type: integer
4380
+ minimum: 0
4381
+ description: All-time readiness runs that used the ThinkAI platform Cursor key.
4382
+ workspaceKeyRunsTotal:
4383
+ type: integer
4384
+ minimum: 0
4385
+ description: All-time readiness runs that used the workspace's own execution key.
4200
4386
 
4201
4387
  AiToolSeatDto:
4202
4388
  type: object
@@ -4258,6 +4444,27 @@ components:
4258
4444
  type: object
4259
4445
  additionalProperties: true
4260
4446
 
4447
+ AiToolSpendDailyRowDto:
4448
+ type: object
4449
+ required: [day, externalId, spendCents, eventCount]
4450
+ properties:
4451
+ day:
4452
+ type: string
4453
+ format: date
4454
+ externalId:
4455
+ type: string
4456
+ email:
4457
+ type: string
4458
+ nullable: true
4459
+ spendCents:
4460
+ type: integer
4461
+ format: int64
4462
+ eventCount:
4463
+ type: integer
4464
+ payload:
4465
+ type: object
4466
+ additionalProperties: true
4467
+
4261
4468
  AiToolRefreshStatusDto:
4262
4469
  type: object
4263
4470
  required: [lastAttemptAt, counts]
@@ -4282,6 +4489,9 @@ components:
4282
4489
  counts:
4283
4490
  type: object
4284
4491
  additionalProperties: true
4492
+ refreshInProgress:
4493
+ type: boolean
4494
+ description: True while a workspace/provider refresh holds the Postgres advisory lock.
4285
4495
 
4286
4496
  AiToolRefreshResponseDto:
4287
4497
  type: object
@@ -5897,6 +6107,15 @@ components:
5897
6107
  type: string
5898
6108
  format: date-time
5899
6109
  nullable: true
6110
+ cursorKeySource:
6111
+ type: string
6112
+ nullable: true
6113
+ enum: [workspace_execution_token, platform_env_key]
6114
+ description: >
6115
+ Which Cursor execution key was used for this run.
6116
+ `workspace_execution_token`: workspace provided its own execution key.
6117
+ `platform_env_key`: ThinkAI platform key was used (opt-in required; additional cost applies).
6118
+ `null`: run did not reach the Cursor agent stage.
5900
6119
 
5901
6120
  ReadinessCriteriaSummaryDto:
5902
6121
  type: object
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.8.6",
3
+ "version": "2.9.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -657,6 +657,23 @@ export interface paths {
657
657
  patch?: never;
658
658
  trace?: never;
659
659
  };
660
+ "/workspaces/{workspaceId}/integrations/ai-tool/{provider}/spend-daily": {
661
+ parameters: {
662
+ query?: never;
663
+ header?: never;
664
+ path?: never;
665
+ cookie?: never;
666
+ };
667
+ /** List AI-tool daily spend (historic Cursor filtered-usage rollup) */
668
+ get: operations["getWorkspaceAiToolSpendDaily"];
669
+ put?: never;
670
+ post?: never;
671
+ delete?: never;
672
+ options?: never;
673
+ head?: never;
674
+ patch?: never;
675
+ trace?: never;
676
+ };
660
677
  "/workspaces/{workspaceId}/integrations/ai-tool/{provider}/status": {
661
678
  parameters: {
662
679
  query?: never;
@@ -1239,6 +1256,46 @@ export interface paths {
1239
1256
  patch?: never;
1240
1257
  trace?: never;
1241
1258
  };
1259
+ "/workspaces/{workspaceId}/cursor/platform-key-consent": {
1260
+ parameters: {
1261
+ query?: never;
1262
+ header?: never;
1263
+ path?: never;
1264
+ cookie?: never;
1265
+ };
1266
+ get?: never;
1267
+ /**
1268
+ * Enable or disable ThinkAI platform Cursor key opt-in
1269
+ * @description Explicitly enable or disable use of ThinkAI's platform Cursor execution key for readiness scans. When enabled and the workspace has no `executionToken` configured, the platform key is used and tracked for billing. Requires workspace editor or admin role.
1270
+ */
1271
+ put: operations["putCursorPlatformKeyConsent"];
1272
+ post?: never;
1273
+ delete?: never;
1274
+ options?: never;
1275
+ head?: never;
1276
+ patch?: never;
1277
+ trace?: never;
1278
+ };
1279
+ "/workspaces/{workspaceId}/readiness/cursor-key-usage": {
1280
+ parameters: {
1281
+ query?: never;
1282
+ header?: never;
1283
+ path?: never;
1284
+ cookie?: never;
1285
+ };
1286
+ /**
1287
+ * Get Cursor key usage stats for this workspace
1288
+ * @description Returns per-workspace counts of readiness runs that used the ThinkAI platform Cursor key vs. the workspace's own execution key. Member-level access.
1289
+ */
1290
+ get: operations["getCursorKeyUsage"];
1291
+ put?: never;
1292
+ post?: never;
1293
+ delete?: never;
1294
+ options?: never;
1295
+ head?: never;
1296
+ patch?: never;
1297
+ trace?: never;
1298
+ };
1242
1299
  "/workspaces/{workspaceId}/squad": {
1243
1300
  parameters: {
1244
1301
  query?: never;
@@ -1653,12 +1710,14 @@ export interface components {
1653
1710
  } & {
1654
1711
  [key: string]: unknown;
1655
1712
  };
1656
- /** @description Cursor (AI Tools) source entry for `PUT /workspaces/{workspaceId}/sources` and `POST /workspaces/{workspaceId}/sources/test`. The `token` field carries a literal Cursor API key on writes; reads from `GET /workspaces/{workspaceId}/config` redact it to `***`. Runtime calls use the Cursor Admin API at `https://api.cursor.com` (HTTP Basic); do not rely on `baseUrl`. */
1713
+ /** @description Cursor source entry for `PUT /workspaces/{workspaceId}/sources` and `POST /workspaces/{workspaceId}/sources/test`. Two distinct keys: Admin API key (`token`) for insights sync; Execution key (`executionToken`) for readiness scanner and Agent CLI. On writes both fields accept literal key values; reads from `GET /workspaces/{workspaceId}/config` return a `CursorSourceConfigDto` shape (`hasToken` / `hasExecutionToken` booleans) raw values are never returned. */
1657
1714
  CursorSourceDto: {
1658
1715
  /** @enum {string} */
1659
1716
  type: "cursor";
1660
- /** @description Cursor API key (literal). Whitespace and `env:` prefix are rejected. */
1717
+ /** @description Cursor Admin API key (literal). Used for seats/spend/usage insights sync only. Whitespace and `env:` prefix are rejected. */
1661
1718
  token: string;
1719
+ /** @description Cursor execution key (literal). Used for the readiness scanner and Agent CLI. This is a Cursor user API key or service account key — NOT the Admin API key. Omit if using the ThinkAI platform key (requires `cursorPlatformKeyEnabled` on the workspace). Whitespace and `env:` prefix are rejected. */
1720
+ executionToken?: string;
1662
1721
  /**
1663
1722
  * @deprecated
1664
1723
  * @description Deprecated. Historically suggested an API base URL; the server ignores this field and always uses the Cursor Admin API host. Kept so older clients can submit payloads unchanged.
@@ -1666,6 +1725,15 @@ export interface components {
1666
1725
  */
1667
1726
  baseUrl: string;
1668
1727
  };
1728
+ /** @description Redacted Cursor source returned by `GET /workspaces/{workspaceId}/config`. `hasToken` and `hasExecutionToken` indicate which keys are stored. Raw values are never returned. */
1729
+ CursorSourceConfigDto: {
1730
+ /** @enum {string} */
1731
+ type: "cursor";
1732
+ /** @description Whether the Admin API key (`token`) is stored for this workspace. */
1733
+ hasToken: boolean;
1734
+ /** @description Whether the execution key is stored. If false and `cursorPlatformKeyEnabled` is true in `WorkspaceConfigDto`, the platform key will be used for readiness runs (additional cost applies). */
1735
+ hasExecutionToken: boolean;
1736
+ };
1669
1737
  /** @description Claude (Anthropic) source entry for `PUT /workspaces/{workspaceId}/sources` and `POST /workspaces/{workspaceId}/sources/test`. The `token` field carries a literal Organization Admin API key on writes (`sk-ant-admin...`); reads from `GET /workspaces/{workspaceId}/config` redact it to `***`. Runtime calls use the Anthropic Admin API at `https://api.anthropic.com`. Provision keys in Claude Console → Organization settings (admin role required). */
1670
1738
  ClaudeSourceDto: {
1671
1739
  /** @enum {string} */
@@ -1678,10 +1746,24 @@ export interface components {
1678
1746
  orgChart?: components["schemas"]["ScoringOrgChartDto"] | null;
1679
1747
  /** @enum {string|null} */
1680
1748
  region?: "us" | "eu" | "me" | null;
1749
+ /** @description When true, readiness runs may use the ThinkAI platform Cursor key if this workspace has no `executionToken` configured. Additional cost applies. Requires explicit opt-in via `PUT /workspaces/{workspaceId}/cursor/platform-key-consent`. */
1750
+ cursorPlatformKeyEnabled?: boolean;
1681
1751
  };
1682
1752
  TestConnectionResponseDto: {
1683
1753
  success: boolean;
1684
1754
  error?: string;
1755
+ /** @description Present when `executionToken` was included in the test request. `true` = key passed save-time validation (format + not-admin-key check). `false` = key failed validation (see `executionKeyError` for detail). `null` = `executionToken` was not provided. */
1756
+ executionKeyValid?: boolean | null;
1757
+ /** @description Error detail when `executionKeyValid` is false. */
1758
+ executionKeyError?: string | null;
1759
+ };
1760
+ CursorKeyUsageDto: {
1761
+ /** @description Readiness runs this calendar month that used the ThinkAI platform Cursor key. */
1762
+ platformKeyRunsThisMonth: number;
1763
+ /** @description All-time readiness runs that used the ThinkAI platform Cursor key. */
1764
+ platformKeyRunsTotal: number;
1765
+ /** @description All-time readiness runs that used the workspace's own execution key. */
1766
+ workspaceKeyRunsTotal: number;
1685
1767
  };
1686
1768
  AiToolSeatDto: {
1687
1769
  externalId: string;
@@ -1715,6 +1797,18 @@ export interface components {
1715
1797
  [key: string]: unknown;
1716
1798
  };
1717
1799
  };
1800
+ AiToolSpendDailyRowDto: {
1801
+ /** Format: date */
1802
+ day: string;
1803
+ externalId: string;
1804
+ email?: string | null;
1805
+ /** Format: int64 */
1806
+ spendCents: number;
1807
+ eventCount: number;
1808
+ payload?: {
1809
+ [key: string]: unknown;
1810
+ };
1811
+ };
1718
1812
  AiToolRefreshStatusDto: {
1719
1813
  /** Format: date-time */
1720
1814
  lastAttemptAt: string;
@@ -1727,6 +1821,8 @@ export interface components {
1727
1821
  counts: {
1728
1822
  [key: string]: unknown;
1729
1823
  };
1824
+ /** @description True while a workspace/provider refresh holds the Postgres advisory lock. */
1825
+ refreshInProgress?: boolean;
1730
1826
  };
1731
1827
  AiToolRefreshResponseDto: {
1732
1828
  ok: boolean;
@@ -2449,6 +2545,11 @@ export interface components {
2449
2545
  createdAt: string;
2450
2546
  /** Format: date-time */
2451
2547
  finishedAt: string | null;
2548
+ /**
2549
+ * @description Which Cursor execution key was used for this run. `workspace_execution_token`: workspace provided its own execution key. `platform_env_key`: ThinkAI platform key was used (opt-in required; additional cost applies). `null`: run did not reach the Cursor agent stage.
2550
+ * @enum {string|null}
2551
+ */
2552
+ cursorKeySource?: "workspace_execution_token" | "platform_env_key" | null;
2452
2553
  };
2453
2554
  ReadinessCriteriaSummaryDto: {
2454
2555
  total: number;
@@ -3038,12 +3139,15 @@ export type OrgChartImportResultDto = components['schemas']['OrgChartImportResul
3038
3139
  export type OrgChartSaveResultDto = components['schemas']['OrgChartSaveResultDto'];
3039
3140
  export type TenantSourceEntryDto = components['schemas']['TenantSourceEntryDto'];
3040
3141
  export type CursorSourceDto = components['schemas']['CursorSourceDto'];
3142
+ export type CursorSourceConfigDto = components['schemas']['CursorSourceConfigDto'];
3041
3143
  export type ClaudeSourceDto = components['schemas']['ClaudeSourceDto'];
3042
3144
  export type WorkspaceConfigDto = components['schemas']['WorkspaceConfigDto'];
3043
3145
  export type TestConnectionResponseDto = components['schemas']['TestConnectionResponseDto'];
3146
+ export type CursorKeyUsageDto = components['schemas']['CursorKeyUsageDto'];
3044
3147
  export type AiToolSeatDto = components['schemas']['AiToolSeatDto'];
3045
3148
  export type AiToolDailyUsageRowDto = components['schemas']['AiToolDailyUsageRowDto'];
3046
3149
  export type AiToolSpendRowDto = components['schemas']['AiToolSpendRowDto'];
3150
+ export type AiToolSpendDailyRowDto = components['schemas']['AiToolSpendDailyRowDto'];
3047
3151
  export type AiToolRefreshStatusDto = components['schemas']['AiToolRefreshStatusDto'];
3048
3152
  export type AiToolRefreshResponseDto = components['schemas']['AiToolRefreshResponseDto'];
3049
3153
  export type DashboardProductivityMetricsDto = components['schemas']['DashboardProductivityMetricsDto'];
@@ -4919,6 +5023,37 @@ export interface operations {
4919
5023
  403: components["responses"]["Forbidden"];
4920
5024
  };
4921
5025
  };
5026
+ getWorkspaceAiToolSpendDaily: {
5027
+ parameters: {
5028
+ query?: {
5029
+ from?: string;
5030
+ to?: string;
5031
+ externalId?: string;
5032
+ };
5033
+ header?: never;
5034
+ path: {
5035
+ workspaceId: components["parameters"]["WorkspaceId"];
5036
+ provider: "cursor" | "claude";
5037
+ };
5038
+ cookie?: never;
5039
+ };
5040
+ requestBody?: never;
5041
+ responses: {
5042
+ /** @description Daily spend rows */
5043
+ 200: {
5044
+ headers: {
5045
+ [name: string]: unknown;
5046
+ };
5047
+ content: {
5048
+ "application/json": {
5049
+ rows: components["schemas"]["AiToolSpendDailyRowDto"][];
5050
+ };
5051
+ };
5052
+ };
5053
+ 401: components["responses"]["Unauthorized"];
5054
+ 403: components["responses"]["Forbidden"];
5055
+ };
5056
+ };
4922
5057
  getWorkspaceAiToolRefreshStatus: {
4923
5058
  parameters: {
4924
5059
  query?: never;
@@ -6370,6 +6505,72 @@ export interface operations {
6370
6505
  };
6371
6506
  };
6372
6507
  };
6508
+ putCursorPlatformKeyConsent: {
6509
+ parameters: {
6510
+ query?: never;
6511
+ header?: never;
6512
+ path: {
6513
+ workspaceId: components["parameters"]["WorkspaceId"];
6514
+ };
6515
+ cookie?: never;
6516
+ };
6517
+ requestBody: {
6518
+ content: {
6519
+ "application/json": {
6520
+ /** @description true to opt in to ThinkAI platform Cursor key (additional cost applies); false to opt out. */
6521
+ enabled: boolean;
6522
+ };
6523
+ };
6524
+ };
6525
+ responses: {
6526
+ /** @description Consent updated */
6527
+ 200: {
6528
+ headers: {
6529
+ [name: string]: unknown;
6530
+ };
6531
+ content: {
6532
+ "application/json": {
6533
+ ok: boolean;
6534
+ };
6535
+ };
6536
+ };
6537
+ /** @description Invalid request body */
6538
+ 400: {
6539
+ headers: {
6540
+ [name: string]: unknown;
6541
+ };
6542
+ content: {
6543
+ "application/json": components["schemas"]["ErrorMessageDto"];
6544
+ };
6545
+ };
6546
+ 401: components["responses"]["Unauthorized"];
6547
+ 403: components["responses"]["Forbidden"];
6548
+ };
6549
+ };
6550
+ getCursorKeyUsage: {
6551
+ parameters: {
6552
+ query?: never;
6553
+ header?: never;
6554
+ path: {
6555
+ workspaceId: components["parameters"]["WorkspaceId"];
6556
+ };
6557
+ cookie?: never;
6558
+ };
6559
+ requestBody?: never;
6560
+ responses: {
6561
+ /** @description Cursor key usage stats */
6562
+ 200: {
6563
+ headers: {
6564
+ [name: string]: unknown;
6565
+ };
6566
+ content: {
6567
+ "application/json": components["schemas"]["CursorKeyUsageDto"];
6568
+ };
6569
+ };
6570
+ 401: components["responses"]["Unauthorized"];
6571
+ 403: components["responses"]["Forbidden"];
6572
+ };
6573
+ };
6373
6574
  getSquad: {
6374
6575
  parameters: {
6375
6576
  query?: never;