@thinkai/tai-api-contract 2.107.0 → 2.109.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.
@@ -1430,6 +1430,26 @@ export interface paths {
1430
1430
  patch?: never;
1431
1431
  trace?: never;
1432
1432
  };
1433
+ "/workspaces/{workspaceId}/integrations/connectors-snapshot": {
1434
+ parameters: {
1435
+ query?: never;
1436
+ header?: never;
1437
+ path?: never;
1438
+ cookie?: never;
1439
+ };
1440
+ /**
1441
+ * Workspace connectors snapshot for settings UI
1442
+ * @description Returns workspace config plus GitHub App and GitHub Actions integration status in one response (lighter than separate config and integration status calls).
1443
+ */
1444
+ get: operations["getWorkspaceConnectorsSnapshot"];
1445
+ put?: never;
1446
+ post?: never;
1447
+ delete?: never;
1448
+ options?: never;
1449
+ head?: never;
1450
+ patch?: never;
1451
+ trace?: never;
1452
+ };
1433
1453
  "/workspaces/{workspaceId}/integrations/github": {
1434
1454
  parameters: {
1435
1455
  query?: never;
@@ -3306,6 +3326,26 @@ export interface paths {
3306
3326
  patch?: never;
3307
3327
  trace?: never;
3308
3328
  };
3329
+ "/me/app-shell": {
3330
+ parameters: {
3331
+ query?: never;
3332
+ header?: never;
3333
+ path?: never;
3334
+ cookie?: never;
3335
+ };
3336
+ /**
3337
+ * App chrome bootstrap payload
3338
+ * @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).
3339
+ */
3340
+ get: operations["getAppShell"];
3341
+ put?: never;
3342
+ post?: never;
3343
+ delete?: never;
3344
+ options?: never;
3345
+ head?: never;
3346
+ patch?: never;
3347
+ trace?: never;
3348
+ };
3309
3349
  "/workspaces/{workspaceId}/org-chart/import": {
3310
3350
  parameters: {
3311
3351
  query?: never;
@@ -3317,7 +3357,7 @@ export interface paths {
3317
3357
  put?: never;
3318
3358
  /**
3319
3359
  * Import org chart from Supabase storage path
3320
- * @description Parse-only. Downloads the CSV at `storagePath` from the `org-charts` bucket and returns `persons` and `errors`. Does not persist to `spa_org_chart` or `org_chart`. The SPA derives teams client-side and saves the org structure via `POST /workspaces/{workspaceId}/org-chart`. Required columns: employee_id, name, email, title, department, team, manager_id, location. Optional: github_username (GitHub login for productivity ingest). Saving the SPA snapshot also materializes a scoring `org_chart` tree for team/person metrics when import members are present.
3360
+ * @description Parse-only. Downloads the CSV at `storagePath` from the `org-charts` bucket and returns `persons` and `errors`. Does not persist to `spa_org_chart` or `org_chart`. The SPA derives teams client-side and saves the org structure via `POST /workspaces/{workspaceId}/org-chart`. Required columns: employee_id, name, email, title, department, team, manager_id, location. Optional: github_username (GitHub login for productivity ingest), bitbucket_nickname, bitbucket_uuid, alternate_emails (comma-separated alternate work emails for AI tool spend attribution). Saving the SPA snapshot also materializes a scoring `org_chart` tree for team/person metrics when import members are present. Parse-only responses may include duplicateEmailWarnings, identityEmailPreview (cross-check against connected AI tool seat rosters), and importWarnings when roster preview is unavailable.
3321
3361
  */
3322
3362
  post: operations["postOrgChartImport"];
3323
3363
  delete?: never;
@@ -3346,6 +3386,26 @@ export interface paths {
3346
3386
  patch?: never;
3347
3387
  trace?: never;
3348
3388
  };
3389
+ "/workspaces/{workspaceId}/your-ai-journey/dashboard-secondary": {
3390
+ parameters: {
3391
+ query?: never;
3392
+ header?: never;
3393
+ path?: never;
3394
+ cookie?: never;
3395
+ };
3396
+ /**
3397
+ * Secondary dashboard panels bootstrap payload
3398
+ * @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.
3399
+ */
3400
+ get: operations["getYourAiJourneyDashboardSecondary"];
3401
+ put?: never;
3402
+ post?: never;
3403
+ delete?: never;
3404
+ options?: never;
3405
+ head?: never;
3406
+ patch?: never;
3407
+ trace?: never;
3408
+ };
3349
3409
  "/workspaces/{workspaceId}/your-ai-journey/analytics": {
3350
3410
  parameters: {
3351
3411
  query?: never;
@@ -3844,6 +3904,26 @@ export interface components {
3844
3904
  bitbucketNickname?: string;
3845
3905
  /** @description Bitbucket account UUID (e.g. "{aeefb6b0-...}") to attribute merged PRs and reviews to this person in productivity ingest. Preferred over bitbucketNickname — Bitbucket PR payloads expose a stable uuid but not nickname. Resolves to the same person_id (email) as githubUsername. */
3846
3906
  bitbucketUuid?: string;
3907
+ /** @description Optional comma-separated work emails that map to the same person for AI tool spend/usage (mirrors multi-login github_username). Primary email remains canonical person_id. */
3908
+ alternateEmails?: string;
3909
+ };
3910
+ OrgChartEmailOwnershipDto: {
3911
+ email: string;
3912
+ employeeId: string;
3913
+ name: string;
3914
+ isPrimary: boolean;
3915
+ };
3916
+ OrgChartEmailDuplicateDto: {
3917
+ email: string;
3918
+ owners: components["schemas"]["OrgChartEmailOwnershipDto"][];
3919
+ };
3920
+ OrgChartIdentityEmailPreviewDto: {
3921
+ employeeId: string;
3922
+ name: string;
3923
+ primaryEmail: string;
3924
+ alternateEmails: string[];
3925
+ rosterMatches: string[];
3926
+ warnings: string[];
3847
3927
  };
3848
3928
  UpdateMyOrgChartMemberBodyDto: {
3849
3929
  name?: string;
@@ -3854,12 +3934,20 @@ export interface components {
3854
3934
  githubUsername?: string;
3855
3935
  bitbucketNickname?: string;
3856
3936
  bitbucketUuid?: string;
3937
+ /** @description Comma-separated alternate work emails for AI tool attribution. */
3938
+ alternateEmails?: string;
3857
3939
  };
3858
3940
  OrgChartImportResultDto: {
3859
3941
  persons: components["schemas"]["OrgChartPersonDto"][];
3860
3942
  errors: string[];
3861
3943
  /** @description Parse-only preview of identity rows that would not match HRIS persons */
3862
3944
  unmatchedPreview?: components["schemas"]["OrgChartUnmatchedIdentitySampleDto"][];
3945
+ /** @description Emails claimed by more than one org-chart row (primary or alternate) */
3946
+ duplicateEmailWarnings?: components["schemas"]["OrgChartEmailDuplicateDto"][];
3947
+ /** @description Cross-check of primary and alternate emails against connected AI tool seat rosters */
3948
+ identityEmailPreview?: components["schemas"]["OrgChartIdentityEmailPreviewDto"][];
3949
+ /** @description Non-fatal import advisories (for example when AI tool roster preview could not be loaded) */
3950
+ importWarnings?: string[];
3863
3951
  };
3864
3952
  OrgChartSaveResultDto: {
3865
3953
  ok: boolean;
@@ -7095,6 +7183,30 @@ export interface components {
7095
7183
  analytics: components["schemas"]["YourAiJourneyAnalyticsDto"];
7096
7184
  productivity: components["schemas"]["DashboardProductivityDto"];
7097
7185
  };
7186
+ ConnectorsSnapshotDto: {
7187
+ config: components["schemas"]["WorkspaceConfigDto"];
7188
+ github: components["schemas"]["GithubInstallationStatusDto"];
7189
+ githubActions: components["schemas"]["GithubActionsIntegrationStatusDto"];
7190
+ };
7191
+ AppShellDto: {
7192
+ me: components["schemas"]["MeProfileDto"];
7193
+ workspaces: components["schemas"]["WorkspaceSummaryDto"][];
7194
+ preferences: components["schemas"]["PreferencesDto"];
7195
+ banner?: components["schemas"]["PlatformBannerViewDto"];
7196
+ unreadCount?: components["schemas"]["NotificationUnreadCountDto"];
7197
+ journeyProgress?: components["schemas"]["JourneyProgressDto"];
7198
+ connectorsSnapshot?: components["schemas"]["ConnectorsSnapshotDto"];
7199
+ };
7200
+ DashboardSecondaryDto: {
7201
+ /** Format: uuid */
7202
+ workspaceId: string;
7203
+ /** Format: date-time */
7204
+ generatedAt: string;
7205
+ readinessAggregate: components["schemas"]["YourAiJourneyReadinessAggregateDto"];
7206
+ mergedPrTrends: components["schemas"]["ProductivityInsightsMergedPrTrendsDto"];
7207
+ aggregatedTeams: components["schemas"]["ProductivityInsightsAggregatedTeamsDto"];
7208
+ agenticFoundation: components["schemas"]["AgenticFoundationDashboardDto"];
7209
+ };
7098
7210
  YourAiJourneyAnalyticsDto: {
7099
7211
  /** Format: uuid */
7100
7212
  workspaceId: string;
@@ -7136,6 +7248,8 @@ export interface components {
7136
7248
  /** @description GitHub merged PRs in this week bucket still awaiting ship-weight scoring. */
7137
7249
  shipWeightPendingCount?: number;
7138
7250
  tokenCount: number;
7251
+ /** @description AI tool spend attributed to this week bucket (USD cents). */
7252
+ spendCents?: number;
7139
7253
  };
7140
7254
  YourAiJourneyAiSpendDto: {
7141
7255
  /** Format: uuid */
@@ -8483,6 +8597,9 @@ export type OrgChartTreeNodeDto = components['schemas']['OrgChartTreeNodeDto'];
8483
8597
  export type ScoringOrgChartDto = components['schemas']['ScoringOrgChartDto'];
8484
8598
  export type OrgChartDto = components['schemas']['OrgChartDto'];
8485
8599
  export type OrgChartPersonDto = components['schemas']['OrgChartPersonDto'];
8600
+ export type OrgChartEmailOwnershipDto = components['schemas']['OrgChartEmailOwnershipDto'];
8601
+ export type OrgChartEmailDuplicateDto = components['schemas']['OrgChartEmailDuplicateDto'];
8602
+ export type OrgChartIdentityEmailPreviewDto = components['schemas']['OrgChartIdentityEmailPreviewDto'];
8486
8603
  export type UpdateMyOrgChartMemberBodyDto = components['schemas']['UpdateMyOrgChartMemberBodyDto'];
8487
8604
  export type OrgChartImportResultDto = components['schemas']['OrgChartImportResultDto'];
8488
8605
  export type OrgChartSaveResultDto = components['schemas']['OrgChartSaveResultDto'];
@@ -8760,6 +8877,9 @@ export type YourAiJourneyPrSignalsDto = components['schemas']['YourAiJourneyPrSi
8760
8877
  export type YourAiJourneyReadinessDimensionDto = components['schemas']['YourAiJourneyReadinessDimensionDto'];
8761
8878
  export type YourAiJourneyReadinessAggregateDto = components['schemas']['YourAiJourneyReadinessAggregateDto'];
8762
8879
  export type YourAiJourneyHeroDto = components['schemas']['YourAiJourneyHeroDto'];
8880
+ export type ConnectorsSnapshotDto = components['schemas']['ConnectorsSnapshotDto'];
8881
+ export type AppShellDto = components['schemas']['AppShellDto'];
8882
+ export type DashboardSecondaryDto = components['schemas']['DashboardSecondaryDto'];
8763
8883
  export type YourAiJourneyAnalyticsDto = components['schemas']['YourAiJourneyAnalyticsDto'];
8764
8884
  export type YourAiJourneyAiSpendWeekDto = components['schemas']['YourAiJourneyAiSpendWeekDto'];
8765
8885
  export type YourAiJourneyAiSpendDto = components['schemas']['YourAiJourneyAiSpendDto'];
@@ -12922,6 +13042,39 @@ export interface operations {
12922
13042
  };
12923
13043
  };
12924
13044
  };
13045
+ getWorkspaceConnectorsSnapshot: {
13046
+ parameters: {
13047
+ query?: never;
13048
+ header?: never;
13049
+ path: {
13050
+ workspaceId: components["parameters"]["WorkspaceId"];
13051
+ };
13052
+ cookie?: never;
13053
+ };
13054
+ requestBody?: never;
13055
+ responses: {
13056
+ /** @description Connectors snapshot */
13057
+ 200: {
13058
+ headers: {
13059
+ [name: string]: unknown;
13060
+ };
13061
+ content: {
13062
+ "application/json": components["schemas"]["ConnectorsSnapshotDto"];
13063
+ };
13064
+ };
13065
+ 401: components["responses"]["Unauthorized"];
13066
+ 403: components["responses"]["Forbidden"];
13067
+ /** @description Workspace does not exist */
13068
+ 404: {
13069
+ headers: {
13070
+ [name: string]: unknown;
13071
+ };
13072
+ content: {
13073
+ "application/json": components["schemas"]["ErrorMessageDto"];
13074
+ };
13075
+ };
13076
+ };
13077
+ };
12925
13078
  getWorkspaceGithubInstallationStatus: {
12926
13079
  parameters: {
12927
13080
  query?: {
@@ -17481,6 +17634,30 @@ export interface operations {
17481
17634
  401: components["responses"]["Unauthorized"];
17482
17635
  };
17483
17636
  };
17637
+ getAppShell: {
17638
+ parameters: {
17639
+ query?: {
17640
+ /** @description Optional workspace scope for banner, notifications, journey, and connectors. Omitted or unresolvable values yield the base shell without workspace extras. */
17641
+ workspaceId?: string;
17642
+ };
17643
+ header?: never;
17644
+ path?: never;
17645
+ cookie?: never;
17646
+ };
17647
+ requestBody?: never;
17648
+ responses: {
17649
+ /** @description App shell bootstrap payload. Workspace-scoped fields (`banner`, `unreadCount`, `journeyProgress`, `connectorsSnapshot`) appear only when `workspaceId` resolves to a workspace the caller belongs to. */
17650
+ 200: {
17651
+ headers: {
17652
+ [name: string]: unknown;
17653
+ };
17654
+ content: {
17655
+ "application/json": components["schemas"]["AppShellDto"];
17656
+ };
17657
+ };
17658
+ 401: components["responses"]["Unauthorized"];
17659
+ };
17660
+ };
17484
17661
  postOrgChartImport: {
17485
17662
  parameters: {
17486
17663
  query?: never;
@@ -17578,6 +17755,39 @@ export interface operations {
17578
17755
  };
17579
17756
  };
17580
17757
  };
17758
+ getYourAiJourneyDashboardSecondary: {
17759
+ parameters: {
17760
+ query?: never;
17761
+ header?: never;
17762
+ path: {
17763
+ workspaceId: components["parameters"]["WorkspaceId"];
17764
+ };
17765
+ cookie?: never;
17766
+ };
17767
+ requestBody?: never;
17768
+ responses: {
17769
+ /** @description Secondary dashboard bootstrap payload */
17770
+ 200: {
17771
+ headers: {
17772
+ [name: string]: unknown;
17773
+ };
17774
+ content: {
17775
+ "application/json": components["schemas"]["DashboardSecondaryDto"];
17776
+ };
17777
+ };
17778
+ 401: components["responses"]["Unauthorized"];
17779
+ 403: components["responses"]["Forbidden"];
17780
+ /** @description Workspace does not exist */
17781
+ 404: {
17782
+ headers: {
17783
+ [name: string]: unknown;
17784
+ };
17785
+ content: {
17786
+ "application/json": components["schemas"]["ErrorMessageDto"];
17787
+ };
17788
+ };
17789
+ };
17790
+ };
17581
17791
  getYourAiJourneyAnalytics: {
17582
17792
  parameters: {
17583
17793
  query?: never;