@thinkai/tai-api-contract 2.57.0 → 2.58.0-pr.901.7f05b4b4

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.
@@ -4230,6 +4230,22 @@ export interface components {
4230
4230
  */
4231
4231
  granted?: "read" | "write" | "admin" | null;
4232
4232
  };
4233
+ GithubWritePermissionsRequiredErrorDto: {
4234
+ /** @enum {string} */
4235
+ error: "github_write_permissions_required";
4236
+ missingPermissions: components["schemas"]["GithubMissingPermissionDto"][];
4237
+ /** @description GitHub installation settings URL to approve write permissions. */
4238
+ manageUrl?: string | null;
4239
+ /** @description Human-readable summary of the write permission upgrade. */
4240
+ writeUpgradeMessage?: string | null;
4241
+ };
4242
+ GithubPermissionsCheckFailedErrorDto: {
4243
+ /**
4244
+ * @description GitHub installation permissions could not be verified (transient upstream failure).
4245
+ * @enum {string}
4246
+ */
4247
+ error: "github_permissions_check_failed";
4248
+ };
4233
4249
  GithubInstallationSummaryDto: {
4234
4250
  installationId: string;
4235
4251
  account: components["schemas"]["GithubAccountDto"];
@@ -4239,11 +4255,22 @@ export interface components {
4239
4255
  manageUrl?: string | null;
4240
4256
  /** Format: date-time */
4241
4257
  lastSyncedAt?: string | null;
4242
- /** @description True when this installation's granted permissions are below what the ThinkAI GitHub App currently requests. */
4258
+ /** @description True when this installation lacks core read permissions required for connect and analysis. Alias for `!corePermissionsOk`. */
4243
4259
  permissionsUpgradeRequired: boolean;
4260
+ /** @description True when installation grants read permissions for repository analysis (contents, metadata, pull requests, and members for org installs). */
4261
+ corePermissionsOk: boolean;
4262
+ /** @description True when installation grants write permissions required for automated fix PRs. */
4263
+ writePermissionsOk: boolean;
4264
+ /** @description Alias for `!writePermissionsOk`. */
4265
+ writePermissionsUpgradeRequired: boolean;
4266
+ /** @description Core read permissions still needed for connect and analysis. */
4244
4267
  missingPermissions?: components["schemas"]["GithubMissingPermissionDto"][];
4245
- /** @description Human-readable summary for UI when permissionsUpgradeRequired is true. */
4268
+ /** @description Write permissions still needed for automated fix PRs. */
4269
+ missingWritePermissions?: components["schemas"]["GithubMissingPermissionDto"][];
4270
+ /** @description Human-readable summary for UI when core permissions are missing. */
4246
4271
  upgradeMessage?: string | null;
4272
+ /** @description Human-readable summary for UI when write permissions are missing. */
4273
+ writeUpgradeMessage?: string | null;
4247
4274
  };
4248
4275
  GithubPendingApprovalDto: {
4249
4276
  /**
@@ -4311,8 +4338,18 @@ export interface components {
4311
4338
  GithubInstallationStatusDto: {
4312
4339
  installed: boolean;
4313
4340
  installations: components["schemas"]["GithubInstallationSummaryDto"][];
4314
- /** @description True if any connected installation is under-permissioned. */
4341
+ /** @description True if any connected installation lacks core read permissions. Alias for `!corePermissionsOk`. */
4315
4342
  permissionsUpgradeRequired: boolean;
4343
+ /** @description True when every connected installation grants core read permissions. */
4344
+ corePermissionsOk: boolean;
4345
+ /** @description True when every connected installation grants write permissions for automated fixes. */
4346
+ writePermissionsOk: boolean;
4347
+ /** @description True when any connected installation lacks write permissions for automated fixes. */
4348
+ writePermissionsUpgradeRequired: boolean;
4349
+ /** @description Aggregated write permissions missing on installations that lack write access. */
4350
+ missingWritePermissions?: components["schemas"]["GithubMissingPermissionDto"][];
4351
+ /** @description Human-readable summary when write permissions are missing. */
4352
+ writeUpgradeMessage?: string | null;
4316
4353
  /** @description Present when an org admin must approve the GitHub App install request. */
4317
4354
  pendingApproval?: components["schemas"]["GithubPendingApprovalDto"] | null;
4318
4355
  /** @description Present when GitHub connect was started but not completed (install OAuth state or account-picker session still active). Omitted when pendingApproval is set. */
@@ -5834,6 +5871,8 @@ export type RepoEligibilityOverridesDto = components['schemas']['RepoEligibility
5834
5871
  export type WorkspaceRepoEligibilityDto = components['schemas']['WorkspaceRepoEligibilityDto'];
5835
5872
  export type RepoEligibilityLimitsDto = components['schemas']['RepoEligibilityLimitsDto'];
5836
5873
  export type GithubMissingPermissionDto = components['schemas']['GithubMissingPermissionDto'];
5874
+ export type GithubWritePermissionsRequiredErrorDto = components['schemas']['GithubWritePermissionsRequiredErrorDto'];
5875
+ export type GithubPermissionsCheckFailedErrorDto = components['schemas']['GithubPermissionsCheckFailedErrorDto'];
5837
5876
  export type GithubInstallationSummaryDto = components['schemas']['GithubInstallationSummaryDto'];
5838
5877
  export type GithubPendingApprovalDto = components['schemas']['GithubPendingApprovalDto'];
5839
5878
  export type GithubSetupInProgressDto = components['schemas']['GithubSetupInProgressDto'];
@@ -11345,6 +11384,24 @@ export interface operations {
11345
11384
  "application/json": components["schemas"]["ErrorMessageDto"];
11346
11385
  };
11347
11386
  };
11387
+ /** @description GitHub installation lacks write permissions required for automated fix PRs */
11388
+ 422: {
11389
+ headers: {
11390
+ [name: string]: unknown;
11391
+ };
11392
+ content: {
11393
+ "application/json": components["schemas"]["GithubWritePermissionsRequiredErrorDto"];
11394
+ };
11395
+ };
11396
+ /** @description GitHub installation permissions could not be verified */
11397
+ 503: {
11398
+ headers: {
11399
+ [name: string]: unknown;
11400
+ };
11401
+ content: {
11402
+ "application/json": components["schemas"]["GithubPermissionsCheckFailedErrorDto"];
11403
+ };
11404
+ };
11348
11405
  };
11349
11406
  };
11350
11407
  postReadinessFixRetrigger: {
@@ -11388,6 +11445,24 @@ export interface operations {
11388
11445
  "application/json": components["schemas"]["ErrorMessageDto"];
11389
11446
  };
11390
11447
  };
11448
+ /** @description GitHub installation lacks write permissions required for automated fix PRs */
11449
+ 422: {
11450
+ headers: {
11451
+ [name: string]: unknown;
11452
+ };
11453
+ content: {
11454
+ "application/json": components["schemas"]["GithubWritePermissionsRequiredErrorDto"];
11455
+ };
11456
+ };
11457
+ /** @description GitHub installation permissions could not be verified */
11458
+ 503: {
11459
+ headers: {
11460
+ [name: string]: unknown;
11461
+ };
11462
+ content: {
11463
+ "application/json": components["schemas"]["GithubPermissionsCheckFailedErrorDto"];
11464
+ };
11465
+ };
11391
11466
  };
11392
11467
  };
11393
11468
  putCursorPlatformKeyConsent: {