@thinkai/tai-api-contract 2.7.3 → 2.8.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 +184 -0
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +195 -0
- package/package.json +1 -1
- package/src/generated/openapi.ts +184 -0
package/openapi/openapi.yaml
CHANGED
|
@@ -2348,6 +2348,109 @@ paths:
|
|
|
2348
2348
|
schema:
|
|
2349
2349
|
$ref: "#/components/schemas/ErrorMessageDto"
|
|
2350
2350
|
|
|
2351
|
+
/workspaces/{workspaceId}/readiness/repos/{repoId}/runs:
|
|
2352
|
+
get:
|
|
2353
|
+
tags: [RepositoryReadiness]
|
|
2354
|
+
summary: Paginated readiness run history for one repository
|
|
2355
|
+
description: >
|
|
2356
|
+
Append-only scan history for charts on repo detail. Ordered by scan finish time
|
|
2357
|
+
(or `createdAt` when still in progress). Use `cursor` from the previous response for
|
|
2358
|
+
the next page. Failed and `partial_failed` runs are included with nullable `overallScore`.
|
|
2359
|
+
operationId: listReadinessRepoRuns
|
|
2360
|
+
parameters:
|
|
2361
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
2362
|
+
- $ref: "#/components/parameters/RepoId"
|
|
2363
|
+
- name: limit
|
|
2364
|
+
in: query
|
|
2365
|
+
schema:
|
|
2366
|
+
type: integer
|
|
2367
|
+
minimum: 1
|
|
2368
|
+
maximum: 100
|
|
2369
|
+
default: 25
|
|
2370
|
+
- name: order
|
|
2371
|
+
in: query
|
|
2372
|
+
schema:
|
|
2373
|
+
type: string
|
|
2374
|
+
enum: [asc, desc]
|
|
2375
|
+
default: desc
|
|
2376
|
+
- name: cursor
|
|
2377
|
+
in: query
|
|
2378
|
+
description: Opaque cursor from a prior response `nextCursor` field.
|
|
2379
|
+
schema:
|
|
2380
|
+
type: string
|
|
2381
|
+
responses:
|
|
2382
|
+
"200":
|
|
2383
|
+
description: Run history page
|
|
2384
|
+
content:
|
|
2385
|
+
application/json:
|
|
2386
|
+
schema:
|
|
2387
|
+
$ref: "#/components/schemas/ReadinessRepoRunListDto"
|
|
2388
|
+
"400":
|
|
2389
|
+
description: Invalid pagination query
|
|
2390
|
+
content:
|
|
2391
|
+
application/json:
|
|
2392
|
+
schema:
|
|
2393
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
2394
|
+
"401":
|
|
2395
|
+
$ref: "#/components/responses/Unauthorized"
|
|
2396
|
+
"403":
|
|
2397
|
+
$ref: "#/components/responses/Forbidden"
|
|
2398
|
+
"404":
|
|
2399
|
+
description: Workspace or repository not found
|
|
2400
|
+
content:
|
|
2401
|
+
application/json:
|
|
2402
|
+
schema:
|
|
2403
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
2404
|
+
|
|
2405
|
+
/workspaces/{workspaceId}/readiness/score-history:
|
|
2406
|
+
get:
|
|
2407
|
+
tags: [RepositoryReadiness]
|
|
2408
|
+
summary: Workspace score time-series for all repositories
|
|
2409
|
+
description: >
|
|
2410
|
+
Returns succeeded runs with stored `overallScore` per repo in one call (avoids N+1).
|
|
2411
|
+
Points are ordered ascending by `finishedAt` within each repo. Omit failed and
|
|
2412
|
+
`partial_failed` runs. Use `since` to bound the window; `limitPerRepo` caps points per repo
|
|
2413
|
+
(most recent first, then returned oldest-to-newest within the cap).
|
|
2414
|
+
operationId: getReadinessScoreHistory
|
|
2415
|
+
parameters:
|
|
2416
|
+
- $ref: "#/components/parameters/WorkspaceId"
|
|
2417
|
+
- name: since
|
|
2418
|
+
in: query
|
|
2419
|
+
description: ISO-8601 lower bound on `finishedAt` (inclusive).
|
|
2420
|
+
schema:
|
|
2421
|
+
type: string
|
|
2422
|
+
format: date-time
|
|
2423
|
+
- name: limitPerRepo
|
|
2424
|
+
in: query
|
|
2425
|
+
schema:
|
|
2426
|
+
type: integer
|
|
2427
|
+
minimum: 1
|
|
2428
|
+
maximum: 200
|
|
2429
|
+
default: 50
|
|
2430
|
+
responses:
|
|
2431
|
+
"200":
|
|
2432
|
+
description: Score history grouped by repository
|
|
2433
|
+
content:
|
|
2434
|
+
application/json:
|
|
2435
|
+
schema:
|
|
2436
|
+
$ref: "#/components/schemas/WorkspaceReadinessScoreHistoryDto"
|
|
2437
|
+
"400":
|
|
2438
|
+
description: Invalid query
|
|
2439
|
+
content:
|
|
2440
|
+
application/json:
|
|
2441
|
+
schema:
|
|
2442
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
2443
|
+
"401":
|
|
2444
|
+
$ref: "#/components/responses/Unauthorized"
|
|
2445
|
+
"403":
|
|
2446
|
+
$ref: "#/components/responses/Forbidden"
|
|
2447
|
+
"404":
|
|
2448
|
+
description: Workspace does not exist
|
|
2449
|
+
content:
|
|
2450
|
+
application/json:
|
|
2451
|
+
schema:
|
|
2452
|
+
$ref: "#/components/schemas/ErrorMessageDto"
|
|
2453
|
+
|
|
2351
2454
|
/workspaces/{workspaceId}/agentic-foundation/dashboard:
|
|
2352
2455
|
get:
|
|
2353
2456
|
tags: [AgenticFoundation]
|
|
@@ -2439,6 +2542,7 @@ paths:
|
|
|
2439
2542
|
maxScore: 3
|
|
2440
2543
|
issues: []
|
|
2441
2544
|
lastAnalyzed: "2026-05-12T12:00:00.000Z"
|
|
2545
|
+
connectedAt: "2026-05-01T10:00:00.000Z"
|
|
2442
2546
|
teamId: null
|
|
2443
2547
|
provider:
|
|
2444
2548
|
kind: github
|
|
@@ -5658,6 +5762,92 @@ components:
|
|
|
5658
5762
|
items:
|
|
5659
5763
|
$ref: "#/components/schemas/ReadinessIssueDto"
|
|
5660
5764
|
|
|
5765
|
+
ReadinessRepoRunHistoryItemDto:
|
|
5766
|
+
type: object
|
|
5767
|
+
required: [runId, status, overallScore, createdAt, finishedAt]
|
|
5768
|
+
properties:
|
|
5769
|
+
runId:
|
|
5770
|
+
type: string
|
|
5771
|
+
format: uuid
|
|
5772
|
+
status:
|
|
5773
|
+
$ref: "#/components/schemas/ReadinessRunStatusDto"
|
|
5774
|
+
overallScore:
|
|
5775
|
+
type: integer
|
|
5776
|
+
minimum: 0
|
|
5777
|
+
maximum: 100
|
|
5778
|
+
nullable: true
|
|
5779
|
+
description: Present for succeeded runs after migration 050; null otherwise.
|
|
5780
|
+
createdAt:
|
|
5781
|
+
type: string
|
|
5782
|
+
format: date-time
|
|
5783
|
+
finishedAt:
|
|
5784
|
+
type: string
|
|
5785
|
+
format: date-time
|
|
5786
|
+
nullable: true
|
|
5787
|
+
|
|
5788
|
+
ReadinessRepoRunListDto:
|
|
5789
|
+
type: object
|
|
5790
|
+
required: [items, limit, nextCursor]
|
|
5791
|
+
properties:
|
|
5792
|
+
items:
|
|
5793
|
+
type: array
|
|
5794
|
+
items:
|
|
5795
|
+
$ref: "#/components/schemas/ReadinessRepoRunHistoryItemDto"
|
|
5796
|
+
limit:
|
|
5797
|
+
type: integer
|
|
5798
|
+
minimum: 1
|
|
5799
|
+
maximum: 100
|
|
5800
|
+
nextCursor:
|
|
5801
|
+
type: string
|
|
5802
|
+
nullable: true
|
|
5803
|
+
description: Pass as `cursor` query param to fetch the next page; null when no more rows.
|
|
5804
|
+
|
|
5805
|
+
ReadinessScoreHistoryPointDto:
|
|
5806
|
+
type: object
|
|
5807
|
+
required: [finishedAt, overallScore]
|
|
5808
|
+
properties:
|
|
5809
|
+
finishedAt:
|
|
5810
|
+
type: string
|
|
5811
|
+
format: date-time
|
|
5812
|
+
overallScore:
|
|
5813
|
+
type: integer
|
|
5814
|
+
minimum: 0
|
|
5815
|
+
maximum: 100
|
|
5816
|
+
|
|
5817
|
+
ReadinessRepoScoreHistoryDto:
|
|
5818
|
+
type: object
|
|
5819
|
+
required: [repoId, repoName, connectedAt, points]
|
|
5820
|
+
properties:
|
|
5821
|
+
repoId:
|
|
5822
|
+
type: string
|
|
5823
|
+
format: uuid
|
|
5824
|
+
repoName:
|
|
5825
|
+
type: string
|
|
5826
|
+
maxLength: 256
|
|
5827
|
+
connectedAt:
|
|
5828
|
+
type: string
|
|
5829
|
+
format: date-time
|
|
5830
|
+
description: When the repository was first materialized in the workspace (GitHub connect).
|
|
5831
|
+
points:
|
|
5832
|
+
type: array
|
|
5833
|
+
items:
|
|
5834
|
+
$ref: "#/components/schemas/ReadinessScoreHistoryPointDto"
|
|
5835
|
+
|
|
5836
|
+
WorkspaceReadinessScoreHistoryDto:
|
|
5837
|
+
type: object
|
|
5838
|
+
required: [workspaceId, generatedAt, repos]
|
|
5839
|
+
properties:
|
|
5840
|
+
workspaceId:
|
|
5841
|
+
type: string
|
|
5842
|
+
format: uuid
|
|
5843
|
+
generatedAt:
|
|
5844
|
+
type: string
|
|
5845
|
+
format: date-time
|
|
5846
|
+
repos:
|
|
5847
|
+
type: array
|
|
5848
|
+
items:
|
|
5849
|
+
$ref: "#/components/schemas/ReadinessRepoScoreHistoryDto"
|
|
5850
|
+
|
|
5661
5851
|
RepoReadinessScoreDto:
|
|
5662
5852
|
type: object
|
|
5663
5853
|
required:
|
|
@@ -5667,6 +5857,7 @@ components:
|
|
|
5667
5857
|
- overallScore
|
|
5668
5858
|
- dimensions
|
|
5669
5859
|
- lastAnalyzed
|
|
5860
|
+
- connectedAt
|
|
5670
5861
|
- provider
|
|
5671
5862
|
- analysisStatus
|
|
5672
5863
|
properties:
|
|
@@ -5691,6 +5882,10 @@ components:
|
|
|
5691
5882
|
lastAnalyzed:
|
|
5692
5883
|
type: string
|
|
5693
5884
|
format: date-time
|
|
5885
|
+
connectedAt:
|
|
5886
|
+
type: string
|
|
5887
|
+
format: date-time
|
|
5888
|
+
description: First time this repository was materialized in the workspace (GitHub connect).
|
|
5694
5889
|
teamId:
|
|
5695
5890
|
type: string
|
|
5696
5891
|
format: uuid
|
package/package.json
CHANGED
package/src/generated/openapi.ts
CHANGED
|
@@ -915,6 +915,46 @@ export interface paths {
|
|
|
915
915
|
patch?: never;
|
|
916
916
|
trace?: never;
|
|
917
917
|
};
|
|
918
|
+
"/workspaces/{workspaceId}/readiness/repos/{repoId}/runs": {
|
|
919
|
+
parameters: {
|
|
920
|
+
query?: never;
|
|
921
|
+
header?: never;
|
|
922
|
+
path?: never;
|
|
923
|
+
cookie?: never;
|
|
924
|
+
};
|
|
925
|
+
/**
|
|
926
|
+
* Paginated readiness run history for one repository
|
|
927
|
+
* @description Append-only scan history for charts on repo detail. Ordered by scan finish time (or `createdAt` when still in progress). Use `cursor` from the previous response for the next page. Failed and `partial_failed` runs are included with nullable `overallScore`.
|
|
928
|
+
*/
|
|
929
|
+
get: operations["listReadinessRepoRuns"];
|
|
930
|
+
put?: never;
|
|
931
|
+
post?: never;
|
|
932
|
+
delete?: never;
|
|
933
|
+
options?: never;
|
|
934
|
+
head?: never;
|
|
935
|
+
patch?: never;
|
|
936
|
+
trace?: never;
|
|
937
|
+
};
|
|
938
|
+
"/workspaces/{workspaceId}/readiness/score-history": {
|
|
939
|
+
parameters: {
|
|
940
|
+
query?: never;
|
|
941
|
+
header?: never;
|
|
942
|
+
path?: never;
|
|
943
|
+
cookie?: never;
|
|
944
|
+
};
|
|
945
|
+
/**
|
|
946
|
+
* Workspace score time-series for all repositories
|
|
947
|
+
* @description Returns succeeded runs with stored `overallScore` per repo in one call (avoids N+1). Points are ordered ascending by `finishedAt` within each repo. Omit failed and `partial_failed` runs. Use `since` to bound the window; `limitPerRepo` caps points per repo (most recent first, then returned oldest-to-newest within the cap).
|
|
948
|
+
*/
|
|
949
|
+
get: operations["getReadinessScoreHistory"];
|
|
950
|
+
put?: never;
|
|
951
|
+
post?: never;
|
|
952
|
+
delete?: never;
|
|
953
|
+
options?: never;
|
|
954
|
+
head?: never;
|
|
955
|
+
patch?: never;
|
|
956
|
+
trace?: never;
|
|
957
|
+
};
|
|
918
958
|
"/workspaces/{workspaceId}/agentic-foundation/dashboard": {
|
|
919
959
|
parameters: {
|
|
920
960
|
query?: never;
|
|
@@ -2375,6 +2415,46 @@ export interface components {
|
|
|
2375
2415
|
criteriaSummary?: components["schemas"]["ReadinessCriteriaSummaryDto"] | null;
|
|
2376
2416
|
issues: components["schemas"]["ReadinessIssueDto"][];
|
|
2377
2417
|
};
|
|
2418
|
+
ReadinessRepoRunHistoryItemDto: {
|
|
2419
|
+
/** Format: uuid */
|
|
2420
|
+
runId: string;
|
|
2421
|
+
status: components["schemas"]["ReadinessRunStatusDto"];
|
|
2422
|
+
/** @description Present for succeeded runs after migration 050; null otherwise. */
|
|
2423
|
+
overallScore: number | null;
|
|
2424
|
+
/** Format: date-time */
|
|
2425
|
+
createdAt: string;
|
|
2426
|
+
/** Format: date-time */
|
|
2427
|
+
finishedAt: string | null;
|
|
2428
|
+
};
|
|
2429
|
+
ReadinessRepoRunListDto: {
|
|
2430
|
+
items: components["schemas"]["ReadinessRepoRunHistoryItemDto"][];
|
|
2431
|
+
limit: number;
|
|
2432
|
+
/** @description Pass as `cursor` query param to fetch the next page; null when no more rows. */
|
|
2433
|
+
nextCursor: string | null;
|
|
2434
|
+
};
|
|
2435
|
+
ReadinessScoreHistoryPointDto: {
|
|
2436
|
+
/** Format: date-time */
|
|
2437
|
+
finishedAt: string;
|
|
2438
|
+
overallScore: number;
|
|
2439
|
+
};
|
|
2440
|
+
ReadinessRepoScoreHistoryDto: {
|
|
2441
|
+
/** Format: uuid */
|
|
2442
|
+
repoId: string;
|
|
2443
|
+
repoName: string;
|
|
2444
|
+
/**
|
|
2445
|
+
* Format: date-time
|
|
2446
|
+
* @description When the repository was first materialized in the workspace (GitHub connect).
|
|
2447
|
+
*/
|
|
2448
|
+
connectedAt: string;
|
|
2449
|
+
points: components["schemas"]["ReadinessScoreHistoryPointDto"][];
|
|
2450
|
+
};
|
|
2451
|
+
WorkspaceReadinessScoreHistoryDto: {
|
|
2452
|
+
/** Format: uuid */
|
|
2453
|
+
workspaceId: string;
|
|
2454
|
+
/** Format: date-time */
|
|
2455
|
+
generatedAt: string;
|
|
2456
|
+
repos: components["schemas"]["ReadinessRepoScoreHistoryDto"][];
|
|
2457
|
+
};
|
|
2378
2458
|
RepoReadinessScoreDto: {
|
|
2379
2459
|
/** Format: uuid */
|
|
2380
2460
|
repoId: string;
|
|
@@ -2385,6 +2465,11 @@ export interface components {
|
|
|
2385
2465
|
dimensions: components["schemas"]["DimensionScoreDto"][];
|
|
2386
2466
|
/** Format: date-time */
|
|
2387
2467
|
lastAnalyzed: string;
|
|
2468
|
+
/**
|
|
2469
|
+
* Format: date-time
|
|
2470
|
+
* @description First time this repository was materialized in the workspace (GitHub connect).
|
|
2471
|
+
*/
|
|
2472
|
+
connectedAt: string;
|
|
2388
2473
|
/** Format: uuid */
|
|
2389
2474
|
teamId?: string | null;
|
|
2390
2475
|
provider: components["schemas"]["RepoProviderDto"];
|
|
@@ -2921,6 +3006,11 @@ export type ReadinessRunSummaryDto = components['schemas']['ReadinessRunSummaryD
|
|
|
2921
3006
|
export type ReadinessCriteriaSummaryDto = components['schemas']['ReadinessCriteriaSummaryDto'];
|
|
2922
3007
|
export type ReadinessIssueDto = components['schemas']['ReadinessIssueDto'];
|
|
2923
3008
|
export type DimensionScoreDto = components['schemas']['DimensionScoreDto'];
|
|
3009
|
+
export type ReadinessRepoRunHistoryItemDto = components['schemas']['ReadinessRepoRunHistoryItemDto'];
|
|
3010
|
+
export type ReadinessRepoRunListDto = components['schemas']['ReadinessRepoRunListDto'];
|
|
3011
|
+
export type ReadinessScoreHistoryPointDto = components['schemas']['ReadinessScoreHistoryPointDto'];
|
|
3012
|
+
export type ReadinessRepoScoreHistoryDto = components['schemas']['ReadinessRepoScoreHistoryDto'];
|
|
3013
|
+
export type WorkspaceReadinessScoreHistoryDto = components['schemas']['WorkspaceReadinessScoreHistoryDto'];
|
|
2924
3014
|
export type RepoReadinessScoreDto = components['schemas']['RepoReadinessScoreDto'];
|
|
2925
3015
|
export type AgenticFoundationDashboardSummaryDto = components['schemas']['AgenticFoundationDashboardSummaryDto'];
|
|
2926
3016
|
export type PageMetaDto = components['schemas']['PageMetaDto'];
|
|
@@ -5298,6 +5388,100 @@ export interface operations {
|
|
|
5298
5388
|
};
|
|
5299
5389
|
};
|
|
5300
5390
|
};
|
|
5391
|
+
listReadinessRepoRuns: {
|
|
5392
|
+
parameters: {
|
|
5393
|
+
query?: {
|
|
5394
|
+
limit?: number;
|
|
5395
|
+
order?: "asc" | "desc";
|
|
5396
|
+
/** @description Opaque cursor from a prior response `nextCursor` field. */
|
|
5397
|
+
cursor?: string;
|
|
5398
|
+
};
|
|
5399
|
+
header?: never;
|
|
5400
|
+
path: {
|
|
5401
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
5402
|
+
repoId: components["parameters"]["RepoId"];
|
|
5403
|
+
};
|
|
5404
|
+
cookie?: never;
|
|
5405
|
+
};
|
|
5406
|
+
requestBody?: never;
|
|
5407
|
+
responses: {
|
|
5408
|
+
/** @description Run history page */
|
|
5409
|
+
200: {
|
|
5410
|
+
headers: {
|
|
5411
|
+
[name: string]: unknown;
|
|
5412
|
+
};
|
|
5413
|
+
content: {
|
|
5414
|
+
"application/json": components["schemas"]["ReadinessRepoRunListDto"];
|
|
5415
|
+
};
|
|
5416
|
+
};
|
|
5417
|
+
/** @description Invalid pagination query */
|
|
5418
|
+
400: {
|
|
5419
|
+
headers: {
|
|
5420
|
+
[name: string]: unknown;
|
|
5421
|
+
};
|
|
5422
|
+
content: {
|
|
5423
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
5424
|
+
};
|
|
5425
|
+
};
|
|
5426
|
+
401: components["responses"]["Unauthorized"];
|
|
5427
|
+
403: components["responses"]["Forbidden"];
|
|
5428
|
+
/** @description Workspace or repository not found */
|
|
5429
|
+
404: {
|
|
5430
|
+
headers: {
|
|
5431
|
+
[name: string]: unknown;
|
|
5432
|
+
};
|
|
5433
|
+
content: {
|
|
5434
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
5435
|
+
};
|
|
5436
|
+
};
|
|
5437
|
+
};
|
|
5438
|
+
};
|
|
5439
|
+
getReadinessScoreHistory: {
|
|
5440
|
+
parameters: {
|
|
5441
|
+
query?: {
|
|
5442
|
+
/** @description ISO-8601 lower bound on `finishedAt` (inclusive). */
|
|
5443
|
+
since?: string;
|
|
5444
|
+
limitPerRepo?: number;
|
|
5445
|
+
};
|
|
5446
|
+
header?: never;
|
|
5447
|
+
path: {
|
|
5448
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
5449
|
+
};
|
|
5450
|
+
cookie?: never;
|
|
5451
|
+
};
|
|
5452
|
+
requestBody?: never;
|
|
5453
|
+
responses: {
|
|
5454
|
+
/** @description Score history grouped by repository */
|
|
5455
|
+
200: {
|
|
5456
|
+
headers: {
|
|
5457
|
+
[name: string]: unknown;
|
|
5458
|
+
};
|
|
5459
|
+
content: {
|
|
5460
|
+
"application/json": components["schemas"]["WorkspaceReadinessScoreHistoryDto"];
|
|
5461
|
+
};
|
|
5462
|
+
};
|
|
5463
|
+
/** @description Invalid query */
|
|
5464
|
+
400: {
|
|
5465
|
+
headers: {
|
|
5466
|
+
[name: string]: unknown;
|
|
5467
|
+
};
|
|
5468
|
+
content: {
|
|
5469
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
5470
|
+
};
|
|
5471
|
+
};
|
|
5472
|
+
401: components["responses"]["Unauthorized"];
|
|
5473
|
+
403: components["responses"]["Forbidden"];
|
|
5474
|
+
/** @description Workspace does not exist */
|
|
5475
|
+
404: {
|
|
5476
|
+
headers: {
|
|
5477
|
+
[name: string]: unknown;
|
|
5478
|
+
};
|
|
5479
|
+
content: {
|
|
5480
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
5481
|
+
};
|
|
5482
|
+
};
|
|
5483
|
+
};
|
|
5484
|
+
};
|
|
5301
5485
|
getAgenticFoundationDashboard: {
|
|
5302
5486
|
parameters: {
|
|
5303
5487
|
query?: never;
|