@thinkai/tai-api-contract 2.224.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 +157 -3
- 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 +196 -2
package/src/index.ts
CHANGED
|
@@ -396,16 +396,36 @@ export interface DashboardProductivityMetricsDto {
|
|
|
396
396
|
deploymentFrequencyPerWeek?: number;
|
|
397
397
|
/** DORA benchmark band for deployment frequency. See docs/DORA-Benchmark-Bands.md. */
|
|
398
398
|
deploymentFrequencyBand?: "elite" | "high" | "medium" | "low";
|
|
399
|
-
/**
|
|
399
|
+
/** Team Efficiency: production deployments in the window behind deployment frequency. */
|
|
400
|
+
deploymentCount?: number;
|
|
401
|
+
/** Median time from code change to production (hours). Team Efficiency on: first commit to production deploy. */
|
|
400
402
|
leadTimeForChangesHours?: number;
|
|
403
|
+
/** p85 lead time (hours). Team Efficiency on: pooled over changes deployed in the window. */
|
|
404
|
+
leadTimeP85Hours?: number;
|
|
401
405
|
/** DORA benchmark band for lead time. See docs/DORA-Benchmark-Bands.md. */
|
|
402
406
|
leadTimeForChangesBand?: "elite" | "high" | "medium" | "low";
|
|
407
|
+
/** Changes with a deploy link that fed lead time. Under 10 means the card is low data. */
|
|
408
|
+
leadTimeSampleSize?: number;
|
|
409
|
+
/** True when lead time has no deploy-linked changes. Hours are omitted, with no PR-opened-to-merged proxy. */
|
|
410
|
+
leadTimeNotReportable?: boolean;
|
|
411
|
+
/** Team Efficiency: fewer than 10 samples for lead time. */
|
|
412
|
+
leadTimeLowData?: boolean;
|
|
403
413
|
/** % of deployments causing incidents (or proxy: incidents / deployments). */
|
|
404
414
|
changeFailureRatePercent?: number;
|
|
415
|
+
/** Team Efficiency: production deployments that were counted as failed. */
|
|
416
|
+
failedDeploymentCount?: number;
|
|
417
|
+
/** Team Efficiency: incidents or critical bugs with no production deploy in the 7 days before. Shown, not counted. */
|
|
418
|
+
unattributedFailureCount?: number;
|
|
405
419
|
/** DORA benchmark band for change failure rate. See docs/DORA-Benchmark-Bands.md. */
|
|
406
420
|
changeFailureRateBand?: "elite" | "high" | "medium" | "low";
|
|
407
421
|
/** Median time from incident.declared to incident.resolved (hours). */
|
|
408
422
|
meanTimeToRecoveryHours?: number;
|
|
423
|
+
/** Team Efficiency: resolved incidents used for recovery time. */
|
|
424
|
+
recoverySampleSize?: number;
|
|
425
|
+
/** Team Efficiency: resolved incidents left out of recovery time because no production deploy links to them. */
|
|
426
|
+
recoveryUnlinkedCount?: number;
|
|
427
|
+
/** Team Efficiency: recovery window used. 3 months by default; 6 when fewer than 5 recoveries in 3 months expanded the lookback. */
|
|
428
|
+
recoveryWindowMonths?: 3 | 6;
|
|
409
429
|
/** DORA benchmark band for MTTR. See docs/DORA-Benchmark-Bands.md. */
|
|
410
430
|
meanTimeToRecoveryBand?: "elite" | "high" | "medium" | "low";
|
|
411
431
|
};
|
|
@@ -1965,7 +1985,7 @@ export const SDL_C_MODULE_IDS = [
|
|
|
1965
1985
|
] as const;
|
|
1966
1986
|
export type SdlcModuleId = (typeof SDL_C_MODULE_IDS)[number];
|
|
1967
1987
|
|
|
1968
|
-
/** Canonical SDLC Engineering Health metric ids (
|
|
1988
|
+
/** Canonical SDLC Engineering Health metric ids (45). */
|
|
1969
1989
|
export const SDL_C_METRIC_IDS = [
|
|
1970
1990
|
"dora-deployment-frequency",
|
|
1971
1991
|
"dora-lead-time",
|
|
@@ -1989,6 +2009,17 @@ export const SDL_C_METRIC_IDS = [
|
|
|
1989
2009
|
"sec-secret-scanning",
|
|
1990
2010
|
"sec-self-approvals",
|
|
1991
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",
|
|
1992
2023
|
"gov-branch-protection",
|
|
1993
2024
|
"gov-stale-branches",
|
|
1994
2025
|
"gov-orphaned-repos",
|
|
@@ -2034,6 +2065,12 @@ export interface SdlcDailySeriesPointDto {
|
|
|
2034
2065
|
value: number;
|
|
2035
2066
|
}
|
|
2036
2067
|
|
|
2068
|
+
export interface SdlcMetricBreakdownItemDto {
|
|
2069
|
+
key: string;
|
|
2070
|
+
label: string;
|
|
2071
|
+
value: number;
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2037
2074
|
export interface SdlcMetricDto {
|
|
2038
2075
|
id: SdlcMetricId;
|
|
2039
2076
|
name: string;
|
|
@@ -2047,6 +2084,8 @@ export interface SdlcMetricDto {
|
|
|
2047
2084
|
benchmarkBand?: SdlcBenchmarkBand;
|
|
2048
2085
|
drilldownAvailable: boolean;
|
|
2049
2086
|
dailySeries?: SdlcDailySeriesPointDto[];
|
|
2087
|
+
/** Severity or category segments (e.g. Dependabot critical/high/medium/low). */
|
|
2088
|
+
breakdown?: SdlcMetricBreakdownItemDto[];
|
|
2050
2089
|
unavailableReason?: string;
|
|
2051
2090
|
}
|
|
2052
2091
|
|
|
@@ -2084,6 +2123,161 @@ export interface SdlcDrilldownDto {
|
|
|
2084
2123
|
nextCursor?: string;
|
|
2085
2124
|
}
|
|
2086
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
|
+
|
|
2087
2281
|
/** Shared Insights & Recommendations response meta (`_meta.isMock` is always false in production). */
|
|
2088
2282
|
export interface InsightsResponseMeta {
|
|
2089
2283
|
syncedAt: string;
|