@distilled.cloud/slack 1.0.0-rc.14 → 1.0.0-rc.16

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 (209) hide show
  1. package/lib/credentials.d.ts +1 -1
  2. package/lib/credentials.d.ts.map +1 -1
  3. package/lib/credentials.js +39 -34
  4. package/lib/credentials.js.map +1 -1
  5. package/lib/errors.d.ts +31 -31
  6. package/lib/errors.d.ts.map +1 -1
  7. package/lib/errors.js +41 -41
  8. package/lib/errors.js.map +1 -1
  9. package/lib/index.d.ts +1 -1
  10. package/lib/index.js +9 -9
  11. package/lib/pagination.d.ts +2 -2
  12. package/lib/pagination.js +28 -28
  13. package/lib/protocol.d.ts.map +1 -1
  14. package/lib/protocol.js +61 -59
  15. package/lib/protocol.js.map +1 -1
  16. package/lib/retry.d.ts +2 -2
  17. package/lib/retry.d.ts.map +1 -1
  18. package/lib/retry.js +34 -33
  19. package/lib/retry.js.map +1 -1
  20. package/lib/services/admin.d.ts +123 -575
  21. package/lib/services/admin.d.ts.map +1 -1
  22. package/lib/services/admin.js +304 -2878
  23. package/lib/services/agents.d.ts +13 -55
  24. package/lib/services/agents.d.ts.map +1 -1
  25. package/lib/services/agents.js +48 -309
  26. package/lib/services/api.d.ts +0 -4
  27. package/lib/services/api.d.ts.map +1 -1
  28. package/lib/services/api.js +16 -18
  29. package/lib/services/apps.d.ts +25 -106
  30. package/lib/services/apps.d.ts.map +1 -1
  31. package/lib/services/apps.js +84 -509
  32. package/lib/services/assistant.d.ts +6 -40
  33. package/lib/services/assistant.d.ts.map +1 -1
  34. package/lib/services/assistant.js +33 -204
  35. package/lib/services/auth.d.ts +4 -15
  36. package/lib/services/auth.d.ts.map +1 -1
  37. package/lib/services/auth.js +22 -90
  38. package/lib/services/blocks.d.ts +1 -7
  39. package/lib/services/blocks.d.ts.map +1 -1
  40. package/lib/services/blocks.js +16 -21
  41. package/lib/services/bookmarks.d.ts +4 -15
  42. package/lib/services/bookmarks.d.ts.map +1 -1
  43. package/lib/services/bookmarks.js +27 -76
  44. package/lib/services/bots.d.ts +1 -9
  45. package/lib/services/bots.d.ts.map +1 -1
  46. package/lib/services/bots.js +17 -54
  47. package/lib/services/calls.d.ts +6 -22
  48. package/lib/services/calls.d.ts.map +1 -1
  49. package/lib/services/calls.js +35 -110
  50. package/lib/services/canvases.d.ts +7 -35
  51. package/lib/services/canvases.d.ts.map +1 -1
  52. package/lib/services/canvases.js +39 -135
  53. package/lib/services/chat.d.ts +14 -83
  54. package/lib/services/chat.d.ts.map +1 -1
  55. package/lib/services/chat.js +59 -381
  56. package/lib/services/conversations.d.ts +31 -116
  57. package/lib/services/conversations.d.ts.map +1 -1
  58. package/lib/services/conversations.js +94 -690
  59. package/lib/services/dialog.d.ts +1 -4
  60. package/lib/services/dialog.d.ts.map +1 -1
  61. package/lib/services/dialog.js +13 -17
  62. package/lib/services/dnd.d.ts +5 -17
  63. package/lib/services/dnd.d.ts.map +1 -1
  64. package/lib/services/dnd.js +26 -91
  65. package/lib/services/emoji.d.ts +1 -8
  66. package/lib/services/emoji.d.ts.map +1 -1
  67. package/lib/services/emoji.js +18 -29
  68. package/lib/services/entity.d.ts +4 -16
  69. package/lib/services/entity.d.ts.map +1 -1
  70. package/lib/services/entity.js +29 -71
  71. package/lib/services/files.d.ts +16 -80
  72. package/lib/services/files.d.ts.map +1 -1
  73. package/lib/services/files.js +75 -433
  74. package/lib/services/functions.d.ts +8 -49
  75. package/lib/services/functions.d.ts.map +1 -1
  76. package/lib/services/functions.js +45 -203
  77. package/lib/services/lists.d.ts +13 -55
  78. package/lib/services/lists.d.ts.map +1 -1
  79. package/lib/services/lists.js +53 -248
  80. package/lib/services/migration.d.ts +1 -7
  81. package/lib/services/migration.d.ts.map +1 -1
  82. package/lib/services/migration.js +18 -27
  83. package/lib/services/oauth.d.ts +7 -43
  84. package/lib/services/oauth.d.ts.map +1 -1
  85. package/lib/services/oauth.js +34 -289
  86. package/lib/services/openid.d.ts +3 -10
  87. package/lib/services/openid.d.ts.map +1 -1
  88. package/lib/services/openid.js +19 -79
  89. package/lib/services/pins.d.ts +3 -13
  90. package/lib/services/pins.d.ts.map +1 -1
  91. package/lib/services/pins.js +27 -61
  92. package/lib/services/reactions.d.ts +5 -17
  93. package/lib/services/reactions.d.ts.map +1 -1
  94. package/lib/services/reactions.js +30 -96
  95. package/lib/services/reminders.d.ts +5 -17
  96. package/lib/services/reminders.d.ts.map +1 -1
  97. package/lib/services/reminders.js +33 -83
  98. package/lib/services/rtm.d.ts +2 -11
  99. package/lib/services/rtm.d.ts.map +1 -1
  100. package/lib/services/rtm.js +22 -56
  101. package/lib/services/search.d.ts +4 -35
  102. package/lib/services/search.d.ts.map +1 -1
  103. package/lib/services/search.js +28 -167
  104. package/lib/services/stars.d.ts +4 -26
  105. package/lib/services/stars.d.ts.map +1 -1
  106. package/lib/services/stars.js +28 -128
  107. package/lib/services/team.d.ts +11 -63
  108. package/lib/services/team.d.ts.map +1 -1
  109. package/lib/services/team.js +45 -289
  110. package/lib/services/tooling.d.ts +2 -5
  111. package/lib/services/tooling.d.ts.map +1 -1
  112. package/lib/services/tooling.js +15 -28
  113. package/lib/services/usergroups.d.ts +7 -31
  114. package/lib/services/usergroups.d.ts.map +1 -1
  115. package/lib/services/usergroups.js +40 -146
  116. package/lib/services/users.d.ts +14 -48
  117. package/lib/services/users.d.ts.map +1 -1
  118. package/lib/services/users.js +54 -249
  119. package/lib/services/views.d.ts +4 -14
  120. package/lib/services/views.d.ts.map +1 -1
  121. package/lib/services/views.js +28 -73
  122. package/lib/services/workflows.d.ts +8 -51
  123. package/lib/services/workflows.d.ts.map +1 -1
  124. package/lib/services/workflows.js +37 -188
  125. package/lib/traits.d.ts +1 -1
  126. package/lib/traits.js +8 -8
  127. package/package.json +14 -10
  128. package/src/credentials.ts +20 -21
  129. package/src/errors.ts +31 -27
  130. package/src/index.ts +1 -1
  131. package/src/pagination.ts +2 -2
  132. package/src/protocol.ts +30 -29
  133. package/src/retry.ts +6 -6
  134. package/src/services/admin.ts +2717 -3451
  135. package/src/services/agents.ts +380 -370
  136. package/src/services/api.ts +31 -21
  137. package/src/services/apps.ts +569 -621
  138. package/src/services/assistant.ts +235 -270
  139. package/src/services/auth.ts +118 -100
  140. package/src/services/blocks.ts +33 -29
  141. package/src/services/bookmarks.ts +101 -83
  142. package/src/services/bots.ts +74 -67
  143. package/src/services/calls.ts +118 -124
  144. package/src/services/canvases.ts +171 -178
  145. package/src/services/chat.ts +428 -496
  146. package/src/services/conversations.ts +675 -761
  147. package/src/services/dialog.ts +30 -17
  148. package/src/services/dnd.ts +125 -99
  149. package/src/services/emoji.ts +46 -42
  150. package/src/services/entity.ts +94 -92
  151. package/src/services/files.ts +536 -531
  152. package/src/services/functions.ts +209 -274
  153. package/src/services/lists.ts +289 -304
  154. package/src/services/migration.ts +39 -37
  155. package/src/services/oauth.ts +345 -361
  156. package/src/services/openid.ts +137 -122
  157. package/src/services/pins.ts +83 -70
  158. package/src/services/reactions.ts +119 -103
  159. package/src/services/reminders.ts +112 -90
  160. package/src/services/rtm.ts +73 -65
  161. package/src/services/search.ts +193 -244
  162. package/src/services/stars.ts +101 -160
  163. package/src/services/team.ts +333 -369
  164. package/src/services/tooling.ts +43 -30
  165. package/src/services/usergroups.ts +175 -179
  166. package/src/services/users.ts +301 -268
  167. package/src/services/views.ts +85 -80
  168. package/src/services/workflows.ts +184 -269
  169. package/src/traits.ts +1 -1
  170. package/lib/protocol.test.d.ts +0 -2
  171. package/lib/protocol.test.d.ts.map +0 -1
  172. package/lib/protocol.test.js +0 -288
  173. package/lib/protocol.test.js.map +0 -1
  174. package/lib/services/admin.js.map +0 -1
  175. package/lib/services/agents.js.map +0 -1
  176. package/lib/services/api.js.map +0 -1
  177. package/lib/services/apps.js.map +0 -1
  178. package/lib/services/assistant.js.map +0 -1
  179. package/lib/services/auth.js.map +0 -1
  180. package/lib/services/blocks.js.map +0 -1
  181. package/lib/services/bookmarks.js.map +0 -1
  182. package/lib/services/bots.js.map +0 -1
  183. package/lib/services/calls.js.map +0 -1
  184. package/lib/services/canvases.js.map +0 -1
  185. package/lib/services/chat.js.map +0 -1
  186. package/lib/services/conversations.js.map +0 -1
  187. package/lib/services/dialog.js.map +0 -1
  188. package/lib/services/dnd.js.map +0 -1
  189. package/lib/services/emoji.js.map +0 -1
  190. package/lib/services/entity.js.map +0 -1
  191. package/lib/services/files.js.map +0 -1
  192. package/lib/services/functions.js.map +0 -1
  193. package/lib/services/lists.js.map +0 -1
  194. package/lib/services/migration.js.map +0 -1
  195. package/lib/services/oauth.js.map +0 -1
  196. package/lib/services/openid.js.map +0 -1
  197. package/lib/services/pins.js.map +0 -1
  198. package/lib/services/reactions.js.map +0 -1
  199. package/lib/services/reminders.js.map +0 -1
  200. package/lib/services/rtm.js.map +0 -1
  201. package/lib/services/search.js.map +0 -1
  202. package/lib/services/stars.js.map +0 -1
  203. package/lib/services/team.js.map +0 -1
  204. package/lib/services/tooling.js.map +0 -1
  205. package/lib/services/usergroups.js.map +0 -1
  206. package/lib/services/users.js.map +0 -1
  207. package/lib/services/views.js.map +0 -1
  208. package/lib/services/workflows.js.map +0 -1
  209. package/src/protocol.test.ts +0 -372
@@ -1,20 +1,19 @@
1
1
  import * as API from "@distilled.cloud/core/api";
2
2
  // AUTO-GENERATED by scripts/generate.ts from .generated-specs (docs.slack.dev JSON twins). Do not edit.
3
- import * as S from "@distilled.cloud/core/schema";
3
+ import * as S from "@distilled.cloud/core/schema-lite";
4
+ import * as __L from "@distilled.cloud/core/schema-lite";
4
5
  import { SlackError, SlackRateLimited } from "../errors.ts";
5
6
  import { slackPaginate } from "../pagination.ts";
6
7
  import { SlackProtocol, type SlackOpError, type SlackOpContext } from "../protocol.ts";
7
8
  import * as Retry from "../retry.ts";
8
9
  import * as T from "../traits.ts";
10
+ // Schema table, filled on first reach (see __S at the end).
11
+ const __s: any[] = [];
9
12
 
10
13
  export type { SlackOpError, SlackOpContext };
11
14
 
12
15
  /** Array of streaming chunks. */
13
16
  export type AppendStreamRequestChunksList = Array<unknown>;
14
- export const AppendStreamRequestChunksList = /*@__PURE__*/ S.Array(
15
- S.Unknown,
16
- ) as any as S.Schema<AppendStreamRequestChunksList>;
17
-
18
17
  export interface AppendStreamRequest {
19
18
  /** An encoded ID that represents a channel, private group, or DM */
20
19
  channel: string;
@@ -25,33 +24,14 @@ export interface AppendStreamRequest {
25
24
  /** Accepts message text formatted in markdown. Limit this field to 12,000 characters. This text is what will be appended to the message received so far. */
26
25
  markdown_text?: string;
27
26
  }
28
- export const AppendStreamRequest = /*@__PURE__*/ S.suspend(() =>
29
- S.Struct({
30
- channel: S.String,
31
- chunks: S.optional(AppendStreamRequestChunksList),
32
- ts: S.String,
33
- markdown_text: S.optional(S.String),
34
- }).pipe(T.Http({ method: "POST", uri: "/chat.appendStream", code: 200 })),
35
- ).annotate({ identifier: "AppendStreamRequest" }) as any as S.Schema<AppendStreamRequest>;
36
-
37
27
  export interface AppendStreamResponse {
38
28
  /** Always `true` (a failed call raises a typed error instead). */
39
29
  ok: boolean;
40
30
  channel: string;
41
31
  ts: string;
42
32
  }
43
- export const AppendStreamResponse = /*@__PURE__*/ S.suspend(() =>
44
- S.Struct({
45
- ok: S.Boolean,
46
- channel: S.String,
47
- ts: S.String,
48
- }),
49
- ).annotate({ identifier: "AppendStreamResponse" }) as any as S.Schema<AppendStreamResponse>;
50
-
51
33
  /** The source of the link to unfurl. The source may either be `composer`, when the link is inside the message composer, or `conversations_history`, when the link has been posted to a conversation. */
52
34
  export type ChatUnfurlRequestSource = "composer" | "conversations_history";
53
- export const ChatUnfurlRequestSource = S.String;
54
-
55
35
  export interface ChatUnfurlRequest {
56
36
  /** Channel ID of the message. Both `channel` and `ts` must be provided together, *or* `unfurl_id` and `source` must be provided together. Required for public channels. */
57
37
  channel?: string;
@@ -72,30 +52,10 @@ export interface ChatUnfurlRequest {
72
52
  /** The source of the link to unfurl. The source may either be `composer`, when the link is inside the message composer, or `conversations_history`, when the link has been posted to a conversation. */
73
53
  source?: ChatUnfurlRequestSource | (string & {});
74
54
  }
75
- export const ChatUnfurlRequest = /*@__PURE__*/ S.suspend(() =>
76
- S.Struct({
77
- channel: S.optional(S.String),
78
- ts: S.optional(S.String),
79
- unfurls: S.optional(S.String),
80
- user_auth_message: S.optional(S.NullOr(S.String)),
81
- user_auth_required: S.optional(S.Boolean),
82
- user_auth_url: S.optional(S.NullOr(S.String)),
83
- user_auth_blocks: S.optional(S.Unknown),
84
- unfurl_id: S.optional(S.String),
85
- source: S.optional(ChatUnfurlRequestSource),
86
- }).pipe(T.Http({ method: "POST", uri: "/chat.unfurl", code: 200 })),
87
- ).annotate({ identifier: "ChatUnfurlRequest" }) as any as S.Schema<ChatUnfurlRequest>;
88
-
89
55
  export interface ChatUnfurlResponse {
90
56
  /** Always `true` (a failed call raises a typed error instead). */
91
57
  ok: boolean;
92
58
  }
93
- export const ChatUnfurlResponse = /*@__PURE__*/ S.suspend(() =>
94
- S.Struct({
95
- ok: S.Boolean,
96
- }),
97
- ).annotate({ identifier: "ChatUnfurlResponse" }) as any as S.Schema<ChatUnfurlResponse>;
98
-
99
59
  export interface DeleteChatRequest {
100
60
  /** (Legacy) Pass true to delete the message as the authed user with `chat:write:user` scope. Bot users in this context are considered authed users. See [legacy `as_user` parameter](#legacy_as_user) below. */
101
61
  as_user?: boolean;
@@ -104,28 +64,12 @@ export interface DeleteChatRequest {
104
64
  /** Timestamp of the message to be deleted. */
105
65
  ts: string;
106
66
  }
107
- export const DeleteChatRequest = /*@__PURE__*/ S.suspend(() =>
108
- S.Struct({
109
- as_user: S.optional(S.Boolean),
110
- channel: S.String,
111
- ts: S.String,
112
- }).pipe(T.Http({ method: "POST", uri: "/chat.delete", code: 200 })),
113
- ).annotate({ identifier: "DeleteChatRequest" }) as any as S.Schema<DeleteChatRequest>;
114
-
115
67
  export interface DeleteChatResponse {
116
68
  /** Always `true` (a failed call raises a typed error instead). */
117
69
  ok: boolean;
118
70
  channel: string;
119
71
  ts: string;
120
72
  }
121
- export const DeleteChatResponse = /*@__PURE__*/ S.suspend(() =>
122
- S.Struct({
123
- ok: S.Boolean,
124
- channel: S.String,
125
- ts: S.String,
126
- }),
127
- ).annotate({ identifier: "DeleteChatResponse" }) as any as S.Schema<DeleteChatResponse>;
128
-
129
73
  export interface DeleteScheduledMessageRequest {
130
74
  /** Pass true to delete the message as the authed user with `chat:write:user` scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with `chat:write:bot` scope. */
131
75
  as_user?: boolean;
@@ -134,55 +78,22 @@ export interface DeleteScheduledMessageRequest {
134
78
  /** `scheduled_message_id` returned from call to chat.scheduleMessage */
135
79
  scheduled_message_id: string;
136
80
  }
137
- export const DeleteScheduledMessageRequest = /*@__PURE__*/ S.suspend(() =>
138
- S.Struct({
139
- as_user: S.optional(S.Boolean),
140
- channel: S.String,
141
- scheduled_message_id: S.String,
142
- }).pipe(T.Http({ method: "POST", uri: "/chat.deleteScheduledMessage", code: 200 })),
143
- ).annotate({
144
- identifier: "DeleteScheduledMessageRequest",
145
- }) as any as S.Schema<DeleteScheduledMessageRequest>;
146
-
147
81
  export interface DeleteScheduledMessageResponse {
148
82
  /** Always `true` (a failed call raises a typed error instead). */
149
83
  ok: boolean;
150
84
  }
151
- export const DeleteScheduledMessageResponse = /*@__PURE__*/ S.suspend(() =>
152
- S.Struct({
153
- ok: S.Boolean,
154
- }),
155
- ).annotate({
156
- identifier: "DeleteScheduledMessageResponse",
157
- }) as any as S.Schema<DeleteScheduledMessageResponse>;
158
-
159
85
  export interface GetPermalinkRequest {
160
86
  /** The ID of the conversation or channel containing the message */
161
87
  channel: string;
162
88
  /** A message's `ts` value, uniquely identifying it within a channel */
163
89
  message_ts: string;
164
90
  }
165
- export const GetPermalinkRequest = /*@__PURE__*/ S.suspend(() =>
166
- S.Struct({
167
- channel: S.String.pipe(T.Query()),
168
- message_ts: S.String.pipe(T.Query()),
169
- }).pipe(T.Http({ method: "GET", uri: "/chat.getPermalink", code: 200 })),
170
- ).annotate({ identifier: "GetPermalinkRequest" }) as any as S.Schema<GetPermalinkRequest>;
171
-
172
91
  export interface GetPermalinkResponse {
173
92
  /** Always `true` (a failed call raises a typed error instead). */
174
93
  ok: boolean;
175
94
  permalink: string;
176
95
  channel: string;
177
96
  }
178
- export const GetPermalinkResponse = /*@__PURE__*/ S.suspend(() =>
179
- S.Struct({
180
- ok: S.Boolean,
181
- permalink: S.String,
182
- channel: S.String,
183
- }),
184
- ).annotate({ identifier: "GetPermalinkResponse" }) as any as S.Schema<GetPermalinkResponse>;
185
-
186
97
  export interface ListScheduledMessagesRequest {
187
98
  /** The channel of the scheduled messages */
188
99
  channel?: string;
@@ -197,19 +108,6 @@ export interface ListScheduledMessagesRequest {
197
108
  /** encoded team id to list channels in, required if org token is used */
198
109
  team_id?: string;
199
110
  }
200
- export const ListScheduledMessagesRequest = /*@__PURE__*/ S.suspend(() =>
201
- S.Struct({
202
- channel: S.optional(S.String),
203
- cursor: S.optional(S.String),
204
- latest: S.optional(S.String),
205
- limit: S.optional(S.Number),
206
- oldest: S.optional(S.String),
207
- team_id: S.optional(S.String),
208
- }).pipe(T.Http({ method: "POST", uri: "/chat.scheduledMessages.list", code: 200 })),
209
- ).annotate({
210
- identifier: "ListScheduledMessagesRequest",
211
- }) as any as S.Schema<ListScheduledMessagesRequest>;
212
-
213
111
  export interface ListScheduledMessagesResponseScheduledMessagesItem {
214
112
  id: string;
215
113
  channel_id: string;
@@ -217,37 +115,13 @@ export interface ListScheduledMessagesResponseScheduledMessagesItem {
217
115
  date_created: number;
218
116
  text?: string;
219
117
  }
220
- export const ListScheduledMessagesResponseScheduledMessagesItem = /*@__PURE__*/ S.suspend(() =>
221
- S.Struct({
222
- id: S.String,
223
- channel_id: S.String,
224
- post_at: S.Number,
225
- date_created: S.Number,
226
- text: S.optional(S.String),
227
- }),
228
- ).annotate({
229
- identifier: "ListScheduledMessagesResponseScheduledMessagesItem",
230
- }) as any as S.Schema<ListScheduledMessagesResponseScheduledMessagesItem>;
231
-
232
118
  export type ListScheduledMessagesResponseScheduledMessagesList =
233
119
  Array<ListScheduledMessagesResponseScheduledMessagesItem>;
234
- export const ListScheduledMessagesResponseScheduledMessagesList = /*@__PURE__*/ S.Array(
235
- ListScheduledMessagesResponseScheduledMessagesItem,
236
- ) as any as S.Schema<ListScheduledMessagesResponseScheduledMessagesList>;
237
-
238
120
  /** Pagination metadata. An empty `next_cursor` means the last page. */
239
121
  export interface ListScheduledMessagesResponseResponseMetadata {
240
- /** Cursor for the next page — pass as `cursor` on the next call. */
122
+ /** Cursor for the next page -- pass as `cursor` on the next call. */
241
123
  next_cursor?: string;
242
124
  }
243
- export const ListScheduledMessagesResponseResponseMetadata = /*@__PURE__*/ S.suspend(() =>
244
- S.Struct({
245
- next_cursor: S.optional(S.String),
246
- }),
247
- ).annotate({
248
- identifier: "ListScheduledMessagesResponseResponseMetadata",
249
- }) as any as S.Schema<ListScheduledMessagesResponseResponseMetadata>;
250
-
251
125
  export interface ListScheduledMessagesResponse {
252
126
  /** Always `true` (a failed call raises a typed error instead). */
253
127
  ok: boolean;
@@ -255,77 +129,28 @@ export interface ListScheduledMessagesResponse {
255
129
  /** Pagination metadata. An empty `next_cursor` means the last page. */
256
130
  response_metadata?: ListScheduledMessagesResponseResponseMetadata;
257
131
  }
258
- export const ListScheduledMessagesResponse = /*@__PURE__*/ S.suspend(() =>
259
- S.Struct({
260
- ok: S.Boolean,
261
- scheduled_messages: ListScheduledMessagesResponseScheduledMessagesList,
262
- response_metadata: S.optional(ListScheduledMessagesResponseResponseMetadata),
263
- }),
264
- ).annotate({
265
- identifier: "ListScheduledMessagesResponse",
266
- }) as any as S.Schema<ListScheduledMessagesResponse>;
267
-
268
132
  export interface MeMessageRequest {
269
133
  /** Channel to send message to. Can be a public channel, private group or IM channel. Can be an encoded ID, or a name. */
270
134
  channel: string;
271
135
  /** Text of the message to send. */
272
136
  text: string;
273
137
  }
274
- export const MeMessageRequest = /*@__PURE__*/ S.suspend(() =>
275
- S.Struct({
276
- channel: S.String,
277
- text: S.String,
278
- }).pipe(T.Http({ method: "POST", uri: "/chat.meMessage", code: 200 })),
279
- ).annotate({ identifier: "MeMessageRequest" }) as any as S.Schema<MeMessageRequest>;
280
-
281
138
  export interface MeMessageResponse {
282
139
  /** Always `true` (a failed call raises a typed error instead). */
283
140
  ok: boolean;
284
141
  ts?: string;
285
142
  channel?: string;
286
143
  }
287
- export const MeMessageResponse = /*@__PURE__*/ S.suspend(() =>
288
- S.Struct({
289
- ok: S.Boolean,
290
- ts: S.optional(S.String),
291
- channel: S.optional(S.String),
292
- }),
293
- ).annotate({ identifier: "MeMessageResponse" }) as any as S.Schema<MeMessageResponse>;
294
-
295
144
  export type PostEphemeralRequestAttachmentsCase1ItemMap = { [key: string]: unknown | undefined };
296
- export const PostEphemeralRequestAttachmentsCase1ItemMap = /*@__PURE__*/ S.Record(
297
- S.String,
298
- S.Unknown,
299
- ) as any as S.Schema<PostEphemeralRequestAttachmentsCase1ItemMap>;
300
-
301
145
  export type PostEphemeralRequestAttachmentsCase1List =
302
146
  Array<PostEphemeralRequestAttachmentsCase1ItemMap>;
303
- export const PostEphemeralRequestAttachmentsCase1List = /*@__PURE__*/ S.Array(
304
- PostEphemeralRequestAttachmentsCase1ItemMap,
305
- ) as any as S.Schema<PostEphemeralRequestAttachmentsCase1List>;
306
-
307
147
  /** A JSON-based array of structured attachments, presented as a URL-encoded string. */
308
148
  export type PostEphemeralRequestAttachments = string | PostEphemeralRequestAttachmentsCase1List;
309
- export const PostEphemeralRequestAttachments = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
310
-
311
149
  export type PostEphemeralRequestBlocksCase1ItemMap = { [key: string]: unknown | undefined };
312
- export const PostEphemeralRequestBlocksCase1ItemMap = /*@__PURE__*/ S.Record(
313
- S.String,
314
- S.Unknown,
315
- ) as any as S.Schema<PostEphemeralRequestBlocksCase1ItemMap>;
316
-
317
150
  export type PostEphemeralRequestBlocksCase1List = Array<PostEphemeralRequestBlocksCase1ItemMap>;
318
- export const PostEphemeralRequestBlocksCase1List = /*@__PURE__*/ S.Array(
319
- PostEphemeralRequestBlocksCase1ItemMap,
320
- ) as any as S.Schema<PostEphemeralRequestBlocksCase1List>;
321
-
322
151
  /** A JSON-based array of structured blocks, presented as a URL-encoded string. */
323
152
  export type PostEphemeralRequestBlocks = string | PostEphemeralRequestBlocksCase1List;
324
- export const PostEphemeralRequestBlocks = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
325
-
326
153
  export type PostEphemeralRequestParse = "" | "none" | "full" | "mrkdwn" | "false";
327
- export const PostEphemeralRequestParse = S.String;
328
-
329
154
  export interface PostEphemeralRequest {
330
155
  /** (Legacy) Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false. */
331
156
  as_user?: boolean;
@@ -356,68 +181,20 @@ export interface PostEphemeralRequest {
356
181
  /** Set your bot's user name. */
357
182
  username?: string;
358
183
  }
359
- export const PostEphemeralRequest = /*@__PURE__*/ S.suspend(() =>
360
- S.Struct({
361
- as_user: S.optional(S.Boolean),
362
- attachments: S.optional(PostEphemeralRequestAttachments),
363
- blocks: S.optional(PostEphemeralRequestBlocks),
364
- channel: S.String,
365
- icon_emoji: S.optional(S.String),
366
- icon_url: S.optional(S.String),
367
- link_names: S.optional(S.Boolean),
368
- markdown_text: S.optional(S.String),
369
- metadata: S.optional(S.NullOr(S.String)),
370
- parse: S.optional(S.NullOr(PostEphemeralRequestParse)),
371
- text: S.optional(S.NullOr(S.String)),
372
- thread_ts: S.optional(S.NullOr(S.String)),
373
- user: S.String,
374
- username: S.optional(S.String),
375
- }).pipe(T.Http({ method: "POST", uri: "/chat.postEphemeral", code: 200 })),
376
- ).annotate({ identifier: "PostEphemeralRequest" }) as any as S.Schema<PostEphemeralRequest>;
377
-
378
184
  export interface PostEphemeralResponse {
379
185
  /** Always `true` (a failed call raises a typed error instead). */
380
186
  ok: boolean;
381
187
  message_ts: string;
382
188
  }
383
- export const PostEphemeralResponse = /*@__PURE__*/ S.suspend(() =>
384
- S.Struct({
385
- ok: S.Boolean,
386
- message_ts: S.String,
387
- }),
388
- ).annotate({ identifier: "PostEphemeralResponse" }) as any as S.Schema<PostEphemeralResponse>;
389
-
390
189
  export type PostMessageRequestAttachmentsCase1ItemMap = { [key: string]: unknown | undefined };
391
- export const PostMessageRequestAttachmentsCase1ItemMap = /*@__PURE__*/ S.Record(
392
- S.String,
393
- S.Unknown,
394
- ) as any as S.Schema<PostMessageRequestAttachmentsCase1ItemMap>;
395
-
396
190
  export type PostMessageRequestAttachmentsCase1List =
397
191
  Array<PostMessageRequestAttachmentsCase1ItemMap>;
398
- export const PostMessageRequestAttachmentsCase1List = /*@__PURE__*/ S.Array(
399
- PostMessageRequestAttachmentsCase1ItemMap,
400
- ) as any as S.Schema<PostMessageRequestAttachmentsCase1List>;
401
-
402
192
  /** A JSON-based array of structured attachments, presented as a URL-encoded string. */
403
193
  export type PostMessageRequestAttachments = string | PostMessageRequestAttachmentsCase1List;
404
- export const PostMessageRequestAttachments = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
405
-
406
194
  export type PostMessageRequestBlocksCase1ItemMap = { [key: string]: unknown | undefined };
407
- export const PostMessageRequestBlocksCase1ItemMap = /*@__PURE__*/ S.Record(
408
- S.String,
409
- S.Unknown,
410
- ) as any as S.Schema<PostMessageRequestBlocksCase1ItemMap>;
411
-
412
195
  export type PostMessageRequestBlocksCase1List = Array<PostMessageRequestBlocksCase1ItemMap>;
413
- export const PostMessageRequestBlocksCase1List = /*@__PURE__*/ S.Array(
414
- PostMessageRequestBlocksCase1ItemMap,
415
- ) as any as S.Schema<PostMessageRequestBlocksCase1List>;
416
-
417
196
  /** A JSON-based array of structured blocks, presented as a URL-encoded string. */
418
197
  export type PostMessageRequestBlocks = string | PostMessageRequestBlocksCase1List;
419
- export const PostMessageRequestBlocks = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
420
-
421
198
  export interface PostMessageRequest {
422
199
  /** (Legacy) Pass true to post the message as the authed user instead of as a bot. Defaults to false. Can only be used by classic apps. See [legacy `as_user` parameter](#legacy_as_user) below. */
423
200
  as_user?: boolean;
@@ -458,30 +235,6 @@ export interface PostMessageRequest {
458
235
  /** Pass true to unfurl links from installed apps, or false to prevent app links from unfurling. When omitted, app links follow the `unfurl_links` setting. */
459
236
  unfurl_app_links?: boolean;
460
237
  }
461
- export const PostMessageRequest = /*@__PURE__*/ S.suspend(() =>
462
- S.Struct({
463
- as_user: S.optional(S.Boolean),
464
- attachments: S.optional(PostMessageRequestAttachments),
465
- blocks: S.optional(PostMessageRequestBlocks),
466
- channel: S.String,
467
- current_draft_last_updated_ts: S.optional(S.String),
468
- icon_emoji: S.optional(S.NullOr(S.String)),
469
- icon_url: S.optional(S.NullOr(S.String)),
470
- link_names: S.optional(S.Boolean),
471
- markdown_text: S.optional(S.String),
472
- metadata: S.optional(S.NullOr(S.String)),
473
- mrkdwn: S.optional(S.Boolean),
474
- parse: S.optional(S.NullOr(S.String)),
475
- reply_broadcast: S.optional(S.Boolean),
476
- text: S.optional(S.NullOr(S.String)),
477
- thread_ts: S.optional(S.NullOr(S.String)),
478
- unfurl_links: S.optional(S.Boolean),
479
- unfurl_media: S.optional(S.Boolean),
480
- username: S.optional(S.NullOr(S.String)),
481
- unfurl_app_links: S.optional(S.Boolean),
482
- }).pipe(T.Http({ method: "POST", uri: "/chat.postMessage", code: 200 })),
483
- ).annotate({ identifier: "PostMessageRequest" }) as any as S.Schema<PostMessageRequest>;
484
-
485
238
  export interface PostMessageResponse {
486
239
  /** Always `true` (a failed call raises a typed error instead). */
487
240
  ok: boolean;
@@ -491,53 +244,17 @@ export interface PostMessageResponse {
491
244
  /** Pass true if duplicate message is attempted to be sent. */
492
245
  is_duplicate?: boolean;
493
246
  }
494
- export const PostMessageResponse = /*@__PURE__*/ S.suspend(() =>
495
- S.Struct({
496
- ok: S.Boolean,
497
- channel: S.String,
498
- ts: S.String,
499
- message: S.optional(S.Unknown),
500
- is_duplicate: S.optional(S.Boolean),
501
- }),
502
- ).annotate({ identifier: "PostMessageResponse" }) as any as S.Schema<PostMessageResponse>;
503
-
504
247
  export type ScheduleMessageRequestAttachmentsCase1ItemMap = { [key: string]: unknown | undefined };
505
- export const ScheduleMessageRequestAttachmentsCase1ItemMap = /*@__PURE__*/ S.Record(
506
- S.String,
507
- S.Unknown,
508
- ) as any as S.Schema<ScheduleMessageRequestAttachmentsCase1ItemMap>;
509
-
510
248
  export type ScheduleMessageRequestAttachmentsCase1List =
511
249
  Array<ScheduleMessageRequestAttachmentsCase1ItemMap>;
512
- export const ScheduleMessageRequestAttachmentsCase1List = /*@__PURE__*/ S.Array(
513
- ScheduleMessageRequestAttachmentsCase1ItemMap,
514
- ) as any as S.Schema<ScheduleMessageRequestAttachmentsCase1List>;
515
-
516
250
  /** A JSON-based array of structured attachments, presented as a URL-encoded string. */
517
251
  export type ScheduleMessageRequestAttachments = string | ScheduleMessageRequestAttachmentsCase1List;
518
- export const ScheduleMessageRequestAttachments = /*@__PURE__*/ S.Unknown.pipe(
519
- T.UnionCases([[], []]),
520
- );
521
-
522
252
  export type ScheduleMessageRequestBlocksCase1ItemMap = { [key: string]: unknown | undefined };
523
- export const ScheduleMessageRequestBlocksCase1ItemMap = /*@__PURE__*/ S.Record(
524
- S.String,
525
- S.Unknown,
526
- ) as any as S.Schema<ScheduleMessageRequestBlocksCase1ItemMap>;
527
-
528
253
  export type ScheduleMessageRequestBlocksCase1List = Array<ScheduleMessageRequestBlocksCase1ItemMap>;
529
- export const ScheduleMessageRequestBlocksCase1List = /*@__PURE__*/ S.Array(
530
- ScheduleMessageRequestBlocksCase1ItemMap,
531
- ) as any as S.Schema<ScheduleMessageRequestBlocksCase1List>;
532
-
533
254
  /** A JSON-based array of structured blocks, presented as a URL-encoded string. */
534
255
  export type ScheduleMessageRequestBlocks = string | ScheduleMessageRequestBlocksCase1List;
535
- export const ScheduleMessageRequestBlocks = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
536
-
537
256
  /** Change how messages are treated. See [chat.postMessage](chat.postMessage#formatting). */
538
257
  export type ScheduleMessageRequestParse = "none" | "full";
539
- export const ScheduleMessageRequestParse = S.String;
540
-
541
258
  export interface ScheduleMessageRequest {
542
259
  /** Set to `true` to post the message as the authed user, instead of as a bot. Defaults to false. Cannot be used by [new Slack apps](/quickstart). See [chat.postMessage](chat.postMessage#authorship). */
543
260
  as_user?: boolean;
@@ -568,31 +285,7 @@ export interface ScheduleMessageRequest {
568
285
  /** JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace. */
569
286
  metadata?: string | null;
570
287
  }
571
- export const ScheduleMessageRequest = /*@__PURE__*/ S.suspend(() =>
572
- S.Struct({
573
- as_user: S.optional(S.Boolean),
574
- attachments: S.optional(ScheduleMessageRequestAttachments),
575
- blocks: S.optional(ScheduleMessageRequestBlocks),
576
- channel: S.String,
577
- link_names: S.optional(S.Boolean),
578
- markdown_text: S.optional(S.String),
579
- parse: S.optional(ScheduleMessageRequestParse),
580
- post_at: S.Number,
581
- reply_broadcast: S.optional(S.Boolean),
582
- text: S.optional(S.String),
583
- thread_ts: S.optional(S.String),
584
- unfurl_links: S.optional(S.Boolean),
585
- unfurl_media: S.optional(S.Boolean),
586
- metadata: S.optional(S.NullOr(S.String)),
587
- }).pipe(T.Http({ method: "POST", uri: "/chat.scheduleMessage", code: 200 })),
588
- ).annotate({ identifier: "ScheduleMessageRequest" }) as any as S.Schema<ScheduleMessageRequest>;
589
-
590
288
  export type ScheduleMessageResponseMessageMap = { [key: string]: unknown | undefined };
591
- export const ScheduleMessageResponseMessageMap = /*@__PURE__*/ S.Record(
592
- S.String,
593
- S.Unknown,
594
- ) as any as S.Schema<ScheduleMessageResponseMessageMap>;
595
-
596
289
  export interface ScheduleMessageResponse {
597
290
  /** Always `true` (a failed call raises a typed error instead). */
598
291
  ok: boolean;
@@ -601,26 +294,10 @@ export interface ScheduleMessageResponse {
601
294
  scheduled_message_id: string;
602
295
  message: ScheduleMessageResponseMessageMap;
603
296
  }
604
- export const ScheduleMessageResponse = /*@__PURE__*/ S.suspend(() =>
605
- S.Struct({
606
- ok: S.Boolean,
607
- channel: S.String,
608
- post_at: S.Number,
609
- scheduled_message_id: S.String,
610
- message: ScheduleMessageResponseMessageMap,
611
- }),
612
- ).annotate({ identifier: "ScheduleMessageResponse" }) as any as S.Schema<ScheduleMessageResponse>;
613
-
614
297
  /** Array of streaming chunks. Can include [markdown text chunk](#markdown_text-chunks) objects, [task update chunk](#task_update-chunks) objects, [plan update chunks](#plan_update-chunks), or [blocks chunks](#blocks-chunks). */
615
298
  export type StartStreamRequestChunksList = Array<unknown>;
616
- export const StartStreamRequestChunksList = /*@__PURE__*/ S.Array(
617
- S.Unknown,
618
- ) as any as S.Schema<StartStreamRequestChunksList>;
619
-
620
299
  /** Specifies how tasks are displayed in the message. `timeline` task updates render as individual task cards interleaved with streamed text. `plan` task updates render together in a plan block. */
621
300
  export type StartStreamRequestTaskDisplayMode = "timeline" | "plan";
622
- export const StartStreamRequestTaskDisplayMode = S.String;
623
-
624
301
  export interface StartStreamRequest {
625
302
  /** An encoded ID that represents a channel, thread, or DM. */
626
303
  channel: string;
@@ -643,21 +320,6 @@ export interface StartStreamRequest {
643
320
  /** The bot's username to display. */
644
321
  username?: string | null;
645
322
  }
646
- export const StartStreamRequest = /*@__PURE__*/ S.suspend(() =>
647
- S.Struct({
648
- channel: S.String,
649
- chunks: S.optional(StartStreamRequestChunksList),
650
- markdown_text: S.optional(S.String),
651
- thread_ts: S.optional(S.String),
652
- recipient_user_id: S.optional(S.String),
653
- recipient_team_id: S.optional(S.String),
654
- task_display_mode: S.optional(StartStreamRequestTaskDisplayMode),
655
- icon_emoji: S.optional(S.NullOr(S.String)),
656
- icon_url: S.optional(S.NullOr(S.String)),
657
- username: S.optional(S.NullOr(S.String)),
658
- }).pipe(T.Http({ method: "POST", uri: "/chat.startStream", code: 200 })),
659
- ).annotate({ identifier: "StartStreamRequest" }) as any as S.Schema<StartStreamRequest>;
660
-
661
323
  export interface StartStreamResponse {
662
324
  /** Always `true` (a failed call raises a typed error instead). */
663
325
  ok: boolean;
@@ -665,18 +327,8 @@ export interface StartStreamResponse {
665
327
  /** The timestamp of the streaming message. */
666
328
  ts: string;
667
329
  }
668
- export const StartStreamResponse = /*@__PURE__*/ S.suspend(() =>
669
- S.Struct({
670
- ok: S.Boolean,
671
- channel: S.String,
672
- ts: S.String,
673
- }),
674
- ).annotate({ identifier: "StartStreamResponse" }) as any as S.Schema<StartStreamResponse>;
675
-
676
330
  /** The session status to set after stopping the stream. */
677
331
  export type StopStreamRequestSessionStatus = "active" | "processing" | "suspended" | "closed";
678
- export const StopStreamRequestSessionStatus = S.String;
679
-
680
332
  export interface StopStreamRequest {
681
333
  /** An encoded ID that represents a channel, private group, or DM */
682
334
  channel: string;
@@ -693,18 +345,6 @@ export interface StopStreamRequest {
693
345
  /** The session status to set after stopping the stream. */
694
346
  session_status?: StopStreamRequestSessionStatus | (string & {});
695
347
  }
696
- export const StopStreamRequest = /*@__PURE__*/ S.suspend(() =>
697
- S.Struct({
698
- channel: S.String,
699
- chunks: S.optional(S.Unknown),
700
- ts: S.String,
701
- markdown_text: S.optional(S.String),
702
- blocks: S.optional(S.Unknown),
703
- metadata: S.optional(S.NullOr(S.String)),
704
- session_status: S.optional(StopStreamRequestSessionStatus),
705
- }).pipe(T.Http({ method: "POST", uri: "/chat.stopStream", code: 200 })),
706
- ).annotate({ identifier: "StopStreamRequest" }) as any as S.Schema<StopStreamRequest>;
707
-
708
348
  export interface StopStreamResponse {
709
349
  /** Always `true` (a failed call raises a typed error instead). */
710
350
  ok: boolean;
@@ -712,59 +352,20 @@ export interface StopStreamResponse {
712
352
  ts: string;
713
353
  message: unknown;
714
354
  }
715
- export const StopStreamResponse = /*@__PURE__*/ S.suspend(() =>
716
- S.Struct({
717
- ok: S.Boolean,
718
- channel: S.String,
719
- ts: S.String,
720
- message: S.Unknown,
721
- }),
722
- ).annotate({ identifier: "StopStreamResponse" }) as any as S.Schema<StopStreamResponse>;
723
-
724
355
  /** Pass true to update the message as the authed user. Bot users in this context are considered authed users. */
725
356
  export type UpdateChatRequestAsUser = boolean | string;
726
- export const UpdateChatRequestAsUser = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
727
-
728
357
  export type UpdateChatRequestAttachmentsCase1ItemMap = { [key: string]: unknown | undefined };
729
- export const UpdateChatRequestAttachmentsCase1ItemMap = /*@__PURE__*/ S.Record(
730
- S.String,
731
- S.Unknown,
732
- ) as any as S.Schema<UpdateChatRequestAttachmentsCase1ItemMap>;
733
-
734
358
  export type UpdateChatRequestAttachmentsCase1List = Array<UpdateChatRequestAttachmentsCase1ItemMap>;
735
- export const UpdateChatRequestAttachmentsCase1List = /*@__PURE__*/ S.Array(
736
- UpdateChatRequestAttachmentsCase1ItemMap,
737
- ) as any as S.Schema<UpdateChatRequestAttachmentsCase1List>;
738
-
739
359
  /** A JSON-based array of structured attachments, presented as a URL-encoded string. */
740
360
  export type UpdateChatRequestAttachments = string | UpdateChatRequestAttachmentsCase1List;
741
- export const UpdateChatRequestAttachments = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
742
-
743
361
  export type UpdateChatRequestBlocksCase1ItemMap = { [key: string]: unknown | undefined };
744
- export const UpdateChatRequestBlocksCase1ItemMap = /*@__PURE__*/ S.Record(
745
- S.String,
746
- S.Unknown,
747
- ) as any as S.Schema<UpdateChatRequestBlocksCase1ItemMap>;
748
-
749
362
  export type UpdateChatRequestBlocksCase1List = Array<UpdateChatRequestBlocksCase1ItemMap>;
750
- export const UpdateChatRequestBlocksCase1List = /*@__PURE__*/ S.Array(
751
- UpdateChatRequestBlocksCase1ItemMap,
752
- ) as any as S.Schema<UpdateChatRequestBlocksCase1List>;
753
-
754
363
  /** A JSON-based array of structured blocks, presented as a URL-encoded string. */
755
364
  export type UpdateChatRequestBlocks = string | UpdateChatRequestBlocksCase1List;
756
- export const UpdateChatRequestBlocks = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
757
-
758
365
  /** Find and link channel names and usernames. Defaults to `none`. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, `none`. */
759
366
  export type UpdateChatRequestLinkNames = boolean | string;
760
- export const UpdateChatRequestLinkNames = /*@__PURE__*/ S.Unknown.pipe(T.UnionCases([[], []]));
761
-
762
367
  /** Array of new file ids that will be sent with this message. */
763
368
  export type UpdateChatRequestFileIdsList = Array<string>;
764
- export const UpdateChatRequestFileIdsList = /*@__PURE__*/ S.Array(
765
- S.String,
766
- ) as any as S.Schema<UpdateChatRequestFileIdsList>;
767
-
768
369
  export interface UpdateChatRequest {
769
370
  /** Pass true to update the message as the authed user. Bot users in this context are considered authed users. */
770
371
  as_user?: UpdateChatRequestAsUser | null;
@@ -793,59 +394,16 @@ export interface UpdateChatRequest {
793
394
  /** Array of new file ids that will be sent with this message. */
794
395
  file_ids?: UpdateChatRequestFileIdsList;
795
396
  }
796
- export const UpdateChatRequest = /*@__PURE__*/ S.suspend(() =>
797
- S.Struct({
798
- as_user: S.optional(S.NullOr(UpdateChatRequestAsUser)),
799
- attachments: S.optional(UpdateChatRequestAttachments),
800
- unfurled_attachments: S.optional(S.NullOr(S.String)),
801
- blocks: S.optional(UpdateChatRequestBlocks),
802
- markdown_text: S.optional(S.String),
803
- metadata: S.optional(S.NullOr(S.String)),
804
- channel: S.String,
805
- link_names: S.optional(S.NullOr(UpdateChatRequestLinkNames)),
806
- parse: S.optional(S.NullOr(S.String)),
807
- text: S.optional(S.NullOr(S.String)),
808
- ts: S.String,
809
- reply_broadcast: S.optional(S.Boolean),
810
- file_ids: S.optional(UpdateChatRequestFileIdsList),
811
- }).pipe(T.Http({ method: "POST", uri: "/chat.update", code: 200 })),
812
- ).annotate({ identifier: "UpdateChatRequest" }) as any as S.Schema<UpdateChatRequest>;
813
-
814
397
  export type UpdateChatResponseMessageAttachmentsItemMap = { [key: string]: unknown | undefined };
815
- export const UpdateChatResponseMessageAttachmentsItemMap = /*@__PURE__*/ S.Record(
816
- S.String,
817
- S.Unknown,
818
- ) as any as S.Schema<UpdateChatResponseMessageAttachmentsItemMap>;
819
-
820
398
  export type UpdateChatResponseMessageAttachmentsList =
821
399
  Array<UpdateChatResponseMessageAttachmentsItemMap>;
822
- export const UpdateChatResponseMessageAttachmentsList = /*@__PURE__*/ S.Array(
823
- UpdateChatResponseMessageAttachmentsItemMap,
824
- ) as any as S.Schema<UpdateChatResponseMessageAttachmentsList>;
825
-
826
400
  export type UpdateChatResponseMessageMetadataMap = { [key: string]: unknown | undefined };
827
- export const UpdateChatResponseMessageMetadataMap = /*@__PURE__*/ S.Record(
828
- S.String,
829
- S.Unknown,
830
- ) as any as S.Schema<UpdateChatResponseMessageMetadataMap>;
831
-
832
401
  export interface UpdateChatResponseMessage {
833
402
  text: string;
834
403
  blocks?: unknown;
835
404
  attachments?: UpdateChatResponseMessageAttachmentsList;
836
405
  metadata?: UpdateChatResponseMessageMetadataMap;
837
406
  }
838
- export const UpdateChatResponseMessage = /*@__PURE__*/ S.suspend(() =>
839
- S.Struct({
840
- text: S.String,
841
- blocks: S.optional(S.Unknown),
842
- attachments: S.optional(UpdateChatResponseMessageAttachmentsList),
843
- metadata: S.optional(UpdateChatResponseMessageMetadataMap),
844
- }),
845
- ).annotate({
846
- identifier: "UpdateChatResponseMessage",
847
- }) as any as S.Schema<UpdateChatResponseMessage>;
848
-
849
407
  export interface UpdateChatResponse {
850
408
  /** Always `true` (a failed call raises a typed error instead). */
851
409
  ok: boolean;
@@ -854,93 +412,83 @@ export interface UpdateChatResponse {
854
412
  text: string;
855
413
  message: UpdateChatResponseMessage;
856
414
  }
857
- export const UpdateChatResponse = /*@__PURE__*/ S.suspend(() =>
858
- S.Struct({
859
- ok: S.Boolean,
860
- channel: S.String,
861
- ts: S.String,
862
- text: S.String,
863
- message: UpdateChatResponseMessage,
864
- }),
865
- ).annotate({ identifier: "UpdateChatResponse" }) as any as S.Schema<UpdateChatResponse>;
866
-
867
415
  export type AppendStreamError = SlackOpError;
868
- /** Appends text to an existing streaming conversation. Required scopes — bot: `chat:write` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `message_not_in_streaming_state` — The message is not in the streaming state. - `messaging_processing_failed` — Failed to process the message. - `as_user_not_supported` — The `as_user` parameter does not function with workspace apps. - `channel_not_found` — Value passed for `channel` was invalid. - `duplicate_channel_not_found` — Channel associated with `client_msg_id` was invalid. - `duplicate_message_not_found` — No duplicate message exists associated with `client_msg_id`. - `ekm_access_denied` — Your message couldn’t be sent because your admins have disabled sending messages to this channel. - `invalid_blocks` — Blocks submitted with this message are not valid. - `invalid_chunks` — Chunks submitted with this message are not valid. - `invalid_metadata_format` — Invalid metadata format provided - `invalid_metadata_schema` — Invalid metadata schema provided - `is_archived` — Channel has been archived. - `message_limit_exceeded` — Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces - `messages_tab_disabled` — Messages tab for the app is disabled. - `metadata_must_be_sent_from_app` — Message metadata can only be posted or updated using an app-level token - `msg_blocks_too_long` — Blocks submitted with this message are too long. - `msg_blocks_too_many` — Max blocks exceeded, blocks are limited to 50 per message. - `metadata_too_large` — Metadata exceeds size limit - `no_text` — No message text provided - `not_in_channel` — Cannot post user messages to a channel they are not in. - `rate_limited` — Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information - `restricted_action` — A workspace preference prevents the authenticated user from posting. - `restricted_action_non_threadable_channel` — Cannot post thread replies into a non_threadable channel. - `restricted_action_read_only_channel` — Cannot post any message into a read-only channel. - `restricted_action_thread_locked` — Cannot post replies to a thread that has been locked by admins. - `restricted_action_thread_only_channel` — Cannot post top-level messages into a thread-only channel. - `slack_connect_canvas_sharing_blocked` — Admin has disabled Canvas File sharing in all Slack Connect communications - `slack_connect_file_link_sharing_blocked` — Admin has disabled Slack File sharing in all Slack Connect communications - `slack_connect_lists_sharing_blocked` — Admin has disabled Lists sharing in all Slack Connect communications - `team_not_found` — This error occurs if, when using an org-wide token, the `channel_name` is passed instead of the `channel_id`. - `too_many_attachments` — Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `too_many_contact_cards` — Too many contact_cards were provided with this message. A maximum of 10 contact cards are allowed on a message. - `message_not_found` — Message not found - `channel_type_not_supported` — Channel type not supported - `stopped_by_user` — The streaming message was stopped by the user and no further appends are accepted. - `message_not_owned_by_app` — The message is not owned by the app. - `markdown_text_required` — Missing required field: 'markdown_text' - `markdown_text_or_chunks_required` — One of 'markdown_text' or 'chunks' is required - `streaming_mode_mismatch` — The streaming mode must be the same as the streaming mode used to start the stream. If you started the stream with `markdown_text`, you must append with `markdown_text`. If you started the stream with `chunks`, you must append with `chunks`. - `cannot_provide_both_markdown_text_and_chunks` — Cannot provide both `markdown_text` and `chunks` in the same request. See https://docs.slack.dev/reference/methods/chat.appendStream */
416
+ /** Appends text to an existing streaming conversation. Required scopes -- bot: `chat:write` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `message_not_in_streaming_state` -- The message is not in the streaming state. - `messaging_processing_failed` -- Failed to process the message. - `as_user_not_supported` -- The `as_user` parameter does not function with workspace apps. - `channel_not_found` -- Value passed for `channel` was invalid. - `duplicate_channel_not_found` -- Channel associated with `client_msg_id` was invalid. - `duplicate_message_not_found` -- No duplicate message exists associated with `client_msg_id`. - `ekm_access_denied` -- Your message couldn't be sent because your admins have disabled sending messages to this channel. - `invalid_blocks` -- Blocks submitted with this message are not valid. - `invalid_chunks` -- Chunks submitted with this message are not valid. - `invalid_metadata_format` -- Invalid metadata format provided - `invalid_metadata_schema` -- Invalid metadata schema provided - `is_archived` -- Channel has been archived. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces - `messages_tab_disabled` -- Messages tab for the app is disabled. - `metadata_must_be_sent_from_app` -- Message metadata can only be posted or updated using an app-level token - `msg_blocks_too_long` -- Blocks submitted with this message are too long. - `msg_blocks_too_many` -- Max blocks exceeded, blocks are limited to 50 per message. - `metadata_too_large` -- Metadata exceeds size limit - `no_text` -- No message text provided - `not_in_channel` -- Cannot post user messages to a channel they are not in. - `rate_limited` -- Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information - `restricted_action` -- A workspace preference prevents the authenticated user from posting. - `restricted_action_non_threadable_channel` -- Cannot post thread replies into a non_threadable channel. - `restricted_action_read_only_channel` -- Cannot post any message into a read-only channel. - `restricted_action_thread_locked` -- Cannot post replies to a thread that has been locked by admins. - `restricted_action_thread_only_channel` -- Cannot post top-level messages into a thread-only channel. - `slack_connect_canvas_sharing_blocked` -- Admin has disabled Canvas File sharing in all Slack Connect communications - `slack_connect_file_link_sharing_blocked` -- Admin has disabled Slack File sharing in all Slack Connect communications - `slack_connect_lists_sharing_blocked` -- Admin has disabled Lists sharing in all Slack Connect communications - `team_not_found` -- This error occurs if, when using an org-wide token, the `channel_name` is passed instead of the `channel_id`. - `too_many_attachments` -- Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `too_many_contact_cards` -- Too many contact_cards were provided with this message. A maximum of 10 contact cards are allowed on a message. - `message_not_found` -- Message not found - `channel_type_not_supported` -- Channel type not supported - `stopped_by_user` -- The streaming message was stopped by the user and no further appends are accepted. - `message_not_owned_by_app` -- The message is not owned by the app. - `markdown_text_required` -- Missing required field: 'markdown_text' - `markdown_text_or_chunks_required` -- One of 'markdown_text' or 'chunks' is required - `streaming_mode_mismatch` -- The streaming mode must be the same as the streaming mode used to start the stream. If you started the stream with `markdown_text`, you must append with `markdown_text`. If you started the stream with `chunks`, you must append with `chunks`. - `cannot_provide_both_markdown_text_and_chunks` -- Cannot provide both `markdown_text` and `chunks` in the same request. See https://docs.slack.dev/reference/methods/chat.appendStream */
869
417
  export const appendStream: API.OperationMethod<
870
418
  AppendStreamRequest,
871
419
  AppendStreamResponse,
872
420
  AppendStreamError,
873
421
  SlackOpContext
874
422
  > = /*@__PURE__*/ API.make(() => ({
875
- input: AppendStreamRequest,
876
- output: AppendStreamResponse,
423
+ input: __S(0, __c0, 0) as any as S.Schema<AppendStreamRequest>,
424
+ output: __S(32, __c2, 0) as any as S.Schema<AppendStreamResponse>,
877
425
  errors: [SlackError, SlackRateLimited],
878
426
  protocol: SlackProtocol,
879
427
  retry: Retry.Retry,
880
428
  }));
881
429
 
882
430
  export type ChatUnfurlError = SlackOpError;
883
- /** Provide custom unfurl behavior for user-posted URLs Required scopes — bot: `links:write`; user: `links:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `cannot_auth_user` — The current user cannot be authenticated. - `cannot_find_channel` — The specified channel could not be located for this token. - `cannot_find_message` — The `ts` value in the request does not match a message. - `cannot_find_service` — A record of your app being allowed to unfurl for this workspace could not be found. - `cannot_parse_attachment` — The provided `unfurls` argument could not be parsed or understood. - `cannot_prompt` — The current user has already interacted with and dismissed a prompt for this application. - `cannot_unfurl_message` — The URL cannot be unfurled because the URL provided does not appear in the message. - `cannot_unfurl_url` — The URL cannot be unfurled. This error may be returned if you haven't acknowledged a `link_shared` event tied to the same URL. It is also returned when the domain appears in a workspace's administrative blocklists. - `invalid_unfurl_id` — The unfurl ID is invalid. - `invalid_unfurls_format` — The `unfurls` parameter cannot be JSON-decoded into a map of URLs to attachments. - `invalid_metadata_format` — The `metadata` parameter cannot be JSON-decoded into the expected format. - `invalid_source` — The unfurl source is invalid. - `missing_channel` — The request is missing the `channel` parameter - `missing_source` — The request is missing the `source` parameter. - `missing_ts` — The request is missing the `ts` parameter - `missing_unfurl_id` — The request is missing the `unfurl_id` parameter. - `missing_unfurls` — The request is missing the `unfurls` parameter. See https://docs.slack.dev/reference/methods/chat.unfurl */
431
+ /** Provide custom unfurl behavior for user-posted URLs Required scopes -- bot: `links:write`; user: `links:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `cannot_auth_user` -- The current user cannot be authenticated. - `cannot_find_channel` -- The specified channel could not be located for this token. - `cannot_find_message` -- The `ts` value in the request does not match a message. - `cannot_find_service` -- A record of your app being allowed to unfurl for this workspace could not be found. - `cannot_parse_attachment` -- The provided `unfurls` argument could not be parsed or understood. - `cannot_prompt` -- The current user has already interacted with and dismissed a prompt for this application. - `cannot_unfurl_message` -- The URL cannot be unfurled because the URL provided does not appear in the message. - `cannot_unfurl_url` -- The URL cannot be unfurled. This error may be returned if you haven't acknowledged a `link_shared` event tied to the same URL. It is also returned when the domain appears in a workspace's administrative blocklists. - `invalid_unfurl_id` -- The unfurl ID is invalid. - `invalid_unfurls_format` -- The `unfurls` parameter cannot be JSON-decoded into a map of URLs to attachments. - `invalid_metadata_format` -- The `metadata` parameter cannot be JSON-decoded into the expected format. - `invalid_source` -- The unfurl source is invalid. - `missing_channel` -- The request is missing the `channel` parameter - `missing_source` -- The request is missing the `source` parameter. - `missing_ts` -- The request is missing the `ts` parameter - `missing_unfurl_id` -- The request is missing the `unfurl_id` parameter. - `missing_unfurls` -- The request is missing the `unfurls` parameter. See https://docs.slack.dev/reference/methods/chat.unfurl */
884
432
  export const chatUnfurl: API.OperationMethod<
885
433
  ChatUnfurlRequest,
886
434
  ChatUnfurlResponse,
887
435
  ChatUnfurlError,
888
436
  SlackOpContext
889
437
  > = /*@__PURE__*/ API.make(() => ({
890
- input: ChatUnfurlRequest,
891
- output: ChatUnfurlResponse,
438
+ input: __S(48, __c3, 0) as any as S.Schema<ChatUnfurlRequest>,
439
+ output: __S(64, __c4, 0) as any as S.Schema<ChatUnfurlResponse>,
892
440
  errors: [SlackError, SlackRateLimited],
893
441
  protocol: SlackProtocol,
894
442
  retry: Retry.Retry,
895
443
  }));
896
444
 
897
445
  export type DeleteChatError = SlackOpError;
898
- /** Deletes a message. Required scopes — bot: `chat:write`; user: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `cant_delete_message` — Authenticated user does not have permission to delete this message. - `channel_not_found` — Value passed for `channel` was invalid. - `message_not_found` — No message exists with the requested timestamp. - `invalid_channel_id` — Value passed for `channel` was not a valid channel ID. See https://docs.slack.dev/reference/methods/chat.delete */
446
+ /** Deletes a message. Required scopes -- bot: `chat:write`; user: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `cant_delete_message` -- Authenticated user does not have permission to delete this message. - `channel_not_found` -- Value passed for `channel` was invalid. - `message_not_found` -- No message exists with the requested timestamp. - `invalid_channel_id` -- Value passed for `channel` was not a valid channel ID. See https://docs.slack.dev/reference/methods/chat.delete */
899
447
  export const deleteChat: API.OperationMethod<
900
448
  DeleteChatRequest,
901
449
  DeleteChatResponse,
902
450
  DeleteChatError,
903
451
  SlackOpContext
904
452
  > = /*@__PURE__*/ API.make(() => ({
905
- input: DeleteChatRequest,
906
- output: DeleteChatResponse,
453
+ input: __S(128, __c8, 0) as any as S.Schema<DeleteChatRequest>,
454
+ output: __S(32, __c2, 0) as any as S.Schema<DeleteChatResponse>,
907
455
  errors: [SlackError, SlackRateLimited],
908
456
  protocol: SlackProtocol,
909
457
  retry: Retry.Retry,
910
458
  }));
911
459
 
912
460
  export type DeleteScheduledMessageError = SlackOpError;
913
- /** Deletes a pending scheduled message from the queue. Required scopes — bot: `chat:write`; user: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bad_token` — The provided `token` was invalid. - `channel_not_found` — The `channel` passed is either an invalid ID or does not exist. - `invalid_scheduled_message_id` — The `scheduled_message_id` passed is either an invalid ID, or the scheduled message it's referencing has already been sent or deleted. See https://docs.slack.dev/reference/methods/chat.deleteScheduledMessage */
461
+ /** Deletes a pending scheduled message from the queue. Required scopes -- bot: `chat:write`; user: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `bad_token` -- The provided `token` was invalid. - `channel_not_found` -- The `channel` passed is either an invalid ID or does not exist. - `invalid_scheduled_message_id` -- The `scheduled_message_id` passed is either an invalid ID, or the scheduled message it's referencing has already been sent or deleted. See https://docs.slack.dev/reference/methods/chat.deleteScheduledMessage */
914
462
  export const deleteScheduledMessage: API.OperationMethod<
915
463
  DeleteScheduledMessageRequest,
916
464
  DeleteScheduledMessageResponse,
917
465
  DeleteScheduledMessageError,
918
466
  SlackOpContext
919
467
  > = /*@__PURE__*/ API.make(() => ({
920
- input: DeleteScheduledMessageRequest,
921
- output: DeleteScheduledMessageResponse,
468
+ input: __S(144, __c9, 0) as any as S.Schema<DeleteScheduledMessageRequest>,
469
+ output: __S(64, __c4, 0) as any as S.Schema<DeleteScheduledMessageResponse>,
922
470
  errors: [SlackError, SlackRateLimited],
923
471
  protocol: SlackProtocol,
924
472
  retry: Retry.Retry,
925
473
  }));
926
474
 
927
475
  export type GetPermalinkError = SlackOpError;
928
- /** Retrieve a permalink URL for a specific extant message Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — Value passed for `channel` was invalid. - `message_not_found` — The message identified by `message_ts` could not be found. See https://docs.slack.dev/reference/methods/chat.getPermalink */
476
+ /** Retrieve a permalink URL for a specific extant message Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- Value passed for `channel` was invalid. - `message_not_found` -- The message identified by `message_ts` could not be found. See https://docs.slack.dev/reference/methods/chat.getPermalink */
929
477
  export const getPermalink: API.OperationMethod<
930
478
  GetPermalinkRequest,
931
479
  GetPermalinkResponse,
932
480
  GetPermalinkError,
933
481
  SlackOpContext
934
482
  > = /*@__PURE__*/ API.make(() => ({
935
- input: GetPermalinkRequest,
936
- output: GetPermalinkResponse,
483
+ input: __S(160, __c10, 0) as any as S.Schema<GetPermalinkRequest>,
484
+ output: __S(161, __c10, 1) as any as S.Schema<GetPermalinkResponse>,
937
485
  errors: [SlackError, SlackRateLimited],
938
486
  protocol: SlackProtocol,
939
487
  retry: Retry.Retry,
940
488
  }));
941
489
 
942
490
  export type ListScheduledMessagesError = SlackOpError;
943
- /** Returns a list of scheduled messages. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `invalid_channel` — The channel passed is invalid - `invalid_cursor` — Provided cursor is invalid - `invalid_token` — Token is invalid See https://docs.slack.dev/reference/methods/chat.scheduledMessages.list */
491
+ /** Returns a list of scheduled messages. Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `invalid_channel` -- The channel passed is invalid - `invalid_cursor` -- Provided cursor is invalid - `invalid_token` -- Token is invalid See https://docs.slack.dev/reference/methods/chat.scheduledMessages.list */
944
492
  export const listScheduledMessages: API.PaginatedOperationMethod<
945
493
  ListScheduledMessagesRequest,
946
494
  ListScheduledMessagesResponse,
@@ -949,8 +497,8 @@ export const listScheduledMessages: API.PaginatedOperationMethod<
949
497
  ListScheduledMessagesResponseScheduledMessagesItem
950
498
  > = /*@__PURE__*/ API.makePaginated(
951
499
  () => ({
952
- input: ListScheduledMessagesRequest,
953
- output: ListScheduledMessagesResponse,
500
+ input: __S(176, __c11, 0) as any as S.Schema<ListScheduledMessagesRequest>,
501
+ output: __S(180, __c11, 4) as any as S.Schema<ListScheduledMessagesResponse>,
954
502
  errors: [SlackError, SlackRateLimited],
955
503
  protocol: SlackProtocol,
956
504
  retry: Retry.Retry,
@@ -966,106 +514,490 @@ export const listScheduledMessages: API.PaginatedOperationMethod<
966
514
  ) as any;
967
515
 
968
516
  export type MeMessageError = SlackOpError;
969
- /** Share a me message into a channel. Required scopes — bot: `chat:write`; user: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — Value passed for `channel` was invalid. - `is_archived` — Channel has been archived. - `msg_too_long` — Message text is too long - `no_text` — No message text provided - `not_in_channel` — Cannot post user messages to a channel they are not in. - `rate_limited` — Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information See https://docs.slack.dev/reference/methods/chat.meMessage */
517
+ /** Share a me message into a channel. Required scopes -- bot: `chat:write`; user: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- Value passed for `channel` was invalid. - `is_archived` -- Channel has been archived. - `msg_too_long` -- Message text is too long - `no_text` -- No message text provided - `not_in_channel` -- Cannot post user messages to a channel they are not in. - `rate_limited` -- Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information See https://docs.slack.dev/reference/methods/chat.meMessage */
970
518
  export const meMessage: API.OperationMethod<
971
519
  MeMessageRequest,
972
520
  MeMessageResponse,
973
521
  MeMessageError,
974
522
  SlackOpContext
975
523
  > = /*@__PURE__*/ API.make(() => ({
976
- input: MeMessageRequest,
977
- output: MeMessageResponse,
524
+ input: __S(192, __c12, 0) as any as S.Schema<MeMessageRequest>,
525
+ output: __S(193, __c12, 1) as any as S.Schema<MeMessageResponse>,
978
526
  errors: [SlackError, SlackRateLimited],
979
527
  protocol: SlackProtocol,
980
528
  retry: Retry.Retry,
981
529
  }));
982
530
 
983
531
  export type PostEphemeralError = SlackOpError;
984
- /** Sends an ephemeral message to a user in a channel. Required scopes — bot: `chat:write`; user: `chat:write` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — Value passed for `channel` was invalid. - `invalid_blocks` — Blocks submitted with this message are not valid - `invalid_blocks_format` — The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax. - `is_archived` — Channel has been archived. - `markdown_text_conflict` — Markdown text cannot be used in conjunction with `blocks` or `text` argument. - `message_limit_exceeded` — Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces - `messages_tab_disabled` — Messages tab for the app is disabled. - `msg_too_long` — Message text is too long - `no_text` — No message text provided - `restricted_action` — A workspace preference prevents the authenticated user from posting. - `too_many_attachments` — Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `user_not_in_channel` — Intended recipient is not in the specified channel. - `not_in_channel` — Cannot post user messages to a channel they are not in. - `invalid_attachments` — Attachments that contain blocks are not valid - `cannot_reply_to_message` — This message type cannot have thread replies. See https://docs.slack.dev/reference/methods/chat.postEphemeral */
532
+ /** Sends an ephemeral message to a user in a channel. Required scopes -- bot: `chat:write`; user: `chat:write` Rate limit tier: 4 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- Value passed for `channel` was invalid. - `invalid_blocks` -- Blocks submitted with this message are not valid - `invalid_blocks_format` -- The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax. - `is_archived` -- Channel has been archived. - `markdown_text_conflict` -- Markdown text cannot be used in conjunction with `blocks` or `text` argument. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces - `messages_tab_disabled` -- Messages tab for the app is disabled. - `msg_too_long` -- Message text is too long - `no_text` -- No message text provided - `restricted_action` -- A workspace preference prevents the authenticated user from posting. - `too_many_attachments` -- Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `user_not_in_channel` -- Intended recipient is not in the specified channel. - `not_in_channel` -- Cannot post user messages to a channel they are not in. - `invalid_attachments` -- Attachments that contain blocks are not valid - `cannot_reply_to_message` -- This message type cannot have thread replies. See https://docs.slack.dev/reference/methods/chat.postEphemeral */
985
533
  export const postEphemeral: API.OperationMethod<
986
534
  PostEphemeralRequest,
987
535
  PostEphemeralResponse,
988
536
  PostEphemeralError,
989
537
  SlackOpContext
990
538
  > = /*@__PURE__*/ API.make(() => ({
991
- input: PostEphemeralRequest,
992
- output: PostEphemeralResponse,
539
+ input: __S(210, __c13, 2) as any as S.Schema<PostEphemeralRequest>,
540
+ output: __S(211, __c13, 3) as any as S.Schema<PostEphemeralResponse>,
993
541
  errors: [SlackError, SlackRateLimited],
994
542
  protocol: SlackProtocol,
995
543
  retry: Retry.Retry,
996
544
  }));
997
545
 
998
546
  export type PostMessageError = SlackOpError;
999
- /** Sends a message to a channel. Required scopes — bot: `chat:write`; user: `chat:write` Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `agent_prompt_display_not_allowed` — `client_context.agent_prompt_display` may only be set by the Slack client when posting to the user's Slackbot DM. - `app_access_restricted` — The user does not have permission to use this app. - `as_user_not_supported` — The `as_user` parameter does not function with workspace apps. - `channel_not_found` — Value passed for `channel` was invalid. - `draft_already_deleted` — The draft has already been deleted. - `draft_already_sent` — The draft has already been sent. - `draft_has_conflict` — The client draft version is out of sync with the server draft version. - `draft_not_found` — The draft was not found. - `duplicate_channel_not_found` — Channel associated with `client_msg_id` was invalid. - `duplicate_message_not_found` — No duplicate message exists associated with `client_msg_id`. - `ekm_access_denied` — Your message couldn’t be sent because your admins have disabled sending messages to this channel. - `invalid_blocks` — Blocks submitted with this message are not valid. - `invalid_blocks_format` — The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax. - `invalid_metadata_format` — Invalid metadata format provided. - `invalid_metadata_schema` — Invalid metadata schema provided. - `is_archived` — Channel has been archived. - `markdown_text_conflict` — Markdown text cannot be used in conjunction with `blocks` or `text` argument. - `message_limit_exceeded` — Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces. - `messages_tab_disabled` — Messages tab for the app is disabled. - `metadata_must_be_sent_from_app` — Message metadata can only be posted or updated using an app-level token. - `metadata_too_large` — Metadata exceeds size limit. - `msg_blocks_too_long` — Blocks submitted with this message are too long. - `no_text` — No message text provided. - `not_in_channel` — Cannot post user messages to a channel they are not in. - `rate_limited` — Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information. - `restricted_action` — A workspace preference prevents the authenticated user from posting. - `restricted_action_non_threadable_channel` — Cannot post thread replies into a non_threadable channel. - `restricted_action_read_only_channel` — Cannot post any message into a read-only channel. - `restricted_action_thread_locked` — Cannot post replies to a thread that has been locked by admins. - `restricted_action_thread_only_channel` — Cannot post top-level messages into a thread-only channel. - `send_on_behalf_not_allowed` — Cannot send on behalf of the provided user. - `slack_connect_canvas_sharing_blocked` — Admin has disabled Canvas File sharing in all Slack Connect communications. - `slack_connect_file_link_sharing_blocked` — Admin has disabled Slack File sharing in all Slack Connect communications. - `slack_connect_lists_sharing_blocked` — Admin has disabled Lists sharing in all Slack Connect communications. - `team_not_found` — This error occurs if, when using an org-wide token, the `channel_name` is passed instead of the `channel_id`. - `too_many_attachments` — Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `too_many_contact_cards` — Too many contact_cards were provided with this message. A maximum of 10 contact cards are allowed on a message. - `cannot_reply_to_message` — This message type cannot have thread replies. - `missing_file_data` — Attempted to share a file but some required data was missing. - `attachment_payload_limit_exceeded` — Attachment payload size is too long. See https://docs.slack.dev/reference/methods/chat.postMessage */
547
+ /** Sends a message to a channel. Required scopes -- bot: `chat:write`; user: `chat:write` Rate limit tier: 5 Method-specific errors (the `error` slug on the SlackError): - `agent_prompt_display_not_allowed` -- `client_context.agent_prompt_display` may only be set by the Slack client when posting to the user's Slackbot DM. - `app_access_restricted` -- The user does not have permission to use this app. - `as_user_not_supported` -- The `as_user` parameter does not function with workspace apps. - `channel_not_found` -- Value passed for `channel` was invalid. - `draft_already_deleted` -- The draft has already been deleted. - `draft_already_sent` -- The draft has already been sent. - `draft_has_conflict` -- The client draft version is out of sync with the server draft version. - `draft_not_found` -- The draft was not found. - `duplicate_channel_not_found` -- Channel associated with `client_msg_id` was invalid. - `duplicate_message_not_found` -- No duplicate message exists associated with `client_msg_id`. - `ekm_access_denied` -- Your message couldn't be sent because your admins have disabled sending messages to this channel. - `invalid_blocks` -- Blocks submitted with this message are not valid. - `invalid_blocks_format` -- The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax. - `invalid_metadata_format` -- Invalid metadata format provided. - `invalid_metadata_schema` -- Invalid metadata schema provided. - `is_archived` -- Channel has been archived. - `markdown_text_conflict` -- Markdown text cannot be used in conjunction with `blocks` or `text` argument. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces. - `messages_tab_disabled` -- Messages tab for the app is disabled. - `metadata_must_be_sent_from_app` -- Message metadata can only be posted or updated using an app-level token. - `metadata_too_large` -- Metadata exceeds size limit. - `msg_blocks_too_long` -- Blocks submitted with this message are too long. - `no_text` -- No message text provided. - `not_in_channel` -- Cannot post user messages to a channel they are not in. - `rate_limited` -- Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information. - `restricted_action` -- A workspace preference prevents the authenticated user from posting. - `restricted_action_non_threadable_channel` -- Cannot post thread replies into a non_threadable channel. - `restricted_action_read_only_channel` -- Cannot post any message into a read-only channel. - `restricted_action_thread_locked` -- Cannot post replies to a thread that has been locked by admins. - `restricted_action_thread_only_channel` -- Cannot post top-level messages into a thread-only channel. - `send_on_behalf_not_allowed` -- Cannot send on behalf of the provided user. - `slack_connect_canvas_sharing_blocked` -- Admin has disabled Canvas File sharing in all Slack Connect communications. - `slack_connect_file_link_sharing_blocked` -- Admin has disabled Slack File sharing in all Slack Connect communications. - `slack_connect_lists_sharing_blocked` -- Admin has disabled Lists sharing in all Slack Connect communications. - `team_not_found` -- This error occurs if, when using an org-wide token, the `channel_name` is passed instead of the `channel_id`. - `too_many_attachments` -- Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `too_many_contact_cards` -- Too many contact_cards were provided with this message. A maximum of 10 contact cards are allowed on a message. - `cannot_reply_to_message` -- This message type cannot have thread replies. - `missing_file_data` -- Attempted to share a file but some required data was missing. - `attachment_payload_limit_exceeded` -- Attachment payload size is too long. See https://docs.slack.dev/reference/methods/chat.postMessage */
1000
548
  export const postMessage: API.OperationMethod<
1001
549
  PostMessageRequest,
1002
550
  PostMessageResponse,
1003
551
  PostMessageError,
1004
552
  SlackOpContext
1005
553
  > = /*@__PURE__*/ API.make(() => ({
1006
- input: PostMessageRequest,
1007
- output: PostMessageResponse,
554
+ input: __S(226, __c14, 2) as any as S.Schema<PostMessageRequest>,
555
+ output: __S(227, __c14, 3) as any as S.Schema<PostMessageResponse>,
1008
556
  errors: [SlackError, SlackRateLimited],
1009
557
  protocol: SlackProtocol,
1010
558
  retry: Retry.Retry,
1011
559
  }));
1012
560
 
1013
561
  export type ScheduleMessageError = SlackOpError;
1014
- /** Schedules a message to be sent to a channel. Required scopes — bot: `chat:write`; user: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` — Value passed for `channel` was invalid. - `is_archived` — Channel has been archived. - `invalid_blocks` — Blocks submitted with this message are not valid - `invalid_blocks_format` — The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax. - `invalid_metadata_format` — Invalid metadata format provided - `invalid_metadata_schema` — Invalid metadata schema provided - `invalid_time` — value passed for `post_time` was invalid. - `markdown_text_conflict` — Markdown text cannot be used in conjunction with `blocks` or `text` argument. - `message_limit_exceeded` — Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces - `metadata_must_be_sent_from_app` — Message metadata can only be posted or updated using an app-level token - `metadata_too_large` — Metadata exceeds size limit - `msg_too_long` — Message text is too long - `no_text` — No message text provided - `not_in_channel` — Cannot post user messages to a channel they are not in. - `rate_limited` — Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information - `restricted_action` — A workspace preference prevents the authenticated user from posting. - `restricted_action_non_threadable_channel` — Cannot post thread replies into a non_threadable channel. - `restricted_action_read_only_channel` — Cannot post any message into a read-only channel. - `restricted_action_thread_only_channel` — Cannot post top-level messages into a thread-only channel. - `restricted_too_many` — Too many messages were scheduled in the channel for a given period. See [usage info](/reference/methods/chat.scheduleMessage#restrictions) for additional details - `slack_connect_file_link_sharing_blocked` — Admin has disabled Slack File sharing in all Slack Connect communications - `time_in_past` — value passed for `post_time` was in the past. - `time_too_far` — value passed for `post_time` was too far into the future. - `too_many_attachments` — Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `invalid_token` — The passed token is invalid or not supported by this method. See https://docs.slack.dev/reference/methods/chat.scheduleMessage */
562
+ /** Schedules a message to be sent to a channel. Required scopes -- bot: `chat:write`; user: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `channel_not_found` -- Value passed for `channel` was invalid. - `is_archived` -- Channel has been archived. - `invalid_blocks` -- Blocks submitted with this message are not valid - `invalid_blocks_format` -- The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax. - `invalid_metadata_format` -- Invalid metadata format provided - `invalid_metadata_schema` -- Invalid metadata schema provided - `invalid_time` -- value passed for `post_time` was invalid. - `markdown_text_conflict` -- Markdown text cannot be used in conjunction with `blocks` or `text` argument. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces - `metadata_must_be_sent_from_app` -- Message metadata can only be posted or updated using an app-level token - `metadata_too_large` -- Metadata exceeds size limit - `msg_too_long` -- Message text is too long - `no_text` -- No message text provided - `not_in_channel` -- Cannot post user messages to a channel they are not in. - `rate_limited` -- Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information - `restricted_action` -- A workspace preference prevents the authenticated user from posting. - `restricted_action_non_threadable_channel` -- Cannot post thread replies into a non_threadable channel. - `restricted_action_read_only_channel` -- Cannot post any message into a read-only channel. - `restricted_action_thread_only_channel` -- Cannot post top-level messages into a thread-only channel. - `restricted_too_many` -- Too many messages were scheduled in the channel for a given period. See [usage info](/reference/methods/chat.scheduleMessage#restrictions) for additional details - `slack_connect_file_link_sharing_blocked` -- Admin has disabled Slack File sharing in all Slack Connect communications - `time_in_past` -- value passed for `post_time` was in the past. - `time_too_far` -- value passed for `post_time` was too far into the future. - `too_many_attachments` -- Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `invalid_token` -- The passed token is invalid or not supported by this method. See https://docs.slack.dev/reference/methods/chat.scheduleMessage */
1015
563
  export const scheduleMessage: API.OperationMethod<
1016
564
  ScheduleMessageRequest,
1017
565
  ScheduleMessageResponse,
1018
566
  ScheduleMessageError,
1019
567
  SlackOpContext
1020
568
  > = /*@__PURE__*/ API.make(() => ({
1021
- input: ScheduleMessageRequest,
1022
- output: ScheduleMessageResponse,
569
+ input: __S(242, __c15, 2) as any as S.Schema<ScheduleMessageRequest>,
570
+ output: __S(243, __c15, 3) as any as S.Schema<ScheduleMessageResponse>,
1023
571
  errors: [SlackError, SlackRateLimited],
1024
572
  protocol: SlackProtocol,
1025
573
  retry: Retry.Retry,
1026
574
  }));
1027
575
 
1028
576
  export type StartStreamError = SlackOpError;
1029
- /** Starts a new streaming conversation. Required scopes — bot: `chat:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `messaging_processing_failed` — Failed to process the message. - `channel_not_found` — Value passed for `channel` was invalid. - `duplicate_channel_not_found` — Channel associated with `client_msg_id` was invalid. - `duplicate_message_not_found` — No duplicate message exists associated with `client_msg_id`. - `ekm_access_denied` — Your message couldn’t be sent because your admins have disabled sending messages to this channel. - `invalid_blocks` — Blocks submitted with this message are not valid - `invalid_chunks` — Chunks submitted with this message are not valid. - `invalid_blocks_format` — The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax. - `invalid_metadata_format` — Invalid metadata format provided - `invalid_metadata_schema` — Invalid metadata schema provided - `is_archived` — Channel has been archived. - `message_limit_exceeded` — Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces - `messages_tab_disabled` — Messages tab for the app is disabled. - `metadata_must_be_sent_from_app` — Message metadata can only be posted or updated using an app-level token - `metadata_too_large` — Metadata exceeds size limit - `msg_blocks_too_long` — Blocks submitted with this message are too long. - `msg_blocks_too_many` — Max blocks exceeded, blocks are limited to 50 per message. - `no_text` — No message text provided - `not_in_channel` — Cannot post user messages to a channel they are not in. - `rate_limited` — Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information - `restricted_action` — A workspace preference prevents the authenticated user from posting. - `restricted_action_non_threadable_channel` — Cannot post thread replies into a non_threadable channel. - `restricted_action_read_only_channel` — Cannot post any message into a read-only channel. - `restricted_action_thread_locked` — Cannot post replies to a thread that has been locked by admins. - `restricted_action_thread_only_channel` — Cannot post top-level messages into a thread-only channel. - `slack_connect_canvas_sharing_blocked` — Admin has disabled Canvas File sharing in all Slack Connect communications - `slack_connect_file_link_sharing_blocked` — Admin has disabled Slack File sharing in all Slack Connect communications - `slack_connect_lists_sharing_blocked` — Admin has disabled Lists sharing in all Slack Connect communications - `team_not_found` — This error occurs if, when using an org-wide token, the `channel_name` is passed instead of the `channel_id`. - `channel_type_not_supported` — Channel type not supported - `user_not_found` — User not found. - `missing_recipient_team_id` — Missing recipient team ID. - `missing_recipient_user_id` — Missing recipient user ID. - `cannot_provide_both_markdown_text_and_chunks` — Cannot provide both `markdown_text` and `chunks` in the same request. See https://docs.slack.dev/reference/methods/chat.startStream */
577
+ /** Starts a new streaming conversation. Required scopes -- bot: `chat:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `messaging_processing_failed` -- Failed to process the message. - `channel_not_found` -- Value passed for `channel` was invalid. - `duplicate_channel_not_found` -- Channel associated with `client_msg_id` was invalid. - `duplicate_message_not_found` -- No duplicate message exists associated with `client_msg_id`. - `ekm_access_denied` -- Your message couldn't be sent because your admins have disabled sending messages to this channel. - `invalid_blocks` -- Blocks submitted with this message are not valid - `invalid_chunks` -- Chunks submitted with this message are not valid. - `invalid_blocks_format` -- The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax. - `invalid_metadata_format` -- Invalid metadata format provided - `invalid_metadata_schema` -- Invalid metadata schema provided - `is_archived` -- Channel has been archived. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces - `messages_tab_disabled` -- Messages tab for the app is disabled. - `metadata_must_be_sent_from_app` -- Message metadata can only be posted or updated using an app-level token - `metadata_too_large` -- Metadata exceeds size limit - `msg_blocks_too_long` -- Blocks submitted with this message are too long. - `msg_blocks_too_many` -- Max blocks exceeded, blocks are limited to 50 per message. - `no_text` -- No message text provided - `not_in_channel` -- Cannot post user messages to a channel they are not in. - `rate_limited` -- Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information - `restricted_action` -- A workspace preference prevents the authenticated user from posting. - `restricted_action_non_threadable_channel` -- Cannot post thread replies into a non_threadable channel. - `restricted_action_read_only_channel` -- Cannot post any message into a read-only channel. - `restricted_action_thread_locked` -- Cannot post replies to a thread that has been locked by admins. - `restricted_action_thread_only_channel` -- Cannot post top-level messages into a thread-only channel. - `slack_connect_canvas_sharing_blocked` -- Admin has disabled Canvas File sharing in all Slack Connect communications - `slack_connect_file_link_sharing_blocked` -- Admin has disabled Slack File sharing in all Slack Connect communications - `slack_connect_lists_sharing_blocked` -- Admin has disabled Lists sharing in all Slack Connect communications - `team_not_found` -- This error occurs if, when using an org-wide token, the `channel_name` is passed instead of the `channel_id`. - `channel_type_not_supported` -- Channel type not supported - `user_not_found` -- User not found. - `missing_recipient_team_id` -- Missing recipient team ID. - `missing_recipient_user_id` -- Missing recipient user ID. - `cannot_provide_both_markdown_text_and_chunks` -- Cannot provide both `markdown_text` and `chunks` in the same request. See https://docs.slack.dev/reference/methods/chat.startStream */
1030
578
  export const startStream: API.OperationMethod<
1031
579
  StartStreamRequest,
1032
580
  StartStreamResponse,
1033
581
  StartStreamError,
1034
582
  SlackOpContext
1035
583
  > = /*@__PURE__*/ API.make(() => ({
1036
- input: StartStreamRequest,
1037
- output: StartStreamResponse,
584
+ input: __S(80, __c5, 0) as any as S.Schema<StartStreamRequest>,
585
+ output: __S(32, __c2, 0) as any as S.Schema<StartStreamResponse>,
1038
586
  errors: [SlackError, SlackRateLimited],
1039
587
  protocol: SlackProtocol,
1040
588
  retry: Retry.Retry,
1041
589
  }));
1042
590
 
1043
591
  export type StopStreamError = SlackOpError;
1044
- /** Stops a streaming conversation. Required scopes — bot: `chat:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `message_not_found` — The message was not found. - `message_not_in_streaming_state` — The message is not in a streaming state. - `as_user_not_supported` — The `as_user` parameter does not function with workspace apps. - `channel_not_found` — Value passed for `channel` was invalid. - `channel_type_not_supported` — Channel type not supported. - `duplicate_channel_not_found` — Channel associated with `client_msg_id` was invalid. - `duplicate_message_not_found` — No duplicate message exists associated with `client_msg_id`. - `ekm_access_denied` — Your message couldn’t be sent because your admins have disabled sending messages to this channel. - `invalid_blocks` — Blocks submitted with this message are not valid. - `invalid_chunks` — Chunks submitted with this message are not valid. - `invalid_metadata_format` — Invalid metadata format provided - `invalid_metadata_schema` — Invalid metadata schema provided - `is_archived` — Channel has been archived. - `message_limit_exceeded` — Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces - `message_not_owned_by_app` — The message is not owned by the app. - `messages_tab_disabled` — Messages tab for the app is disabled. - `metadata_must_be_sent_from_app` — Message metadata can only be posted or updated using an app-level token - `metadata_too_large` — Metadata exceeds size limit - `msg_blocks_too_long` — Blocks submitted with this message are too long. - `msg_blocks_too_many` — Max blocks exceeded, blocks are limited to 50 per message. - `no_text` — No message text provided - `not_in_channel` — Cannot post user messages to a channel they are not in. - `rate_limited` — Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information - `restricted_action` — A workspace preference prevents the authenticated user from posting. - `restricted_action_non_threadable_channel` — Cannot post thread replies into a non_threadable channel. - `restricted_action_read_only_channel` — Cannot post any message into a read-only channel. - `restricted_action_thread_locked` — Cannot post replies to a thread that has been locked by admins. - `restricted_action_thread_only_channel` — Cannot post top-level messages into a thread-only channel. - `slack_connect_canvas_sharing_blocked` — Admin has disabled Canvas File sharing in all Slack Connect communications - `slack_connect_file_link_sharing_blocked` — Admin has disabled Slack File sharing in all Slack Connect communications - `slack_connect_lists_sharing_blocked` — Admin has disabled Lists sharing in all Slack Connect communications - `team_not_found` — This error occurs if, when using an org-wide token, the `channel_name` is passed instead of the `channel_id`. - `too_many_attachments` — Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `too_many_contact_cards` — Too many contact_cards were provided with this message. A maximum of 10 contact cards are allowed on a message. - `cannot_reply_to_message` — This message type cannot have thread replies. - `missing_file_data` — Attempted to share a file but some required data was missing. - `attachment_payload_limit_exceeded` — Attachment payload size is too long. - `cannot_provide_both_markdown_text_and_chunks` — Cannot provide both `markdown_text` and `chunks` in the same request. - `streaming_mode_mismatch` — The streaming mode must be the same as the streaming mode used to start the stream. If you started the stream with `markdown_text`, you must append with `markdown_text`. If you started the stream with `chunks`, you must append with `chunks`. See https://docs.slack.dev/reference/methods/chat.stopStream */
592
+ /** Stops a streaming conversation. Required scopes -- bot: `chat:write` Rate limit tier: 2 Method-specific errors (the `error` slug on the SlackError): - `message_not_found` -- The message was not found. - `message_not_in_streaming_state` -- The message is not in a streaming state. - `as_user_not_supported` -- The `as_user` parameter does not function with workspace apps. - `channel_not_found` -- Value passed for `channel` was invalid. - `channel_type_not_supported` -- Channel type not supported. - `duplicate_channel_not_found` -- Channel associated with `client_msg_id` was invalid. - `duplicate_message_not_found` -- No duplicate message exists associated with `client_msg_id`. - `ekm_access_denied` -- Your message couldn't be sent because your admins have disabled sending messages to this channel. - `invalid_blocks` -- Blocks submitted with this message are not valid. - `invalid_chunks` -- Chunks submitted with this message are not valid. - `invalid_metadata_format` -- Invalid metadata format provided - `invalid_metadata_schema` -- Invalid metadata schema provided - `is_archived` -- Channel has been archived. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces - `message_not_owned_by_app` -- The message is not owned by the app. - `messages_tab_disabled` -- Messages tab for the app is disabled. - `metadata_must_be_sent_from_app` -- Message metadata can only be posted or updated using an app-level token - `metadata_too_large` -- Metadata exceeds size limit - `msg_blocks_too_long` -- Blocks submitted with this message are too long. - `msg_blocks_too_many` -- Max blocks exceeded, blocks are limited to 50 per message. - `no_text` -- No message text provided - `not_in_channel` -- Cannot post user messages to a channel they are not in. - `rate_limited` -- Application has posted too many messages, [read the Rate Limit documentation](/apis/web-api/rate-limits) for more information - `restricted_action` -- A workspace preference prevents the authenticated user from posting. - `restricted_action_non_threadable_channel` -- Cannot post thread replies into a non_threadable channel. - `restricted_action_read_only_channel` -- Cannot post any message into a read-only channel. - `restricted_action_thread_locked` -- Cannot post replies to a thread that has been locked by admins. - `restricted_action_thread_only_channel` -- Cannot post top-level messages into a thread-only channel. - `slack_connect_canvas_sharing_blocked` -- Admin has disabled Canvas File sharing in all Slack Connect communications - `slack_connect_file_link_sharing_blocked` -- Admin has disabled Slack File sharing in all Slack Connect communications - `slack_connect_lists_sharing_blocked` -- Admin has disabled Lists sharing in all Slack Connect communications - `team_not_found` -- This error occurs if, when using an org-wide token, the `channel_name` is passed instead of the `channel_id`. - `too_many_attachments` -- Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `too_many_contact_cards` -- Too many contact_cards were provided with this message. A maximum of 10 contact cards are allowed on a message. - `cannot_reply_to_message` -- This message type cannot have thread replies. - `missing_file_data` -- Attempted to share a file but some required data was missing. - `attachment_payload_limit_exceeded` -- Attachment payload size is too long. - `cannot_provide_both_markdown_text_and_chunks` -- Cannot provide both `markdown_text` and `chunks` in the same request. - `streaming_mode_mismatch` -- The streaming mode must be the same as the streaming mode used to start the stream. If you started the stream with `markdown_text`, you must append with `markdown_text`. If you started the stream with `chunks`, you must append with `chunks`. See https://docs.slack.dev/reference/methods/chat.stopStream */
1045
593
  export const stopStream: API.OperationMethod<
1046
594
  StopStreamRequest,
1047
595
  StopStreamResponse,
1048
596
  StopStreamError,
1049
597
  SlackOpContext
1050
598
  > = /*@__PURE__*/ API.make(() => ({
1051
- input: StopStreamRequest,
1052
- output: StopStreamResponse,
599
+ input: __S(96, __c6, 0) as any as S.Schema<StopStreamRequest>,
600
+ output: __S(97, __c6, 1) as any as S.Schema<StopStreamResponse>,
1053
601
  errors: [SlackError, SlackRateLimited],
1054
602
  protocol: SlackProtocol,
1055
603
  retry: Retry.Retry,
1056
604
  }));
1057
605
 
1058
606
  export type UpdateChatError = SlackOpError;
1059
- /** Updates a message. Required scopes — bot: `chat:write`; user: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `as_user_not_supported` — The `as_user` parameter does not function with workspace apps. - `blocked_file_type` — Admin has disabled uploading this type of file. - `block_mismatch` — Rich-text blocks cannot be replaced with non-rich-text blocks - `cant_broadcast_message` — Unable to broadcast this message. - `cant_update_message` — Authenticated user does not have permission to update this message. - `channel_not_found` — Value passed for `channel` was invalid. - `edit_window_closed` — The message cannot be edited due to the team message edit settings - `external_channel_migrating` — The channel is in the process of migrating and so the message cannot be updated at this time. - `file_deleted` — File to share deleted. - `file_is_deleted` — The file is deleted. - `file_not_found` — One or more of the provided file IDs could not be found. - `file_share_limit_reached` — The file has reached the share limit. - `invalid_attachments` — The attachments were invalid. - `invalid_blocks` — The blocks were invalid for the requesting user. - `invalid_blocks_format` — The `blocks` array is not a valid JSON object or doesn't match the Block Kit syntax. - `invalid_metadata_format` — Invalid metadata format provided - `invalid_metadata_schema` — Invalid metadata schema provided - `is_inactive` — The message cannot be edited within a frozen, archived or deleted channel. - `markdown_text_conflict` — Markdown text cannot be used in conjunction with `blocks` or `text` argument. - `max_file_sharing_exceeded` — Exceeded max allowed files shared. - `message_limit_exceeded` — Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces. - `message_not_found` — No message exists with the requested timestamp. - `metadata_must_be_sent_from_app` — Message metadata can only be posted or updated using an app-level token - `metadata_too_large` — Metadata exceeds size limit - `msg_too_long` — Message text is too long. The `text` field cannot exceed 4,000 characters. - `no_dual_broadcast_content_update` — Can't broadcast an old reply and update the content at the same time. - `no_text` — No message text provided - `posting_to_channel_denied` — The user does not have permission to share files in this channel. - `slack_connect_blocked_file_type` — Files with certain extensions are blocked from being uploaded in all Slack Connect messages. - `slack_connect_canvas_sharing_blocked` — Admin has disabled sharing of canvas links in all Slack Connect messages. - `slack_connect_clip_sharing_blocked` — Admin has disabled Clip uploads in Slack Connect channels. - `slack_connect_file_link_sharing_blocked` — Admin has disabled Slack file sharing in all Slack Connect messages. - `slack_connect_file_upload_sharing_blocked` — Admin has disabled file uploads in all Slack Connect messages. - `streaming_state_conflict` — The message is currently streaming text and cannot be edited. - `team_not_found` — Team associated with the message and channel could not be found. - `too_many_attachments` — Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `unable_to_share_files` — Sharing the files failed. - `update_failed` — Internal update failure. - `invalid_channel_id` — Value passed for `channel` was not a valid channel ID. See https://docs.slack.dev/reference/methods/chat.update */
607
+ /** Updates a message. Required scopes -- bot: `chat:write`; user: `chat:write` Rate limit tier: 3 Method-specific errors (the `error` slug on the SlackError): - `as_user_not_supported` -- The `as_user` parameter does not function with workspace apps. - `blocked_file_type` -- Admin has disabled uploading this type of file. - `block_mismatch` -- Rich-text blocks cannot be replaced with non-rich-text blocks - `cant_broadcast_message` -- Unable to broadcast this message. - `cant_update_message` -- Authenticated user does not have permission to update this message. - `channel_not_found` -- Value passed for `channel` was invalid. - `edit_window_closed` -- The message cannot be edited due to the team message edit settings - `external_channel_migrating` -- The channel is in the process of migrating and so the message cannot be updated at this time. - `file_deleted` -- File to share deleted. - `file_is_deleted` -- The file is deleted. - `file_not_found` -- One or more of the provided file IDs could not be found. - `file_share_limit_reached` -- The file has reached the share limit. - `invalid_attachments` -- The attachments were invalid. - `invalid_blocks` -- The blocks were invalid for the requesting user. - `invalid_blocks_format` -- The `blocks` array is not a valid JSON object or doesn't match the Block Kit syntax. - `invalid_metadata_format` -- Invalid metadata format provided - `invalid_metadata_schema` -- Invalid metadata schema provided - `is_inactive` -- The message cannot be edited within a frozen, archived or deleted channel. - `markdown_text_conflict` -- Markdown text cannot be used in conjunction with `blocks` or `text` argument. - `max_file_sharing_exceeded` -- Exceeded max allowed files shared. - `message_limit_exceeded` -- Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces. - `message_not_found` -- No message exists with the requested timestamp. - `metadata_must_be_sent_from_app` -- Message metadata can only be posted or updated using an app-level token - `metadata_too_large` -- Metadata exceeds size limit - `msg_too_long` -- Message text is too long. The `text` field cannot exceed 4,000 characters. - `no_dual_broadcast_content_update` -- Can't broadcast an old reply and update the content at the same time. - `no_text` -- No message text provided - `posting_to_channel_denied` -- The user does not have permission to share files in this channel. - `slack_connect_blocked_file_type` -- Files with certain extensions are blocked from being uploaded in all Slack Connect messages. - `slack_connect_canvas_sharing_blocked` -- Admin has disabled sharing of canvas links in all Slack Connect messages. - `slack_connect_clip_sharing_blocked` -- Admin has disabled Clip uploads in Slack Connect channels. - `slack_connect_file_link_sharing_blocked` -- Admin has disabled Slack file sharing in all Slack Connect messages. - `slack_connect_file_upload_sharing_blocked` -- Admin has disabled file uploads in all Slack Connect messages. - `streaming_state_conflict` -- The message is currently streaming text and cannot be edited. - `team_not_found` -- Team associated with the message and channel could not be found. - `too_many_attachments` -- Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message. - `unable_to_share_files` -- Sharing the files failed. - `update_failed` -- Internal update failure. - `invalid_channel_id` -- Value passed for `channel` was not a valid channel ID. See https://docs.slack.dev/reference/methods/chat.update */
1060
608
  export const updateChat: API.OperationMethod<
1061
609
  UpdateChatRequest,
1062
610
  UpdateChatResponse,
1063
611
  UpdateChatError,
1064
612
  SlackOpContext
1065
613
  > = /*@__PURE__*/ API.make(() => ({
1066
- input: UpdateChatRequest,
1067
- output: UpdateChatResponse,
614
+ input: __S(118, __c7, 6) as any as S.Schema<UpdateChatRequest>,
615
+ output: __S(120, __c7, 8) as any as S.Schema<UpdateChatResponse>,
1068
616
  errors: [SlackError, SlackRateLimited],
1069
617
  protocol: SlackProtocol,
1070
618
  retry: Retry.Retry,
1071
619
  }));
620
+
621
+ // Schema builders: each runs one schema initializer, on that schema's first use.
622
+ function __c0(j: number): any {
623
+ switch (j) {
624
+ case 0:
625
+ return S.suspend(() =>
626
+ S.Struct({
627
+ channel: S.String,
628
+ chunks: S.optional(__S(16, __c1, 0)),
629
+ ts: S.String,
630
+ markdown_text: S.optional(S.String),
631
+ }).pipe(T.Http({ method: "POST", uri: "/chat.appendStream", code: 200 })),
632
+ ).annotate({ identifier: "AppendStreamRequest" });
633
+ }
634
+ }
635
+ function __c1(j: number): any {
636
+ switch (j) {
637
+ case 0:
638
+ return S.Array(S.Unknown);
639
+ }
640
+ }
641
+ function __c2(j: number): any {
642
+ switch (j) {
643
+ case 0:
644
+ return S.suspend(() =>
645
+ S.Struct({
646
+ ok: S.Boolean,
647
+ channel: S.String,
648
+ ts: S.String,
649
+ }),
650
+ ).annotate({ identifier: "AppendStreamResponse" });
651
+ }
652
+ }
653
+ function __c3(j: number): any {
654
+ switch (j) {
655
+ case 0:
656
+ return S.suspend(() =>
657
+ S.Struct({
658
+ channel: S.optional(S.String),
659
+ ts: S.optional(S.String),
660
+ unfurls: S.optional(S.String),
661
+ user_auth_message: S.optional(S.NullOr(S.String)),
662
+ user_auth_required: S.optional(S.Boolean),
663
+ user_auth_url: S.optional(S.NullOr(S.String)),
664
+ user_auth_blocks: S.optional(S.Unknown),
665
+ unfurl_id: S.optional(S.String),
666
+ source: S.optional(S.String),
667
+ }).pipe(T.Http({ method: "POST", uri: "/chat.unfurl", code: 200 })),
668
+ ).annotate({ identifier: "ChatUnfurlRequest" });
669
+ }
670
+ }
671
+ function __c4(j: number): any {
672
+ switch (j) {
673
+ case 0:
674
+ return S.suspend(() =>
675
+ S.Struct({
676
+ ok: S.Boolean,
677
+ }),
678
+ ).annotate({ identifier: "ChatUnfurlResponse" });
679
+ }
680
+ }
681
+ function __c5(j: number): any {
682
+ switch (j) {
683
+ case 0:
684
+ return S.suspend(() =>
685
+ S.Struct({
686
+ channel: S.String,
687
+ chunks: S.optional(__S(16, __c1, 0)),
688
+ markdown_text: S.optional(S.String),
689
+ thread_ts: S.optional(S.String),
690
+ recipient_user_id: S.optional(S.String),
691
+ recipient_team_id: S.optional(S.String),
692
+ task_display_mode: S.optional(S.String),
693
+ icon_emoji: S.optional(S.NullOr(S.String)),
694
+ icon_url: S.optional(S.NullOr(S.String)),
695
+ username: S.optional(S.NullOr(S.String)),
696
+ }).pipe(T.Http({ method: "POST", uri: "/chat.startStream", code: 200 })),
697
+ ).annotate({ identifier: "StartStreamRequest" });
698
+ }
699
+ }
700
+ function __c6(j: number): any {
701
+ switch (j) {
702
+ case 0:
703
+ return S.suspend(() =>
704
+ S.Struct({
705
+ channel: S.String,
706
+ chunks: S.optional(S.Unknown),
707
+ ts: S.String,
708
+ markdown_text: S.optional(S.String),
709
+ blocks: S.optional(S.Unknown),
710
+ metadata: S.optional(S.NullOr(S.String)),
711
+ session_status: S.optional(S.String),
712
+ }).pipe(T.Http({ method: "POST", uri: "/chat.stopStream", code: 200 })),
713
+ ).annotate({ identifier: "StopStreamRequest" });
714
+ case 1:
715
+ return S.suspend(() =>
716
+ S.Struct({
717
+ ok: S.Boolean,
718
+ channel: S.String,
719
+ ts: S.String,
720
+ message: S.Unknown,
721
+ }),
722
+ ).annotate({ identifier: "StopStreamResponse" });
723
+ }
724
+ }
725
+ function __c7(j: number): any {
726
+ switch (j) {
727
+ case 0:
728
+ return S.Array(__S(256, __c16, 0));
729
+ case 1:
730
+ return S.Unknown.pipe(/*@__PURE__*/ T.UnionCases([[], []]));
731
+ case 2:
732
+ return S.Unknown.pipe(/*@__PURE__*/ T.UnionCases([[], []]));
733
+ case 3:
734
+ return S.Unknown.pipe(/*@__PURE__*/ T.UnionCases([[], []]));
735
+ case 4:
736
+ return S.Unknown.pipe(/*@__PURE__*/ T.UnionCases([[], []]));
737
+ case 5:
738
+ return S.Array(S.String);
739
+ case 6:
740
+ return S.suspend(() =>
741
+ S.Struct({
742
+ as_user: S.optional(S.NullOr(__S(113, __c7, 1))),
743
+ attachments: S.optional(__S(114, __c7, 2)),
744
+ unfurled_attachments: S.optional(S.NullOr(S.String)),
745
+ blocks: S.optional(__S(115, __c7, 3)),
746
+ markdown_text: S.optional(S.String),
747
+ metadata: S.optional(S.NullOr(S.String)),
748
+ channel: S.String,
749
+ link_names: S.optional(S.NullOr(__S(116, __c7, 4))),
750
+ parse: S.optional(S.NullOr(S.String)),
751
+ text: S.optional(S.NullOr(S.String)),
752
+ ts: S.String,
753
+ reply_broadcast: S.optional(S.Boolean),
754
+ file_ids: S.optional(__S(117, __c7, 5)),
755
+ }).pipe(T.Http({ method: "POST", uri: "/chat.update", code: 200 })),
756
+ ).annotate({ identifier: "UpdateChatRequest" });
757
+ case 7:
758
+ return S.suspend(() =>
759
+ S.Struct({
760
+ text: S.String,
761
+ blocks: S.optional(S.Unknown),
762
+ attachments: S.optional(__S(112, __c7, 0)),
763
+ metadata: S.optional(__S(256, __c16, 0)),
764
+ }),
765
+ ).annotate({ identifier: "UpdateChatResponseMessage" });
766
+ case 8:
767
+ return S.suspend(() =>
768
+ S.Struct({
769
+ ok: S.Boolean,
770
+ channel: S.String,
771
+ ts: S.String,
772
+ text: S.String,
773
+ message: __S(119, __c7, 7),
774
+ }),
775
+ ).annotate({ identifier: "UpdateChatResponse" });
776
+ }
777
+ }
778
+ function __c8(j: number): any {
779
+ switch (j) {
780
+ case 0:
781
+ return S.suspend(() =>
782
+ S.Struct({
783
+ as_user: S.optional(S.Boolean),
784
+ channel: S.String,
785
+ ts: S.String,
786
+ }).pipe(T.Http({ method: "POST", uri: "/chat.delete", code: 200 })),
787
+ ).annotate({ identifier: "DeleteChatRequest" });
788
+ }
789
+ }
790
+ function __c9(j: number): any {
791
+ switch (j) {
792
+ case 0:
793
+ return S.suspend(() =>
794
+ S.Struct({
795
+ as_user: S.optional(S.Boolean),
796
+ channel: S.String,
797
+ scheduled_message_id: S.String,
798
+ }).pipe(T.Http({ method: "POST", uri: "/chat.deleteScheduledMessage", code: 200 })),
799
+ ).annotate({ identifier: "DeleteScheduledMessageRequest" });
800
+ }
801
+ }
802
+ function __c10(j: number): any {
803
+ switch (j) {
804
+ case 0:
805
+ return S.suspend(() =>
806
+ S.Struct({
807
+ channel: S.String.pipe(T.Query()),
808
+ message_ts: S.String.pipe(T.Query()),
809
+ }).pipe(T.Http({ method: "GET", uri: "/chat.getPermalink", code: 200 })),
810
+ ).annotate({ identifier: "GetPermalinkRequest" });
811
+ case 1:
812
+ return S.suspend(() =>
813
+ S.Struct({
814
+ ok: S.Boolean,
815
+ permalink: S.String,
816
+ channel: S.String,
817
+ }),
818
+ ).annotate({ identifier: "GetPermalinkResponse" });
819
+ }
820
+ }
821
+ function __c11(j: number): any {
822
+ switch (j) {
823
+ case 0:
824
+ return S.suspend(() =>
825
+ S.Struct({
826
+ channel: S.optional(S.String),
827
+ cursor: S.optional(S.String),
828
+ latest: S.optional(S.String),
829
+ limit: S.optional(S.Number),
830
+ oldest: S.optional(S.String),
831
+ team_id: S.optional(S.String),
832
+ }).pipe(T.Http({ method: "POST", uri: "/chat.scheduledMessages.list", code: 200 })),
833
+ ).annotate({ identifier: "ListScheduledMessagesRequest" });
834
+ case 1:
835
+ return S.suspend(() =>
836
+ S.Struct({
837
+ id: S.String,
838
+ channel_id: S.String,
839
+ post_at: S.Number,
840
+ date_created: S.Number,
841
+ text: S.optional(S.String),
842
+ }),
843
+ ).annotate({ identifier: "ListScheduledMessagesResponseScheduledMessagesItem" });
844
+ case 2:
845
+ return S.Array(__S(177, __c11, 1));
846
+ case 3:
847
+ return S.suspend(() =>
848
+ S.Struct({
849
+ next_cursor: S.optional(S.String),
850
+ }),
851
+ ).annotate({ identifier: "ListScheduledMessagesResponseResponseMetadata" });
852
+ case 4:
853
+ return S.suspend(() =>
854
+ S.Struct({
855
+ ok: S.Boolean,
856
+ scheduled_messages: __S(178, __c11, 2),
857
+ response_metadata: S.optional(__S(179, __c11, 3)),
858
+ }),
859
+ ).annotate({ identifier: "ListScheduledMessagesResponse" });
860
+ }
861
+ }
862
+ function __c12(j: number): any {
863
+ switch (j) {
864
+ case 0:
865
+ return S.suspend(() =>
866
+ S.Struct({
867
+ channel: S.String,
868
+ text: S.String,
869
+ }).pipe(T.Http({ method: "POST", uri: "/chat.meMessage", code: 200 })),
870
+ ).annotate({ identifier: "MeMessageRequest" });
871
+ case 1:
872
+ return S.suspend(() =>
873
+ S.Struct({
874
+ ok: S.Boolean,
875
+ ts: S.optional(S.String),
876
+ channel: S.optional(S.String),
877
+ }),
878
+ ).annotate({ identifier: "MeMessageResponse" });
879
+ }
880
+ }
881
+ function __c13(j: number): any {
882
+ switch (j) {
883
+ case 0:
884
+ return S.Unknown.pipe(/*@__PURE__*/ T.UnionCases([[], []]));
885
+ case 1:
886
+ return S.Unknown.pipe(/*@__PURE__*/ T.UnionCases([[], []]));
887
+ case 2:
888
+ return S.suspend(() =>
889
+ S.Struct({
890
+ as_user: S.optional(S.Boolean),
891
+ attachments: S.optional(__S(208, __c13, 0)),
892
+ blocks: S.optional(__S(209, __c13, 1)),
893
+ channel: S.String,
894
+ icon_emoji: S.optional(S.String),
895
+ icon_url: S.optional(S.String),
896
+ link_names: S.optional(S.Boolean),
897
+ markdown_text: S.optional(S.String),
898
+ metadata: S.optional(S.NullOr(S.String)),
899
+ parse: S.optional(S.NullOr(S.String)),
900
+ text: S.optional(S.NullOr(S.String)),
901
+ thread_ts: S.optional(S.NullOr(S.String)),
902
+ user: S.String,
903
+ username: S.optional(S.String),
904
+ }).pipe(T.Http({ method: "POST", uri: "/chat.postEphemeral", code: 200 })),
905
+ ).annotate({ identifier: "PostEphemeralRequest" });
906
+ case 3:
907
+ return S.suspend(() =>
908
+ S.Struct({
909
+ ok: S.Boolean,
910
+ message_ts: S.String,
911
+ }),
912
+ ).annotate({ identifier: "PostEphemeralResponse" });
913
+ }
914
+ }
915
+ function __c14(j: number): any {
916
+ switch (j) {
917
+ case 0:
918
+ return S.Unknown.pipe(/*@__PURE__*/ T.UnionCases([[], []]));
919
+ case 1:
920
+ return S.Unknown.pipe(/*@__PURE__*/ T.UnionCases([[], []]));
921
+ case 2:
922
+ return S.suspend(() =>
923
+ S.Struct({
924
+ as_user: S.optional(S.Boolean),
925
+ attachments: S.optional(__S(224, __c14, 0)),
926
+ blocks: S.optional(__S(225, __c14, 1)),
927
+ channel: S.String,
928
+ current_draft_last_updated_ts: S.optional(S.String),
929
+ icon_emoji: S.optional(S.NullOr(S.String)),
930
+ icon_url: S.optional(S.NullOr(S.String)),
931
+ link_names: S.optional(S.Boolean),
932
+ markdown_text: S.optional(S.String),
933
+ metadata: S.optional(S.NullOr(S.String)),
934
+ mrkdwn: S.optional(S.Boolean),
935
+ parse: S.optional(S.NullOr(S.String)),
936
+ reply_broadcast: S.optional(S.Boolean),
937
+ text: S.optional(S.NullOr(S.String)),
938
+ thread_ts: S.optional(S.NullOr(S.String)),
939
+ unfurl_links: S.optional(S.Boolean),
940
+ unfurl_media: S.optional(S.Boolean),
941
+ username: S.optional(S.NullOr(S.String)),
942
+ unfurl_app_links: S.optional(S.Boolean),
943
+ }).pipe(T.Http({ method: "POST", uri: "/chat.postMessage", code: 200 })),
944
+ ).annotate({ identifier: "PostMessageRequest" });
945
+ case 3:
946
+ return S.suspend(() =>
947
+ S.Struct({
948
+ ok: S.Boolean,
949
+ channel: S.String,
950
+ ts: S.String,
951
+ message: S.optional(S.Unknown),
952
+ is_duplicate: S.optional(S.Boolean),
953
+ }),
954
+ ).annotate({ identifier: "PostMessageResponse" });
955
+ }
956
+ }
957
+ function __c15(j: number): any {
958
+ switch (j) {
959
+ case 0:
960
+ return S.Unknown.pipe(/*@__PURE__*/ T.UnionCases([[], []]));
961
+ case 1:
962
+ return S.Unknown.pipe(/*@__PURE__*/ T.UnionCases([[], []]));
963
+ case 2:
964
+ return S.suspend(() =>
965
+ S.Struct({
966
+ as_user: S.optional(S.Boolean),
967
+ attachments: S.optional(__S(240, __c15, 0)),
968
+ blocks: S.optional(__S(241, __c15, 1)),
969
+ channel: S.String,
970
+ link_names: S.optional(S.Boolean),
971
+ markdown_text: S.optional(S.String),
972
+ parse: S.optional(S.String),
973
+ post_at: S.Number,
974
+ reply_broadcast: S.optional(S.Boolean),
975
+ text: S.optional(S.String),
976
+ thread_ts: S.optional(S.String),
977
+ unfurl_links: S.optional(S.Boolean),
978
+ unfurl_media: S.optional(S.Boolean),
979
+ metadata: S.optional(S.NullOr(S.String)),
980
+ }).pipe(T.Http({ method: "POST", uri: "/chat.scheduleMessage", code: 200 })),
981
+ ).annotate({ identifier: "ScheduleMessageRequest" });
982
+ case 3:
983
+ return S.suspend(() =>
984
+ S.Struct({
985
+ ok: S.Boolean,
986
+ channel: S.String,
987
+ post_at: S.Number,
988
+ scheduled_message_id: S.String,
989
+ message: __S(256, __c16, 0),
990
+ }),
991
+ ).annotate({ identifier: "ScheduleMessageResponse" });
992
+ }
993
+ }
994
+ function __c16(j: number): any {
995
+ switch (j) {
996
+ case 0:
997
+ return S.Record(S.String, S.Unknown);
998
+ }
999
+ }
1000
+ // Schema table: entry i is schema j of builder f, made on first reach.
1001
+ function __S(i: number, f: (j: number) => unknown, j: number): any {
1002
+ return (__s[i] ??= __L.at(f, j));
1003
+ }