@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.
@@ -3715,7 +3715,7 @@ export interface paths {
3715
3715
  put?: never;
3716
3716
  /**
3717
3717
  * Apply a Message Center email unsubscribe (public)
3718
- * @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.
3718
+ * @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.
3719
3719
  */
3720
3720
  post: operations["postNotificationEmailUnsubscribe"];
3721
3721
  delete?: never;
@@ -3753,7 +3753,7 @@ export interface paths {
3753
3753
  };
3754
3754
  /**
3755
3755
  * Slack OAuth callback
3756
- * @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.
3756
+ * @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.
3757
3757
  */
3758
3758
  get: operations["getSlackOauthCallback"];
3759
3759
  put?: never;
@@ -3808,6 +3808,30 @@ export interface paths {
3808
3808
  patch?: never;
3809
3809
  trace?: never;
3810
3810
  };
3811
+ "/workspaces/{workspaceId}/notification-preferences": {
3812
+ parameters: {
3813
+ query?: never;
3814
+ header?: never;
3815
+ path?: never;
3816
+ cookie?: never;
3817
+ };
3818
+ /**
3819
+ * Member notification preferences for this workspace
3820
+ * @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`).
3821
+ */
3822
+ get: operations["getWorkspaceNotificationPreferences"];
3823
+ /**
3824
+ * Save member notification preferences for this workspace
3825
+ * @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.
3826
+ */
3827
+ put: operations["putWorkspaceNotificationPreferences"];
3828
+ post?: never;
3829
+ delete?: never;
3830
+ options?: never;
3831
+ head?: never;
3832
+ patch?: never;
3833
+ trace?: never;
3834
+ };
3811
3835
  "/workspaces/{workspaceId}/notifications": {
3812
3836
  parameters: {
3813
3837
  query?: never;
@@ -3848,6 +3872,26 @@ export interface paths {
3848
3872
  patch?: never;
3849
3873
  trace?: never;
3850
3874
  };
3875
+ "/workspaces/{workspaceId}/notifications/read": {
3876
+ parameters: {
3877
+ query?: never;
3878
+ header?: never;
3879
+ path?: never;
3880
+ cookie?: never;
3881
+ };
3882
+ get?: never;
3883
+ put?: never;
3884
+ /**
3885
+ * Mark selected notifications read
3886
+ * @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.
3887
+ */
3888
+ post: operations["postNotificationsRead"];
3889
+ delete?: never;
3890
+ options?: never;
3891
+ head?: never;
3892
+ patch?: never;
3893
+ trace?: never;
3894
+ };
3851
3895
  "/workspaces/{workspaceId}/notifications/{id}/read": {
3852
3896
  parameters: {
3853
3897
  query?: never;
@@ -3865,6 +3909,26 @@ export interface paths {
3865
3909
  patch?: never;
3866
3910
  trace?: never;
3867
3911
  };
3912
+ "/workspaces/{workspaceId}/notifications/{id}/unread": {
3913
+ parameters: {
3914
+ query?: never;
3915
+ header?: never;
3916
+ path?: never;
3917
+ cookie?: never;
3918
+ };
3919
+ get?: never;
3920
+ put?: never;
3921
+ /**
3922
+ * Mark notification unread
3923
+ * @description Clears read state for the current member's row. Does not follow a route.
3924
+ */
3925
+ post: operations["postNotificationUnread"];
3926
+ delete?: never;
3927
+ options?: never;
3928
+ head?: never;
3929
+ patch?: never;
3930
+ trace?: never;
3931
+ };
3868
3932
  "/workspaces/{workspaceId}/notifications/read-all": {
3869
3933
  parameters: {
3870
3934
  query?: never;
@@ -4235,7 +4299,7 @@ export interface paths {
4235
4299
  };
4236
4300
  /**
4237
4301
  * Finish Teams Microsoft sign-in
4238
- * @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`.
4302
+ * @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`.
4239
4303
  */
4240
4304
  get: operations["getTeamsIntegrationCallback"];
4241
4305
  put?: never;
@@ -8216,6 +8280,19 @@ export interface components {
8216
8280
  activity: components["schemas"]["NotificationChatDeliveryMode"];
8217
8281
  system: components["schemas"]["NotificationChatDeliveryMode"];
8218
8282
  };
8283
+ /** @description Message Center switches and delivery cells for one member in one workspace. */
8284
+ WorkspaceNotificationPreferencesDto: {
8285
+ notifications: components["schemas"]["NotificationPreferencesDto"];
8286
+ notificationChannels: components["schemas"]["NotificationChannelsDto"];
8287
+ };
8288
+ /** @description Body for `PUT /workspaces/{workspaceId}/notification-preferences`. Omit `notificationChannels` to keep stored cells. */
8289
+ PutWorkspaceNotificationPreferencesBodyDto: {
8290
+ notifications: components["schemas"]["NotificationPreferencesDto"];
8291
+ notificationChannels?: components["schemas"]["PutNotificationChannelsDto"];
8292
+ };
8293
+ NotificationReadIdsBodyDto: {
8294
+ ids: string[];
8295
+ };
8219
8296
  /** @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. */
8220
8297
  NotificationChannelsDto: {
8221
8298
  email: components["schemas"]["NotificationEmailChannelsDto"];
@@ -11025,6 +11102,9 @@ export type NotificationEmailDeliveryMode = components['schemas']['NotificationE
11025
11102
  export type NotificationChatDeliveryMode = components['schemas']['NotificationChatDeliveryMode'];
11026
11103
  export type NotificationEmailChannelsDto = components['schemas']['NotificationEmailChannelsDto'];
11027
11104
  export type NotificationChatChannelsDto = components['schemas']['NotificationChatChannelsDto'];
11105
+ export type WorkspaceNotificationPreferencesDto = components['schemas']['WorkspaceNotificationPreferencesDto'];
11106
+ export type PutWorkspaceNotificationPreferencesBodyDto = components['schemas']['PutWorkspaceNotificationPreferencesBodyDto'];
11107
+ export type NotificationReadIdsBodyDto = components['schemas']['NotificationReadIdsBodyDto'];
11028
11108
  export type NotificationChannelsDto = components['schemas']['NotificationChannelsDto'];
11029
11109
  export type SlackInstallUrlDto = components['schemas']['SlackInstallUrlDto'];
11030
11110
  export type SlackIntegrationStatusDto = components['schemas']['SlackIntegrationStatusDto'];
@@ -20957,7 +21037,7 @@ export interface operations {
20957
21037
  /** @description Preference updated, or left unchanged for status email. */
20958
21038
  303: {
20959
21039
  headers: {
20960
- /** @description `{spa}/settings?tab=preferences` */
21040
+ /** @description `{spa}/workspace/preferences` */
20961
21041
  Location?: string;
20962
21042
  [name: string]: unknown;
20963
21043
  };
@@ -21242,6 +21322,71 @@ export interface operations {
21242
21322
  };
21243
21323
  };
21244
21324
  };
21325
+ getWorkspaceNotificationPreferences: {
21326
+ parameters: {
21327
+ query?: never;
21328
+ header?: never;
21329
+ path: {
21330
+ workspaceId: components["parameters"]["WorkspaceId"];
21331
+ };
21332
+ cookie?: never;
21333
+ };
21334
+ requestBody?: never;
21335
+ responses: {
21336
+ /** @description Preferences for this member in this workspace */
21337
+ 200: {
21338
+ headers: {
21339
+ [name: string]: unknown;
21340
+ };
21341
+ content: {
21342
+ "application/json": components["schemas"]["WorkspaceNotificationPreferencesDto"];
21343
+ };
21344
+ };
21345
+ 401: components["responses"]["Unauthorized"];
21346
+ };
21347
+ };
21348
+ putWorkspaceNotificationPreferences: {
21349
+ parameters: {
21350
+ query?: never;
21351
+ header?: never;
21352
+ path: {
21353
+ workspaceId: components["parameters"]["WorkspaceId"];
21354
+ };
21355
+ cookie?: never;
21356
+ };
21357
+ requestBody: {
21358
+ content: {
21359
+ "application/json": components["schemas"]["PutWorkspaceNotificationPreferencesBodyDto"];
21360
+ };
21361
+ };
21362
+ responses: {
21363
+ /** @description Saved preferences */
21364
+ 200: {
21365
+ headers: {
21366
+ [name: string]: unknown;
21367
+ };
21368
+ content: {
21369
+ "application/json": components["schemas"]["WorkspaceNotificationPreferencesDto"];
21370
+ };
21371
+ };
21372
+ /** @description Invalid body, or status email set to off */
21373
+ 400: {
21374
+ headers: {
21375
+ [name: string]: unknown;
21376
+ };
21377
+ content: {
21378
+ /**
21379
+ * @example {
21380
+ * "error": "Status email cannot be turned off",
21381
+ * "code": "notification_channel_required"
21382
+ * }
21383
+ */
21384
+ "application/json": components["schemas"]["ErrorMessageDto"];
21385
+ };
21386
+ };
21387
+ 401: components["responses"]["Unauthorized"];
21388
+ };
21389
+ };
21245
21390
  listNotifications: {
21246
21391
  parameters: {
21247
21392
  query?: {
@@ -21304,6 +21449,40 @@ export interface operations {
21304
21449
  401: components["responses"]["Unauthorized"];
21305
21450
  };
21306
21451
  };
21452
+ postNotificationsRead: {
21453
+ parameters: {
21454
+ query?: never;
21455
+ header?: never;
21456
+ path: {
21457
+ workspaceId: components["parameters"]["WorkspaceId"];
21458
+ };
21459
+ cookie?: never;
21460
+ };
21461
+ requestBody: {
21462
+ content: {
21463
+ "application/json": components["schemas"]["NotificationReadIdsBodyDto"];
21464
+ };
21465
+ };
21466
+ responses: {
21467
+ /** @description Updated */
21468
+ 204: {
21469
+ headers: {
21470
+ [name: string]: unknown;
21471
+ };
21472
+ content?: never;
21473
+ };
21474
+ /** @description Invalid ids */
21475
+ 400: {
21476
+ headers: {
21477
+ [name: string]: unknown;
21478
+ };
21479
+ content: {
21480
+ "application/json": components["schemas"]["ErrorMessageDto"];
21481
+ };
21482
+ };
21483
+ 401: components["responses"]["Unauthorized"];
21484
+ };
21485
+ };
21307
21486
  postNotificationRead: {
21308
21487
  parameters: {
21309
21488
  query?: never;
@@ -21326,6 +21505,37 @@ export interface operations {
21326
21505
  401: components["responses"]["Unauthorized"];
21327
21506
  };
21328
21507
  };
21508
+ postNotificationUnread: {
21509
+ parameters: {
21510
+ query?: never;
21511
+ header?: never;
21512
+ path: {
21513
+ workspaceId: components["parameters"]["WorkspaceId"];
21514
+ id: components["parameters"]["NotificationId"];
21515
+ };
21516
+ cookie?: never;
21517
+ };
21518
+ requestBody?: never;
21519
+ responses: {
21520
+ /** @description Updated */
21521
+ 204: {
21522
+ headers: {
21523
+ [name: string]: unknown;
21524
+ };
21525
+ content?: never;
21526
+ };
21527
+ 401: components["responses"]["Unauthorized"];
21528
+ /** @description Notification was not found for this member */
21529
+ 404: {
21530
+ headers: {
21531
+ [name: string]: unknown;
21532
+ };
21533
+ content: {
21534
+ "application/json": components["schemas"]["ErrorMessageDto"];
21535
+ };
21536
+ };
21537
+ };
21538
+ };
21329
21539
  postNotificationsReadAll: {
21330
21540
  parameters: {
21331
21541
  query?: never;