@thinkai/tai-api-contract 2.156.0 → 2.157.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.
@@ -3773,7 +3773,7 @@ export interface paths {
3773
3773
  };
3774
3774
  /**
3775
3775
  * Slack install URL for Message Center
3776
- * @description Workspace admin only. Returns the Slack OAuth authorize URL. State is stored server-side and names this workspace and the signed-in admin. Editor or viewer is `403` with `code` `workspace_admin_required`. Missing Slack app settings are `503` with `code` `slack_not_configured`.
3776
+ * @description Workspace admin only. Returns the Slack OAuth authorize URL with `incoming-webhook` scope. State is stored server-side and names this workspace and the signed-in admin. Editor or viewer is `403` with `code` `workspace_admin_required`. Missing Slack app settings are `503` with `code` `slack_not_configured`.
3777
3777
  */
3778
3778
  get: operations["getSlackInstallUrl"];
3779
3779
  put?: never;
@@ -3793,7 +3793,7 @@ export interface paths {
3793
3793
  };
3794
3794
  /**
3795
3795
  * Slack OAuth callback
3796
- * @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.
3796
+ * @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. Install requests `incoming-webhook` only. The encrypted incoming-webhook URL and the channel Slack returns are stored 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 webhook URL is never in the redirect.
3797
3797
  */
3798
3798
  get: operations["getSlackOauthCallback"];
3799
3799
  put?: never;
@@ -3813,14 +3813,14 @@ export interface paths {
3813
3813
  };
3814
3814
  /**
3815
3815
  * Slack connection status
3816
- * @description Any workspace member. `{ connected, channelName }`. `channelName` is null until an admin saves a channel. The bot token is never returned.
3816
+ * @description Any workspace member. `{ connected, channelName }`. `connected` is true only when a decryptable install webhook is stored. `channelName` is the channel chosen on Slack's install screen (null when not connected). Secrets are never returned.
3817
3817
  */
3818
3818
  get: operations["getSlackIntegration"];
3819
3819
  put?: never;
3820
3820
  post?: never;
3821
3821
  /**
3822
3822
  * Disconnect Slack
3823
- * @description Workspace admin only. Removes the bot token and saved channel. Later Message Center delivery does not post to Slack.
3823
+ * @description Workspace admin only. Removes the install webhook, optional bot token, and saved channel. Later Message Center delivery does not post to Slack.
3824
3824
  */
3825
3825
  delete: operations["deleteSlackIntegration"];
3826
3826
  options?: never;
@@ -3837,8 +3837,8 @@ export interface paths {
3837
3837
  };
3838
3838
  get?: never;
3839
3839
  /**
3840
- * Save the Slack channel for Message Center
3841
- * @description Workspace admin only. Body `{ channelId }`. Slack must already be connected. The response is the same status object as `getSlackIntegration`, with the channel name Slack returned. Unknown or malformed `channelId` is `400` `invalid_slack_channel`. Not connected is `409` `slack_not_connected`.
3840
+ * Change Slack channel (requires reinstall)
3841
+ * @description Workspace admin only. Body `{ channelId }`. The notification channel is chosen on Slack's install screen with the incoming webhook; this route does not rewrite channel metadata. When Slack is connected, the API returns `409` with `code` `slack_channel_reinstall_required` — reconnect via `getSlackInstallUrl` to pick a different channel. Malformed `channelId` is `400` `invalid_slack_channel`. Not connected is `409` `slack_not_connected`.
3842
3842
  */
3843
3843
  put: operations["putSlackChannel"];
3844
3844
  post?: never;
@@ -8353,12 +8353,13 @@ export interface components {
8353
8353
  teams: components["schemas"]["NotificationChatChannelsDto"];
8354
8354
  };
8355
8355
  SlackInstallUrlDto: {
8356
- /** @description Slack OAuth authorize URL. The bot token is not included. */
8356
+ /** @description Slack OAuth authorize URL (`incoming-webhook` scope). Secrets are not included. */
8357
8357
  url: string;
8358
8358
  };
8359
8359
  SlackIntegrationStatusDto: {
8360
+ /** @description True only when a decryptable install webhook URL is stored for this workspace. */
8360
8361
  connected: boolean;
8361
- /** @description Saved channel name. Null until an admin saves a channel, and when disconnected. */
8362
+ /** @description Channel name returned by Slack at install time. Null when not connected. */
8362
8363
  channelName: string | null;
8363
8364
  };
8364
8365
  SlackChannelBodyDto: {
@@ -21396,7 +21397,7 @@ export interface operations {
21396
21397
  };
21397
21398
  };
21398
21399
  responses: {
21399
- /** @description Channel saved */
21400
+ /** @description Not returned. The channel is chosen on Slack's install screen; when connected the API responds with `409` `slack_channel_reinstall_required`. */
21400
21401
  200: {
21401
21402
  headers: {
21402
21403
  [name: string]: unknown;
@@ -21405,7 +21406,7 @@ export interface operations {
21405
21406
  "application/json": components["schemas"]["SlackIntegrationStatusDto"];
21406
21407
  };
21407
21408
  };
21408
- /** @description channelId is missing, malformed, or unknown to Slack */
21409
+ /** @description channelId is missing or malformed */
21409
21410
  400: {
21410
21411
  headers: {
21411
21412
  [name: string]: unknown;
@@ -21413,7 +21414,7 @@ export interface operations {
21413
21414
  content: {
21414
21415
  /**
21415
21416
  * @example {
21416
- * "error": "Slack channel was not found",
21417
+ * "error": "channelId is required",
21417
21418
  * "code": "invalid_slack_channel"
21418
21419
  * }
21419
21420
  */
@@ -21445,33 +21446,12 @@ export interface operations {
21445
21446
  "application/json": components["schemas"]["ErrorMessageDto"];
21446
21447
  };
21447
21448
  };
21448
- /** @description Slack is not connected */
21449
+ /** @description Slack is not connected (`slack_not_connected`), or the channel cannot be changed without a new install (`slack_channel_reinstall_required`). */
21449
21450
  409: {
21450
21451
  headers: {
21451
21452
  [name: string]: unknown;
21452
21453
  };
21453
21454
  content: {
21454
- /**
21455
- * @example {
21456
- * "error": "Slack is not connected",
21457
- * "code": "slack_not_connected"
21458
- * }
21459
- */
21460
- "application/json": components["schemas"]["ErrorMessageDto"];
21461
- };
21462
- };
21463
- /** @description Slack rejected the lookup */
21464
- 502: {
21465
- headers: {
21466
- [name: string]: unknown;
21467
- };
21468
- content: {
21469
- /**
21470
- * @example {
21471
- * "error": "Slack did not accept the channel",
21472
- * "code": "slack_request_failed"
21473
- * }
21474
- */
21475
21455
  "application/json": components["schemas"]["ErrorMessageDto"];
21476
21456
  };
21477
21457
  };