@thinkai/tai-api-contract 2.65.0 → 2.67.0-pr.934.5215788b

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.
@@ -963,6 +963,26 @@ export interface paths {
963
963
  patch?: never;
964
964
  trace?: never;
965
965
  };
966
+ "/workspaces/{workspaceId}/insights/recommendations-page/bundle": {
967
+ parameters: {
968
+ query?: never;
969
+ header?: never;
970
+ path?: never;
971
+ cookie?: never;
972
+ };
973
+ /**
974
+ * Insights recommendations — full page bundle
975
+ * @description Single HTTP round-trip for `/insights-recommendations`. Returns the same section payloads as the seven per-resource GETs (`verdict-summary` through `recommendations`) nested under one response with a shared `_meta` envelope. Section objects omit per-resource `_meta`; use the top-level `_meta.syncedAt` for the page.
976
+ */
977
+ get: operations["getInsightsRecommendationsPageBundle"];
978
+ put?: never;
979
+ post?: never;
980
+ delete?: never;
981
+ options?: never;
982
+ head?: never;
983
+ patch?: never;
984
+ trace?: never;
985
+ };
966
986
  "/workspaces/{workspaceId}/insights/recommendations-page/verdict-summary": {
967
987
  parameters: {
968
988
  query?: never;
@@ -4745,6 +4765,15 @@ export interface components {
4745
4765
  */
4746
4766
  error: "github_permissions_check_failed";
4747
4767
  };
4768
+ /**
4769
+ * @description Whether a GitHub Code security product is enabled and readable for sampled repos. `partial` means mixed enablement across the sample; `unknown` when not probed or grants missing.
4770
+ * @enum {string}
4771
+ */
4772
+ GithubProductSettingStatus: "ok" | "not_enabled" | "partial" | "forbidden" | "unknown";
4773
+ GithubProductSettingsDto: {
4774
+ dependabotAlerts: components["schemas"]["GithubProductSettingStatus"];
4775
+ secretScanning: components["schemas"]["GithubProductSettingStatus"];
4776
+ };
4748
4777
  GithubInstallationSummaryDto: {
4749
4778
  installationId: string;
4750
4779
  account: components["schemas"]["GithubAccountDto"];
@@ -4758,6 +4787,20 @@ export interface components {
4758
4787
  permissionsUpgradeRequired: boolean;
4759
4788
  /** @description True when installation grants read permissions for repository analysis (contents, metadata, pull requests, and members for org installs). */
4760
4789
  corePermissionsOk: boolean;
4790
+ /** @description True when installation grants Vulnerability alerts and Secret scanning alerts read for SDLC security metrics. */
4791
+ securityPermissionsOk: boolean;
4792
+ /** @description True when installation grants financial/operational SDLC metric permissions (Actions, Deployments, and org Administration / Copilot seat reads for organization installs). */
4793
+ financialPermissionsOk: boolean;
4794
+ /** @description Security alert permissions still needed for SDLC security metrics. */
4795
+ missingSecurityPermissions?: components["schemas"]["GithubMissingPermissionDto"][];
4796
+ /** @description Financial/operational permissions still needed for SDLC financial metrics. */
4797
+ missingFinancialPermissions?: components["schemas"]["GithubMissingPermissionDto"][];
4798
+ /** @description Human-readable summary when security App permissions are missing. */
4799
+ securityUpgradeMessage?: string | null;
4800
+ /** @description Human-readable summary when financial App permissions are missing. */
4801
+ financialUpgradeMessage?: string | null;
4802
+ /** @description Dependabot alerts and secret scanning enablement on sampled repos (throttled probe). Omitted when security App grants are missing or the probe has not run. */
4803
+ githubProductSettings?: components["schemas"]["GithubProductSettingsDto"] | null;
4761
4804
  /** @description True when automated fixes are enabled and the linked Automations (write) installation grants write permissions required for fix PRs. */
4762
4805
  writePermissionsOk: boolean;
4763
4806
  /** @description Alias for `!writePermissionsOk`. */
@@ -4942,6 +4985,20 @@ export interface components {
4942
4985
  permissionsUpgradeRequired: boolean;
4943
4986
  /** @description True when every connected installation grants core read permissions. */
4944
4987
  corePermissionsOk: boolean;
4988
+ /** @description True when every connected installation grants security alert read permissions. */
4989
+ securityPermissionsOk: boolean;
4990
+ /** @description True when every connected installation grants financial/operational read permissions. */
4991
+ financialPermissionsOk: boolean;
4992
+ /** @description Aggregated security permissions missing on installations with security gaps. */
4993
+ missingSecurityPermissions?: components["schemas"]["GithubMissingPermissionDto"][];
4994
+ /** @description Aggregated financial permissions missing on installations with financial gaps. */
4995
+ missingFinancialPermissions?: components["schemas"]["GithubMissingPermissionDto"][];
4996
+ /** @description Human-readable summary when security App permissions are missing. */
4997
+ securityUpgradeMessage?: string | null;
4998
+ /** @description Human-readable summary when financial App permissions are missing. */
4999
+ financialUpgradeMessage?: string | null;
5000
+ /** @description Workspace-wide Code security product status reduced from installations. */
5001
+ githubProductSettings?: components["schemas"]["GithubProductSettingsDto"] | null;
4945
5002
  /** @description True when every connected installation grants write permissions for automated fixes. */
4946
5003
  writePermissionsOk: boolean;
4947
5004
  /** @description True when any connected installation lacks write permissions for automated fixes. */
@@ -6525,6 +6582,19 @@ export interface components {
6525
6582
  items: components["schemas"]["InsightsRecommendationDto"][];
6526
6583
  _meta: components["schemas"]["InsightsResponseMeta"];
6527
6584
  };
6585
+ InsightsRecommendationsPageBundleRecommendations: {
6586
+ items: components["schemas"]["InsightsRecommendationDto"][];
6587
+ };
6588
+ InsightsRecommendationsPageBundleResponse: {
6589
+ verdictSummary: components["schemas"]["InsightsRecommendationsVerdictSummary"];
6590
+ roiQuadrant: components["schemas"]["InsightsRecommendationsRoiQuadrant"];
6591
+ velocityQuality: components["schemas"]["InsightsRecommendationsVelocityQuality"];
6592
+ reviewPipeline: components["schemas"]["InsightsRecommendationsReviewPipeline"];
6593
+ costPerPr: components["schemas"]["InsightsRecommendationsCostPerPr"];
6594
+ adoptionGap: components["schemas"]["InsightsRecommendationsAdoptionGap"];
6595
+ recommendations: components["schemas"]["InsightsRecommendationsPageBundleRecommendations"];
6596
+ _meta: components["schemas"]["InsightsResponseMeta"];
6597
+ };
6528
6598
  };
6529
6599
  responses: {
6530
6600
  /** @description Missing or invalid bearer token */
@@ -6778,6 +6848,8 @@ export type RepoEligibilityLimitsDto = components['schemas']['RepoEligibilityLim
6778
6848
  export type GithubMissingPermissionDto = components['schemas']['GithubMissingPermissionDto'];
6779
6849
  export type GithubWritePermissionsRequiredErrorDto = components['schemas']['GithubWritePermissionsRequiredErrorDto'];
6780
6850
  export type GithubPermissionsCheckFailedErrorDto = components['schemas']['GithubPermissionsCheckFailedErrorDto'];
6851
+ export type GithubProductSettingStatus = components['schemas']['GithubProductSettingStatus'];
6852
+ export type GithubProductSettingsDto = components['schemas']['GithubProductSettingsDto'];
6781
6853
  export type GithubInstallationSummaryDto = components['schemas']['GithubInstallationSummaryDto'];
6782
6854
  export type GithubPendingApprovalDto = components['schemas']['GithubPendingApprovalDto'];
6783
6855
  export type GithubSetupInProgressDto = components['schemas']['GithubSetupInProgressDto'];
@@ -6961,6 +7033,8 @@ export type InsightsEvidenceChip = components['schemas']['InsightsEvidenceChip']
6961
7033
  export type InsightsRecommendationEvidenceGroup = components['schemas']['InsightsRecommendationEvidenceGroup'];
6962
7034
  export type InsightsRecommendationDto = components['schemas']['InsightsRecommendationDto'];
6963
7035
  export type InsightsRecommendationsListResponse = components['schemas']['InsightsRecommendationsListResponse'];
7036
+ export type InsightsRecommendationsPageBundleRecommendations = components['schemas']['InsightsRecommendationsPageBundleRecommendations'];
7037
+ export type InsightsRecommendationsPageBundleResponse = components['schemas']['InsightsRecommendationsPageBundleResponse'];
6964
7038
  export type ResponseUnauthorized = components['responses']['Unauthorized'];
6965
7039
  export type ResponseForbidden = components['responses']['Forbidden'];
6966
7040
  export type ResponseZenHrSyncInProgress = components['responses']['ZenHrSyncInProgress'];
@@ -9681,6 +9755,64 @@ export interface operations {
9681
9755
  };
9682
9756
  };
9683
9757
  };
9758
+ getInsightsRecommendationsPageBundle: {
9759
+ parameters: {
9760
+ query: {
9761
+ /** @description Org-chart department ids (repeat param or comma-separated). Empty/omitted = all departments. */
9762
+ departments?: components["parameters"]["InsightsRecommendationsDepartments"];
9763
+ /** @description Org-chart team ids (repeat param or comma-separated). Empty/omitted = all teams in department scope. */
9764
+ teams?: components["parameters"]["InsightsRecommendationsTeams"];
9765
+ /** @description Inclusive window start (`YYYY-MM-DD`). Required with `dateTo`. Maps to Measure day-mode custom range (`from`/`to`). Max span 180 days. */
9766
+ dateFrom: components["parameters"]["InsightsRecommendationsDateFrom"];
9767
+ /** @description Inclusive window end (`YYYY-MM-DD`). Required with `dateFrom`. */
9768
+ dateTo: components["parameters"]["InsightsRecommendationsDateTo"];
9769
+ /** @description AI provider ids (e.g. `cursor`, `copilot`). Empty/omitted = all configured providers. */
9770
+ provider?: components["parameters"]["InsightsRecommendationsProvider"];
9771
+ /** @description Include contributors / AI rows not mapped to a team. */
9772
+ includeUnmapped?: components["parameters"]["InsightsRecommendationsIncludeUnmapped"];
9773
+ /** @description Include bot accounts in PR/CI stats. */
9774
+ includeBots?: components["parameters"]["InsightsRecommendationsIncludeBots"];
9775
+ };
9776
+ header?: never;
9777
+ path: {
9778
+ workspaceId: components["parameters"]["WorkspaceId"];
9779
+ };
9780
+ cookie?: never;
9781
+ };
9782
+ requestBody?: never;
9783
+ responses: {
9784
+ /** @description All recommendations-page sections with shared `_meta.isMock=false` */
9785
+ 200: {
9786
+ headers: {
9787
+ [name: string]: unknown;
9788
+ };
9789
+ content: {
9790
+ "application/json": components["schemas"]["InsightsRecommendationsPageBundleResponse"];
9791
+ };
9792
+ };
9793
+ /** @description Invalid filter or date range */
9794
+ 400: {
9795
+ headers: {
9796
+ [name: string]: unknown;
9797
+ };
9798
+ content: {
9799
+ "application/json": {
9800
+ /** @example invalid_query */
9801
+ error: string;
9802
+ };
9803
+ };
9804
+ };
9805
+ 401: components["responses"]["Unauthorized"];
9806
+ 403: components["responses"]["Forbidden"];
9807
+ /** @description Workspace does not exist or malformed workspaceId */
9808
+ 404: {
9809
+ headers: {
9810
+ [name: string]: unknown;
9811
+ };
9812
+ content?: never;
9813
+ };
9814
+ };
9815
+ };
9684
9816
  getInsightsRecommendationsVerdictSummary: {
9685
9817
  parameters: {
9686
9818
  query: {
@@ -10338,8 +10470,10 @@ export interface operations {
10338
10470
  query?: {
10339
10471
  /** @description When true, bypass `tai_workspace_vcs_repos_cache` and re-fetch from GitHub. When productivity backfill phase is `complete`, also triggers inline `on_demand` ingest for the current UTC week (gap-fill only when metrics are missing). Response includes `productivityRefreshInProgress` while the workspace advisory lock is held. */
10340
10472
  refresh?: boolean;
10341
- /** @description When true, re-fetch GitHub App and installation permission metadata (used by the login permission gate after the user approves on GitHub). */
10473
+ /** @description When true, re-fetch GitHub App and installation permission metadata (used by the login permission gate after the user approves on GitHub). Clears App-permission and product-settings caches so the next `productSettingsRefresh` re-probes. Does not itself call alert-list APIs; use `productSettingsRefresh` for that. */
10342
10474
  permissionsRefresh?: boolean;
10475
+ /** @description When true, probe Dependabot alerts and secret scanning enablement on a small sample of connected repositories (only when security App grants are present). Without this flag, status returns previously cached `githubProductSettings` only (no live probe). Results are cached server-side for several minutes. */
10476
+ productSettingsRefresh?: boolean;
10343
10477
  /** @description Page size for the nested installation repo list (default 25, max 100). */
10344
10478
  repoLimit?: components["parameters"]["GithubRepoLimit"];
10345
10479
  /** @description Zero-based offset into the merged installation repo list. */
package/src/index.ts CHANGED
@@ -1700,6 +1700,23 @@ export interface InsightsRecommendationsListResponse {
1700
1700
  _meta: InsightsResponseMeta;
1701
1701
  }
1702
1702
 
1703
+ export interface InsightsRecommendationsPageBundleRecommendations {
1704
+ items: InsightsRecommendationDto[];
1705
+ }
1706
+
1707
+ export interface InsightsRecommendationsPageBundle {
1708
+ verdictSummary: InsightsRecommendationsVerdictSummary;
1709
+ roiQuadrant: InsightsRecommendationsRoiQuadrant;
1710
+ velocityQuality: InsightsRecommendationsVelocityQuality;
1711
+ reviewPipeline: InsightsRecommendationsReviewPipeline;
1712
+ costPerPr: InsightsRecommendationsCostPerPr;
1713
+ adoptionGap: InsightsRecommendationsAdoptionGap;
1714
+ recommendations: InsightsRecommendationsPageBundleRecommendations;
1715
+ }
1716
+
1717
+ export type InsightsRecommendationsPageBundleResponse =
1718
+ WithInsightsMeta<InsightsRecommendationsPageBundle>;
1719
+
1703
1720
  export {
1704
1721
  JOURNEY_STEP_IDS,
1705
1722
  JOURNEY_STEP_REGISTRY,