@thinkai/tai-api-contract 2.225.0 → 2.226.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 +439 -1
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +136 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/openapi/openapi.yaml +631 -2
- package/openapi/x-test-status-map.json +20 -0
- package/package.json +1 -1
- package/src/generated/openapi.ts +439 -1
- package/src/index.ts +175 -1
package/src/index.ts
CHANGED
|
@@ -1985,7 +1985,7 @@ export const SDL_C_MODULE_IDS = [
|
|
|
1985
1985
|
] as const;
|
|
1986
1986
|
export type SdlcModuleId = (typeof SDL_C_MODULE_IDS)[number];
|
|
1987
1987
|
|
|
1988
|
-
/** Canonical SDLC Engineering Health metric ids (
|
|
1988
|
+
/** Canonical SDLC Engineering Health metric ids (45). */
|
|
1989
1989
|
export const SDL_C_METRIC_IDS = [
|
|
1990
1990
|
"dora-deployment-frequency",
|
|
1991
1991
|
"dora-lead-time",
|
|
@@ -2009,6 +2009,17 @@ export const SDL_C_METRIC_IDS = [
|
|
|
2009
2009
|
"sec-secret-scanning",
|
|
2010
2010
|
"sec-self-approvals",
|
|
2011
2011
|
"sec-unreviewed-merge",
|
|
2012
|
+
"sec-critical-open",
|
|
2013
|
+
"sec-past-due",
|
|
2014
|
+
"sec-scan-coverage",
|
|
2015
|
+
"sec-code-scanning-backlog",
|
|
2016
|
+
"sec-sonar-vulnerabilities",
|
|
2017
|
+
"sec-quality-gate-failing",
|
|
2018
|
+
"sec-posture-gaps",
|
|
2019
|
+
"sec-security-incidents",
|
|
2020
|
+
"sec-security-tickets",
|
|
2021
|
+
"sec-ai-pr-share",
|
|
2022
|
+
"sec-ai-unreviewed-merge",
|
|
2012
2023
|
"gov-branch-protection",
|
|
2013
2024
|
"gov-stale-branches",
|
|
2014
2025
|
"gov-orphaned-repos",
|
|
@@ -2054,6 +2065,12 @@ export interface SdlcDailySeriesPointDto {
|
|
|
2054
2065
|
value: number;
|
|
2055
2066
|
}
|
|
2056
2067
|
|
|
2068
|
+
export interface SdlcMetricBreakdownItemDto {
|
|
2069
|
+
key: string;
|
|
2070
|
+
label: string;
|
|
2071
|
+
value: number;
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2057
2074
|
export interface SdlcMetricDto {
|
|
2058
2075
|
id: SdlcMetricId;
|
|
2059
2076
|
name: string;
|
|
@@ -2067,6 +2084,8 @@ export interface SdlcMetricDto {
|
|
|
2067
2084
|
benchmarkBand?: SdlcBenchmarkBand;
|
|
2068
2085
|
drilldownAvailable: boolean;
|
|
2069
2086
|
dailySeries?: SdlcDailySeriesPointDto[];
|
|
2087
|
+
/** Severity or category segments (e.g. Dependabot critical/high/medium/low). */
|
|
2088
|
+
breakdown?: SdlcMetricBreakdownItemDto[];
|
|
2070
2089
|
unavailableReason?: string;
|
|
2071
2090
|
}
|
|
2072
2091
|
|
|
@@ -2104,6 +2123,161 @@ export interface SdlcDrilldownDto {
|
|
|
2104
2123
|
nextCursor?: string;
|
|
2105
2124
|
}
|
|
2106
2125
|
|
|
2126
|
+
/** Security finding source connector / pipeline. */
|
|
2127
|
+
export type SecurityFindingSource =
|
|
2128
|
+
| "github_dependabot"
|
|
2129
|
+
| "github_secret_scanning"
|
|
2130
|
+
| "github_code_scanning"
|
|
2131
|
+
| "sonar_vulnerability"
|
|
2132
|
+
| "sonar_hotspot"
|
|
2133
|
+
| "readiness_gap"
|
|
2134
|
+
| "code_insights"
|
|
2135
|
+
| "incident"
|
|
2136
|
+
| "ticket";
|
|
2137
|
+
|
|
2138
|
+
export type SecurityFindingCategory =
|
|
2139
|
+
"dependency" | "secret" | "code" | "posture" | "incident" | "ticket";
|
|
2140
|
+
|
|
2141
|
+
export type SecuritySeverity = "critical" | "high" | "medium" | "low" | "unknown";
|
|
2142
|
+
|
|
2143
|
+
export type SecurityAiInvolvement = "measured" | "estimated" | "none" | "unknown";
|
|
2144
|
+
|
|
2145
|
+
export type SecurityFindingState = "open" | "fixed" | "dismissed";
|
|
2146
|
+
|
|
2147
|
+
export type SecurityFindingActionKind =
|
|
2148
|
+
"fix_pr" | "open_source" | "rotate_secret" | "assign_owner" | "open_incident" | "open_ticket";
|
|
2149
|
+
|
|
2150
|
+
export interface SecurityFindingActionDto {
|
|
2151
|
+
kind: SecurityFindingActionKind;
|
|
2152
|
+
href?: string;
|
|
2153
|
+
readinessIssueId?: string;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
export interface SecurityNamedRefDto {
|
|
2157
|
+
id: string;
|
|
2158
|
+
name: string;
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
export interface SecurityRepoRefDto {
|
|
2162
|
+
id: string;
|
|
2163
|
+
slug: string;
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
export interface SecurityFindingDto {
|
|
2167
|
+
id: string;
|
|
2168
|
+
source: SecurityFindingSource;
|
|
2169
|
+
sourceLabel: string;
|
|
2170
|
+
category: SecurityFindingCategory;
|
|
2171
|
+
severity: SecuritySeverity;
|
|
2172
|
+
title: string;
|
|
2173
|
+
repo: SecurityRepoRefDto | null;
|
|
2174
|
+
team: SecurityNamedRefDto | null;
|
|
2175
|
+
openedAt: string;
|
|
2176
|
+
dueAt: string | null;
|
|
2177
|
+
pastDue: boolean;
|
|
2178
|
+
state: SecurityFindingState;
|
|
2179
|
+
url: string | null;
|
|
2180
|
+
aiInvolvement: SecurityAiInvolvement;
|
|
2181
|
+
/** Other sources that reported the same advisory/CVE in this repo (headline collapse). */
|
|
2182
|
+
alsoSeenIn: SecurityFindingSource[];
|
|
2183
|
+
primaryAction: SecurityFindingActionDto;
|
|
2184
|
+
redacted: boolean;
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
export type SecurityDataSourceCategory =
|
|
2188
|
+
"source_control" | "code_quality" | "ai_tools" | "incidents" | "tickets" | "security";
|
|
2189
|
+
|
|
2190
|
+
export type SecurityDataSourceStatus =
|
|
2191
|
+
"connected" | "stale" | "needs_permission" | "not_connected" | "coming_soon";
|
|
2192
|
+
|
|
2193
|
+
export interface SecurityDataSourceDto {
|
|
2194
|
+
id: string;
|
|
2195
|
+
name: string;
|
|
2196
|
+
category: SecurityDataSourceCategory;
|
|
2197
|
+
status: SecurityDataSourceStatus;
|
|
2198
|
+
lastSuccessAt: string | null;
|
|
2199
|
+
feeds: SdlcMetricId[];
|
|
2200
|
+
actionLabel?: string;
|
|
2201
|
+
actionHref?: string;
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
export type SecurityBlindSpotMissing =
|
|
2205
|
+
"dependabot" | "secret_scanning" | "sast" | "review_rule" | "owner";
|
|
2206
|
+
|
|
2207
|
+
export interface SecurityBlindSpotDto {
|
|
2208
|
+
repo: SecurityRepoRefDto;
|
|
2209
|
+
team: SecurityNamedRefDto | null;
|
|
2210
|
+
missing: SecurityBlindSpotMissing[];
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
export interface SecurityTeamRollupDto {
|
|
2214
|
+
team: SecurityNamedRefDto | null;
|
|
2215
|
+
criticalOpen: number;
|
|
2216
|
+
pastDue: number;
|
|
2217
|
+
scanCoveragePercent: number | null;
|
|
2218
|
+
aiUnreviewedPercent: number | null;
|
|
2219
|
+
openFindings: number;
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2222
|
+
export interface SecurityAiRiskDto {
|
|
2223
|
+
agentPrSharePercent: number | null;
|
|
2224
|
+
agentUnreviewedPercent: number | null;
|
|
2225
|
+
humanUnreviewedPercent: number | null;
|
|
2226
|
+
acceptedAiLinesByTeam: Array<{ team: SecurityNamedRefDto | null; lines: number }>;
|
|
2227
|
+
guardrails: {
|
|
2228
|
+
reposWithAgentIgnore: number;
|
|
2229
|
+
reposWithMcpPosture: number;
|
|
2230
|
+
reposWithSecretsScanner: number;
|
|
2231
|
+
reposScanned: number;
|
|
2232
|
+
};
|
|
2233
|
+
attributionQuality: SecurityAiInvolvement;
|
|
2234
|
+
}
|
|
2235
|
+
|
|
2236
|
+
/** Response for GET /workspaces/:workspaceId/insights/security/posture */
|
|
2237
|
+
export interface SecurityPostureDto {
|
|
2238
|
+
asOf: string;
|
|
2239
|
+
rangeId: string;
|
|
2240
|
+
headline: {
|
|
2241
|
+
criticalOpen: number;
|
|
2242
|
+
pastDue: number;
|
|
2243
|
+
reposWithoutCoverage: number;
|
|
2244
|
+
unownedFindings: number;
|
|
2245
|
+
};
|
|
2246
|
+
dataSources: SecurityDataSourceDto[];
|
|
2247
|
+
fixFirst: SecurityFindingDto[];
|
|
2248
|
+
blindSpots: SecurityBlindSpotDto[];
|
|
2249
|
+
teams: SecurityTeamRollupDto[];
|
|
2250
|
+
aiRisk: SecurityAiRiskDto;
|
|
2251
|
+
viewer: { isAdmin: boolean; ownedTeamIds: string[] };
|
|
2252
|
+
_meta: InsightsResponseMeta;
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
/** Response for GET /workspaces/:workspaceId/insights/security/findings */
|
|
2256
|
+
export interface SecurityFindingsPageDto {
|
|
2257
|
+
items: SecurityFindingDto[];
|
|
2258
|
+
nextCursor?: string;
|
|
2259
|
+
total: number;
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
/** Response for GET/PUT /workspaces/:workspaceId/insights/security/settings */
|
|
2263
|
+
export interface SecuritySettingsDto {
|
|
2264
|
+
slaDays: {
|
|
2265
|
+
critical: number | null;
|
|
2266
|
+
high: number | null;
|
|
2267
|
+
medium: number | null;
|
|
2268
|
+
low: number | null;
|
|
2269
|
+
};
|
|
2270
|
+
incidentRules: {
|
|
2271
|
+
labels: string[];
|
|
2272
|
+
severityNames: string[];
|
|
2273
|
+
titleKeywords: string[];
|
|
2274
|
+
};
|
|
2275
|
+
ticketRules: {
|
|
2276
|
+
labels: string[];
|
|
2277
|
+
issueTypes: string[];
|
|
2278
|
+
};
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2107
2281
|
/** Shared Insights & Recommendations response meta (`_meta.isMock` is always false in production). */
|
|
2108
2282
|
export interface InsightsResponseMeta {
|
|
2109
2283
|
syncedAt: string;
|