@thinkai/tai-api-contract 2.56.0 → 2.57.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.56.0
4
+ version: 2.57.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}/...`.
@@ -64,6 +64,8 @@ tags:
64
64
  description: >
65
65
  Data subject access / erasure / portability request intake and privacy-ops management (DSAR, issue #611).
66
66
  Public and authenticated submission; platform-admin queue, export, and fulfillment.
67
+ - name: Platform
68
+ description: Platform-wide banner surfaces (global outage/maintenance banner, issue #284).
67
69
 
68
70
  paths:
69
71
  /admin/users/{userId}:
@@ -694,6 +696,98 @@ paths:
694
696
  schema:
695
697
  $ref: "#/components/schemas/ErrorMessageDto"
696
698
 
699
+ /platform/banner:
700
+ get:
701
+ tags: [Platform]
702
+ summary: Global platform banner
703
+ operationId: getPlatformBanner
704
+ security: []
705
+ description: >
706
+ Returns the active global outage or maintenance banner for the platform shell, if any.
707
+ No authentication required so signed-in users can see incident messaging during partial outages.
708
+ When both a database-managed banner and a runtime-config fallback exist, the database value wins.
709
+ responses:
710
+ "200":
711
+ description: Active platform banner (if any)
712
+ content:
713
+ application/json:
714
+ schema:
715
+ $ref: "#/components/schemas/PlatformBannerViewDto"
716
+
717
+ /admin/platform/banner:
718
+ get:
719
+ tags: [PlatformAdmin]
720
+ summary: Read stored and effective global platform banner
721
+ operationId: adminGetPlatformBanner
722
+ description: >
723
+ Platform admins only. Returns the database-stored banner (`stored`) for editing and the
724
+ merged banner users see (`effective`, DB wins over runtime-config fallback). Requires Bearer
725
+ JWT from an email on `PLATFORM_ADMIN_EMAILS`.
726
+ responses:
727
+ "200":
728
+ description: Admin platform banner view
729
+ content:
730
+ application/json:
731
+ schema:
732
+ $ref: "#/components/schemas/PlatformAdminBannerDto"
733
+ "401":
734
+ $ref: "#/components/responses/Unauthorized"
735
+ "403":
736
+ description: Caller is not a platform admin.
737
+ content:
738
+ application/json:
739
+ schema:
740
+ $ref: "#/components/schemas/ErrorMessageDto"
741
+ "503":
742
+ description: Platform banner persistence unavailable.
743
+ content:
744
+ application/json:
745
+ schema:
746
+ $ref: "#/components/schemas/ErrorMessageDto"
747
+ put:
748
+ tags: [PlatformAdmin]
749
+ summary: Set or clear global platform banner
750
+ operationId: adminUpsertPlatformBanner
751
+ description: >
752
+ Platform admins may activate, update, or clear (`banner: null`) the global outage/maintenance banner
753
+ shown in the authenticated SPA shell. Requires Bearer JWT from an email on `PLATFORM_ADMIN_EMAILS`.
754
+ requestBody:
755
+ required: true
756
+ content:
757
+ application/json:
758
+ schema:
759
+ $ref: "#/components/schemas/PlatformBannerUpsertDto"
760
+ responses:
761
+ "200":
762
+ description: Updated platform banner
763
+ content:
764
+ application/json:
765
+ schema:
766
+ $ref: "#/components/schemas/PlatformBannerViewDto"
767
+ "400":
768
+ description: Invalid banner payload
769
+ content:
770
+ application/json:
771
+ schema:
772
+ $ref: "#/components/schemas/ErrorMessageDto"
773
+ "401":
774
+ $ref: "#/components/responses/Unauthorized"
775
+ "403":
776
+ description: Caller is not a platform admin.
777
+ content:
778
+ application/json:
779
+ schema:
780
+ $ref: "#/components/schemas/ErrorMessageDto"
781
+ example:
782
+ error: Forbidden
783
+ code: forbidden
784
+ "503":
785
+ description: Platform banner persistence unavailable.
786
+ content:
787
+ application/json:
788
+ schema:
789
+ $ref: "#/components/schemas/ErrorMessageDto"
790
+
697
791
  /me:
698
792
  get:
699
793
  tags: [Me]
@@ -11930,6 +12024,67 @@ components:
11930
12024
  type: string
11931
12025
  format: date-time
11932
12026
 
12027
+ PlatformBannerDto:
12028
+ type: object
12029
+ required: [id, kind, title, message, dismissible]
12030
+ properties:
12031
+ id:
12032
+ type: string
12033
+ description: Stable identifier used for dismiss persistence in the SPA.
12034
+ kind:
12035
+ type: string
12036
+ enum: [maintenance, outage, info]
12037
+ title:
12038
+ type: string
12039
+ message:
12040
+ type: string
12041
+ dismissible:
12042
+ type: boolean
12043
+ statusPageUrl:
12044
+ type: string
12045
+ description: Optional link to the public status page (status.aidrivensdlc.com).
12046
+ startsAt:
12047
+ type: string
12048
+ format: date-time
12049
+ description: When set, the banner is hidden before this instant (UTC).
12050
+ endsAt:
12051
+ type: string
12052
+ format: date-time
12053
+ description: When set, the banner is hidden after this instant (UTC).
12054
+
12055
+ PlatformBannerViewDto:
12056
+ type: object
12057
+ required: [banner]
12058
+ properties:
12059
+ banner:
12060
+ allOf:
12061
+ - $ref: "#/components/schemas/PlatformBannerDto"
12062
+ nullable: true
12063
+
12064
+ PlatformBannerUpsertDto:
12065
+ type: object
12066
+ required: [banner]
12067
+ properties:
12068
+ banner:
12069
+ allOf:
12070
+ - $ref: "#/components/schemas/PlatformBannerDto"
12071
+ nullable: true
12072
+ description: Pass null to clear the active database-managed banner.
12073
+
12074
+ PlatformAdminBannerDto:
12075
+ type: object
12076
+ required: [stored, effective]
12077
+ properties:
12078
+ stored:
12079
+ allOf:
12080
+ - $ref: "#/components/schemas/PlatformBannerDto"
12081
+ nullable: true
12082
+ description: Banner persisted in the database (editable via PUT).
12083
+ effective:
12084
+ allOf:
12085
+ - $ref: "#/components/schemas/PlatformBannerViewDto"
12086
+ description: Merged banner shown in the SPA (stored wins over runtime-config fallback).
12087
+
11933
12088
  NotificationDto:
11934
12089
  type: object
11935
12090
  required: [id, type, title, message, read, createdAt]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.56.0",
3
+ "version": "2.57.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -217,6 +217,50 @@ export interface paths {
217
217
  patch?: never;
218
218
  trace?: never;
219
219
  };
220
+ "/platform/banner": {
221
+ parameters: {
222
+ query?: never;
223
+ header?: never;
224
+ path?: never;
225
+ cookie?: never;
226
+ };
227
+ /**
228
+ * Global platform banner
229
+ * @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.
230
+ */
231
+ get: operations["getPlatformBanner"];
232
+ put?: never;
233
+ post?: never;
234
+ delete?: never;
235
+ options?: never;
236
+ head?: never;
237
+ patch?: never;
238
+ trace?: never;
239
+ };
240
+ "/admin/platform/banner": {
241
+ parameters: {
242
+ query?: never;
243
+ header?: never;
244
+ path?: never;
245
+ cookie?: never;
246
+ };
247
+ /**
248
+ * Read stored and effective global platform banner
249
+ * @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`.
250
+ */
251
+ get: operations["adminGetPlatformBanner"];
252
+ /**
253
+ * Set or clear global platform banner
254
+ * @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`.
255
+ */
256
+ put: operations["adminUpsertPlatformBanner"];
257
+ post?: never;
258
+ delete?: never;
259
+ options?: never;
260
+ head?: never;
261
+ patch?: never;
262
+ trace?: never;
263
+ };
220
264
  "/me": {
221
265
  parameters: {
222
266
  query?: never;
@@ -4996,6 +5040,40 @@ export interface components {
4996
5040
  /** Format: date-time */
4997
5041
  createdAt?: string;
4998
5042
  };
5043
+ PlatformBannerDto: {
5044
+ /** @description Stable identifier used for dismiss persistence in the SPA. */
5045
+ id: string;
5046
+ /** @enum {string} */
5047
+ kind: "maintenance" | "outage" | "info";
5048
+ title: string;
5049
+ message: string;
5050
+ dismissible: boolean;
5051
+ /** @description Optional link to the public status page (status.aidrivensdlc.com). */
5052
+ statusPageUrl?: string;
5053
+ /**
5054
+ * Format: date-time
5055
+ * @description When set, the banner is hidden before this instant (UTC).
5056
+ */
5057
+ startsAt?: string;
5058
+ /**
5059
+ * Format: date-time
5060
+ * @description When set, the banner is hidden after this instant (UTC).
5061
+ */
5062
+ endsAt?: string;
5063
+ };
5064
+ PlatformBannerViewDto: {
5065
+ banner: components["schemas"]["PlatformBannerDto"] | null;
5066
+ };
5067
+ PlatformBannerUpsertDto: {
5068
+ /** @description Pass null to clear the active database-managed banner. */
5069
+ banner: components["schemas"]["PlatformBannerDto"] | null;
5070
+ };
5071
+ PlatformAdminBannerDto: {
5072
+ /** @description Banner persisted in the database (editable via PUT). */
5073
+ stored: components["schemas"]["PlatformBannerDto"] | null;
5074
+ /** @description Merged banner shown in the SPA (stored wins over runtime-config fallback). */
5075
+ effective: components["schemas"]["PlatformBannerViewDto"];
5076
+ };
4999
5077
  NotificationDto: {
5000
5078
  id: string;
5001
5079
  /** @enum {string} */
@@ -5833,6 +5911,10 @@ export type SquadDto = components['schemas']['SquadDto'];
5833
5911
  export type WorkflowDto = components['schemas']['WorkflowDto'];
5834
5912
  export type ProjectDto = components['schemas']['ProjectDto'];
5835
5913
  export type ProjectPatchDto = components['schemas']['ProjectPatchDto'];
5914
+ export type PlatformBannerDto = components['schemas']['PlatformBannerDto'];
5915
+ export type PlatformBannerViewDto = components['schemas']['PlatformBannerViewDto'];
5916
+ export type PlatformBannerUpsertDto = components['schemas']['PlatformBannerUpsertDto'];
5917
+ export type PlatformAdminBannerDto = components['schemas']['PlatformAdminBannerDto'];
5836
5918
  export type NotificationDto = components['schemas']['NotificationDto'];
5837
5919
  export type NotificationListDto = components['schemas']['NotificationListDto'];
5838
5920
  export type NotificationUnreadCountDto = components['schemas']['NotificationUnreadCountDto'];
@@ -6579,6 +6661,123 @@ export interface operations {
6579
6661
  };
6580
6662
  };
6581
6663
  };
6664
+ getPlatformBanner: {
6665
+ parameters: {
6666
+ query?: never;
6667
+ header?: never;
6668
+ path?: never;
6669
+ cookie?: never;
6670
+ };
6671
+ requestBody?: never;
6672
+ responses: {
6673
+ /** @description Active platform banner (if any) */
6674
+ 200: {
6675
+ headers: {
6676
+ [name: string]: unknown;
6677
+ };
6678
+ content: {
6679
+ "application/json": components["schemas"]["PlatformBannerViewDto"];
6680
+ };
6681
+ };
6682
+ };
6683
+ };
6684
+ adminGetPlatformBanner: {
6685
+ parameters: {
6686
+ query?: never;
6687
+ header?: never;
6688
+ path?: never;
6689
+ cookie?: never;
6690
+ };
6691
+ requestBody?: never;
6692
+ responses: {
6693
+ /** @description Admin platform banner view */
6694
+ 200: {
6695
+ headers: {
6696
+ [name: string]: unknown;
6697
+ };
6698
+ content: {
6699
+ "application/json": components["schemas"]["PlatformAdminBannerDto"];
6700
+ };
6701
+ };
6702
+ 401: components["responses"]["Unauthorized"];
6703
+ /** @description Caller is not a platform admin. */
6704
+ 403: {
6705
+ headers: {
6706
+ [name: string]: unknown;
6707
+ };
6708
+ content: {
6709
+ "application/json": components["schemas"]["ErrorMessageDto"];
6710
+ };
6711
+ };
6712
+ /** @description Platform banner persistence unavailable. */
6713
+ 503: {
6714
+ headers: {
6715
+ [name: string]: unknown;
6716
+ };
6717
+ content: {
6718
+ "application/json": components["schemas"]["ErrorMessageDto"];
6719
+ };
6720
+ };
6721
+ };
6722
+ };
6723
+ adminUpsertPlatformBanner: {
6724
+ parameters: {
6725
+ query?: never;
6726
+ header?: never;
6727
+ path?: never;
6728
+ cookie?: never;
6729
+ };
6730
+ requestBody: {
6731
+ content: {
6732
+ "application/json": components["schemas"]["PlatformBannerUpsertDto"];
6733
+ };
6734
+ };
6735
+ responses: {
6736
+ /** @description Updated platform banner */
6737
+ 200: {
6738
+ headers: {
6739
+ [name: string]: unknown;
6740
+ };
6741
+ content: {
6742
+ "application/json": components["schemas"]["PlatformBannerViewDto"];
6743
+ };
6744
+ };
6745
+ /** @description Invalid banner payload */
6746
+ 400: {
6747
+ headers: {
6748
+ [name: string]: unknown;
6749
+ };
6750
+ content: {
6751
+ "application/json": components["schemas"]["ErrorMessageDto"];
6752
+ };
6753
+ };
6754
+ 401: components["responses"]["Unauthorized"];
6755
+ /** @description Caller is not a platform admin. */
6756
+ 403: {
6757
+ headers: {
6758
+ [name: string]: unknown;
6759
+ };
6760
+ content: {
6761
+ /**
6762
+ * @example {
6763
+ * "error": "Forbidden",
6764
+ * "code": "forbidden"
6765
+ * }
6766
+ */
6767
+ "application/json": components["schemas"]["ErrorMessageDto"];
6768
+ };
6769
+ };
6770
+ /** @description Platform banner persistence unavailable. */
6771
+ 503: {
6772
+ headers: {
6773
+ [name: string]: unknown;
6774
+ };
6775
+ content: {
6776
+ "application/json": components["schemas"]["ErrorMessageDto"];
6777
+ };
6778
+ };
6779
+ };
6780
+ };
6582
6781
  getMe: {
6583
6782
  parameters: {
6584
6783
  query?: never;