@thinkai/tai-api-contract 2.106.0 → 2.108.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 +187 -0
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/openapi/openapi.yaml +171 -1
- package/package.json +1 -1
- package/src/generated/openapi.ts +187 -0
- package/src/index.ts +49 -1
package/src/generated/openapi.ts
CHANGED
|
@@ -1431,6 +1431,26 @@ export interface paths {
|
|
|
1431
1431
|
patch?: never;
|
|
1432
1432
|
trace?: never;
|
|
1433
1433
|
};
|
|
1434
|
+
"/workspaces/{workspaceId}/integrations/connectors-snapshot": {
|
|
1435
|
+
parameters: {
|
|
1436
|
+
query?: never;
|
|
1437
|
+
header?: never;
|
|
1438
|
+
path?: never;
|
|
1439
|
+
cookie?: never;
|
|
1440
|
+
};
|
|
1441
|
+
/**
|
|
1442
|
+
* Workspace connectors snapshot for settings UI
|
|
1443
|
+
* @description Returns workspace config plus GitHub App and GitHub Actions integration status in one response (lighter than separate config and integration status calls).
|
|
1444
|
+
*/
|
|
1445
|
+
get: operations["getWorkspaceConnectorsSnapshot"];
|
|
1446
|
+
put?: never;
|
|
1447
|
+
post?: never;
|
|
1448
|
+
delete?: never;
|
|
1449
|
+
options?: never;
|
|
1450
|
+
head?: never;
|
|
1451
|
+
patch?: never;
|
|
1452
|
+
trace?: never;
|
|
1453
|
+
};
|
|
1434
1454
|
"/workspaces/{workspaceId}/integrations/github": {
|
|
1435
1455
|
parameters: {
|
|
1436
1456
|
query?: never;
|
|
@@ -3307,6 +3327,26 @@ export interface paths {
|
|
|
3307
3327
|
patch?: never;
|
|
3308
3328
|
trace?: never;
|
|
3309
3329
|
};
|
|
3330
|
+
"/me/app-shell": {
|
|
3331
|
+
parameters: {
|
|
3332
|
+
query?: never;
|
|
3333
|
+
header?: never;
|
|
3334
|
+
path?: never;
|
|
3335
|
+
cookie?: never;
|
|
3336
|
+
};
|
|
3337
|
+
/**
|
|
3338
|
+
* App chrome bootstrap payload
|
|
3339
|
+
* @description Returns the authenticated user's profile, workspace list, and preferences in one response. When `workspaceId` is provided and resolves to a workspace the caller belongs to, also returns platform banner, unread notification count, journey progress, and connectors snapshot. Invalid, unknown, or non-member `workspaceId` values do not produce 403/404 — the response is still 200 with only `me`, `workspaces`, and `preferences` (workspace-scoped fields omitted).
|
|
3340
|
+
*/
|
|
3341
|
+
get: operations["getAppShell"];
|
|
3342
|
+
put?: never;
|
|
3343
|
+
post?: never;
|
|
3344
|
+
delete?: never;
|
|
3345
|
+
options?: never;
|
|
3346
|
+
head?: never;
|
|
3347
|
+
patch?: never;
|
|
3348
|
+
trace?: never;
|
|
3349
|
+
};
|
|
3310
3350
|
"/workspaces/{workspaceId}/org-chart/import": {
|
|
3311
3351
|
parameters: {
|
|
3312
3352
|
query?: never;
|
|
@@ -3347,6 +3387,26 @@ export interface paths {
|
|
|
3347
3387
|
patch?: never;
|
|
3348
3388
|
trace?: never;
|
|
3349
3389
|
};
|
|
3390
|
+
"/workspaces/{workspaceId}/your-ai-journey/dashboard-secondary": {
|
|
3391
|
+
parameters: {
|
|
3392
|
+
query?: never;
|
|
3393
|
+
header?: never;
|
|
3394
|
+
path?: never;
|
|
3395
|
+
cookie?: never;
|
|
3396
|
+
};
|
|
3397
|
+
/**
|
|
3398
|
+
* Secondary dashboard panels bootstrap payload
|
|
3399
|
+
* @description Returns readiness aggregate, merged PR trends (8-week default window), aggregated teams (8-week default window), and agentic foundation dashboard in one response. Nested payloads reuse the same builders and caches as their dedicated routes.
|
|
3400
|
+
*/
|
|
3401
|
+
get: operations["getYourAiJourneyDashboardSecondary"];
|
|
3402
|
+
put?: never;
|
|
3403
|
+
post?: never;
|
|
3404
|
+
delete?: never;
|
|
3405
|
+
options?: never;
|
|
3406
|
+
head?: never;
|
|
3407
|
+
patch?: never;
|
|
3408
|
+
trace?: never;
|
|
3409
|
+
};
|
|
3350
3410
|
"/workspaces/{workspaceId}/your-ai-journey/analytics": {
|
|
3351
3411
|
parameters: {
|
|
3352
3412
|
query?: never;
|
|
@@ -7096,6 +7156,30 @@ export interface components {
|
|
|
7096
7156
|
analytics: components["schemas"]["YourAiJourneyAnalyticsDto"];
|
|
7097
7157
|
productivity: components["schemas"]["DashboardProductivityDto"];
|
|
7098
7158
|
};
|
|
7159
|
+
ConnectorsSnapshotDto: {
|
|
7160
|
+
config: components["schemas"]["WorkspaceConfigDto"];
|
|
7161
|
+
github: components["schemas"]["GithubInstallationStatusDto"];
|
|
7162
|
+
githubActions: components["schemas"]["GithubActionsIntegrationStatusDto"];
|
|
7163
|
+
};
|
|
7164
|
+
AppShellDto: {
|
|
7165
|
+
me: components["schemas"]["MeProfileDto"];
|
|
7166
|
+
workspaces: components["schemas"]["WorkspaceSummaryDto"][];
|
|
7167
|
+
preferences: components["schemas"]["PreferencesDto"];
|
|
7168
|
+
banner?: components["schemas"]["PlatformBannerViewDto"];
|
|
7169
|
+
unreadCount?: components["schemas"]["NotificationUnreadCountDto"];
|
|
7170
|
+
journeyProgress?: components["schemas"]["JourneyProgressDto"];
|
|
7171
|
+
connectorsSnapshot?: components["schemas"]["ConnectorsSnapshotDto"];
|
|
7172
|
+
};
|
|
7173
|
+
DashboardSecondaryDto: {
|
|
7174
|
+
/** Format: uuid */
|
|
7175
|
+
workspaceId: string;
|
|
7176
|
+
/** Format: date-time */
|
|
7177
|
+
generatedAt: string;
|
|
7178
|
+
readinessAggregate: components["schemas"]["YourAiJourneyReadinessAggregateDto"];
|
|
7179
|
+
mergedPrTrends: components["schemas"]["ProductivityInsightsMergedPrTrendsDto"];
|
|
7180
|
+
aggregatedTeams: components["schemas"]["ProductivityInsightsAggregatedTeamsDto"];
|
|
7181
|
+
agenticFoundation: components["schemas"]["AgenticFoundationDashboardDto"];
|
|
7182
|
+
};
|
|
7099
7183
|
YourAiJourneyAnalyticsDto: {
|
|
7100
7184
|
/** Format: uuid */
|
|
7101
7185
|
workspaceId: string;
|
|
@@ -7137,6 +7221,8 @@ export interface components {
|
|
|
7137
7221
|
/** @description GitHub merged PRs in this week bucket still awaiting ship-weight scoring. */
|
|
7138
7222
|
shipWeightPendingCount?: number;
|
|
7139
7223
|
tokenCount: number;
|
|
7224
|
+
/** @description AI tool spend attributed to this week bucket (USD cents). */
|
|
7225
|
+
spendCents?: number;
|
|
7140
7226
|
};
|
|
7141
7227
|
YourAiJourneyAiSpendDto: {
|
|
7142
7228
|
/** Format: uuid */
|
|
@@ -7655,6 +7741,11 @@ export interface components {
|
|
|
7655
7741
|
InsightsRecommendationsReviewPipelineResponse: components["schemas"]["InsightsRecommendationsReviewPipeline"] & {
|
|
7656
7742
|
_meta: components["schemas"]["InsightsResponseMeta"];
|
|
7657
7743
|
};
|
|
7744
|
+
InsightsCostPerPrModelSlice: {
|
|
7745
|
+
modelName: string;
|
|
7746
|
+
spendUsd: number;
|
|
7747
|
+
tokenCount: number;
|
|
7748
|
+
};
|
|
7658
7749
|
InsightsCostPerPrTeam: {
|
|
7659
7750
|
id: string;
|
|
7660
7751
|
name: string;
|
|
@@ -7665,6 +7756,8 @@ export interface components {
|
|
|
7665
7756
|
changePct: number;
|
|
7666
7757
|
/** @description Weekly cost per merged PR aligned to the selected week buckets (same order as filters.weekBuckets). Null when the team had no merged PRs in that week. */
|
|
7667
7758
|
trendUsdPerPr?: (number | null)[];
|
|
7759
|
+
/** @description Model spend mix for teams in the top five by spend in this response (server-computed from AI-tool usage). When multiple providers are in scope, each team's mix reflects that team's dominant provider by spend. Omitted when unavailable. */
|
|
7760
|
+
models?: components["schemas"]["InsightsCostPerPrModelSlice"][];
|
|
7668
7761
|
};
|
|
7669
7762
|
InsightsRecommendationsCostPerPr: {
|
|
7670
7763
|
orgAvgCostUsd: number;
|
|
@@ -8754,6 +8847,9 @@ export type YourAiJourneyPrSignalsDto = components['schemas']['YourAiJourneyPrSi
|
|
|
8754
8847
|
export type YourAiJourneyReadinessDimensionDto = components['schemas']['YourAiJourneyReadinessDimensionDto'];
|
|
8755
8848
|
export type YourAiJourneyReadinessAggregateDto = components['schemas']['YourAiJourneyReadinessAggregateDto'];
|
|
8756
8849
|
export type YourAiJourneyHeroDto = components['schemas']['YourAiJourneyHeroDto'];
|
|
8850
|
+
export type ConnectorsSnapshotDto = components['schemas']['ConnectorsSnapshotDto'];
|
|
8851
|
+
export type AppShellDto = components['schemas']['AppShellDto'];
|
|
8852
|
+
export type DashboardSecondaryDto = components['schemas']['DashboardSecondaryDto'];
|
|
8757
8853
|
export type YourAiJourneyAnalyticsDto = components['schemas']['YourAiJourneyAnalyticsDto'];
|
|
8758
8854
|
export type YourAiJourneyAiSpendWeekDto = components['schemas']['YourAiJourneyAiSpendWeekDto'];
|
|
8759
8855
|
export type YourAiJourneyAiSpendDto = components['schemas']['YourAiJourneyAiSpendDto'];
|
|
@@ -8812,6 +8908,7 @@ export type InsightsReviewStage = components['schemas']['InsightsReviewStage'];
|
|
|
8812
8908
|
export type InsightsReviewerLoadItem = components['schemas']['InsightsReviewerLoadItem'];
|
|
8813
8909
|
export type InsightsRecommendationsReviewPipeline = components['schemas']['InsightsRecommendationsReviewPipeline'];
|
|
8814
8910
|
export type InsightsRecommendationsReviewPipelineResponse = components['schemas']['InsightsRecommendationsReviewPipelineResponse'];
|
|
8911
|
+
export type InsightsCostPerPrModelSlice = components['schemas']['InsightsCostPerPrModelSlice'];
|
|
8815
8912
|
export type InsightsCostPerPrTeam = components['schemas']['InsightsCostPerPrTeam'];
|
|
8816
8913
|
export type InsightsRecommendationsCostPerPr = components['schemas']['InsightsRecommendationsCostPerPr'];
|
|
8817
8914
|
export type InsightsRecommendationsCostPerPrResponse = components['schemas']['InsightsRecommendationsCostPerPrResponse'];
|
|
@@ -12915,6 +13012,39 @@ export interface operations {
|
|
|
12915
13012
|
};
|
|
12916
13013
|
};
|
|
12917
13014
|
};
|
|
13015
|
+
getWorkspaceConnectorsSnapshot: {
|
|
13016
|
+
parameters: {
|
|
13017
|
+
query?: never;
|
|
13018
|
+
header?: never;
|
|
13019
|
+
path: {
|
|
13020
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
13021
|
+
};
|
|
13022
|
+
cookie?: never;
|
|
13023
|
+
};
|
|
13024
|
+
requestBody?: never;
|
|
13025
|
+
responses: {
|
|
13026
|
+
/** @description Connectors snapshot */
|
|
13027
|
+
200: {
|
|
13028
|
+
headers: {
|
|
13029
|
+
[name: string]: unknown;
|
|
13030
|
+
};
|
|
13031
|
+
content: {
|
|
13032
|
+
"application/json": components["schemas"]["ConnectorsSnapshotDto"];
|
|
13033
|
+
};
|
|
13034
|
+
};
|
|
13035
|
+
401: components["responses"]["Unauthorized"];
|
|
13036
|
+
403: components["responses"]["Forbidden"];
|
|
13037
|
+
/** @description Workspace does not exist */
|
|
13038
|
+
404: {
|
|
13039
|
+
headers: {
|
|
13040
|
+
[name: string]: unknown;
|
|
13041
|
+
};
|
|
13042
|
+
content: {
|
|
13043
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
13044
|
+
};
|
|
13045
|
+
};
|
|
13046
|
+
};
|
|
13047
|
+
};
|
|
12918
13048
|
getWorkspaceGithubInstallationStatus: {
|
|
12919
13049
|
parameters: {
|
|
12920
13050
|
query?: {
|
|
@@ -17474,6 +17604,30 @@ export interface operations {
|
|
|
17474
17604
|
401: components["responses"]["Unauthorized"];
|
|
17475
17605
|
};
|
|
17476
17606
|
};
|
|
17607
|
+
getAppShell: {
|
|
17608
|
+
parameters: {
|
|
17609
|
+
query?: {
|
|
17610
|
+
/** @description Optional workspace scope for banner, notifications, journey, and connectors. Omitted or unresolvable values yield the base shell without workspace extras. */
|
|
17611
|
+
workspaceId?: string;
|
|
17612
|
+
};
|
|
17613
|
+
header?: never;
|
|
17614
|
+
path?: never;
|
|
17615
|
+
cookie?: never;
|
|
17616
|
+
};
|
|
17617
|
+
requestBody?: never;
|
|
17618
|
+
responses: {
|
|
17619
|
+
/** @description App shell bootstrap payload. Workspace-scoped fields (`banner`, `unreadCount`, `journeyProgress`, `connectorsSnapshot`) appear only when `workspaceId` resolves to a workspace the caller belongs to. */
|
|
17620
|
+
200: {
|
|
17621
|
+
headers: {
|
|
17622
|
+
[name: string]: unknown;
|
|
17623
|
+
};
|
|
17624
|
+
content: {
|
|
17625
|
+
"application/json": components["schemas"]["AppShellDto"];
|
|
17626
|
+
};
|
|
17627
|
+
};
|
|
17628
|
+
401: components["responses"]["Unauthorized"];
|
|
17629
|
+
};
|
|
17630
|
+
};
|
|
17477
17631
|
postOrgChartImport: {
|
|
17478
17632
|
parameters: {
|
|
17479
17633
|
query?: never;
|
|
@@ -17571,6 +17725,39 @@ export interface operations {
|
|
|
17571
17725
|
};
|
|
17572
17726
|
};
|
|
17573
17727
|
};
|
|
17728
|
+
getYourAiJourneyDashboardSecondary: {
|
|
17729
|
+
parameters: {
|
|
17730
|
+
query?: never;
|
|
17731
|
+
header?: never;
|
|
17732
|
+
path: {
|
|
17733
|
+
workspaceId: components["parameters"]["WorkspaceId"];
|
|
17734
|
+
};
|
|
17735
|
+
cookie?: never;
|
|
17736
|
+
};
|
|
17737
|
+
requestBody?: never;
|
|
17738
|
+
responses: {
|
|
17739
|
+
/** @description Secondary dashboard bootstrap payload */
|
|
17740
|
+
200: {
|
|
17741
|
+
headers: {
|
|
17742
|
+
[name: string]: unknown;
|
|
17743
|
+
};
|
|
17744
|
+
content: {
|
|
17745
|
+
"application/json": components["schemas"]["DashboardSecondaryDto"];
|
|
17746
|
+
};
|
|
17747
|
+
};
|
|
17748
|
+
401: components["responses"]["Unauthorized"];
|
|
17749
|
+
403: components["responses"]["Forbidden"];
|
|
17750
|
+
/** @description Workspace does not exist */
|
|
17751
|
+
404: {
|
|
17752
|
+
headers: {
|
|
17753
|
+
[name: string]: unknown;
|
|
17754
|
+
};
|
|
17755
|
+
content: {
|
|
17756
|
+
"application/json": components["schemas"]["ErrorMessageDto"];
|
|
17757
|
+
};
|
|
17758
|
+
};
|
|
17759
|
+
};
|
|
17760
|
+
};
|
|
17574
17761
|
getYourAiJourneyAnalytics: {
|
|
17575
17762
|
parameters: {
|
|
17576
17763
|
query?: never;
|
package/src/index.ts
CHANGED
|
@@ -3,7 +3,18 @@
|
|
|
3
3
|
* The ONLY package the frontend may import.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type {
|
|
6
|
+
import type {
|
|
7
|
+
AgenticFoundationDashboardDto,
|
|
8
|
+
GithubActionsIntegrationStatusDto,
|
|
9
|
+
GithubInstallationStatusDto,
|
|
10
|
+
JourneyProgressDto,
|
|
11
|
+
MeProfileDto,
|
|
12
|
+
NotificationUnreadCountDto,
|
|
13
|
+
PlatformBannerViewDto,
|
|
14
|
+
PreferencesDto,
|
|
15
|
+
WorkspaceConfigDto as OpenApiWorkspaceConfigDto,
|
|
16
|
+
WorkspaceSummaryDto,
|
|
17
|
+
} from "./generated/openapi.js";
|
|
7
18
|
|
|
8
19
|
/** Run metadata (window, ruleset, created). M5.4: optional tenantId, personId. */
|
|
9
20
|
export interface RunMetadataDto {
|
|
@@ -1191,6 +1202,34 @@ export interface YourAiJourneyHeroDto {
|
|
|
1191
1202
|
productivity: YourAiJourneyProductivityDto;
|
|
1192
1203
|
}
|
|
1193
1204
|
|
|
1205
|
+
/** GitHub + workspace config snapshot for connectors UI (BFF). */
|
|
1206
|
+
export interface ConnectorsSnapshotDto {
|
|
1207
|
+
config: OpenApiWorkspaceConfigDto;
|
|
1208
|
+
github: GithubInstallationStatusDto;
|
|
1209
|
+
githubActions: GithubActionsIntegrationStatusDto;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
/** Response for GET /me/app-shell — bootstrap payload for app chrome. */
|
|
1213
|
+
export interface AppShellDto {
|
|
1214
|
+
me: MeProfileDto;
|
|
1215
|
+
workspaces: WorkspaceSummaryDto[];
|
|
1216
|
+
preferences: PreferencesDto;
|
|
1217
|
+
banner?: PlatformBannerViewDto;
|
|
1218
|
+
unreadCount?: NotificationUnreadCountDto;
|
|
1219
|
+
journeyProgress?: JourneyProgressDto;
|
|
1220
|
+
connectorsSnapshot?: ConnectorsSnapshotDto;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
/** Response for GET /workspaces/:workspaceId/your-ai-journey/dashboard-secondary. */
|
|
1224
|
+
export interface DashboardSecondaryDto {
|
|
1225
|
+
workspaceId: string;
|
|
1226
|
+
generatedAt: string;
|
|
1227
|
+
readinessAggregate: YourAiJourneyReadinessAggregateDto;
|
|
1228
|
+
mergedPrTrends: ProductivityInsightsMergedPrTrendsDto;
|
|
1229
|
+
aggregatedTeams: ProductivityInsightsAggregatedTeamsDto;
|
|
1230
|
+
agenticFoundation: AgenticFoundationDashboardDto;
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1194
1233
|
/** Response for GET /workspaces/:workspaceId/your-ai-journey/agentic-foundation — same shape as AgenticFoundationDashboardDto. */
|
|
1195
1234
|
export type YourAiJourneyAgenticFoundationDto = AgenticFoundationDashboardDto;
|
|
1196
1235
|
|
|
@@ -1201,6 +1240,7 @@ export interface YourAiJourneyAiSpendWeekDto {
|
|
|
1201
1240
|
weekLabel: string;
|
|
1202
1241
|
mergedPrCount: number;
|
|
1203
1242
|
tokenCount: number;
|
|
1243
|
+
spendCents?: number;
|
|
1204
1244
|
}
|
|
1205
1245
|
|
|
1206
1246
|
/** Response for GET /workspaces/:workspaceId/your-ai-journey/ai-spend */
|
|
@@ -1661,6 +1701,12 @@ export interface InsightsRecommendationsReviewPipeline {
|
|
|
1661
1701
|
reviewerLoad: InsightsReviewerLoadItem[];
|
|
1662
1702
|
}
|
|
1663
1703
|
|
|
1704
|
+
export interface InsightsCostPerPrModelSlice {
|
|
1705
|
+
modelName: string;
|
|
1706
|
+
spendUsd: number;
|
|
1707
|
+
tokenCount: number;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1664
1710
|
export interface InsightsCostPerPrTeam {
|
|
1665
1711
|
id: string;
|
|
1666
1712
|
name: string;
|
|
@@ -1671,6 +1717,8 @@ export interface InsightsCostPerPrTeam {
|
|
|
1671
1717
|
changePct: number;
|
|
1672
1718
|
/** Weekly $/merged PR for weeks with at least one merged PR in scope. */
|
|
1673
1719
|
trendUsdPerPr?: (number | null)[];
|
|
1720
|
+
/** Model spend mix for top-spend teams (server-computed). */
|
|
1721
|
+
models?: InsightsCostPerPrModelSlice[];
|
|
1674
1722
|
}
|
|
1675
1723
|
|
|
1676
1724
|
export interface InsightsRecommendationsCostPerPr {
|