@distilled.cloud/slack 1.0.0-rc.18 → 1.0.0-rc.20

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.
Files changed (190) hide show
  1. package/lib/_bundle/sdk.js +1 -1
  2. package/lib/_bundle/sdk.js.map +1 -1
  3. package/lib/protocol.d.ts +2 -1
  4. package/lib/protocol.d.ts.map +1 -1
  5. package/lib/services/admin.d.ts +594 -356
  6. package/lib/services/admin.d.ts.map +1 -1
  7. package/lib/services/admin.js +149 -140
  8. package/lib/services/admin.js.map +1 -1
  9. package/lib/services/agents.d.ts +89 -97
  10. package/lib/services/agents.d.ts.map +1 -1
  11. package/lib/services/agents.js +1 -1
  12. package/lib/services/agents.js.map +1 -1
  13. package/lib/services/api.d.ts +2 -2
  14. package/lib/services/api.d.ts.map +1 -1
  15. package/lib/services/api.js +1 -1
  16. package/lib/services/api.js.map +1 -1
  17. package/lib/services/apps.d.ts +74 -74
  18. package/lib/services/apps.d.ts.map +1 -1
  19. package/lib/services/apps.js +32 -32
  20. package/lib/services/apps.js.map +1 -1
  21. package/lib/services/assistant.d.ts +55 -46
  22. package/lib/services/assistant.d.ts.map +1 -1
  23. package/lib/services/assistant.js +1 -1
  24. package/lib/services/assistant.js.map +1 -1
  25. package/lib/services/auth.d.ts +27 -27
  26. package/lib/services/auth.d.ts.map +1 -1
  27. package/lib/services/auth.js +1 -1
  28. package/lib/services/auth.js.map +1 -1
  29. package/lib/services/blocks.d.ts +3 -3
  30. package/lib/services/blocks.d.ts.map +1 -1
  31. package/lib/services/blocks.js +1 -1
  32. package/lib/services/blocks.js.map +1 -1
  33. package/lib/services/bookmarks.d.ts +19 -19
  34. package/lib/services/bookmarks.d.ts.map +1 -1
  35. package/lib/services/bookmarks.js +1 -1
  36. package/lib/services/bookmarks.js.map +1 -1
  37. package/lib/services/bots.d.ts +23 -23
  38. package/lib/services/bots.d.ts.map +1 -1
  39. package/lib/services/bots.js +1 -1
  40. package/lib/services/bots.js.map +1 -1
  41. package/lib/services/calls.d.ts +10 -10
  42. package/lib/services/calls.d.ts.map +1 -1
  43. package/lib/services/calls.js +1 -1
  44. package/lib/services/calls.js.map +1 -1
  45. package/lib/services/canvases.d.ts +18 -18
  46. package/lib/services/canvases.d.ts.map +1 -1
  47. package/lib/services/canvases.js +1 -1
  48. package/lib/services/canvases.js.map +1 -1
  49. package/lib/services/chat.d.ts +103 -103
  50. package/lib/services/chat.d.ts.map +1 -1
  51. package/lib/services/chat.js +1 -1
  52. package/lib/services/chat.js.map +1 -1
  53. package/lib/services/conversations.d.ts +109 -103
  54. package/lib/services/conversations.d.ts.map +1 -1
  55. package/lib/services/conversations.js +38 -38
  56. package/lib/services/conversations.js.map +1 -1
  57. package/lib/services/dialog.js +1 -1
  58. package/lib/services/dialog.js.map +1 -1
  59. package/lib/services/dnd.d.ts +14 -14
  60. package/lib/services/dnd.d.ts.map +1 -1
  61. package/lib/services/dnd.js +1 -1
  62. package/lib/services/dnd.js.map +1 -1
  63. package/lib/services/emoji.d.ts +6 -6
  64. package/lib/services/emoji.d.ts.map +1 -1
  65. package/lib/services/emoji.js +1 -1
  66. package/lib/services/emoji.js.map +1 -1
  67. package/lib/services/entity.d.ts +14 -14
  68. package/lib/services/entity.d.ts.map +1 -1
  69. package/lib/services/entity.js +1 -1
  70. package/lib/services/entity.js.map +1 -1
  71. package/lib/services/files.d.ts +106 -106
  72. package/lib/services/files.d.ts.map +1 -1
  73. package/lib/services/files.js +26 -26
  74. package/lib/services/files.js.map +1 -1
  75. package/lib/services/functions.d.ts +37 -37
  76. package/lib/services/functions.d.ts.map +1 -1
  77. package/lib/services/functions.js +1 -1
  78. package/lib/services/functions.js.map +1 -1
  79. package/lib/services/index.d.ts +1 -0
  80. package/lib/services/index.d.ts.map +1 -1
  81. package/lib/services/index.js +1 -0
  82. package/lib/services/lists.d.ts +47 -45
  83. package/lib/services/lists.d.ts.map +1 -1
  84. package/lib/services/lists.js +1 -1
  85. package/lib/services/lists.js.map +1 -1
  86. package/lib/services/migration.d.ts +3 -3
  87. package/lib/services/migration.d.ts.map +1 -1
  88. package/lib/services/migration.js +1 -1
  89. package/lib/services/migration.js.map +1 -1
  90. package/lib/services/oauth.d.ts +102 -102
  91. package/lib/services/oauth.d.ts.map +1 -1
  92. package/lib/services/oauth.js +1 -1
  93. package/lib/services/oauth.js.map +1 -1
  94. package/lib/services/openid.d.ts +40 -40
  95. package/lib/services/openid.d.ts.map +1 -1
  96. package/lib/services/openid.js +1 -1
  97. package/lib/services/openid.js.map +1 -1
  98. package/lib/services/pins.d.ts +9 -9
  99. package/lib/services/pins.d.ts.map +1 -1
  100. package/lib/services/pins.js +1 -1
  101. package/lib/services/pins.js.map +1 -1
  102. package/lib/services/reactions.d.ts +23 -23
  103. package/lib/services/reactions.d.ts.map +1 -1
  104. package/lib/services/reactions.js +1 -1
  105. package/lib/services/reactions.js.map +1 -1
  106. package/lib/services/reminders.d.ts +8 -8
  107. package/lib/services/reminders.d.ts.map +1 -1
  108. package/lib/services/reminders.js +1 -1
  109. package/lib/services/reminders.js.map +1 -1
  110. package/lib/services/rtm.d.ts +11 -11
  111. package/lib/services/rtm.d.ts.map +1 -1
  112. package/lib/services/rtm.js +1 -1
  113. package/lib/services/rtm.js.map +1 -1
  114. package/lib/services/search.d.ts +84 -80
  115. package/lib/services/search.d.ts.map +1 -1
  116. package/lib/services/search.js +1 -1
  117. package/lib/services/search.js.map +1 -1
  118. package/lib/services/slackbot.d.ts +366 -0
  119. package/lib/services/slackbot.d.ts.map +1 -0
  120. package/lib/services/slackbot.js +2 -0
  121. package/lib/services/slackbot.js.map +1 -0
  122. package/lib/services/stars.d.ts +16 -16
  123. package/lib/services/stars.d.ts.map +1 -1
  124. package/lib/services/stars.js +1 -1
  125. package/lib/services/stars.js.map +1 -1
  126. package/lib/services/team.d.ts +39 -37
  127. package/lib/services/team.d.ts.map +1 -1
  128. package/lib/services/team.js +1 -1
  129. package/lib/services/team.js.map +1 -1
  130. package/lib/services/tooling.js +1 -1
  131. package/lib/services/tooling.js.map +1 -1
  132. package/lib/services/usergroups.d.ts +30 -30
  133. package/lib/services/usergroups.d.ts.map +1 -1
  134. package/lib/services/usergroups.js +1 -1
  135. package/lib/services/usergroups.js.map +1 -1
  136. package/lib/services/users.d.ts +37 -37
  137. package/lib/services/users.d.ts.map +1 -1
  138. package/lib/services/users.js +1 -1
  139. package/lib/services/users.js.map +1 -1
  140. package/lib/services/views.d.ts +9 -9
  141. package/lib/services/views.d.ts.map +1 -1
  142. package/lib/services/views.js +1 -1
  143. package/lib/services/views.js.map +1 -1
  144. package/lib/services/workflows.d.ts +16 -16
  145. package/lib/services/workflows.d.ts.map +1 -1
  146. package/lib/services/workflows.js +1 -1
  147. package/lib/services/workflows.js.map +1 -1
  148. package/lib/services.lazy/admin.js +2 -2
  149. package/lib/services.lazy/apps.js +1 -1
  150. package/lib/services.lazy/conversations.js +1 -1
  151. package/lib/services.lazy/files.js +1 -1
  152. package/lib/services.lazy/index.js +2 -2
  153. package/lib/services.lazy/slackbot.js +1 -0
  154. package/package.json +6 -6
  155. package/src/protocol.ts +3 -5
  156. package/src/services/admin.ts +1609 -1016
  157. package/src/services/agents.ts +93 -103
  158. package/src/services/api.ts +2 -2
  159. package/src/services/apps.ts +74 -74
  160. package/src/services/assistant.ts +88 -56
  161. package/src/services/auth.ts +27 -27
  162. package/src/services/blocks.ts +3 -3
  163. package/src/services/bookmarks.ts +19 -19
  164. package/src/services/bots.ts +23 -23
  165. package/src/services/calls.ts +10 -10
  166. package/src/services/canvases.ts +50 -46
  167. package/src/services/chat.ts +103 -103
  168. package/src/services/conversations.ts +126 -115
  169. package/src/services/dnd.ts +14 -14
  170. package/src/services/emoji.ts +6 -6
  171. package/src/services/entity.ts +14 -14
  172. package/src/services/files.ts +106 -106
  173. package/src/services/functions.ts +37 -37
  174. package/src/services/index.ts +1 -0
  175. package/src/services/lists.ts +49 -46
  176. package/src/services/migration.ts +3 -3
  177. package/src/services/oauth.ts +102 -102
  178. package/src/services/openid.ts +40 -40
  179. package/src/services/pins.ts +9 -9
  180. package/src/services/reactions.ts +23 -23
  181. package/src/services/reminders.ts +8 -8
  182. package/src/services/rtm.ts +11 -11
  183. package/src/services/search.ts +123 -130
  184. package/src/services/slackbot.ts +766 -0
  185. package/src/services/stars.ts +16 -16
  186. package/src/services/team.ts +42 -37
  187. package/src/services/usergroups.ts +30 -30
  188. package/src/services/users.ts +37 -37
  189. package/src/services/views.ts +9 -9
  190. package/src/services/workflows.ts +16 -16
@@ -28,7 +28,7 @@ export interface ArchiveConversationRequest {
28
28
  /** ID of the code channel to archive. */
29
29
  channel_id: string;
30
30
  /** Timestamp of a message in the code channel to share back as a thread reply on the origin message. Requires the channel to have an `origin_link` set. */
31
- summary_message_ts?: string;
31
+ summary_message_ts?: string | undefined;
32
32
  }
33
33
  export interface ArchiveConversationResponse {
34
34
  /** Always `true` (a failed call raises a typed error instead). */
@@ -36,17 +36,17 @@ export interface ArchiveConversationResponse {
36
36
  }
37
37
  export interface CreateConversationRequest {
38
38
  /** Encoded team id to create the channel in. Required for org tokens when `origin_channel_id` is not provided. When omitted, the workspace is derived from the origin channel. */
39
- team_id?: string;
39
+ team_id?: string | undefined;
40
40
  /** An opaque identifier for the agent session. When provided, the call is idempotent: if a channel already exists for this `session_id`, it is returned instead of creating a new one. */
41
- session_id?: string;
41
+ session_id?: string | undefined;
42
42
  /** A friendly display name for the code channel. Optional when `origin_channel_id` and `origin_message_ts` are provided -- in that case the channel is named from the origin message and re-titled automatically. Required when no origin link is given. */
43
43
  name: string;
44
- /** Create a private channel instead of a public one. */
45
- is_private?: boolean;
44
+ /** Whether the code channel is private. When omitted, the channel matches the privacy of `origin_channel_id`, or is public if no origin is given. An explicit value is always honored, even if it differs from the origin channel's privacy: passing `false` creates a public channel from a private origin. */
45
+ is_private?: boolean | undefined;
46
46
  /** The channel ID where the agent session was initiated from. Must be provided together with `origin_message_ts`. The channel must be accessible to the calling user and must not be externally shared (Slack Connect). When `team_id` is omitted with an org token, the channel is created in the same workspace as this origin channel. */
47
- origin_channel_id?: string;
47
+ origin_channel_id?: string | undefined;
48
48
  /** The message timestamp in the origin channel that started the agent session. Must be provided together with `origin_channel_id`. The author of this message is automatically invited to the newly created code channel. */
49
- origin_message_ts?: string;
49
+ origin_message_ts?: string | undefined;
50
50
  }
51
51
  export interface CreateConversationResponse {
52
52
  /** Always `true` (a failed call raises a typed error instead). */
@@ -62,9 +62,9 @@ export interface GetCanvasRequest {
62
62
  /** Encoded ID of the canvas to fetch. */
63
63
  canvas_id: string;
64
64
  /** Format to render the canvas content in. Defaults to markdown. */
65
- content_format?: GetCanvasRequestContentFormat | (string & {});
65
+ content_format?: GetCanvasRequestContentFormat | (string & {}) | undefined;
66
66
  /** Whether to include resolved comment threads in the response. Defaults to false. */
67
- include_resolved?: boolean;
67
+ include_resolved?: boolean | undefined;
68
68
  }
69
69
  export interface GetCanvasResponseCommentsItemRepliesItem {
70
70
  /** Message timestamp of the reply. */
@@ -141,9 +141,9 @@ export interface RemoveViewRequest {
141
141
  /** ID of the code channel to remove the view from. */
142
142
  channel_id: string;
143
143
  /** Agent-assigned key of the view to remove. Provide exactly one of view_key or view_id. */
144
- view_key?: string;
144
+ view_key?: string | undefined;
145
145
  /** Encoded channel tab ID of the view to remove. Provide exactly one of view_key or view_id. */
146
- view_id?: string;
146
+ view_id?: string | undefined;
147
147
  }
148
148
  export interface RemoveViewResponse {
149
149
  /** Always `true` (a failed call raises a typed error instead). */
@@ -155,19 +155,19 @@ export interface RemoveViewResponse {
155
155
  }
156
156
  export interface RenameSessionRequest {
157
157
  /** ID of the channel containing the agent session. Required for public channels. */
158
- channel_id?: string;
158
+ channel_id?: string | undefined;
159
159
  /** New title for the agent session (1-200 characters). For a session channel, this also renames the channel. */
160
160
  title: string;
161
161
  /** Timestamp of the thread root message the session is scoped to. Required for thread-based sessions in regular channels and DMs. Must be omitted for session channels. */
162
- thread_ts?: string;
162
+ thread_ts?: string | undefined;
163
163
  }
164
164
  export interface RenameSessionResponse {
165
165
  /** Always `true` (a failed call raises a typed error instead). */
166
166
  ok: boolean;
167
167
  /** The updated title of the agent session. */
168
- title?: string;
168
+ title: string;
169
169
  /** The encoded ID of the channel, returned when an agent channel was renamed. */
170
- channel_id?: string;
170
+ channel_id?: string | undefined;
171
171
  }
172
172
  export interface SetCanvasContentRequest {
173
173
  /** ID of the agent session channel the canvas is attached to. */
@@ -212,67 +212,67 @@ export interface SetPropertiesRequestCodeChannelSummaryMessage {
212
212
  /** Timestamp of the summary message in the code channel. */
213
213
  message_ts: string;
214
214
  /** Thread timestamp if the summary message is a thread reply. Clients need this to fetch the message via conversations.replies. */
215
- thread_ts?: string;
215
+ thread_ts?: string | undefined;
216
216
  }
217
217
  /** Code channel properties to set. Only provided fields are updated. */
218
218
  export interface SetPropertiesRequestCodeChannel {
219
219
  /** Git hosting provider (e.g. github.com). */
220
- host?: string;
220
+ host?: string | undefined;
221
221
  /** Repository name (e.g., org/repo). */
222
- repo?: string;
222
+ repo?: string | undefined;
223
223
  /** Working branch name. */
224
- branch?: string;
224
+ branch?: string | undefined;
225
225
  /** Base branch the working branch was created from. */
226
- base_branch?: string;
226
+ base_branch?: string | undefined;
227
227
  /** Current commit SHA. */
228
- commit_sha?: string;
228
+ commit_sha?: string | undefined;
229
229
  /** Pull request number. */
230
- pr_number?: number;
230
+ pr_number?: number | undefined;
231
231
  /** URL of the pull request. */
232
- pr_url?: string;
232
+ pr_url?: string | undefined;
233
233
  /** Title of the pull request. */
234
- pr_title?: string;
235
- /** Status of the pull request (e.g. open, merged, closed). */
236
- pr_status?: string;
234
+ pr_title?: string | undefined;
235
+ /** The pull request status displayed for the channel as a whole. One of: an empty string while the pull request is a draft (no status is displayed); open, when it is ready for review; blocked, when a reviewer requested changes, checks are failing, or it has merge conflicts; merged, once it is merged; or closed, when it is closed without being merged. */
236
+ pr_status?: string | undefined;
237
237
  /** URL to the CI pipeline run. */
238
- ci_url?: string;
238
+ ci_url?: string | undefined;
239
239
  /** State of the CI pipeline (e.g. pending, success, failure). */
240
- ci_state?: string;
240
+ ci_state?: string | undefined;
241
241
  /** List of file paths relevant to this session. */
242
- file_paths?: SetPropertiesRequestCodeChannelFilePathsList;
242
+ file_paths?: SetPropertiesRequestCodeChannelFilePathsList | undefined;
243
243
  /** Primary programming language. */
244
- language?: string;
244
+ language?: string | undefined;
245
245
  /** Upstream repository URL. */
246
- upstream_url?: string;
246
+ upstream_url?: string | undefined;
247
247
  /** URL of the working branch. */
248
- branch_url?: string;
248
+ branch_url?: string | undefined;
249
249
  /** Configurable items to display in the channel context bar. A maximum of 5 items will be applied; any beyond that will be silently truncated and a warning returned. */
250
- context_bar_items?: SetPropertiesRequestCodeChannelContextBarItemsList;
250
+ context_bar_items?: SetPropertiesRequestCodeChannelContextBarItemsList | undefined;
251
251
  /** Points to the current summary message for this code channel. Must reference a message within this channel. When the channel is archived with a summary_message_ts, this property is also set to record where the summary lives so clients can fetch it. */
252
- summary_message?: SetPropertiesRequestCodeChannelSummaryMessage;
252
+ summary_message?: SetPropertiesRequestCodeChannelSummaryMessage | undefined;
253
253
  }
254
254
  /** Agent resource properties to set. Only provided fields are updated. */
255
255
  export interface SetPropertiesRequestAgentResource {
256
256
  /** URL of the external resource. */
257
- url?: string;
257
+ url?: string | undefined;
258
258
  /** Type of the external resource. */
259
- resource_type?: string;
259
+ resource_type?: string | undefined;
260
260
  /** Display title of the external resource. */
261
- title?: string;
261
+ title?: string | undefined;
262
262
  /** Provider of the external resource. */
263
- provider?: string;
263
+ provider?: string | undefined;
264
264
  }
265
265
  export interface SetPropertiesRequest {
266
266
  /** ID of the code channel to update. */
267
267
  channel_id: string;
268
268
  /** New display title for the agent session. */
269
- title?: string;
269
+ title?: string | undefined;
270
270
  /** New status for the agent session. */
271
- status?: SetPropertiesRequestStatus | (string & {});
271
+ status?: SetPropertiesRequestStatus | (string & {}) | undefined;
272
272
  /** Code channel properties to set. Only provided fields are updated. */
273
- code_channel?: SetPropertiesRequestCodeChannel;
273
+ code_channel?: SetPropertiesRequestCodeChannel | undefined;
274
274
  /** Agent resource properties to set. Only provided fields are updated. */
275
- agent_resource?: SetPropertiesRequestAgentResource;
275
+ agent_resource?: SetPropertiesRequestAgentResource | undefined;
276
276
  }
277
277
  export interface SetPropertiesResponse {
278
278
  /** Always `true` (a failed call raises a typed error instead). */
@@ -280,78 +280,70 @@ export interface SetPropertiesResponse {
280
280
  /** The encoded ID of the updated code channel. */
281
281
  channel_id: string;
282
282
  }
283
- /** The lifecycle status to set. */
284
- export type SetStatusRequestStatus = "active" | "processing" | "suspended" | "closed";
285
283
  export interface SetStatusRequest {
286
284
  /** ID of the channel containing the agent session. Required for public channels. */
287
- channel_id?: string;
285
+ channel_id?: string | undefined;
288
286
  /** The lifecycle status to set. */
289
- status: SetStatusRequestStatus | (string & {});
287
+ status: unknown;
290
288
  /** Timestamp of the thread root message the session is scoped to. Required for thread-based sessions in regular channels and DMs. Must be omitted for session channels. */
291
- thread_ts?: string;
289
+ thread_ts?: string | undefined;
292
290
  /** Title for the agent session (max 200 characters). Only used when creating a new session; ignored if the session already exists. To rename an existing session, use `agents.sessions.rename`. */
293
- title?: string;
291
+ title?: string | undefined;
294
292
  /** The user who initiated the session. Only used when creating a new session; ignored if the session already exists. Must be a member of the channel. */
295
- initiator_user_id?: string;
293
+ initiator_user_id?: string | undefined;
296
294
  /** Emoji to use as the agent's icon. Takes priority over `icon_url`. Remains in effect until you clear it (pass `null`) or set a new value. Requires the `chat:write.customize` scope. */
297
- icon_emoji?: string;
295
+ icon_emoji?: string | undefined;
298
296
  /** URL to an image to use as the agent's icon. Remains in effect until you clear it (pass `null`) or set a new value. Requires the `chat:write.customize` scope. */
299
- icon_url?: string;
297
+ icon_url?: string | undefined;
300
298
  /** Display name override for the agent (max 200 characters). Remains in effect until you clear it (pass `null`) or set a new value. Requires the `chat:write.customize` scope. */
301
- username?: string;
299
+ username?: string | undefined;
302
300
  }
303
301
  export interface SetStatusResponse {
304
302
  /** Always `true` (a failed call raises a typed error instead). */
305
303
  ok: boolean;
306
304
  /** The current lifecycle status of the agent session, derived from the statuses of all agents in the session. */
307
- status?: unknown;
305
+ status: unknown;
308
306
  /** The lifecycle status of the calling agent within this session. May differ from the session-level status when other agents are present. */
309
- agent_status?: unknown;
307
+ agent_status: unknown;
310
308
  /** The current title of the agent session, if set. */
311
- title?: string;
309
+ title?: string | undefined;
312
310
  }
313
- /** For canvas views: access level granted to the channel for the canvas tab. Defaults to write. Use 'comment' to grant channel members comment access (read and comment, no editing) so the agent remains the sole author of the canvas text. */
311
+ /** For `canvas` views: access level granted to the channel for the canvas tab. Defaults to `write`. Use `comment` to grant channel members comment access (read and comment, no editing) so the agent remains the sole author of the canvas text. */
314
312
  export type SetViewRequestAccessLevel = "read" | "write" | "comment";
315
- /** Origins the view may fetch()/XHR/WebSocket to. Accepted and stored, but not honored at render time yet. */
316
- export type SetViewRequestCspConnectDomainsList = Array<string>;
317
- /** Origins the view may load scripts/styles/fonts/images/media from, merged into the curated CDN allowlist at render time. */
313
+ /** Origins the view may load scripts, styles, fonts, images, and media from, merged into the curated CDN allowlist at render time. */
318
314
  export type SetViewRequestCspResourceDomainsList = Array<string>;
319
- /** Content-Security-Policy domain declarations for the view. Domains are validated server-side (https-only, no private/internal hosts) and persisted. Only resource_domains is honored at render time today; connect_domains is accepted and stored for forward-compatibility but NOT honored yet. */
315
+ /** Content-Security-Policy domain declarations for the view. Domains are validated server-side (`https://` only, no private or internal hosts) and persisted. */
320
316
  export interface SetViewRequestCsp {
321
- /** Origins the view may fetch()/XHR/WebSocket to. Accepted and stored, but not honored at render time yet. */
322
- connect_domains?: SetViewRequestCspConnectDomainsList;
323
- /** Origins the view may load scripts/styles/fonts/images/media from, merged into the curated CDN allowlist at render time. */
324
- resource_domains?: SetViewRequestCspResourceDomainsList;
317
+ /** Origins the view may load scripts, styles, fonts, images, and media from, merged into the curated CDN allowlist at render time. */
318
+ resource_domains?: SetViewRequestCspResourceDomainsList | undefined;
325
319
  }
326
320
  export interface SetViewRequest {
327
321
  /** ID of the code channel to render the view in. */
328
322
  channel_id: string;
329
- /** The kind of view to create or update. Defaults to html. Determines which other arguments are required: html and diff require content, block_kit requires blocks, canvas requires canvas_id, pull_request requires pr_url. */
330
- type?: unknown;
331
- /** Agent-assigned stable identity for the view (e.g. the source file path on the agent's machine). Used as the upsert key: calls with the same view_key update the same view. Required for html, block_kit, and canvas views; ignored for diff (a diff view is a per-channel singleton). */
332
- view_key?: string;
333
- /** View content. For html, a full self-contained HTML document; for diff, raw unified diff text. Capped at 1,000,000 bytes -- larger content returns content_too_large. The cap is enforced by the handler (not schema maxLength) so the documented error code actually surfaces instead of a generic argument-validation failure. Required when type is html or diff. */
334
- content?: string;
335
- /** Block Kit blocks to render in the view tab. Required when type is block_kit; ignored otherwise. */
336
- blocks?: unknown;
337
- /** Encoded ID of the canvas to attach as the view. Required when type is canvas; ignored otherwise. */
338
- canvas_id?: string;
339
- /** For canvas views: access level granted to the channel for the canvas tab. Defaults to write. Use 'comment' to grant channel members comment access (read and comment, no editing) so the agent remains the sole author of the canvas text. */
340
- access_level?: SetViewRequestAccessLevel | (string & {});
341
- /** For canvas views: hash of the canvas-derived markdown the agent last wrote, recorded so the agent can later detect human edits to the canvas. Opaque to the server. */
342
- agent_content_hash?: string;
343
- /** For pull_request views: the pull request's URL. Required when type is pull_request; ignored otherwise. */
344
- pr_url?: string;
345
- /** For diff views: base branch name for display purposes. */
346
- base_branch?: string;
347
- /** For diff views: head branch name for display purposes. */
348
- head_branch?: string;
349
- /** Display label for the view tab. Preferred over the legacy 'label' argument (name wins if both are supplied). Defaults to the last path segment of view_key, stripped of any .html/.htm extension. */
350
- name?: string;
351
- /** Deprecated alias for 'name'. Display label for the view tab. Defaults to the last path segment of view_key, stripped of any .html/.htm extension. */
352
- label?: string;
353
- /** Content-Security-Policy domain declarations for the view. Domains are validated server-side (https-only, no private/internal hosts) and persisted. Only resource_domains is honored at render time today; connect_domains is accepted and stored for forward-compatibility but NOT honored yet. */
354
- csp?: SetViewRequestCsp;
323
+ /** The kind of view to create or update. Defaults to `html`. Determines which other arguments are required: `html` and `diff` require `content`, `block_kit` requires `blocks`, and `canvas` requires `canvas_id`. */
324
+ type?: unknown | undefined;
325
+ /** Agent-assigned stable identity for the view (e.g. the source file path on the agent's machine). Used as the upsert key: calls with the same `view_key` update the same view. Required for `html`, `block_kit`, and `canvas` views; ignored for `diff` (a `diff` view is a per-channel singleton). */
326
+ view_key?: string | undefined;
327
+ /** View content. For `html`, a full self-contained HTML document; for `diff`, raw unified diff text. Capped at 1,000,000 bytes; larger content returns `content_too_large`. The cap is enforced by the handler (not schema `maxLength`) so the documented error code actually surfaces instead of a generic argument-validation failure. Required when `type` is `html` or `diff`. */
328
+ content?: string | undefined;
329
+ /** Block Kit blocks to render in the view tab. Required when `type` is `block_kit`; ignored otherwise. */
330
+ blocks?: unknown | undefined;
331
+ /** Encoded ID of the canvas to attach as the view. Required when `type` is `canvas`; ignored otherwise. */
332
+ canvas_id?: string | undefined;
333
+ /** For `canvas` views: access level granted to the channel for the canvas tab. Defaults to `write`. Use `comment` to grant channel members comment access (read and comment, no editing) so the agent remains the sole author of the canvas text. */
334
+ access_level?: SetViewRequestAccessLevel | (string & {}) | undefined;
335
+ /** For `canvas` views: hash of the canvas-derived markdown the agent last wrote, recorded so the agent can later detect human edits to the canvas. Opaque to the server. */
336
+ agent_content_hash?: string | undefined;
337
+ /** For `diff` views: base branch name for display purposes. */
338
+ base_branch?: string | undefined;
339
+ /** For `diff` views: head branch name for display purposes. */
340
+ head_branch?: string | undefined;
341
+ /** Display label for the view tab. Preferred over the legacy `label` argument (`name` wins if both are supplied). Defaults to the last path segment of `view_key`, stripped of any `.html` or `.htm` extension. */
342
+ name?: string | undefined;
343
+ /** Deprecated alias for `name`. Display label for the view tab. Defaults to the last path segment of `view_key`, stripped of any `.html` or `.htm` extension. */
344
+ label?: string | undefined;
345
+ /** Content-Security-Policy domain declarations for the view. Domains are validated server-side (`https://` only, no private or internal hosts) and persisted. */
346
+ csp?: SetViewRequestCsp | undefined;
355
347
  }
356
348
  export interface SetViewResponse {
357
349
  /** Always `true` (a failed call raises a typed error instead). */
@@ -360,14 +352,14 @@ export interface SetViewResponse {
360
352
  channel_id: string;
361
353
  /** The encoded channel tab ID of the view. */
362
354
  view_id: string;
363
- /** The encoded ID of the backing file for the view. For html and block_kit views this is the agent-owned content file; for diff views it is the diff snippet file; for canvas views it is the canvas's file ID (same value as canvas_id). Empty for pull_request views, which have no backing file. */
355
+ /** The encoded ID of the backing file for the view. For `html` and `block_kit` views this is the agent-owned content file; for `diff` views it is the diff snippet file; for `canvas` views it is the canvas's file ID (same value as `canvas_id`). */
364
356
  file_id: string;
365
357
  /** Server-assigned content version, monotonically increasing per view. */
366
358
  content_version: number;
367
359
  /** The type of the view that was created or updated. */
368
- type?: unknown;
369
- /** For canvas views, the encoded ID of the attached canvas. Absent for other view types. */
370
- canvas_id?: string;
360
+ type?: unknown | undefined;
361
+ /** For `canvas` views, the encoded ID of the attached canvas. Absent for other view types. */
362
+ canvas_id?: string | undefined;
371
363
  }
372
364
  export type ArchiveConversationError = SlackOpError;
373
365
  /** Archive a code channel. Required scopes -- bot: `code_channels:manage` Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- The specified channel_id does not correspond to a valid channel. - `not_agent_channel` -- The specified channel is not a code channel. - `not_authorized` -- The caller is not an authorized agent bot for this channel. - `already_archived` -- The channel has already been archived. - `restricted_action` -- The workspace does not allow the bot to archive channels. - `summary_message_not_found` -- The specified summary_message_ts does not correspond to a message in the code channel. - `no_origin_link` -- summary_message_ts was provided but the code channel has no origin_link set. - `origin_channel_not_found` -- The origin channel referenced by the code channel is no longer accessible. - `origin_message_not_found` -- The origin message referenced by the code channel's origin_link could not be found. See https://docs.slack.dev/reference/methods/agents.conversations.archive */
@@ -404,7 +396,7 @@ export const createConversation: API.OperationMethod<
404
396
  }));
405
397
 
406
398
  export type GetCanvasError = SlackOpError;
407
- /** Fetch a canvas attached to a code channel. Required scopes -- bot: `code_channels:manage` Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- The specified channel does not correspond to a valid channel. - `not_agent_channel` -- The specified channel is not an agent session channel. - `not_authorized` -- The caller is not an authorized agent bot for this channel. - `canvas_not_found` -- The specified `canvas_id` does not correspond to a canvas you can access. - `canvas_content_fetch_failed` -- The canvas content could not be fetched or rendered. - `comments_fetch_failed` -- The canvas comment threads could not be fetched. See https://docs.slack.dev/reference/methods/agents.conversations.getCanvas */
399
+ /** Fetch a canvas attached to a code channel. Required scopes -- bot: `code_channels:manage` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- The specified channel does not correspond to a valid channel. - `not_agent_channel` -- The specified channel is not an agent session channel. - `not_authorized` -- The caller is not an authorized agent bot for this channel. - `canvas_not_found` -- The specified `canvas_id` does not correspond to a canvas you can access. - `canvas_content_fetch_failed` -- The canvas content could not be fetched or rendered. - `comments_fetch_failed` -- The canvas comment threads could not be fetched. See https://docs.slack.dev/reference/methods/agents.conversations.getCanvas */
408
400
  export const getCanvas: API.OperationMethod<
409
401
  GetCanvasRequest,
410
402
  GetCanvasResponse,
@@ -472,7 +464,7 @@ export const renameSession: API.OperationMethod<
472
464
  }));
473
465
 
474
466
  export type SetCanvasContentError = SlackOpError;
475
- /** Replace the full markdown content of a plan canvas attached to a code channel. Required scopes -- bot: `code_channels:manage` Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- The specified channel does not correspond to a valid channel. - `not_agent_channel` -- The specified channel is not an agent session channel. - `feature_not_enabled` -- The set-canvas-content feature is not enabled for this user. - `not_authorized` -- The caller is not an authorized agent bot for this channel. - `canvas_not_found` -- The specified canvas_id does not correspond to a canvas you can access. - `content_too_large` -- The provided content exceeds the maximum canvas size. - `too_many_sections` -- The provided content or the existing canvas has too many sections to diff. Reduce the number of distinct blocks (paragraphs, headings, code fences) in the document. - `canvas_content_fetch_failed` -- The canvas's current content could not be read to compute the diff. - `canvas_content_update_failed` -- The canvas content could not be updated. See https://docs.slack.dev/reference/methods/agents.conversations.setCanvasContent */
467
+ /** Replace the full markdown content of a plan canvas attached to a code channel. Required scopes -- bot: `code_channels:manage` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- The specified channel does not correspond to a valid channel. - `not_agent_channel` -- The specified channel is not an agent session channel. - `not_authorized` -- The caller is not an authorized agent bot for this channel. - `canvas_not_found` -- The specified canvas_id does not correspond to a canvas you can access. - `content_too_large` -- The provided content exceeds the maximum canvas size. - `too_many_sections` -- The provided content or the existing canvas has too many sections to diff. Reduce the number of distinct blocks (paragraphs, headings, code fences) in the document. - `canvas_content_fetch_failed` -- The canvas's current content could not be read to compute the diff. - `canvas_content_update_failed` -- The canvas content could not be updated. See https://docs.slack.dev/reference/methods/agents.conversations.setCanvasContent */
476
468
  export const setCanvasContent: API.OperationMethod<
477
469
  SetCanvasContentRequest,
478
470
  SetCanvasContentResponse,
@@ -540,7 +532,7 @@ export const setStatus: API.OperationMethod<
540
532
  }));
541
533
 
542
534
  export type SetViewError = SlackOpError;
543
- /** Create or update a view in a code channel. Required scopes -- bot: `code_channels:manage` Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- The specified channel does not correspond to a valid channel. - `not_agent_channel` -- The specified channel is not a code channel. - `not_authorized` -- The caller is not an authorized agent bot or member for this channel. - `content_too_large` -- The view content exceeds the maximum allowed size (1 MB). - `too_many_views` -- The channel already has the maximum number of views (5), or already has a diff view (at most 1 is allowed). - `invalid_csp_domain` -- One or more declared CSP domains failed validation (must be https:// origins, no private/reserved/internal hosts). - `invalid_view_type` -- The supplied type is not a recognized view type. - `missing_required_arg` -- A required argument for the supplied view type is missing (content for html/diff, blocks for block_kit, canvas_id for canvas, pr_url for pull_request). - `invalid_pr_url` -- The supplied pr_url is not a valid https pull request URL. - `invalid_blocks` -- The supplied blocks failed Block Kit validation. - `canvas_not_found` -- The specified canvas_id does not correspond to a canvas you can access. - `not_view_owner` -- The view already exists and was created by a different agent bot; only its owner may update it. - `view_creation_failed` -- The view could not be created as a channel tab. See https://docs.slack.dev/reference/methods/agents.conversations.setView */
535
+ /** Create or update a view in a code channel. Required scopes -- bot: `code_channels:manage` Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- The specified channel does not correspond to a valid channel. - `not_agent_channel` -- The specified channel is not a code channel. - `not_authorized` -- The caller is not an authorized agent bot or member for this channel. - `content_too_large` -- The view content exceeds the maximum allowed size (1 MB). - `too_many_views` -- The channel already has the maximum number of views (5), or already has a `diff` view (at most 1 is allowed). - `invalid_csp_domain` -- One or more declared CSP domains failed validation (must be `https://` origins, no private, reserved, or internal hosts). - `invalid_view_type` -- The supplied `type` is not a recognized view type. - `missing_required_arg` -- A required argument for the supplied view type is missing (`content` for `html` or `diff`, `blocks` for `block_kit`, `canvas_id` for `canvas`). - `invalid_blocks` -- The supplied `blocks` failed Block Kit validation. - `canvas_not_found` -- The specified `canvas_id` does not correspond to a canvas you can access. - `not_view_owner` -- The view already exists and was created by a different agent bot; only its owner may update it. - `view_creation_failed` -- The view could not be created as a channel tab. See https://docs.slack.dev/reference/methods/agents.conversations.setView */
544
536
  export const setView: API.OperationMethod<
545
537
  SetViewRequest,
546
538
  SetViewResponse,
@@ -605,7 +597,6 @@ function __c3(j: number): any {
605
597
  case 0:
606
598
  return S.suspend(() =>
607
599
  S.Struct({
608
- connect_domains: S.optional(__S(96, __c12, 0)),
609
600
  resource_domains: S.optional(__S(96, __c12, 0)),
610
601
  }),
611
602
  ).annotate({ identifier: "SetViewRequestCsp" });
@@ -620,7 +611,6 @@ function __c3(j: number): any {
620
611
  canvas_id: S.optional(S.String),
621
612
  access_level: S.optional(S.String),
622
613
  agent_content_hash: S.optional(S.String),
623
- pr_url: S.optional(S.String),
624
614
  base_branch: S.optional(S.String),
625
615
  head_branch: S.optional(S.String),
626
616
  name: S.optional(S.String),
@@ -755,7 +745,7 @@ function __c7(j: number): any {
755
745
  return S.suspend(() =>
756
746
  S.Struct({
757
747
  ok: S.Boolean,
758
- title: S.optional(S.String),
748
+ title: S.String,
759
749
  channel_id: S.optional(S.String),
760
750
  }),
761
751
  ).annotate({ identifier: "RenameSessionResponse" });
@@ -872,7 +862,7 @@ function __c13(j: number): any {
872
862
  return S.suspend(() =>
873
863
  S.Struct({
874
864
  channel_id: S.optional(S.String),
875
- status: S.String,
865
+ status: S.Unknown,
876
866
  thread_ts: S.optional(S.String),
877
867
  title: S.optional(S.String),
878
868
  initiator_user_id: S.optional(S.String),
@@ -885,8 +875,8 @@ function __c13(j: number): any {
885
875
  return S.suspend(() =>
886
876
  S.Struct({
887
877
  ok: S.Boolean,
888
- status: S.optional(S.Unknown),
889
- agent_status: S.optional(S.Unknown),
878
+ status: S.Unknown,
879
+ agent_status: S.Unknown,
890
880
  title: S.optional(S.String),
891
881
  }),
892
882
  ).annotate({ identifier: "SetStatusResponse" });
@@ -26,13 +26,13 @@ const TELEMETRY = {
26
26
 
27
27
  export interface TestApiRequest {
28
28
  /** Error response to return */
29
- error?: string;
29
+ error?: string | undefined;
30
30
  }
31
31
  export type TestApiResponseArgsMap = { [key: string]: unknown | undefined };
32
32
  export interface TestApiResponse {
33
33
  /** Always `true` (a failed call raises a typed error instead). */
34
34
  ok: boolean;
35
- args?: TestApiResponseArgsMap;
35
+ args?: TestApiResponseArgsMap | undefined;
36
36
  }
37
37
  export type TestApiError = SlackOpError;
38
38
  /** Checks API calling code. Rate limit tier: 4 See https://docs.slack.dev/reference/methods/api.test */