@thinkai/tai-api-contract 2.107.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 +179 -0
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/openapi/openapi.yaml +155 -1
- package/package.json +1 -1
- package/src/generated/openapi.ts +179 -0
- package/src/index.ts +41 -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 */
|
|
@@ -8761,6 +8847,9 @@ export type YourAiJourneyPrSignalsDto = components['schemas']['YourAiJourneyPrSi
|
|
|
8761
8847
|
export type YourAiJourneyReadinessDimensionDto = components['schemas']['YourAiJourneyReadinessDimensionDto'];
|
|
8762
8848
|
export type YourAiJourneyReadinessAggregateDto = components['schemas']['YourAiJourneyReadinessAggregateDto'];
|
|
8763
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'];
|
|
8764
8853
|
export type YourAiJourneyAnalyticsDto = components['schemas']['YourAiJourneyAnalyticsDto'];
|
|
8765
8854
|
export type YourAiJourneyAiSpendWeekDto = components['schemas']['YourAiJourneyAiSpendWeekDto'];
|
|
8766
8855
|
export type YourAiJourneyAiSpendDto = components['schemas']['YourAiJourneyAiSpendDto'];
|
|
@@ -12923,6 +13012,39 @@ export interface operations {
|
|
|
12923
13012
|
};
|
|
12924
13013
|
};
|
|
12925
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
|
+
};
|
|
12926
13048
|
getWorkspaceGithubInstallationStatus: {
|
|
12927
13049
|
parameters: {
|
|
12928
13050
|
query?: {
|
|
@@ -17482,6 +17604,30 @@ export interface operations {
|
|
|
17482
17604
|
401: components["responses"]["Unauthorized"];
|
|
17483
17605
|
};
|
|
17484
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
|
+
};
|
|
17485
17631
|
postOrgChartImport: {
|
|
17486
17632
|
parameters: {
|
|
17487
17633
|
query?: never;
|
|
@@ -17579,6 +17725,39 @@ export interface operations {
|
|
|
17579
17725
|
};
|
|
17580
17726
|
};
|
|
17581
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
|
+
};
|
|
17582
17761
|
getYourAiJourneyAnalytics: {
|
|
17583
17762
|
parameters: {
|
|
17584
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 */
|