@thinkai/tai-api-contract 2.151.0 → 2.153.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.151.0
4
+ version: 2.153.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}/...`.
@@ -9236,7 +9236,7 @@ paths:
9236
9236
  description: >
9237
9237
  **Unauthenticated.** Sets that category's email cell to `off` when the category
9238
9238
  allows off. A status token leaves status email unchanged. Redirects `303` to
9239
- `{spa}/settings?tab=preferences`. An unknown or expired token is `400` HTML and
9239
+ `{spa}/workspace/preferences`. An unknown or expired token is `400` HTML and
9240
9240
  does not change preferences.
9241
9241
  operationId: postNotificationEmailUnsubscribe
9242
9242
  security: []
@@ -9252,7 +9252,7 @@ paths:
9252
9252
  description: Preference updated, or left unchanged for status email.
9253
9253
  headers:
9254
9254
  Location:
9255
- description: "`{spa}/settings?tab=preferences`"
9255
+ description: "`{spa}/workspace/preferences`"
9256
9256
  schema:
9257
9257
  type: string
9258
9258
  "400":
@@ -9326,7 +9326,7 @@ paths:
9326
9326
  bearer token. `state` was issued by `getSlackInstallUrl` to a signed-in admin
9327
9327
  and is single-use. The bot token is stored encrypted only when that user is
9328
9328
  still a workspace admin. Success redirects to
9329
- `{spa}/settings?tab=preferences&chat=slack`. Failures redirect to the same
9329
+ `{spa}/workspace/preferences?chat=slack`. Failures redirect to the same
9330
9330
  page with `slack=error`. The token is never in the redirect.
9331
9331
  parameters:
9332
9332
  - name: code
@@ -9489,6 +9489,61 @@ paths:
9489
9489
  error: Slack did not accept the channel
9490
9490
  code: slack_request_failed
9491
9491
 
9492
+ /workspaces/{workspaceId}/notification-preferences:
9493
+ get:
9494
+ tags: [Notifications]
9495
+ summary: Member notification preferences for this workspace
9496
+ description: >
9497
+ In-app Message Center switches and email, Slack, and Teams cells for the
9498
+ current member in this workspace. Missing stored values use the same defaults
9499
+ as account preferences (`email.status` is `digest`; other channel cells are `off`).
9500
+ operationId: getWorkspaceNotificationPreferences
9501
+ parameters:
9502
+ - $ref: "#/components/parameters/WorkspaceId"
9503
+ responses:
9504
+ "200":
9505
+ description: Preferences for this member in this workspace
9506
+ content:
9507
+ application/json:
9508
+ schema:
9509
+ $ref: "#/components/schemas/WorkspaceNotificationPreferencesDto"
9510
+ "401":
9511
+ $ref: "#/components/responses/Unauthorized"
9512
+ put:
9513
+ tags: [Notifications]
9514
+ summary: Save member notification preferences for this workspace
9515
+ description: >
9516
+ Replaces the in-app switches. `notificationChannels` may be omitted to keep
9517
+ stored cells. `email.status` = `off` is `400` `notification_channel_required`.
9518
+ Account `PUT /me/preferences` no longer changes the inbox or delivery.
9519
+ operationId: putWorkspaceNotificationPreferences
9520
+ parameters:
9521
+ - $ref: "#/components/parameters/WorkspaceId"
9522
+ requestBody:
9523
+ required: true
9524
+ content:
9525
+ application/json:
9526
+ schema:
9527
+ $ref: "#/components/schemas/PutWorkspaceNotificationPreferencesBodyDto"
9528
+ responses:
9529
+ "200":
9530
+ description: Saved preferences
9531
+ content:
9532
+ application/json:
9533
+ schema:
9534
+ $ref: "#/components/schemas/WorkspaceNotificationPreferencesDto"
9535
+ "400":
9536
+ description: Invalid body, or status email set to off
9537
+ content:
9538
+ application/json:
9539
+ schema:
9540
+ $ref: "#/components/schemas/ErrorMessageDto"
9541
+ example:
9542
+ error: Status email cannot be turned off
9543
+ code: notification_channel_required
9544
+ "401":
9545
+ $ref: "#/components/responses/Unauthorized"
9546
+
9492
9547
  /workspaces/{workspaceId}/notifications:
9493
9548
  get:
9494
9549
  tags: [Notifications]
@@ -9566,6 +9621,35 @@ paths:
9566
9621
  "401":
9567
9622
  $ref: "#/components/responses/Unauthorized"
9568
9623
 
9624
+ /workspaces/{workspaceId}/notifications/read:
9625
+ post:
9626
+ tags: [Notifications]
9627
+ summary: Mark selected notifications read
9628
+ description: >
9629
+ Marks only the given ids read for the current member in this workspace.
9630
+ Ids that are missing or belong to someone else are ignored. `ids` is 1 to 100
9631
+ uuids.
9632
+ operationId: postNotificationsRead
9633
+ parameters:
9634
+ - $ref: "#/components/parameters/WorkspaceId"
9635
+ requestBody:
9636
+ required: true
9637
+ content:
9638
+ application/json:
9639
+ schema:
9640
+ $ref: "#/components/schemas/NotificationReadIdsBodyDto"
9641
+ responses:
9642
+ "204":
9643
+ description: Updated
9644
+ "400":
9645
+ description: Invalid ids
9646
+ content:
9647
+ application/json:
9648
+ schema:
9649
+ $ref: "#/components/schemas/ErrorMessageDto"
9650
+ "401":
9651
+ $ref: "#/components/responses/Unauthorized"
9652
+
9569
9653
  /workspaces/{workspaceId}/notifications/{id}/read:
9570
9654
  post:
9571
9655
  tags: [Notifications]
@@ -9580,6 +9664,27 @@ paths:
9580
9664
  "401":
9581
9665
  $ref: "#/components/responses/Unauthorized"
9582
9666
 
9667
+ /workspaces/{workspaceId}/notifications/{id}/unread:
9668
+ post:
9669
+ tags: [Notifications]
9670
+ summary: Mark notification unread
9671
+ description: Clears read state for the current member's row. Does not follow a route.
9672
+ operationId: postNotificationUnread
9673
+ parameters:
9674
+ - $ref: "#/components/parameters/WorkspaceId"
9675
+ - $ref: "#/components/parameters/NotificationId"
9676
+ responses:
9677
+ "204":
9678
+ description: Updated
9679
+ "401":
9680
+ $ref: "#/components/responses/Unauthorized"
9681
+ "404":
9682
+ description: Notification was not found for this member
9683
+ content:
9684
+ application/json:
9685
+ schema:
9686
+ $ref: "#/components/schemas/ErrorMessageDto"
9687
+
9583
9688
  /workspaces/{workspaceId}/notifications/read-all:
9584
9689
  post:
9585
9690
  tags: [Notifications]
@@ -10305,7 +10410,7 @@ paths:
10305
10410
  description: >
10306
10411
  Public redirect target. The one-time state was minted by a signed-in admin and
10307
10412
  still requires that user to be a workspace admin. Stores the bot token encrypted
10308
- and redirects to `{spa}/settings?tab=preferences&chat=teams`.
10413
+ and redirects to `{spa}/workspace/preferences?chat=teams`.
10309
10414
  security: []
10310
10415
  parameters:
10311
10416
  - name: code
@@ -10328,7 +10433,7 @@ paths:
10328
10433
  Location:
10329
10434
  schema:
10330
10435
  type: string
10331
- example: "https://app.example.com/settings?tab=preferences&chat=teams"
10436
+ example: "https://app.example.com/workspace/preferences?chat=teams"
10332
10437
  "503":
10333
10438
  description: SPA origin is not configured
10334
10439
  content:
@@ -19369,6 +19474,44 @@ components:
19369
19474
  system:
19370
19475
  $ref: "#/components/schemas/NotificationChatDeliveryMode"
19371
19476
 
19477
+ WorkspaceNotificationPreferencesDto:
19478
+ type: object
19479
+ additionalProperties: false
19480
+ required: [notifications, notificationChannels]
19481
+ description: >
19482
+ Message Center switches and delivery cells for one member in one workspace.
19483
+ properties:
19484
+ notifications:
19485
+ $ref: "#/components/schemas/NotificationPreferencesDto"
19486
+ notificationChannels:
19487
+ $ref: "#/components/schemas/NotificationChannelsDto"
19488
+
19489
+ PutWorkspaceNotificationPreferencesBodyDto:
19490
+ type: object
19491
+ additionalProperties: false
19492
+ required: [notifications]
19493
+ description: >
19494
+ Body for `PUT /workspaces/{workspaceId}/notification-preferences`.
19495
+ Omit `notificationChannels` to keep stored cells.
19496
+ properties:
19497
+ notifications:
19498
+ $ref: "#/components/schemas/NotificationPreferencesDto"
19499
+ notificationChannels:
19500
+ $ref: "#/components/schemas/PutNotificationChannelsDto"
19501
+
19502
+ NotificationReadIdsBodyDto:
19503
+ type: object
19504
+ additionalProperties: false
19505
+ required: [ids]
19506
+ properties:
19507
+ ids:
19508
+ type: array
19509
+ minItems: 1
19510
+ maxItems: 100
19511
+ items:
19512
+ type: string
19513
+ format: uuid
19514
+
19372
19515
  NotificationChannelsDto:
19373
19516
  type: object
19374
19517
  additionalProperties: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkai/tai-api-contract",
3
- "version": "2.151.0",
3
+ "version": "2.153.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -19,9 +19,9 @@
19
19
  }
20
20
  },
21
21
  "devDependencies": {
22
- "@stoplight/spectral-cli": "^6.16.3",
23
- "@types/node": "^26.6.3",
24
- "jsonpath-plus": "^11.1.0",
22
+ "@stoplight/spectral-cli": "^6.17.0",
23
+ "@types/node": "^26.6.4",
24
+ "jsonpath-plus": "^11.1.1",
25
25
  "openapi-typescript": "^7.13.0",
26
26
  "typescript": "~6.0.3"
27
27
  },
@@ -3716,7 +3716,7 @@ export interface paths {
3716
3716
  put?: never;
3717
3717
  /**
3718
3718
  * Apply a Message Center email unsubscribe (public)
3719
- * @description **Unauthenticated.** Sets that category's email cell to `off` when the category allows off. A status token leaves status email unchanged. Redirects `303` to `{spa}/settings?tab=preferences`. An unknown or expired token is `400` HTML and does not change preferences.
3719
+ * @description **Unauthenticated.** Sets that category's email cell to `off` when the category allows off. A status token leaves status email unchanged. Redirects `303` to `{spa}/workspace/preferences`. An unknown or expired token is `400` HTML and does not change preferences.
3720
3720
  */
3721
3721
  post: operations["postNotificationEmailUnsubscribe"];
3722
3722
  delete?: never;
@@ -3754,7 +3754,7 @@ export interface paths {
3754
3754
  };
3755
3755
  /**
3756
3756
  * Slack OAuth callback
3757
- * @description Browser return from Slack. The provider redirect does not include the API bearer token. `state` was issued by `getSlackInstallUrl` to a signed-in admin and is single-use. The bot token is stored encrypted only when that user is still a workspace admin. Success redirects to `{spa}/settings?tab=preferences&chat=slack`. Failures redirect to the same page with `slack=error`. The token is never in the redirect.
3757
+ * @description Browser return from Slack. The provider redirect does not include the API bearer token. `state` was issued by `getSlackInstallUrl` to a signed-in admin and is single-use. The bot token is stored encrypted only when that user is still a workspace admin. Success redirects to `{spa}/workspace/preferences?chat=slack`. Failures redirect to the same page with `slack=error`. The token is never in the redirect.
3758
3758
  */
3759
3759
  get: operations["getSlackOauthCallback"];
3760
3760
  put?: never;
@@ -3809,6 +3809,30 @@ export interface paths {
3809
3809
  patch?: never;
3810
3810
  trace?: never;
3811
3811
  };
3812
+ "/workspaces/{workspaceId}/notification-preferences": {
3813
+ parameters: {
3814
+ query?: never;
3815
+ header?: never;
3816
+ path?: never;
3817
+ cookie?: never;
3818
+ };
3819
+ /**
3820
+ * Member notification preferences for this workspace
3821
+ * @description In-app Message Center switches and email, Slack, and Teams cells for the current member in this workspace. Missing stored values use the same defaults as account preferences (`email.status` is `digest`; other channel cells are `off`).
3822
+ */
3823
+ get: operations["getWorkspaceNotificationPreferences"];
3824
+ /**
3825
+ * Save member notification preferences for this workspace
3826
+ * @description Replaces the in-app switches. `notificationChannels` may be omitted to keep stored cells. `email.status` = `off` is `400` `notification_channel_required`. Account `PUT /me/preferences` no longer changes the inbox or delivery.
3827
+ */
3828
+ put: operations["putWorkspaceNotificationPreferences"];
3829
+ post?: never;
3830
+ delete?: never;
3831
+ options?: never;
3832
+ head?: never;
3833
+ patch?: never;
3834
+ trace?: never;
3835
+ };
3812
3836
  "/workspaces/{workspaceId}/notifications": {
3813
3837
  parameters: {
3814
3838
  query?: never;
@@ -3849,6 +3873,26 @@ export interface paths {
3849
3873
  patch?: never;
3850
3874
  trace?: never;
3851
3875
  };
3876
+ "/workspaces/{workspaceId}/notifications/read": {
3877
+ parameters: {
3878
+ query?: never;
3879
+ header?: never;
3880
+ path?: never;
3881
+ cookie?: never;
3882
+ };
3883
+ get?: never;
3884
+ put?: never;
3885
+ /**
3886
+ * Mark selected notifications read
3887
+ * @description Marks only the given ids read for the current member in this workspace. Ids that are missing or belong to someone else are ignored. `ids` is 1 to 100 uuids.
3888
+ */
3889
+ post: operations["postNotificationsRead"];
3890
+ delete?: never;
3891
+ options?: never;
3892
+ head?: never;
3893
+ patch?: never;
3894
+ trace?: never;
3895
+ };
3852
3896
  "/workspaces/{workspaceId}/notifications/{id}/read": {
3853
3897
  parameters: {
3854
3898
  query?: never;
@@ -3866,6 +3910,26 @@ export interface paths {
3866
3910
  patch?: never;
3867
3911
  trace?: never;
3868
3912
  };
3913
+ "/workspaces/{workspaceId}/notifications/{id}/unread": {
3914
+ parameters: {
3915
+ query?: never;
3916
+ header?: never;
3917
+ path?: never;
3918
+ cookie?: never;
3919
+ };
3920
+ get?: never;
3921
+ put?: never;
3922
+ /**
3923
+ * Mark notification unread
3924
+ * @description Clears read state for the current member's row. Does not follow a route.
3925
+ */
3926
+ post: operations["postNotificationUnread"];
3927
+ delete?: never;
3928
+ options?: never;
3929
+ head?: never;
3930
+ patch?: never;
3931
+ trace?: never;
3932
+ };
3869
3933
  "/workspaces/{workspaceId}/notifications/read-all": {
3870
3934
  parameters: {
3871
3935
  query?: never;
@@ -4236,7 +4300,7 @@ export interface paths {
4236
4300
  };
4237
4301
  /**
4238
4302
  * Finish Teams Microsoft sign-in
4239
- * @description Public redirect target. The one-time state was minted by a signed-in admin and still requires that user to be a workspace admin. Stores the bot token encrypted and redirects to `{spa}/settings?tab=preferences&chat=teams`.
4303
+ * @description Public redirect target. The one-time state was minted by a signed-in admin and still requires that user to be a workspace admin. Stores the bot token encrypted and redirects to `{spa}/workspace/preferences?chat=teams`.
4240
4304
  */
4241
4305
  get: operations["getTeamsIntegrationCallback"];
4242
4306
  put?: never;
@@ -8217,6 +8281,19 @@ export interface components {
8217
8281
  activity: components["schemas"]["NotificationChatDeliveryMode"];
8218
8282
  system: components["schemas"]["NotificationChatDeliveryMode"];
8219
8283
  };
8284
+ /** @description Message Center switches and delivery cells for one member in one workspace. */
8285
+ WorkspaceNotificationPreferencesDto: {
8286
+ notifications: components["schemas"]["NotificationPreferencesDto"];
8287
+ notificationChannels: components["schemas"]["NotificationChannelsDto"];
8288
+ };
8289
+ /** @description Body for `PUT /workspaces/{workspaceId}/notification-preferences`. Omit `notificationChannels` to keep stored cells. */
8290
+ PutWorkspaceNotificationPreferencesBodyDto: {
8291
+ notifications: components["schemas"]["NotificationPreferencesDto"];
8292
+ notificationChannels?: components["schemas"]["PutNotificationChannelsDto"];
8293
+ };
8294
+ NotificationReadIdsBodyDto: {
8295
+ ids: string[];
8296
+ };
8220
8297
  /** @description Delivery cells beside the in-app Message Center switches. Defaults: `email.status` is `digest`; every other cell is `off`. Inbox rows whose type is `integration` use the `status` cell. */
8221
8298
  NotificationChannelsDto: {
8222
8299
  email: components["schemas"]["NotificationEmailChannelsDto"];
@@ -11026,6 +11103,9 @@ export type NotificationEmailDeliveryMode = components['schemas']['NotificationE
11026
11103
  export type NotificationChatDeliveryMode = components['schemas']['NotificationChatDeliveryMode'];
11027
11104
  export type NotificationEmailChannelsDto = components['schemas']['NotificationEmailChannelsDto'];
11028
11105
  export type NotificationChatChannelsDto = components['schemas']['NotificationChatChannelsDto'];
11106
+ export type WorkspaceNotificationPreferencesDto = components['schemas']['WorkspaceNotificationPreferencesDto'];
11107
+ export type PutWorkspaceNotificationPreferencesBodyDto = components['schemas']['PutWorkspaceNotificationPreferencesBodyDto'];
11108
+ export type NotificationReadIdsBodyDto = components['schemas']['NotificationReadIdsBodyDto'];
11029
11109
  export type NotificationChannelsDto = components['schemas']['NotificationChannelsDto'];
11030
11110
  export type SlackInstallUrlDto = components['schemas']['SlackInstallUrlDto'];
11031
11111
  export type SlackIntegrationStatusDto = components['schemas']['SlackIntegrationStatusDto'];
@@ -20958,7 +21038,7 @@ export interface operations {
20958
21038
  /** @description Preference updated, or left unchanged for status email. */
20959
21039
  303: {
20960
21040
  headers: {
20961
- /** @description `{spa}/settings?tab=preferences` */
21041
+ /** @description `{spa}/workspace/preferences` */
20962
21042
  Location?: string;
20963
21043
  [name: string]: unknown;
20964
21044
  };
@@ -21243,6 +21323,71 @@ export interface operations {
21243
21323
  };
21244
21324
  };
21245
21325
  };
21326
+ getWorkspaceNotificationPreferences: {
21327
+ parameters: {
21328
+ query?: never;
21329
+ header?: never;
21330
+ path: {
21331
+ workspaceId: components["parameters"]["WorkspaceId"];
21332
+ };
21333
+ cookie?: never;
21334
+ };
21335
+ requestBody?: never;
21336
+ responses: {
21337
+ /** @description Preferences for this member in this workspace */
21338
+ 200: {
21339
+ headers: {
21340
+ [name: string]: unknown;
21341
+ };
21342
+ content: {
21343
+ "application/json": components["schemas"]["WorkspaceNotificationPreferencesDto"];
21344
+ };
21345
+ };
21346
+ 401: components["responses"]["Unauthorized"];
21347
+ };
21348
+ };
21349
+ putWorkspaceNotificationPreferences: {
21350
+ parameters: {
21351
+ query?: never;
21352
+ header?: never;
21353
+ path: {
21354
+ workspaceId: components["parameters"]["WorkspaceId"];
21355
+ };
21356
+ cookie?: never;
21357
+ };
21358
+ requestBody: {
21359
+ content: {
21360
+ "application/json": components["schemas"]["PutWorkspaceNotificationPreferencesBodyDto"];
21361
+ };
21362
+ };
21363
+ responses: {
21364
+ /** @description Saved preferences */
21365
+ 200: {
21366
+ headers: {
21367
+ [name: string]: unknown;
21368
+ };
21369
+ content: {
21370
+ "application/json": components["schemas"]["WorkspaceNotificationPreferencesDto"];
21371
+ };
21372
+ };
21373
+ /** @description Invalid body, or status email set to off */
21374
+ 400: {
21375
+ headers: {
21376
+ [name: string]: unknown;
21377
+ };
21378
+ content: {
21379
+ /**
21380
+ * @example {
21381
+ * "error": "Status email cannot be turned off",
21382
+ * "code": "notification_channel_required"
21383
+ * }
21384
+ */
21385
+ "application/json": components["schemas"]["ErrorMessageDto"];
21386
+ };
21387
+ };
21388
+ 401: components["responses"]["Unauthorized"];
21389
+ };
21390
+ };
21246
21391
  listNotifications: {
21247
21392
  parameters: {
21248
21393
  query?: {
@@ -21305,6 +21450,40 @@ export interface operations {
21305
21450
  401: components["responses"]["Unauthorized"];
21306
21451
  };
21307
21452
  };
21453
+ postNotificationsRead: {
21454
+ parameters: {
21455
+ query?: never;
21456
+ header?: never;
21457
+ path: {
21458
+ workspaceId: components["parameters"]["WorkspaceId"];
21459
+ };
21460
+ cookie?: never;
21461
+ };
21462
+ requestBody: {
21463
+ content: {
21464
+ "application/json": components["schemas"]["NotificationReadIdsBodyDto"];
21465
+ };
21466
+ };
21467
+ responses: {
21468
+ /** @description Updated */
21469
+ 204: {
21470
+ headers: {
21471
+ [name: string]: unknown;
21472
+ };
21473
+ content?: never;
21474
+ };
21475
+ /** @description Invalid ids */
21476
+ 400: {
21477
+ headers: {
21478
+ [name: string]: unknown;
21479
+ };
21480
+ content: {
21481
+ "application/json": components["schemas"]["ErrorMessageDto"];
21482
+ };
21483
+ };
21484
+ 401: components["responses"]["Unauthorized"];
21485
+ };
21486
+ };
21308
21487
  postNotificationRead: {
21309
21488
  parameters: {
21310
21489
  query?: never;
@@ -21327,6 +21506,37 @@ export interface operations {
21327
21506
  401: components["responses"]["Unauthorized"];
21328
21507
  };
21329
21508
  };
21509
+ postNotificationUnread: {
21510
+ parameters: {
21511
+ query?: never;
21512
+ header?: never;
21513
+ path: {
21514
+ workspaceId: components["parameters"]["WorkspaceId"];
21515
+ id: components["parameters"]["NotificationId"];
21516
+ };
21517
+ cookie?: never;
21518
+ };
21519
+ requestBody?: never;
21520
+ responses: {
21521
+ /** @description Updated */
21522
+ 204: {
21523
+ headers: {
21524
+ [name: string]: unknown;
21525
+ };
21526
+ content?: never;
21527
+ };
21528
+ 401: components["responses"]["Unauthorized"];
21529
+ /** @description Notification was not found for this member */
21530
+ 404: {
21531
+ headers: {
21532
+ [name: string]: unknown;
21533
+ };
21534
+ content: {
21535
+ "application/json": components["schemas"]["ErrorMessageDto"];
21536
+ };
21537
+ };
21538
+ };
21539
+ };
21330
21540
  postNotificationsReadAll: {
21331
21541
  parameters: {
21332
21542
  query?: never;