@thinkai/tai-api-contract 2.8.5 → 2.9.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.
- package/dist/generated/openapi.d.ts +148 -2
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +171 -7
- package/package.json +1 -1
- package/src/generated/openapi.ts +148 -2
|
@@ -1238,6 +1238,46 @@ export interface paths {
|
|
|
1238
1238
|
patch?: never;
|
|
1239
1239
|
trace?: never;
|
|
1240
1240
|
};
|
|
1241
|
+
"/workspaces/{workspaceId}/cursor/platform-key-consent": {
|
|
1242
|
+
parameters: {
|
|
1243
|
+
query?: never;
|
|
1244
|
+
header?: never;
|
|
1245
|
+
path?: never;
|
|
1246
|
+
cookie?: never;
|
|
1247
|
+
};
|
|
1248
|
+
get?: never;
|
|
1249
|
+
/**
|
|
1250
|
+
* Enable or disable ThinkAI platform Cursor key opt-in
|
|
1251
|
+
* @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.
|
|
1252
|
+
*/
|
|
1253
|
+
put: operations["putCursorPlatformKeyConsent"];
|
|
1254
|
+
post?: never;
|
|
1255
|
+
delete?: never;
|
|
1256
|
+
options?: never;
|
|
1257
|
+
head?: never;
|
|
1258
|
+
patch?: never;
|
|
1259
|
+
trace?: never;
|
|
1260
|
+
};
|
|
1261
|
+
"/workspaces/{workspaceId}/readiness/cursor-key-usage": {
|
|
1262
|
+
parameters: {
|
|
1263
|
+
query?: never;
|
|
1264
|
+
header?: never;
|
|
1265
|
+
path?: never;
|
|
1266
|
+
cookie?: never;
|
|
1267
|
+
};
|
|
1268
|
+
/**
|
|
1269
|
+
* Get Cursor key usage stats for this workspace
|
|
1270
|
+
* @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.
|
|
1271
|
+
*/
|
|
1272
|
+
get: operations["getCursorKeyUsage"];
|
|
1273
|
+
put?: never;
|
|
1274
|
+
post?: never;
|
|
1275
|
+
delete?: never;
|
|
1276
|
+
options?: never;
|
|
1277
|
+
head?: never;
|
|
1278
|
+
patch?: never;
|
|
1279
|
+
trace?: never;
|
|
1280
|
+
};
|
|
1241
1281
|
"/workspaces/{workspaceId}/squad": {
|
|
1242
1282
|
parameters: {
|
|
1243
1283
|
query?: never;
|
|
@@ -1652,12 +1692,14 @@ export interface components {
|
|
|
1652
1692
|
} & {
|
|
1653
1693
|
[key: string]: unknown;
|
|
1654
1694
|
};
|
|
1655
|
-
/** @description Cursor
|
|
1695
|
+
/** @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. */
|
|
1656
1696
|
CursorSourceDto: {
|
|
1657
1697
|
/** @enum {string} */
|
|
1658
1698
|
type: "cursor";
|
|
1659
|
-
/** @description Cursor API key (literal). Whitespace and `env:` prefix are rejected. */
|
|
1699
|
+
/** @description Cursor Admin API key (literal). Used for seats/spend/usage insights sync only. Whitespace and `env:` prefix are rejected. */
|
|
1660
1700
|
token: string;
|
|
1701
|
+
/** @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. */
|
|
1702
|
+
executionToken?: string;
|
|
1661
1703
|
/**
|
|
1662
1704
|
* @deprecated
|
|
1663
1705
|
* @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.
|
|
@@ -1665,6 +1707,15 @@ export interface components {
|
|
|
1665
1707
|
*/
|
|
1666
1708
|
baseUrl: string;
|
|
1667
1709
|
};
|
|
1710
|
+
/** @description Redacted Cursor source returned by `GET /workspaces/{workspaceId}/config`. `hasToken` and `hasExecutionToken` indicate which keys are stored. Raw values are never returned. */
|
|
1711
|
+
CursorSourceConfigDto: {
|
|
1712
|
+
/** @enum {string} */
|
|
1713
|
+
type: "cursor";
|
|
1714
|
+
/** @description Whether the Admin API key (`token`) is stored for this workspace. */
|
|
1715
|
+
hasToken: boolean;
|
|
1716
|
+
/** @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). */
|
|
1717
|
+
hasExecutionToken: boolean;
|
|
1718
|
+
};
|
|
1668
1719
|
/** @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). */
|
|
1669
1720
|
ClaudeSourceDto: {
|
|
1670
1721
|
/** @enum {string} */
|
|
@@ -1677,10 +1728,24 @@ export interface components {
|
|
|
1677
1728
|
orgChart?: components["schemas"]["ScoringOrgChartDto"] | null;
|
|
1678
1729
|
/** @enum {string|null} */
|
|
1679
1730
|
region?: "us" | "eu" | "me" | null;
|
|
1731
|
+
/** @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`. */
|
|
1732
|
+
cursorPlatformKeyEnabled?: boolean;
|
|
1680
1733
|
};
|
|
1681
1734
|
TestConnectionResponseDto: {
|
|
1682
1735
|
success: boolean;
|
|
1683
1736
|
error?: string;
|
|
1737
|
+
/** @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. */
|
|
1738
|
+
executionKeyValid?: boolean | null;
|
|
1739
|
+
/** @description Error detail when `executionKeyValid` is false. */
|
|
1740
|
+
executionKeyError?: string | null;
|
|
1741
|
+
};
|
|
1742
|
+
CursorKeyUsageDto: {
|
|
1743
|
+
/** @description Readiness runs this calendar month that used the ThinkAI platform Cursor key. */
|
|
1744
|
+
platformKeyRunsThisMonth: number;
|
|
1745
|
+
/** @description All-time readiness runs that used the ThinkAI platform Cursor key. */
|
|
1746
|
+
platformKeyRunsTotal: number;
|
|
1747
|
+
/** @description All-time readiness runs that used the workspace's own execution key. */
|
|
1748
|
+
workspaceKeyRunsTotal: number;
|
|
1684
1749
|
};
|
|
1685
1750
|
AiToolSeatDto: {
|
|
1686
1751
|
externalId: string;
|
|
@@ -2448,6 +2513,11 @@ export interface components {
|
|
|
2448
2513
|
createdAt: string;
|
|
2449
2514
|
/** Format: date-time */
|
|
2450
2515
|
finishedAt: string | null;
|
|
2516
|
+
/**
|
|
2517
|
+
* @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.
|
|
2518
|
+
* @enum {string|null}
|
|
2519
|
+
*/
|
|
2520
|
+
cursorKeySource?: "workspace_execution_token" | "platform_env_key" | null;
|
|
2451
2521
|
};
|
|
2452
2522
|
ReadinessCriteriaSummaryDto: {
|
|
2453
2523
|
total: number;
|
|
@@ -2504,10 +2574,17 @@ export interface components {
|
|
|
2504
2574
|
/** @description Pass as `cursor` query param to fetch the next page; null when no more rows. */
|
|
2505
2575
|
nextCursor: string | null;
|
|
2506
2576
|
};
|
|
2577
|
+
ReadinessScoreHistoryDimensionScoreDto: {
|
|
2578
|
+
dimensionId: components["schemas"]["ReadinessDimensionId"];
|
|
2579
|
+
/** @description Dimension score as a percentage (0–100) for this scan run. */
|
|
2580
|
+
scorePercent: number;
|
|
2581
|
+
};
|
|
2507
2582
|
ReadinessScoreHistoryPointDto: {
|
|
2508
2583
|
/** Format: date-time */
|
|
2509
2584
|
finishedAt: string;
|
|
2510
2585
|
overallScore: number;
|
|
2586
|
+
/** @description Per-dimension percentages captured on this scan run. */
|
|
2587
|
+
dimensionScores?: components["schemas"]["ReadinessScoreHistoryDimensionScoreDto"][];
|
|
2511
2588
|
};
|
|
2512
2589
|
ReadinessRepoScoreHistoryDto: {
|
|
2513
2590
|
/** Format: uuid */
|
|
@@ -3030,9 +3107,11 @@ export type OrgChartImportResultDto = components['schemas']['OrgChartImportResul
|
|
|
3030
3107
|
export type OrgChartSaveResultDto = components['schemas']['OrgChartSaveResultDto'];
|
|
3031
3108
|
export type TenantSourceEntryDto = components['schemas']['TenantSourceEntryDto'];
|
|
3032
3109
|
export type CursorSourceDto = components['schemas']['CursorSourceDto'];
|
|
3110
|
+
export type CursorSourceConfigDto = components['schemas']['CursorSourceConfigDto'];
|
|
3033
3111
|
export type ClaudeSourceDto = components['schemas']['ClaudeSourceDto'];
|
|
3034
3112
|
export type WorkspaceConfigDto = components['schemas']['WorkspaceConfigDto'];
|
|
3035
3113
|
export type TestConnectionResponseDto = components['schemas']['TestConnectionResponseDto'];
|
|
3114
|
+
export type CursorKeyUsageDto = components['schemas']['CursorKeyUsageDto'];
|
|
3036
3115
|
export type AiToolSeatDto = components['schemas']['AiToolSeatDto'];
|
|
3037
3116
|
export type AiToolDailyUsageRowDto = components['schemas']['AiToolDailyUsageRowDto'];
|
|
3038
3117
|
export type AiToolSpendRowDto = components['schemas']['AiToolSpendRowDto'];
|
|
@@ -3117,6 +3196,7 @@ export type ReadinessIssueDto = components['schemas']['ReadinessIssueDto'];
|
|
|
3117
3196
|
export type DimensionScoreDto = components['schemas']['DimensionScoreDto'];
|
|
3118
3197
|
export type ReadinessRepoRunHistoryItemDto = components['schemas']['ReadinessRepoRunHistoryItemDto'];
|
|
3119
3198
|
export type ReadinessRepoRunListDto = components['schemas']['ReadinessRepoRunListDto'];
|
|
3199
|
+
export type ReadinessScoreHistoryDimensionScoreDto = components['schemas']['ReadinessScoreHistoryDimensionScoreDto'];
|
|
3120
3200
|
export type ReadinessScoreHistoryPointDto = components['schemas']['ReadinessScoreHistoryPointDto'];
|
|
3121
3201
|
export type ReadinessRepoScoreHistoryDto = components['schemas']['ReadinessRepoScoreHistoryDto'];
|
|
3122
3202
|
export type WorkspaceReadinessScoreHistoryDto = components['schemas']['WorkspaceReadinessScoreHistoryDto'];
|
|
@@ -6361,6 +6441,72 @@ export interface operations {
|
|
|
6361
6441
|
};
|
|
6362
6442
|
};
|
|
6363
6443
|
};
|
|
6444
|
+
putCursorPlatformKeyConsent: {
|
|
6445
|
+
parameters: {
|
|
6446
|
+
query?: never;
|
|
6447
|
+
header?: never;
|
|
6448
|
+
path: {
|
|
6449
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
6450
|
+
};
|
|
6451
|
+
cookie?: never;
|
|
6452
|
+
};
|
|
6453
|
+
requestBody: {
|
|
6454
|
+
content: {
|
|
6455
|
+
"application/json": {
|
|
6456
|
+
/** @description true to opt in to ThinkAI platform Cursor key (additional cost applies); false to opt out. */
|
|
6457
|
+
enabled: boolean;
|
|
6458
|
+
};
|
|
6459
|
+
};
|
|
6460
|
+
};
|
|
6461
|
+
responses: {
|
|
6462
|
+
/** @description Consent updated */
|
|
6463
|
+
200: {
|
|
6464
|
+
headers: {
|
|
6465
|
+
[name: string]: unknown;
|
|
6466
|
+
};
|
|
6467
|
+
content: {
|
|
6468
|
+
"application/json": {
|
|
6469
|
+
ok: boolean;
|
|
6470
|
+
};
|
|
6471
|
+
};
|
|
6472
|
+
};
|
|
6473
|
+
/** @description Invalid request body */
|
|
6474
|
+
400: {
|
|
6475
|
+
headers: {
|
|
6476
|
+
[name: string]: unknown;
|
|
6477
|
+
};
|
|
6478
|
+
content: {
|
|
6479
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
6480
|
+
};
|
|
6481
|
+
};
|
|
6482
|
+
401: components["responses"]["Unauthorized"];
|
|
6483
|
+
403: components["responses"]["Forbidden"];
|
|
6484
|
+
};
|
|
6485
|
+
};
|
|
6486
|
+
getCursorKeyUsage: {
|
|
6487
|
+
parameters: {
|
|
6488
|
+
query?: never;
|
|
6489
|
+
header?: never;
|
|
6490
|
+
path: {
|
|
6491
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
6492
|
+
};
|
|
6493
|
+
cookie?: never;
|
|
6494
|
+
};
|
|
6495
|
+
requestBody?: never;
|
|
6496
|
+
responses: {
|
|
6497
|
+
/** @description Cursor key usage stats */
|
|
6498
|
+
200: {
|
|
6499
|
+
headers: {
|
|
6500
|
+
[name: string]: unknown;
|
|
6501
|
+
};
|
|
6502
|
+
content: {
|
|
6503
|
+
"application/json": components["schemas"]["CursorKeyUsageDto"];
|
|
6504
|
+
};
|
|
6505
|
+
};
|
|
6506
|
+
401: components["responses"]["Unauthorized"];
|
|
6507
|
+
403: components["responses"]["Forbidden"];
|
|
6508
|
+
};
|
|
6509
|
+
};
|
|
6364
6510
|
getSquad: {
|
|
6365
6511
|
parameters: {
|
|
6366
6512
|
query?: never;
|