@thinkai/tai-api-contract 2.216.0 → 2.219.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 +221 -0
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/openapi/openapi.yaml +346 -1
- package/package.json +1 -1
- package/src/generated/openapi.ts +221 -0
- package/src/index.ts +13 -1
package/src/generated/openapi.ts
CHANGED
|
@@ -1638,6 +1638,26 @@ export interface paths {
|
|
|
1638
1638
|
patch?: never;
|
|
1639
1639
|
trace?: never;
|
|
1640
1640
|
};
|
|
1641
|
+
"/workspaces/{workspaceId}/insights/team-efficiency/bundle": {
|
|
1642
|
+
parameters: {
|
|
1643
|
+
query?: never;
|
|
1644
|
+
header?: never;
|
|
1645
|
+
path?: never;
|
|
1646
|
+
cookie?: never;
|
|
1647
|
+
};
|
|
1648
|
+
/**
|
|
1649
|
+
* Team Efficiency page bundle
|
|
1650
|
+
* @description One round trip for the Team Efficiency page. Metrics are computed for the rolling `months` calendar months (default 3) against the previous period. A department is the union of its teams. All departments plus all teams, and person scope, are rejected with 400. Returns 404 when `backend-api.teamEfficiency` is off (unless the workspace is on the allowlist).
|
|
1651
|
+
*/
|
|
1652
|
+
get: operations["getTeamEfficiencyBundle"];
|
|
1653
|
+
put?: never;
|
|
1654
|
+
post?: never;
|
|
1655
|
+
delete?: never;
|
|
1656
|
+
options?: never;
|
|
1657
|
+
head?: never;
|
|
1658
|
+
patch?: never;
|
|
1659
|
+
trace?: never;
|
|
1660
|
+
};
|
|
1641
1661
|
"/workspaces/{workspaceId}/insights/devex/sync": {
|
|
1642
1662
|
parameters: {
|
|
1643
1663
|
query?: never;
|
|
@@ -6651,6 +6671,133 @@ export interface components {
|
|
|
6651
6671
|
metricId: "devex-score";
|
|
6652
6672
|
results: components["schemas"]["DevexResultDto"][];
|
|
6653
6673
|
};
|
|
6674
|
+
TeamEfficiencyDataQualityDto: {
|
|
6675
|
+
/** @enum {string} */
|
|
6676
|
+
code: "low_data" | "missing_start" | "batch_closed" | "no_roster" | "not_configured" | "no_bug_data" | "no_survey" | "unattributed_failures" | "excluded_incidents" | "unlinked_incidents" | "unknown_review_comments" | "no_linked_deploys" | "no_deployments" | "six_month_window";
|
|
6677
|
+
message: string;
|
|
6678
|
+
percent?: number;
|
|
6679
|
+
count?: number;
|
|
6680
|
+
};
|
|
6681
|
+
TeamEfficiencyMetricDto: {
|
|
6682
|
+
/** @enum {string} */
|
|
6683
|
+
id: "flow-time" | "pr-throughput-per-engineer" | "escaped-defects" | "devex-score" | "deployment-frequency" | "lead-time-for-changes" | "change-failure-rate" | "time-to-restore" | "pr-size" | "time-to-first-review" | "pr-approvals-without-comments";
|
|
6684
|
+
label: string;
|
|
6685
|
+
/** @description Short card label, for example "Recovery time". */
|
|
6686
|
+
shortLabel?: string;
|
|
6687
|
+
unit: string;
|
|
6688
|
+
value?: number;
|
|
6689
|
+
p85?: number;
|
|
6690
|
+
previous?: number;
|
|
6691
|
+
/** @description Per calendar month in the window, oldest first. null when no data. */
|
|
6692
|
+
monthly: (number | null)[];
|
|
6693
|
+
sampleSize: number;
|
|
6694
|
+
/** @description Fewer than 10 samples. */
|
|
6695
|
+
lowData: boolean;
|
|
6696
|
+
reportable: boolean;
|
|
6697
|
+
numerator?: number;
|
|
6698
|
+
denominator?: number;
|
|
6699
|
+
owner: string;
|
|
6700
|
+
counterweightIds: string[];
|
|
6701
|
+
dataQuality: components["schemas"]["TeamEfficiencyDataQualityDto"][];
|
|
6702
|
+
/** @description Drill-through route; the client appends scope and window. */
|
|
6703
|
+
href: string;
|
|
6704
|
+
/** @description Counts by key, for example escaped defects by severity. */
|
|
6705
|
+
breakdown?: {
|
|
6706
|
+
[key: string]: number;
|
|
6707
|
+
};
|
|
6708
|
+
/** @description The same series for the months before `monthly`, oldest first. */
|
|
6709
|
+
previousMonthly?: (number | null)[];
|
|
6710
|
+
stages?: components["schemas"]["TeamEfficiencyLeadTimeStagesDto"];
|
|
6711
|
+
devex?: components["schemas"]["TeamEfficiencyDevexDetailDto"];
|
|
6712
|
+
signals?: components["schemas"]["TeamEfficiencySignalDto"][];
|
|
6713
|
+
};
|
|
6714
|
+
/** @description Median hours per lead-time stage. */
|
|
6715
|
+
TeamEfficiencyLeadTimeStagesDto: {
|
|
6716
|
+
codingHours: number;
|
|
6717
|
+
pickupHours: number;
|
|
6718
|
+
reviewHours: number;
|
|
6719
|
+
deployHours: number;
|
|
6720
|
+
};
|
|
6721
|
+
TeamEfficiencySignalDto: {
|
|
6722
|
+
/** @enum {string} */
|
|
6723
|
+
id: "review-time-drop" | "approvals-without-comments-rise" | "pr-size-falling-flow-flat";
|
|
6724
|
+
label: string;
|
|
6725
|
+
flagged: boolean;
|
|
6726
|
+
/** @description Short detail shown when flagged, for example "24% to 31%". */
|
|
6727
|
+
detail?: string;
|
|
6728
|
+
};
|
|
6729
|
+
TeamEfficiencyDevexDetailDto: {
|
|
6730
|
+
/** @example 2026-Q3 */
|
|
6731
|
+
quarter: string;
|
|
6732
|
+
dimensions: {
|
|
6733
|
+
feedbackLoops: number;
|
|
6734
|
+
cognitiveLoad: number;
|
|
6735
|
+
flowState: number;
|
|
6736
|
+
};
|
|
6737
|
+
/** @description Latest quarters, oldest first. */
|
|
6738
|
+
quarters: {
|
|
6739
|
+
quarter: string;
|
|
6740
|
+
score: number;
|
|
6741
|
+
}[];
|
|
6742
|
+
responseCount: number;
|
|
6743
|
+
rosterSize?: number;
|
|
6744
|
+
/** @description 0 to 1. */
|
|
6745
|
+
responseRate?: number;
|
|
6746
|
+
lowResponseRate: boolean;
|
|
6747
|
+
/** @description Fewer than 5 responses, so the score shown is the department's. */
|
|
6748
|
+
rolledUp: boolean;
|
|
6749
|
+
};
|
|
6750
|
+
TeamEfficiencySetupItemDto: {
|
|
6751
|
+
id: string;
|
|
6752
|
+
label: string;
|
|
6753
|
+
done: boolean;
|
|
6754
|
+
hint: string;
|
|
6755
|
+
};
|
|
6756
|
+
TeamEfficiencyBundleDto: {
|
|
6757
|
+
summary: {
|
|
6758
|
+
engineers: number;
|
|
6759
|
+
issuesDone: number;
|
|
6760
|
+
mergedPrs: number;
|
|
6761
|
+
deployments: number;
|
|
6762
|
+
survey?: {
|
|
6763
|
+
responses: number;
|
|
6764
|
+
invited?: number;
|
|
6765
|
+
};
|
|
6766
|
+
};
|
|
6767
|
+
/** @description Share of engineers using an AI tool per month, for the months before the window followed by the window months, oldest first. null when no data. */
|
|
6768
|
+
aiAdoption: (number | null)[];
|
|
6769
|
+
scope: {
|
|
6770
|
+
department?: string;
|
|
6771
|
+
team?: string;
|
|
6772
|
+
teamIds: string[];
|
|
6773
|
+
/** @description Org-chart engineers, excluding managers, product managers and designers. */
|
|
6774
|
+
rosterEngineerCount: number;
|
|
6775
|
+
};
|
|
6776
|
+
window: {
|
|
6777
|
+
monthCount: number;
|
|
6778
|
+
/** Format: date-time */
|
|
6779
|
+
start: string;
|
|
6780
|
+
/** Format: date-time */
|
|
6781
|
+
end: string;
|
|
6782
|
+
/** Format: date-time */
|
|
6783
|
+
previousStart: string;
|
|
6784
|
+
/** Format: date-time */
|
|
6785
|
+
previousEnd: string;
|
|
6786
|
+
months: {
|
|
6787
|
+
/** Format: date-time */
|
|
6788
|
+
start: string;
|
|
6789
|
+
/** Format: date-time */
|
|
6790
|
+
end: string;
|
|
6791
|
+
}[];
|
|
6792
|
+
};
|
|
6793
|
+
metrics: components["schemas"]["TeamEfficiencyMetricDto"][];
|
|
6794
|
+
setup: {
|
|
6795
|
+
items: components["schemas"]["TeamEfficiencySetupItemDto"][];
|
|
6796
|
+
complete: boolean;
|
|
6797
|
+
};
|
|
6798
|
+
/** Format: date-time */
|
|
6799
|
+
generatedAt: string;
|
|
6800
|
+
};
|
|
6654
6801
|
DevexSyncRequestDto: {
|
|
6655
6802
|
/** @example 2026-Q1 */
|
|
6656
6803
|
quarter?: string;
|
|
@@ -7262,6 +7409,26 @@ export interface components {
|
|
|
7262
7409
|
clusterName?: string;
|
|
7263
7410
|
/** @description Present for Prometheus verify success — Alertmanager version when available. */
|
|
7264
7411
|
version?: string;
|
|
7412
|
+
/** @description Present for SurveyMonkey verify success. Question and choice labels only (never answers), so the connect screen can pick the team question and rating questions. */
|
|
7413
|
+
survey?: {
|
|
7414
|
+
title: string;
|
|
7415
|
+
questions: {
|
|
7416
|
+
id: string;
|
|
7417
|
+
text: string;
|
|
7418
|
+
/** @description Every choice carries a 1-5 weight or position, so the question can be scored. */
|
|
7419
|
+
ratingScale: boolean;
|
|
7420
|
+
choices: {
|
|
7421
|
+
id: string;
|
|
7422
|
+
text: string;
|
|
7423
|
+
}[];
|
|
7424
|
+
}[];
|
|
7425
|
+
};
|
|
7426
|
+
/** @description Present for SurveyMonkey verify success when the request carried `teamQuestionId`. How many survey choices matched an org-chart team by name. */
|
|
7427
|
+
teamMatch?: {
|
|
7428
|
+
matched: number;
|
|
7429
|
+
total: number;
|
|
7430
|
+
unmatched: string[];
|
|
7431
|
+
};
|
|
7265
7432
|
};
|
|
7266
7433
|
CursorKeyUsageDto: {
|
|
7267
7434
|
/** @description Readiness runs this calendar month that used the ThinkAI platform Cursor key. */
|
|
@@ -14103,6 +14270,13 @@ export type SurveyMonkeySourceDto = components['schemas']['SurveyMonkeySourceDto
|
|
|
14103
14270
|
export type SurveyMonkeySourceConfigDto = components['schemas']['SurveyMonkeySourceConfigDto'];
|
|
14104
14271
|
export type DevexResultDto = components['schemas']['DevexResultDto'];
|
|
14105
14272
|
export type DevexResultsResponseDto = components['schemas']['DevexResultsResponseDto'];
|
|
14273
|
+
export type TeamEfficiencyDataQualityDto = components['schemas']['TeamEfficiencyDataQualityDto'];
|
|
14274
|
+
export type TeamEfficiencyMetricDto = components['schemas']['TeamEfficiencyMetricDto'];
|
|
14275
|
+
export type TeamEfficiencyLeadTimeStagesDto = components['schemas']['TeamEfficiencyLeadTimeStagesDto'];
|
|
14276
|
+
export type TeamEfficiencySignalDto = components['schemas']['TeamEfficiencySignalDto'];
|
|
14277
|
+
export type TeamEfficiencyDevexDetailDto = components['schemas']['TeamEfficiencyDevexDetailDto'];
|
|
14278
|
+
export type TeamEfficiencySetupItemDto = components['schemas']['TeamEfficiencySetupItemDto'];
|
|
14279
|
+
export type TeamEfficiencyBundleDto = components['schemas']['TeamEfficiencyBundleDto'];
|
|
14106
14280
|
export type DevexSyncRequestDto = components['schemas']['DevexSyncRequestDto'];
|
|
14107
14281
|
export type DevexSyncResultDto = components['schemas']['DevexSyncResultDto'];
|
|
14108
14282
|
export type IncidentIoSourceDto = components['schemas']['IncidentIoSourceDto'];
|
|
@@ -19645,6 +19819,53 @@ export interface operations {
|
|
|
19645
19819
|
};
|
|
19646
19820
|
};
|
|
19647
19821
|
};
|
|
19822
|
+
getTeamEfficiencyBundle: {
|
|
19823
|
+
parameters: {
|
|
19824
|
+
query?: {
|
|
19825
|
+
department?: string;
|
|
19826
|
+
team?: string;
|
|
19827
|
+
months?: number;
|
|
19828
|
+
};
|
|
19829
|
+
header?: never;
|
|
19830
|
+
path: {
|
|
19831
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
19832
|
+
};
|
|
19833
|
+
cookie?: never;
|
|
19834
|
+
};
|
|
19835
|
+
requestBody?: never;
|
|
19836
|
+
responses: {
|
|
19837
|
+
/** @description Team Efficiency metrics, window, and setup checklist */
|
|
19838
|
+
200: {
|
|
19839
|
+
headers: {
|
|
19840
|
+
[name: string]: unknown;
|
|
19841
|
+
};
|
|
19842
|
+
content: {
|
|
19843
|
+
"application/json": components["schemas"]["TeamEfficiencyBundleDto"];
|
|
19844
|
+
};
|
|
19845
|
+
};
|
|
19846
|
+
/** @description Invalid scope or months (`scope_required`, `person_scope_not_supported`, `team_not_found`, `department_not_found`, `invalid_months`) */
|
|
19847
|
+
400: {
|
|
19848
|
+
headers: {
|
|
19849
|
+
[name: string]: unknown;
|
|
19850
|
+
};
|
|
19851
|
+
content: {
|
|
19852
|
+
"application/json": {
|
|
19853
|
+
error: string;
|
|
19854
|
+
code: string;
|
|
19855
|
+
};
|
|
19856
|
+
};
|
|
19857
|
+
};
|
|
19858
|
+
401: components["responses"]["Unauthorized"];
|
|
19859
|
+
403: components["responses"]["Forbidden"];
|
|
19860
|
+
/** @description Feature flag off or workspace not found */
|
|
19861
|
+
404: {
|
|
19862
|
+
headers: {
|
|
19863
|
+
[name: string]: unknown;
|
|
19864
|
+
};
|
|
19865
|
+
content?: never;
|
|
19866
|
+
};
|
|
19867
|
+
};
|
|
19868
|
+
};
|
|
19648
19869
|
syncDevexSurvey: {
|
|
19649
19870
|
parameters: {
|
|
19650
19871
|
query?: never;
|
package/src/index.ts
CHANGED
|
@@ -2005,7 +2005,19 @@ export const SDL_C_METRIC_IDS = [
|
|
|
2005
2005
|
export type SdlcMetricId = (typeof SDL_C_METRIC_IDS)[number];
|
|
2006
2006
|
|
|
2007
2007
|
/** Team Efficiency metric ids (Shine). Bundle assembly lands in T8. */
|
|
2008
|
-
export const TEAM_EFFICIENCY_METRIC_IDS = [
|
|
2008
|
+
export const TEAM_EFFICIENCY_METRIC_IDS = [
|
|
2009
|
+
"flow-time",
|
|
2010
|
+
"pr-throughput-per-engineer",
|
|
2011
|
+
"escaped-defects",
|
|
2012
|
+
"devex-score",
|
|
2013
|
+
"deployment-frequency",
|
|
2014
|
+
"lead-time-for-changes",
|
|
2015
|
+
"change-failure-rate",
|
|
2016
|
+
"time-to-restore",
|
|
2017
|
+
"pr-size",
|
|
2018
|
+
"time-to-first-review",
|
|
2019
|
+
"pr-approvals-without-comments",
|
|
2020
|
+
] as const;
|
|
2009
2021
|
export type TeamEfficiencyMetricId = (typeof TEAM_EFFICIENCY_METRIC_IDS)[number];
|
|
2010
2022
|
|
|
2011
2023
|
export type SdlcMetricDataStatus = "live" | "preview" | "unavailable";
|