@thinkai/tai-api-contract 2.66.0 → 2.67.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.
@@ -1,7 +1,7 @@
1
1
  openapi: 3.0.3
2
2
  info:
3
3
  title: ThinkAI API
4
- version: 2.66.0
4
+ version: 2.67.0
5
5
  description: >
6
6
  Contract surface for the AI Driven SDLC backend used by ThinkAI.
7
7
  Workspace-scoped routes use `/workspaces/{workspaceId}/...`.
@@ -3394,7 +3394,20 @@ paths:
3394
3394
  required: false
3395
3395
  description: >
3396
3396
  When true, re-fetch GitHub App and installation permission metadata (used by the
3397
- login permission gate after the user approves on GitHub).
3397
+ login permission gate after the user approves on GitHub). Clears App-permission and
3398
+ product-settings caches so the next `productSettingsRefresh` re-probes. Does not itself
3399
+ call alert-list APIs; use `productSettingsRefresh` for that.
3400
+ schema:
3401
+ type: boolean
3402
+ default: false
3403
+ - name: productSettingsRefresh
3404
+ in: query
3405
+ required: false
3406
+ description: >
3407
+ When true, probe Dependabot alerts and secret scanning enablement on a small sample of
3408
+ connected repositories (only when security App grants are present). Without this flag,
3409
+ status returns previously cached `githubProductSettings` only (no live probe).
3410
+ Results are cached server-side for several minutes.
3398
3411
  schema:
3399
3412
  type: boolean
3400
3413
  default: false
@@ -11442,6 +11455,23 @@ components:
11442
11455
  enum: [github_permissions_check_failed]
11443
11456
  description: GitHub installation permissions could not be verified (transient upstream failure).
11444
11457
 
11458
+ GithubProductSettingStatus:
11459
+ type: string
11460
+ enum: [ok, not_enabled, partial, forbidden, unknown]
11461
+ description: >
11462
+ Whether a GitHub Code security product is enabled and readable for sampled repos.
11463
+ `partial` means mixed enablement across the sample; `unknown` when not probed or grants missing.
11464
+
11465
+ GithubProductSettingsDto:
11466
+ type: object
11467
+ additionalProperties: false
11468
+ required: [dependabotAlerts, secretScanning]
11469
+ properties:
11470
+ dependabotAlerts:
11471
+ $ref: "#/components/schemas/GithubProductSettingStatus"
11472
+ secretScanning:
11473
+ $ref: "#/components/schemas/GithubProductSettingStatus"
11474
+
11445
11475
  GithubInstallationSummaryDto:
11446
11476
  type: object
11447
11477
  required:
@@ -11450,6 +11480,8 @@ components:
11450
11480
  - repos
11451
11481
  - permissionsUpgradeRequired
11452
11482
  - corePermissionsOk
11483
+ - securityPermissionsOk
11484
+ - financialPermissionsOk
11453
11485
  - writePermissionsOk
11454
11486
  - writePermissionsUpgradeRequired
11455
11487
  - automatedFixesEnabled
@@ -11483,6 +11515,40 @@ components:
11483
11515
  description: >
11484
11516
  True when installation grants read permissions for repository analysis (contents, metadata,
11485
11517
  pull requests, and members for org installs).
11518
+ securityPermissionsOk:
11519
+ type: boolean
11520
+ description: >
11521
+ True when installation grants Vulnerability alerts and Secret scanning alerts read for SDLC security metrics.
11522
+ financialPermissionsOk:
11523
+ type: boolean
11524
+ description: >
11525
+ True when installation grants financial/operational SDLC metric permissions (Actions, Deployments,
11526
+ and org Administration / Copilot seat reads for organization installs).
11527
+ missingSecurityPermissions:
11528
+ type: array
11529
+ items:
11530
+ $ref: "#/components/schemas/GithubMissingPermissionDto"
11531
+ description: Security alert permissions still needed for SDLC security metrics.
11532
+ missingFinancialPermissions:
11533
+ type: array
11534
+ items:
11535
+ $ref: "#/components/schemas/GithubMissingPermissionDto"
11536
+ description: Financial/operational permissions still needed for SDLC financial metrics.
11537
+ securityUpgradeMessage:
11538
+ type: string
11539
+ nullable: true
11540
+ description: Human-readable summary when security App permissions are missing.
11541
+ financialUpgradeMessage:
11542
+ type: string
11543
+ nullable: true
11544
+ description: Human-readable summary when financial App permissions are missing.
11545
+ githubProductSettings:
11546
+ nullable: true
11547
+ allOf:
11548
+ - $ref: "#/components/schemas/GithubProductSettingsDto"
11549
+ description: >
11550
+ Dependabot alerts and secret scanning enablement on sampled repos (throttled probe).
11551
+ Omitted when security App grants are missing or the probe has not run.
11486
11552
  writePermissionsOk:
11487
11553
  type: boolean
11488
11554
  description: >
@@ -11820,6 +11886,8 @@ components:
11820
11886
  - installations
11821
11887
  - permissionsUpgradeRequired
11822
11888
  - corePermissionsOk
11889
+ - securityPermissionsOk
11890
+ - financialPermissionsOk
11823
11891
  - writePermissionsOk
11824
11892
  - writePermissionsUpgradeRequired
11825
11893
  properties:
@@ -11835,6 +11903,35 @@ components:
11835
11903
  corePermissionsOk:
11836
11904
  type: boolean
11837
11905
  description: True when every connected installation grants core read permissions.
11906
+ securityPermissionsOk:
11907
+ type: boolean
11908
+ description: True when every connected installation grants security alert read permissions.
11909
+ financialPermissionsOk:
11910
+ type: boolean
11911
+ description: True when every connected installation grants financial/operational read permissions.
11912
+ missingSecurityPermissions:
11913
+ type: array
11914
+ items:
11915
+ $ref: "#/components/schemas/GithubMissingPermissionDto"
11916
+ description: Aggregated security permissions missing on installations with security gaps.
11917
+ missingFinancialPermissions:
11918
+ type: array
11919
+ items:
11920
+ $ref: "#/components/schemas/GithubMissingPermissionDto"
11921
+ description: Aggregated financial permissions missing on installations with financial gaps.
11922
+ securityUpgradeMessage:
11923
+ type: string
11924
+ nullable: true
11925
+ description: Human-readable summary when security App permissions are missing.
11926
+ financialUpgradeMessage:
11927
+ type: string
11928
+ nullable: true
11929
+ description: Human-readable summary when financial App permissions are missing.
11930
+ githubProductSettings:
11931
+ nullable: true
11932
+ allOf:
11933
+ - $ref: "#/components/schemas/GithubProductSettingsDto"
11934
+ description: Workspace-wide Code security product status reduced from installations.
11838
11935
  writePermissionsOk:
11839
11936
  type: boolean
11840
11937
  description: True when every connected installation grants write permissions for automated fixes.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.66.0",
3
+ "version": "2.67.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -4765,6 +4765,15 @@ export interface components {
4765
4765
  */
4766
4766
  error: "github_permissions_check_failed";
4767
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
+ };
4768
4777
  GithubInstallationSummaryDto: {
4769
4778
  installationId: string;
4770
4779
  account: components["schemas"]["GithubAccountDto"];
@@ -4778,6 +4787,20 @@ export interface components {
4778
4787
  permissionsUpgradeRequired: boolean;
4779
4788
  /** @description True when installation grants read permissions for repository analysis (contents, metadata, pull requests, and members for org installs). */
4780
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;
4781
4804
  /** @description True when automated fixes are enabled and the linked Automations (write) installation grants write permissions required for fix PRs. */
4782
4805
  writePermissionsOk: boolean;
4783
4806
  /** @description Alias for `!writePermissionsOk`. */
@@ -4962,6 +4985,20 @@ export interface components {
4962
4985
  permissionsUpgradeRequired: boolean;
4963
4986
  /** @description True when every connected installation grants core read permissions. */
4964
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;
4965
5002
  /** @description True when every connected installation grants write permissions for automated fixes. */
4966
5003
  writePermissionsOk: boolean;
4967
5004
  /** @description True when any connected installation lacks write permissions for automated fixes. */
@@ -6811,6 +6848,8 @@ export type RepoEligibilityLimitsDto = components['schemas']['RepoEligibilityLim
6811
6848
  export type GithubMissingPermissionDto = components['schemas']['GithubMissingPermissionDto'];
6812
6849
  export type GithubWritePermissionsRequiredErrorDto = components['schemas']['GithubWritePermissionsRequiredErrorDto'];
6813
6850
  export type GithubPermissionsCheckFailedErrorDto = components['schemas']['GithubPermissionsCheckFailedErrorDto'];
6851
+ export type GithubProductSettingStatus = components['schemas']['GithubProductSettingStatus'];
6852
+ export type GithubProductSettingsDto = components['schemas']['GithubProductSettingsDto'];
6814
6853
  export type GithubInstallationSummaryDto = components['schemas']['GithubInstallationSummaryDto'];
6815
6854
  export type GithubPendingApprovalDto = components['schemas']['GithubPendingApprovalDto'];
6816
6855
  export type GithubSetupInProgressDto = components['schemas']['GithubSetupInProgressDto'];
@@ -10431,8 +10470,10 @@ export interface operations {
10431
10470
  query?: {
10432
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. */
10433
10472
  refresh?: boolean;
10434
- /** @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. */
10435
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;
10436
10477
  /** @description Page size for the nested installation repo list (default 25, max 100). */
10437
10478
  repoLimit?: components["parameters"]["GithubRepoLimit"];
10438
10479
  /** @description Zero-based offset into the merged installation repo list. */