@thinkai/tai-api-contract 2.56.0 → 2.58.0-pr.901.2e63dee8

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.
@@ -216,6 +216,50 @@ export interface paths {
216
216
  patch?: never;
217
217
  trace?: never;
218
218
  };
219
+ "/platform/banner": {
220
+ parameters: {
221
+ query?: never;
222
+ header?: never;
223
+ path?: never;
224
+ cookie?: never;
225
+ };
226
+ /**
227
+ * Global platform banner
228
+ * @description Returns the active global outage or maintenance banner for the platform shell, if any. No authentication required so signed-in users can see incident messaging during partial outages. When both a database-managed banner and a runtime-config fallback exist, the database value wins.
229
+ */
230
+ get: operations["getPlatformBanner"];
231
+ put?: never;
232
+ post?: never;
233
+ delete?: never;
234
+ options?: never;
235
+ head?: never;
236
+ patch?: never;
237
+ trace?: never;
238
+ };
239
+ "/admin/platform/banner": {
240
+ parameters: {
241
+ query?: never;
242
+ header?: never;
243
+ path?: never;
244
+ cookie?: never;
245
+ };
246
+ /**
247
+ * Read stored and effective global platform banner
248
+ * @description Platform admins only. Returns the database-stored banner (`stored`) for editing and the merged banner users see (`effective`, DB wins over runtime-config fallback). Requires Bearer JWT from an email on `PLATFORM_ADMIN_EMAILS`.
249
+ */
250
+ get: operations["adminGetPlatformBanner"];
251
+ /**
252
+ * Set or clear global platform banner
253
+ * @description Platform admins may activate, update, or clear (`banner: null`) the global outage/maintenance banner shown in the authenticated SPA shell. Requires Bearer JWT from an email on `PLATFORM_ADMIN_EMAILS`.
254
+ */
255
+ put: operations["adminUpsertPlatformBanner"];
256
+ post?: never;
257
+ delete?: never;
258
+ options?: never;
259
+ head?: never;
260
+ patch?: never;
261
+ trace?: never;
262
+ };
219
263
  "/me": {
220
264
  parameters: {
221
265
  query?: never;
@@ -4195,11 +4239,22 @@ export interface components {
4195
4239
  manageUrl?: string | null;
4196
4240
  /** Format: date-time */
4197
4241
  lastSyncedAt?: string | null;
4198
- /** @description True when this installation's granted permissions are below what the ThinkAI GitHub App currently requests. */
4242
+ /** @description True when this installation lacks core read permissions required for connect and analysis. Alias for `!corePermissionsOk`. */
4199
4243
  permissionsUpgradeRequired: boolean;
4244
+ /** @description True when installation grants read permissions for repository analysis (contents, metadata, pull requests, and members for org installs). */
4245
+ corePermissionsOk: boolean;
4246
+ /** @description True when installation grants write permissions required for automated fix PRs. */
4247
+ writePermissionsOk: boolean;
4248
+ /** @description Alias for `!writePermissionsOk`. */
4249
+ writePermissionsUpgradeRequired: boolean;
4250
+ /** @description Core read permissions still needed for connect and analysis. */
4200
4251
  missingPermissions?: components["schemas"]["GithubMissingPermissionDto"][];
4201
- /** @description Human-readable summary for UI when permissionsUpgradeRequired is true. */
4252
+ /** @description Write permissions still needed for automated fix PRs. */
4253
+ missingWritePermissions?: components["schemas"]["GithubMissingPermissionDto"][];
4254
+ /** @description Human-readable summary for UI when core permissions are missing. */
4202
4255
  upgradeMessage?: string | null;
4256
+ /** @description Human-readable summary for UI when write permissions are missing. */
4257
+ writeUpgradeMessage?: string | null;
4203
4258
  };
4204
4259
  GithubPendingApprovalDto: {
4205
4260
  /**
@@ -4267,8 +4322,18 @@ export interface components {
4267
4322
  GithubInstallationStatusDto: {
4268
4323
  installed: boolean;
4269
4324
  installations: components["schemas"]["GithubInstallationSummaryDto"][];
4270
- /** @description True if any connected installation is under-permissioned. */
4325
+ /** @description True if any connected installation lacks core read permissions. Alias for `!corePermissionsOk`. */
4271
4326
  permissionsUpgradeRequired: boolean;
4327
+ /** @description True when every connected installation grants core read permissions. */
4328
+ corePermissionsOk: boolean;
4329
+ /** @description True when every connected installation grants write permissions for automated fixes. */
4330
+ writePermissionsOk: boolean;
4331
+ /** @description True when any connected installation lacks write permissions for automated fixes. */
4332
+ writePermissionsUpgradeRequired: boolean;
4333
+ /** @description Aggregated write permissions missing on installations that lack write access. */
4334
+ missingWritePermissions?: components["schemas"]["GithubMissingPermissionDto"][];
4335
+ /** @description Human-readable summary when write permissions are missing. */
4336
+ writeUpgradeMessage?: string | null;
4272
4337
  /** @description Present when an org admin must approve the GitHub App install request. */
4273
4338
  pendingApproval?: components["schemas"]["GithubPendingApprovalDto"] | null;
4274
4339
  /** @description Present when GitHub connect was started but not completed (install OAuth state or account-picker session still active). Omitted when pendingApproval is set. */
@@ -4995,6 +5060,40 @@ export interface components {
4995
5060
  /** Format: date-time */
4996
5061
  createdAt?: string;
4997
5062
  };
5063
+ PlatformBannerDto: {
5064
+ /** @description Stable identifier used for dismiss persistence in the SPA. */
5065
+ id: string;
5066
+ /** @enum {string} */
5067
+ kind: "maintenance" | "outage" | "info";
5068
+ title: string;
5069
+ message: string;
5070
+ dismissible: boolean;
5071
+ /** @description Optional link to the public status page (status.aidrivensdlc.com). */
5072
+ statusPageUrl?: string;
5073
+ /**
5074
+ * Format: date-time
5075
+ * @description When set, the banner is hidden before this instant (UTC).
5076
+ */
5077
+ startsAt?: string;
5078
+ /**
5079
+ * Format: date-time
5080
+ * @description When set, the banner is hidden after this instant (UTC).
5081
+ */
5082
+ endsAt?: string;
5083
+ };
5084
+ PlatformBannerViewDto: {
5085
+ banner: components["schemas"]["PlatformBannerDto"] | null;
5086
+ };
5087
+ PlatformBannerUpsertDto: {
5088
+ /** @description Pass null to clear the active database-managed banner. */
5089
+ banner: components["schemas"]["PlatformBannerDto"] | null;
5090
+ };
5091
+ PlatformAdminBannerDto: {
5092
+ /** @description Banner persisted in the database (editable via PUT). */
5093
+ stored: components["schemas"]["PlatformBannerDto"] | null;
5094
+ /** @description Merged banner shown in the SPA (stored wins over runtime-config fallback). */
5095
+ effective: components["schemas"]["PlatformBannerViewDto"];
5096
+ };
4998
5097
  NotificationDto: {
4999
5098
  id: string;
5000
5099
  /** @enum {string} */
@@ -5832,6 +5931,10 @@ export type SquadDto = components['schemas']['SquadDto'];
5832
5931
  export type WorkflowDto = components['schemas']['WorkflowDto'];
5833
5932
  export type ProjectDto = components['schemas']['ProjectDto'];
5834
5933
  export type ProjectPatchDto = components['schemas']['ProjectPatchDto'];
5934
+ export type PlatformBannerDto = components['schemas']['PlatformBannerDto'];
5935
+ export type PlatformBannerViewDto = components['schemas']['PlatformBannerViewDto'];
5936
+ export type PlatformBannerUpsertDto = components['schemas']['PlatformBannerUpsertDto'];
5937
+ export type PlatformAdminBannerDto = components['schemas']['PlatformAdminBannerDto'];
5835
5938
  export type NotificationDto = components['schemas']['NotificationDto'];
5836
5939
  export type NotificationListDto = components['schemas']['NotificationListDto'];
5837
5940
  export type NotificationUnreadCountDto = components['schemas']['NotificationUnreadCountDto'];
@@ -6578,6 +6681,123 @@ export interface operations {
6578
6681
  };
6579
6682
  };
6580
6683
  };
6684
+ getPlatformBanner: {
6685
+ parameters: {
6686
+ query?: never;
6687
+ header?: never;
6688
+ path?: never;
6689
+ cookie?: never;
6690
+ };
6691
+ requestBody?: never;
6692
+ responses: {
6693
+ /** @description Active platform banner (if any) */
6694
+ 200: {
6695
+ headers: {
6696
+ [name: string]: unknown;
6697
+ };
6698
+ content: {
6699
+ "application/json": components["schemas"]["PlatformBannerViewDto"];
6700
+ };
6701
+ };
6702
+ };
6703
+ };
6704
+ adminGetPlatformBanner: {
6705
+ parameters: {
6706
+ query?: never;
6707
+ header?: never;
6708
+ path?: never;
6709
+ cookie?: never;
6710
+ };
6711
+ requestBody?: never;
6712
+ responses: {
6713
+ /** @description Admin platform banner view */
6714
+ 200: {
6715
+ headers: {
6716
+ [name: string]: unknown;
6717
+ };
6718
+ content: {
6719
+ "application/json": components["schemas"]["PlatformAdminBannerDto"];
6720
+ };
6721
+ };
6722
+ 401: components["responses"]["Unauthorized"];
6723
+ /** @description Caller is not a platform admin. */
6724
+ 403: {
6725
+ headers: {
6726
+ [name: string]: unknown;
6727
+ };
6728
+ content: {
6729
+ "application/json": components["schemas"]["ErrorMessageDto"];
6730
+ };
6731
+ };
6732
+ /** @description Platform banner persistence unavailable. */
6733
+ 503: {
6734
+ headers: {
6735
+ [name: string]: unknown;
6736
+ };
6737
+ content: {
6738
+ "application/json": components["schemas"]["ErrorMessageDto"];
6739
+ };
6740
+ };
6741
+ };
6742
+ };
6743
+ adminUpsertPlatformBanner: {
6744
+ parameters: {
6745
+ query?: never;
6746
+ header?: never;
6747
+ path?: never;
6748
+ cookie?: never;
6749
+ };
6750
+ requestBody: {
6751
+ content: {
6752
+ "application/json": components["schemas"]["PlatformBannerUpsertDto"];
6753
+ };
6754
+ };
6755
+ responses: {
6756
+ /** @description Updated platform banner */
6757
+ 200: {
6758
+ headers: {
6759
+ [name: string]: unknown;
6760
+ };
6761
+ content: {
6762
+ "application/json": components["schemas"]["PlatformBannerViewDto"];
6763
+ };
6764
+ };
6765
+ /** @description Invalid banner payload */
6766
+ 400: {
6767
+ headers: {
6768
+ [name: string]: unknown;
6769
+ };
6770
+ content: {
6771
+ "application/json": components["schemas"]["ErrorMessageDto"];
6772
+ };
6773
+ };
6774
+ 401: components["responses"]["Unauthorized"];
6775
+ /** @description Caller is not a platform admin. */
6776
+ 403: {
6777
+ headers: {
6778
+ [name: string]: unknown;
6779
+ };
6780
+ content: {
6781
+ /**
6782
+ * @example {
6783
+ * "error": "Forbidden",
6784
+ * "code": "forbidden"
6785
+ * }
6786
+ */
6787
+ "application/json": components["schemas"]["ErrorMessageDto"];
6788
+ };
6789
+ };
6790
+ /** @description Platform banner persistence unavailable. */
6791
+ 503: {
6792
+ headers: {
6793
+ [name: string]: unknown;
6794
+ };
6795
+ content: {
6796
+ "application/json": components["schemas"]["ErrorMessageDto"];
6797
+ };
6798
+ };
6799
+ };
6800
+ };
6581
6801
  getMe: {
6582
6802
  parameters: {
6583
6803
  query?: never;