@thinkai/tai-api-contract 2.11.0 → 2.12.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 +296 -1
- package/dist/generated/openapi.d.ts.map +1 -1
- package/openapi/openapi.yaml +340 -1
- package/package.json +2 -1
- package/src/generated/openapi.ts +296 -1
package/src/generated/openapi.ts
CHANGED
|
@@ -875,6 +875,26 @@ export interface paths {
|
|
|
875
875
|
patch?: never;
|
|
876
876
|
trace?: never;
|
|
877
877
|
};
|
|
878
|
+
"/workspaces/{workspaceId}/readiness/initialize": {
|
|
879
|
+
parameters: {
|
|
880
|
+
query?: never;
|
|
881
|
+
header?: never;
|
|
882
|
+
path?: never;
|
|
883
|
+
cookie?: never;
|
|
884
|
+
};
|
|
885
|
+
get?: never;
|
|
886
|
+
put?: never;
|
|
887
|
+
/**
|
|
888
|
+
* Trigger initial readiness scans for all workspace repos (idempotent)
|
|
889
|
+
* @description Called automatically when a user first visits the Agentic Foundation dashboard. Enqueues readiness scans for every GitHub repo in the workspace that has not yet been scanned. Idempotent — if any readiness run has ever been queued for this workspace the request is a no-op and returns `already_triggered`. Safe to call on every page load; the backend enforces the once-per-workspace guarantee via the database.
|
|
890
|
+
*/
|
|
891
|
+
post: operations["postReadinessInitialize"];
|
|
892
|
+
delete?: never;
|
|
893
|
+
options?: never;
|
|
894
|
+
head?: never;
|
|
895
|
+
patch?: never;
|
|
896
|
+
trace?: never;
|
|
897
|
+
};
|
|
878
898
|
"/workspaces/{workspaceId}/readiness/analyze": {
|
|
879
899
|
parameters: {
|
|
880
900
|
query?: never;
|
|
@@ -929,7 +949,12 @@ export interface paths {
|
|
|
929
949
|
delete?: never;
|
|
930
950
|
options?: never;
|
|
931
951
|
head?: never;
|
|
932
|
-
|
|
952
|
+
/**
|
|
953
|
+
* Archive (remove) or restore (re-add) a repository
|
|
954
|
+
* @description Set `archived: true` to soft-remove the repo (Inactive). Set `archived: false` to re-add a previously Inactive repo (Active). Re-add reuses the same `repo_id` row so historical scan foreign keys remain intact, and automatically enqueues a fresh readiness scan.
|
|
955
|
+
* Returns `409` with `code: repo_scan_in_progress` if a scan is queued or running when archiving. Returns `409` with `code: repo_already_active` if re-adding a repo that is already Active.
|
|
956
|
+
*/
|
|
957
|
+
patch: operations["patchReadinessRepo"];
|
|
933
958
|
trace?: never;
|
|
934
959
|
};
|
|
935
960
|
"/workspaces/{workspaceId}/readiness/repos/{repoId}/runs": {
|
|
@@ -972,6 +997,26 @@ export interface paths {
|
|
|
972
997
|
patch?: never;
|
|
973
998
|
trace?: never;
|
|
974
999
|
};
|
|
1000
|
+
"/workspaces/{workspaceId}/activity": {
|
|
1001
|
+
parameters: {
|
|
1002
|
+
query?: never;
|
|
1003
|
+
header?: never;
|
|
1004
|
+
path?: never;
|
|
1005
|
+
cookie?: never;
|
|
1006
|
+
};
|
|
1007
|
+
/**
|
|
1008
|
+
* Workspace activity log (paginated)
|
|
1009
|
+
* @description Paginated, chronological feed of workspace-scoped lifecycle events: repository add/remove/re-add and GitHub integration add/remove. Inactive repos remain visible in this log. Filter by `eventType`, `actorUserId`, or date range (`since`/`until`).
|
|
1010
|
+
*/
|
|
1011
|
+
get: operations["listWorkspaceActivity"];
|
|
1012
|
+
put?: never;
|
|
1013
|
+
post?: never;
|
|
1014
|
+
delete?: never;
|
|
1015
|
+
options?: never;
|
|
1016
|
+
head?: never;
|
|
1017
|
+
patch?: never;
|
|
1018
|
+
trace?: never;
|
|
1019
|
+
};
|
|
975
1020
|
"/workspaces/{workspaceId}/readiness/score-history": {
|
|
976
1021
|
parameters: {
|
|
977
1022
|
query?: never;
|
|
@@ -2536,6 +2581,15 @@ export interface components {
|
|
|
2536
2581
|
/** @description GitHub owner/repo slug; compatibility path only */
|
|
2537
2582
|
providerSlug?: string;
|
|
2538
2583
|
} & (unknown | unknown);
|
|
2584
|
+
ReadinessInitializeResponseDto: {
|
|
2585
|
+
/**
|
|
2586
|
+
* @description `triggered` — scans were enqueued for the first time (HTTP 202). `already_triggered` — a previous session already started scans; nothing new enqueued (HTTP 200). `no_repos` — workspace has no GitHub repos connected yet (HTTP 200). `no_integration` — workspace has no GitHub App installation linked yet (HTTP 200).
|
|
2587
|
+
* @enum {string}
|
|
2588
|
+
*/
|
|
2589
|
+
kind: "triggered" | "already_triggered" | "no_repos" | "no_integration";
|
|
2590
|
+
/** @description Number of repos enqueued. Present only when `kind` is `triggered`. */
|
|
2591
|
+
count?: number;
|
|
2592
|
+
};
|
|
2539
2593
|
ReadinessAnalyzeResponseDto: {
|
|
2540
2594
|
/** Format: uuid */
|
|
2541
2595
|
runId: string;
|
|
@@ -3091,6 +3145,79 @@ export interface components {
|
|
|
3091
3145
|
activeUsers: number;
|
|
3092
3146
|
}[];
|
|
3093
3147
|
};
|
|
3148
|
+
PatchRepoArchiveBodyDto: {
|
|
3149
|
+
/** @description `true` to soft-remove (Inactive). `false` to restore a previously Inactive repo (Active), which also enqueues a fresh readiness scan. */
|
|
3150
|
+
archived: boolean;
|
|
3151
|
+
};
|
|
3152
|
+
PatchRepoArchiveResponseDto: {
|
|
3153
|
+
/** Format: uuid */
|
|
3154
|
+
repoId: string;
|
|
3155
|
+
/**
|
|
3156
|
+
* @description Current lifecycle status of the repository after the operation.
|
|
3157
|
+
* @enum {string}
|
|
3158
|
+
*/
|
|
3159
|
+
status: "Active" | "Inactive";
|
|
3160
|
+
/**
|
|
3161
|
+
* Format: uuid
|
|
3162
|
+
* @description ID of the freshly enqueued readiness scan run (only present on re-add).
|
|
3163
|
+
*/
|
|
3164
|
+
runId?: string | null;
|
|
3165
|
+
};
|
|
3166
|
+
/**
|
|
3167
|
+
* @description Type of workspace lifecycle event.
|
|
3168
|
+
* @enum {string}
|
|
3169
|
+
*/
|
|
3170
|
+
ActivityLogEventTypeDto: "repo.added" | "repo.removed" | "repo.readded" | "integration.github.added" | "integration.github.updated" | "integration.github.removed" | "integration.github.permissions_changed" | "integration.github.repo_added" | "integration.github.repo_removed" | "fix.requested" | "fix.generating" | "fix.pr_created" | "fix.merged" | "fix.failed" | "readiness.scan_started" | "readiness.scan_completed" | "readiness.scan_failed" | "readiness.scan_partial" | "config.cursor.added" | "config.cursor.updated" | "config.cursor.removed" | "config.cursor.platform_key_enabled" | "config.cursor.platform_key_disabled" | "config.claude.added" | "config.claude.updated" | "config.claude.removed" | "member.invited" | "member.role_changed" | "member.removed";
|
|
3171
|
+
ActivityLogActorDto: {
|
|
3172
|
+
/** Format: uuid */
|
|
3173
|
+
userId: string;
|
|
3174
|
+
/** Format: email */
|
|
3175
|
+
email?: string | null;
|
|
3176
|
+
name?: string | null;
|
|
3177
|
+
};
|
|
3178
|
+
ActivityLogEntryDto: {
|
|
3179
|
+
/** Format: uuid */
|
|
3180
|
+
id: string;
|
|
3181
|
+
eventType: components["schemas"]["ActivityLogEventTypeDto"];
|
|
3182
|
+
/** @description Namespace prefix derived from event_type (e.g. "fix", "repo", "config"). */
|
|
3183
|
+
eventCategory: string;
|
|
3184
|
+
/** Format: date-time */
|
|
3185
|
+
occurredAt: string;
|
|
3186
|
+
/**
|
|
3187
|
+
* @description Whether the event was triggered by a human user, a batch/system process, or a webhook.
|
|
3188
|
+
* @enum {string}
|
|
3189
|
+
*/
|
|
3190
|
+
actorType: "user" | "system" | "webhook";
|
|
3191
|
+
actor?: components["schemas"]["ActivityLogActorDto"] | null;
|
|
3192
|
+
/** Format: uuid */
|
|
3193
|
+
repoId?: string | null;
|
|
3194
|
+
repoName?: string | null;
|
|
3195
|
+
/** Format: uuid */
|
|
3196
|
+
integrationId?: string | null;
|
|
3197
|
+
integrationType?: string | null;
|
|
3198
|
+
/**
|
|
3199
|
+
* Format: uuid
|
|
3200
|
+
* @description ID of the related fix request (fix.* events).
|
|
3201
|
+
*/
|
|
3202
|
+
fixRequestId?: string | null;
|
|
3203
|
+
/**
|
|
3204
|
+
* Format: uuid
|
|
3205
|
+
* @description ID of the related readiness issue (fix.* events).
|
|
3206
|
+
*/
|
|
3207
|
+
issueId?: string | null;
|
|
3208
|
+
/**
|
|
3209
|
+
* Format: uuid
|
|
3210
|
+
* @description ID of the related readiness run (readiness.* events).
|
|
3211
|
+
*/
|
|
3212
|
+
readinessRunId?: string | null;
|
|
3213
|
+
/** @description Event-specific supplementary data (before/after state, installation IDs, etc.). */
|
|
3214
|
+
metadata?: {
|
|
3215
|
+
[key: string]: unknown;
|
|
3216
|
+
} | null;
|
|
3217
|
+
};
|
|
3218
|
+
ActivityLogPageDto: components["schemas"]["PageMetaDto"] & {
|
|
3219
|
+
items: components["schemas"]["ActivityLogEntryDto"][];
|
|
3220
|
+
};
|
|
3094
3221
|
};
|
|
3095
3222
|
responses: {
|
|
3096
3223
|
/** @description Missing or invalid bearer token */
|
|
@@ -3250,6 +3377,7 @@ export type ReadinessDimensionDto = components['schemas']['ReadinessDimensionDto
|
|
|
3250
3377
|
export type ReadinessDimensionId = components['schemas']['ReadinessDimensionId'];
|
|
3251
3378
|
export type RepoProviderDto = components['schemas']['RepoProviderDto'];
|
|
3252
3379
|
export type ReadinessAnalyzeBodyDto = components['schemas']['ReadinessAnalyzeBodyDto'];
|
|
3380
|
+
export type ReadinessInitializeResponseDto = components['schemas']['ReadinessInitializeResponseDto'];
|
|
3253
3381
|
export type ReadinessAnalyzeResponseDto = components['schemas']['ReadinessAnalyzeResponseDto'];
|
|
3254
3382
|
export type ReadinessRunStatusDto = components['schemas']['ReadinessRunStatusDto'];
|
|
3255
3383
|
export type ReadinessRepoAnalysisStatusDto = components['schemas']['ReadinessRepoAnalysisStatusDto'];
|
|
@@ -3311,6 +3439,12 @@ export type YourAiJourneyReadinessAggregateDto = components['schemas']['YourAiJo
|
|
|
3311
3439
|
export type YourAiJourneyAnalyticsDto = components['schemas']['YourAiJourneyAnalyticsDto'];
|
|
3312
3440
|
export type YourAiJourneyAiSpendWeekDto = components['schemas']['YourAiJourneyAiSpendWeekDto'];
|
|
3313
3441
|
export type YourAiJourneyAiSpendDto = components['schemas']['YourAiJourneyAiSpendDto'];
|
|
3442
|
+
export type PatchRepoArchiveBodyDto = components['schemas']['PatchRepoArchiveBodyDto'];
|
|
3443
|
+
export type PatchRepoArchiveResponseDto = components['schemas']['PatchRepoArchiveResponseDto'];
|
|
3444
|
+
export type ActivityLogEventTypeDto = components['schemas']['ActivityLogEventTypeDto'];
|
|
3445
|
+
export type ActivityLogActorDto = components['schemas']['ActivityLogActorDto'];
|
|
3446
|
+
export type ActivityLogEntryDto = components['schemas']['ActivityLogEntryDto'];
|
|
3447
|
+
export type ActivityLogPageDto = components['schemas']['ActivityLogPageDto'];
|
|
3314
3448
|
export type ResponseUnauthorized = components['responses']['Unauthorized'];
|
|
3315
3449
|
export type ResponseForbidden = components['responses']['Forbidden'];
|
|
3316
3450
|
export type ParameterWorkspaceId = components['parameters']['WorkspaceId'];
|
|
@@ -5507,6 +5641,8 @@ export interface operations {
|
|
|
5507
5641
|
search?: components["parameters"]["ReadinessRepoSearch"];
|
|
5508
5642
|
/** @description Exact language filter (e.g. `typescript`). */
|
|
5509
5643
|
language?: components["parameters"]["ReadinessRepoLanguage"];
|
|
5644
|
+
/** @description When `true`, includes Inactive (user-removed) repos alongside Active ones. Default is `false` (active only). */
|
|
5645
|
+
includeArchived?: boolean;
|
|
5510
5646
|
};
|
|
5511
5647
|
header?: never;
|
|
5512
5648
|
path: {
|
|
@@ -5547,6 +5683,48 @@ export interface operations {
|
|
|
5547
5683
|
};
|
|
5548
5684
|
};
|
|
5549
5685
|
};
|
|
5686
|
+
postReadinessInitialize: {
|
|
5687
|
+
parameters: {
|
|
5688
|
+
query?: never;
|
|
5689
|
+
header?: never;
|
|
5690
|
+
path: {
|
|
5691
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
5692
|
+
};
|
|
5693
|
+
cookie?: never;
|
|
5694
|
+
};
|
|
5695
|
+
requestBody?: never;
|
|
5696
|
+
responses: {
|
|
5697
|
+
/** @description Already triggered in a previous session — no new runs enqueued */
|
|
5698
|
+
200: {
|
|
5699
|
+
headers: {
|
|
5700
|
+
[name: string]: unknown;
|
|
5701
|
+
};
|
|
5702
|
+
content: {
|
|
5703
|
+
"application/json": components["schemas"]["ReadinessInitializeResponseDto"];
|
|
5704
|
+
};
|
|
5705
|
+
};
|
|
5706
|
+
/** @description Scans enqueued for all repos (first-time trigger) */
|
|
5707
|
+
202: {
|
|
5708
|
+
headers: {
|
|
5709
|
+
[name: string]: unknown;
|
|
5710
|
+
};
|
|
5711
|
+
content: {
|
|
5712
|
+
"application/json": components["schemas"]["ReadinessInitializeResponseDto"];
|
|
5713
|
+
};
|
|
5714
|
+
};
|
|
5715
|
+
401: components["responses"]["Unauthorized"];
|
|
5716
|
+
403: components["responses"]["Forbidden"];
|
|
5717
|
+
/** @description Feature not supported by this server build */
|
|
5718
|
+
501: {
|
|
5719
|
+
headers: {
|
|
5720
|
+
[name: string]: unknown;
|
|
5721
|
+
};
|
|
5722
|
+
content: {
|
|
5723
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
5724
|
+
};
|
|
5725
|
+
};
|
|
5726
|
+
};
|
|
5727
|
+
};
|
|
5550
5728
|
postReadinessAnalyze: {
|
|
5551
5729
|
parameters: {
|
|
5552
5730
|
query?: never;
|
|
@@ -5679,6 +5857,62 @@ export interface operations {
|
|
|
5679
5857
|
};
|
|
5680
5858
|
};
|
|
5681
5859
|
};
|
|
5860
|
+
patchReadinessRepo: {
|
|
5861
|
+
parameters: {
|
|
5862
|
+
query?: never;
|
|
5863
|
+
header?: never;
|
|
5864
|
+
path: {
|
|
5865
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
5866
|
+
repoId: components["parameters"]["RepoId"];
|
|
5867
|
+
};
|
|
5868
|
+
cookie?: never;
|
|
5869
|
+
};
|
|
5870
|
+
requestBody: {
|
|
5871
|
+
content: {
|
|
5872
|
+
"application/json": components["schemas"]["PatchRepoArchiveBodyDto"];
|
|
5873
|
+
};
|
|
5874
|
+
};
|
|
5875
|
+
responses: {
|
|
5876
|
+
/** @description Repo status updated */
|
|
5877
|
+
200: {
|
|
5878
|
+
headers: {
|
|
5879
|
+
[name: string]: unknown;
|
|
5880
|
+
};
|
|
5881
|
+
content: {
|
|
5882
|
+
"application/json": components["schemas"]["PatchRepoArchiveResponseDto"];
|
|
5883
|
+
};
|
|
5884
|
+
};
|
|
5885
|
+
/** @description Malformed request body or repoId */
|
|
5886
|
+
400: {
|
|
5887
|
+
headers: {
|
|
5888
|
+
[name: string]: unknown;
|
|
5889
|
+
};
|
|
5890
|
+
content: {
|
|
5891
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
5892
|
+
};
|
|
5893
|
+
};
|
|
5894
|
+
401: components["responses"]["Unauthorized"];
|
|
5895
|
+
403: components["responses"]["Forbidden"];
|
|
5896
|
+
/** @description Workspace or repository not found */
|
|
5897
|
+
404: {
|
|
5898
|
+
headers: {
|
|
5899
|
+
[name: string]: unknown;
|
|
5900
|
+
};
|
|
5901
|
+
content: {
|
|
5902
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
5903
|
+
};
|
|
5904
|
+
};
|
|
5905
|
+
/** @description Conflict — scan in progress or repo already in the requested state */
|
|
5906
|
+
409: {
|
|
5907
|
+
headers: {
|
|
5908
|
+
[name: string]: unknown;
|
|
5909
|
+
};
|
|
5910
|
+
content: {
|
|
5911
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
5912
|
+
};
|
|
5913
|
+
};
|
|
5914
|
+
};
|
|
5915
|
+
};
|
|
5682
5916
|
listReadinessRepoRuns: {
|
|
5683
5917
|
parameters: {
|
|
5684
5918
|
query?: {
|
|
@@ -5782,6 +6016,67 @@ export interface operations {
|
|
|
5782
6016
|
};
|
|
5783
6017
|
};
|
|
5784
6018
|
};
|
|
6019
|
+
listWorkspaceActivity: {
|
|
6020
|
+
parameters: {
|
|
6021
|
+
query?: {
|
|
6022
|
+
/** @description Page size (default 25, max 100). */
|
|
6023
|
+
limit?: components["parameters"]["PaginationLimit"];
|
|
6024
|
+
/** @description Zero-based row offset into the filtered, sorted result set. */
|
|
6025
|
+
offset?: components["parameters"]["PaginationOffset"];
|
|
6026
|
+
/** @description Sort direction. */
|
|
6027
|
+
order?: components["parameters"]["PaginationOrder"];
|
|
6028
|
+
/** @description Filter to a specific event type. */
|
|
6029
|
+
eventType?: components["schemas"]["ActivityLogEventTypeDto"];
|
|
6030
|
+
/** @description Filter to events performed by a specific user (UUID). */
|
|
6031
|
+
actorUserId?: string;
|
|
6032
|
+
/** @description ISO-8601 lower bound on `occurredAt` (inclusive). */
|
|
6033
|
+
since?: string;
|
|
6034
|
+
/** @description ISO-8601 upper bound on `occurredAt` (inclusive). */
|
|
6035
|
+
until?: string;
|
|
6036
|
+
/** @description Filter by event namespace prefix (e.g. "fix", "repo", "integration", "readiness", "config", "member"). */
|
|
6037
|
+
eventCategory?: string;
|
|
6038
|
+
/** @description Case-insensitive substring filter applied across repo name, integration type, actor email, and actor display name. */
|
|
6039
|
+
search?: string;
|
|
6040
|
+
};
|
|
6041
|
+
header?: never;
|
|
6042
|
+
path: {
|
|
6043
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
6044
|
+
};
|
|
6045
|
+
cookie?: never;
|
|
6046
|
+
};
|
|
6047
|
+
requestBody?: never;
|
|
6048
|
+
responses: {
|
|
6049
|
+
/** @description Paginated activity log entries */
|
|
6050
|
+
200: {
|
|
6051
|
+
headers: {
|
|
6052
|
+
[name: string]: unknown;
|
|
6053
|
+
};
|
|
6054
|
+
content: {
|
|
6055
|
+
"application/json": components["schemas"]["ActivityLogPageDto"];
|
|
6056
|
+
};
|
|
6057
|
+
};
|
|
6058
|
+
/** @description Invalid query parameters */
|
|
6059
|
+
400: {
|
|
6060
|
+
headers: {
|
|
6061
|
+
[name: string]: unknown;
|
|
6062
|
+
};
|
|
6063
|
+
content: {
|
|
6064
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
6065
|
+
};
|
|
6066
|
+
};
|
|
6067
|
+
401: components["responses"]["Unauthorized"];
|
|
6068
|
+
403: components["responses"]["Forbidden"];
|
|
6069
|
+
/** @description Workspace does not exist */
|
|
6070
|
+
404: {
|
|
6071
|
+
headers: {
|
|
6072
|
+
[name: string]: unknown;
|
|
6073
|
+
};
|
|
6074
|
+
content: {
|
|
6075
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
6076
|
+
};
|
|
6077
|
+
};
|
|
6078
|
+
};
|
|
6079
|
+
};
|
|
5785
6080
|
getReadinessScoreHistory: {
|
|
5786
6081
|
parameters: {
|
|
5787
6082
|
query?: {
|