slackline/api/chat
This module is generated by gleam run -m slackline_codegen/generate. Do not edit it by hand.
Post, update, schedule, stream and unfurl messages (chat.*).
Types
Identifies chat.appendStream in the slackline.Call that append_stream
returns.
pub type AppendStream
A successful response from chat.appendStream.
pub type AppendStreamResponse {
AppendStreamResponse(
channel: String,
ts: String,
response_metadata: option.Option(slackline.ResponseMetadata),
)
}
Constructors
-
AppendStreamResponse( channel: String, ts: String, response_metadata: option.Option(slackline.ResponseMetadata), )Arguments
- channel
-
The ID of the conversation the stream is posted to.
- ts
-
The timestamp of the streaming message.
An unfurl made of Block Kit blocks.
pub type BlocksUnfurl {
BlocksUnfurl(
blocks: List(block.Block),
preview: option.Option(UnfurlPreview),
hide_color: option.Option(Bool),
)
}
Constructors
-
BlocksUnfurl( blocks: List(block.Block), preview: option.Option(UnfurlPreview), hide_color: option.Option(Bool), )Arguments
- blocks
-
The blocks to show for the URL.
- preview
-
A custom preview, used only for links in the message composer.
- hide_color
-
Set to
trueto remove the color bar. Only valid with a single file block.
A successful response from chat.delete.
pub type DeleteResponse {
DeleteResponse(channel: String, ts: String)
}
Constructors
-
DeleteResponse(channel: String, ts: String)Arguments
- channel
-
The ID of the conversation the message was deleted from.
- ts
-
The timestamp of the deleted message.
Identifies chat.deleteScheduledMessage in the slackline.Call that
delete_scheduled_message returns.
pub type DeleteScheduledMessage
Identifies chat.getPermalink in the slackline.Call that get_permalink
returns.
pub type GetPermalink
A successful response from chat.getPermalink.
pub type GetPermalinkResponse {
GetPermalinkResponse(channel: String, permalink: String)
}
Constructors
-
GetPermalinkResponse(channel: String, permalink: String)Arguments
- channel
-
The ID of the conversation containing the message.
- permalink
-
The permalink URL of the message.
Identifies chat.meMessage in the slackline.Call that me_message
returns.
pub type MeMessage
A successful response from chat.meMessage.
pub type MeMessageResponse {
MeMessageResponse(channel: String, ts: String)
}
Constructors
-
MeMessageResponse(channel: String, ts: String)Arguments
- channel
-
The ID of the conversation the message was posted to.
- ts
-
The timestamp of the posted message.
How Slack parses message text. See the formatting docs.
pub type ParseMode {
ParseNone
ParseFull
}
Constructors
-
ParseNonenone -
ParseFullfull
Identifies chat.postEphemeral in the slackline.Call that
post_ephemeral returns.
pub type PostEphemeral
A successful response from chat.postEphemeral.
pub type PostEphemeralResponse {
PostEphemeralResponse(
message_ts: String,
response_metadata: option.Option(slackline.ResponseMetadata),
)
}
Constructors
-
PostEphemeralResponse( message_ts: String, response_metadata: option.Option(slackline.ResponseMetadata), )Arguments
- message_ts
-
The timestamp of the ephemeral message. It cannot be used with
chat.update.
Identifies chat.postMessage in the slackline.Call that post_message
returns.
pub type PostMessage
A successful response from chat.postMessage.
pub type PostMessageResponse {
PostMessageResponse(
channel: String,
ts: String,
message: option.Option(message.Message),
warning: option.Option(String),
response_metadata: option.Option(slackline.ResponseMetadata),
)
}
Constructors
-
PostMessageResponse( channel: String, ts: String, message: option.Option(message.Message), warning: option.Option(String), response_metadata: option.Option(slackline.ResponseMetadata), )Arguments
- channel
-
The ID of the conversation the message was posted to.
- ts
-
The timestamp ID of the posted message.
- message
-
The message as parsed by Slack. May differ from what was sent.
- warning
-
A warning, such as
message_truncated.
Identifies chat.scheduleMessage in the slackline.Call that
schedule_message returns.
pub type ScheduleMessage
A successful response from chat.scheduleMessage.
pub type ScheduleMessageResponse {
ScheduleMessageResponse(
channel: String,
scheduled_message_id: String,
post_at: option.Option(ScheduledPostAt),
message: option.Option(message.Message),
response_metadata: option.Option(slackline.ResponseMetadata),
)
}
Constructors
-
ScheduleMessageResponse( channel: String, scheduled_message_id: String, post_at: option.Option(ScheduledPostAt), message: option.Option(message.Message), response_metadata: option.Option(slackline.ResponseMetadata), )Arguments
- channel
-
The ID of the conversation the message will be posted to.
- scheduled_message_id
-
The ID of the scheduled message, for
chat.deleteScheduledMessage. - post_at
-
When the message will be posted.
- message
-
The scheduled message.
A pending scheduled message.
pub type ScheduledMessage {
ScheduledMessage(
id: ScheduledMessageId,
channel_id: option.Option(String),
post_at: option.Option(Int),
date_created: option.Option(Int),
text: option.Option(String),
)
}
Constructors
-
ScheduledMessage( id: ScheduledMessageId, channel_id: option.Option(String), post_at: option.Option(Int), date_created: option.Option(Int), text: option.Option(String), )Arguments
- id
-
The ID of the scheduled message.
- channel_id
-
The channel the message will be posted to.
- post_at
-
Unix timestamp of when the message will be posted.
- date_created
-
Unix timestamp of when the message was scheduled.
- text
-
The text of the message.
A scheduled message ID, as a string or an integer.
pub type ScheduledMessageId {
ScheduledMessageIdString(String)
ScheduledMessageIdInt(Int)
}
Constructors
-
ScheduledMessageIdString(String) -
ScheduledMessageIdInt(Int)
Identifies chat.scheduledMessages.list in the slackline.Call that
scheduled_messages_list returns.
pub type ScheduledMessagesList
A successful response from chat.scheduledMessages.list.
pub type ScheduledMessagesListResponse {
ScheduledMessagesListResponse(
scheduled_messages: option.Option(List(ScheduledMessage)),
response_metadata: option.Option(slackline.ResponseMetadata),
)
}
Constructors
-
ScheduledMessagesListResponse( scheduled_messages: option.Option(List(ScheduledMessage)), response_metadata: option.Option(slackline.ResponseMetadata), )Arguments
- scheduled_messages
-
The pending scheduled messages.
The post_at of a scheduled message, as an integer or a string.
pub type ScheduledPostAt {
ScheduledPostAtUnix(Int)
ScheduledPostAtString(String)
}
Constructors
-
ScheduledPostAtUnix(Int) -
ScheduledPostAtString(String)
The status to leave an agent session in when a stream stops.
pub type SessionStatus {
SessionActive
SessionProcessing
SessionSuspended
SessionClosed
}
Constructors
-
SessionActiveactive -
SessionProcessingprocessing -
SessionSuspendedsuspended -
SessionClosedclosed
Identifies chat.startStream in the slackline.Call that start_stream
returns.
pub type StartStream
A successful response from chat.startStream.
pub type StartStreamResponse {
StartStreamResponse(
channel: String,
ts: String,
response_metadata: option.Option(slackline.ResponseMetadata),
)
}
Constructors
-
StartStreamResponse( channel: String, ts: String, response_metadata: option.Option(slackline.ResponseMetadata), )Arguments
- channel
-
The ID of the conversation the stream is posted to.
- ts
-
The timestamp of the streaming message.
Identifies chat.stopStream in the slackline.Call that stop_stream
returns.
pub type StopStream
A successful response from chat.stopStream.
pub type StopStreamResponse {
StopStreamResponse(
channel: String,
ts: String,
message: option.Option(message.Message),
response_metadata: option.Option(slackline.ResponseMetadata),
)
}
Constructors
-
StopStreamResponse( channel: String, ts: String, message: option.Option(message.Message), response_metadata: option.Option(slackline.ResponseMetadata), )Arguments
- channel
-
The ID of the conversation the stream was posted to.
- ts
-
The timestamp of the streamed message.
- message
-
The finalized message.
A chunk of content streamed with chat.startStream, chat.appendStream
or chat.stopStream.
pub type StreamChunk {
MarkdownTextChunk(text: String)
TaskUpdateChunk(
id: String,
title: String,
status: block.TaskStatus,
hide_title: option.Option(Bool),
icon: option.Option(TaskIcon),
details: option.Option(String),
output: option.Option(String),
sources: option.Option(List(TaskSource)),
)
PlanUpdateChunk(title: String)
BlocksChunk(blocks: List(block.Block))
UnknownStreamChunk(type_: String, raw: value.Value)
}
Constructors
-
MarkdownTextChunk(text: String)Text content with markdown formatting.
Arguments
- text
-
The markdown text to stream.
-
TaskUpdateChunk( id: String, title: String, status: block.TaskStatus, hide_title: option.Option(Bool), icon: option.Option(TaskIcon), details: option.Option(String), output: option.Option(String), sources: option.Option(List(TaskSource)), )Displays or updates a task, rendered like a task card.
Arguments
- id
-
A unique ID for the task. Later chunks with the same ID update it.
- title
-
Title of the task.
- status
-
The state of the task.
- hide_title
-
When
true, the title is not displayed. - icon
-
Icon associated with the task.
- details
-
Details of the task. Up to 12,000 characters.
- output
-
Output of the task. Up to 12,000 characters.
- sources
-
Sources used to produce the task’s output. At most 50.
-
PlanUpdateChunk(title: String)Updates the title of the plan when
task_display_modeisplan.Arguments
- title
-
The new title of the plan.
-
BlocksChunk(blocks: List(block.Block))Passes blocks within the message. At most 50 blocks per stream.
Arguments
- blocks
-
The blocks to add.
-
UnknownStreamChunk(type_: String, raw: value.Value)A
typethat this version of slackline does not know.rawholds the full json.
How a stream displays task updates.
pub type TaskDisplayMode {
Timeline
Plan
}
Constructors
-
Timelinetimeline -
Planplan
An icon for a streamed task.
pub type TaskIcon {
TaskIcon(name: String)
}
Constructors
-
TaskIcon(name: String)Arguments
- name
-
The icon name or image URL.
A URL source used to produce a task’s output.
pub type TaskSource {
TaskSource(url: String, text: String)
}
Constructors
-
TaskSource(url: String, text: String)Arguments
- url
-
The URL of the source.
- text
-
Display text for the URL.
What to show for one unfurled URL: blocks, or a single legacy attachment.
pub type Unfurl {
BlocksUnfurlContent(BlocksUnfurl)
AttachmentUnfurlContent(attachment.Attachment)
}
Constructors
-
BlocksUnfurlContent(BlocksUnfurl) -
AttachmentUnfurlContent(attachment.Attachment)
Identifies chat.unfurl in the slackline.Call that unfurl returns.
pub type UnfurlMethod
A custom preview for a link unfurled inside the message composer.
pub type UnfurlPreview {
UnfurlPreview(
title: option.Option(block.Text),
icon_url: option.Option(String),
)
}
Constructors
-
UnfurlPreview( title: option.Option(block.Text), icon_url: option.Option(String), )Arguments
- title
-
A
plain_texttitle for the preview. - icon_url
-
URL of an icon for the preview.
Where the unfurled link was posted.
pub type UnfurlSource {
Composer
ConversationsHistory
}
Constructors
-
Composercomposer -
ConversationsHistoryconversations_history
A successful response from chat.update.
pub type UpdateResponse {
UpdateResponse(
channel: String,
ts: String,
text: option.Option(String),
message: option.Option(message.Message),
response_metadata: option.Option(slackline.ResponseMetadata),
)
}
Constructors
-
UpdateResponse( channel: String, ts: String, text: option.Option(String), message: option.Option(message.Message), response_metadata: option.Option(slackline.ResponseMetadata), )Arguments
- channel
-
The ID of the conversation containing the message.
- ts
-
The timestamp of the updated message.
- text
-
The text of the updated message.
- message
-
The updated message.
Values
pub fn append_stream(
channel channel: String,
ts ts: String,
) -> slackline.Call(AppendStream, AppendStreamResponse)
chat.appendStream:
Append text to an existing streaming conversation
chat.AppendStream identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/chat/append_stream.
Bot token scopes: chat:write.
Rate limit tier: t4.
Documented errors: as_user_not_supported,
cannot_provide_both_markdown_text_and_chunks, channel_not_found,
channel_type_not_supported, duplicate_channel_not_found,
duplicate_message_not_found, invalid_blocks, invalid_chunks,
invalid_metadata_format, invalid_metadata_schema, is_archived,
markdown_text_or_chunks_required, markdown_text_required,
message_limit_exceeded, message_not_found,
message_not_in_streaming_state, message_not_owned_by_app,
messages_tab_disabled, messaging_processing_failed,
metadata_must_be_sent_from_app, metadata_too_large,
msg_blocks_too_long, msg_blocks_too_many, no_text, not_in_channel,
rate_limited, restricted_action,
restricted_action_non_threadable_channel,
restricted_action_read_only_channel, restricted_action_thread_locked,
restricted_action_thread_only_channel,
slack_connect_canvas_sharing_blocked,
slack_connect_file_link_sharing_blocked,
slack_connect_lists_sharing_blocked, stopped_by_user,
streaming_mode_mismatch, team_not_found, too_many_attachments,
too_many_contact_cards.
pub fn append_stream_response_decoder() -> decode.Decoder(
AppendStreamResponse,
)
Decodes the response from chat.appendStream.
pub fn blocks_unfurl_decoder() -> decode.Decoder(BlocksUnfurl)
Decodes BlocksUnfurl from json.
pub fn blocks_unfurl_to_json(it: BlocksUnfurl) -> json.Json
Encodes BlocksUnfurl as json.
pub fn delete(
channel channel: String,
ts ts: String,
) -> slackline.Call(Delete, DeleteResponse)
chat.delete:
Deletes a message.
chat.Delete identifies this method in slackline.Call.
Set optional arguments with the functions in slackline/api/chat/delete.
Bot token scopes: chat:write.
User token scopes: chat:write.
Rate limit tier: t3.
Documented errors: cant_delete_message, channel_not_found,
invalid_channel_id, message_not_found.
pub fn delete_response_decoder() -> decode.Decoder(DeleteResponse)
Decodes the response from chat.delete.
pub fn delete_scheduled_message(
channel channel: String,
scheduled_message_id scheduled_message_id: String,
) -> slackline.Call(DeleteScheduledMessage, Nil)
chat.deleteScheduledMessage:
Deletes a pending scheduled message from the queue.
chat.DeleteScheduledMessage identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/chat/delete_scheduled_message.
Bot token scopes: chat:write.
User token scopes: chat:write.
Rate limit tier: t3.
Documented errors: bad_token, channel_not_found,
invalid_scheduled_message_id.
pub fn get_permalink(
channel channel: String,
message_ts message_ts: String,
) -> slackline.Call(GetPermalink, GetPermalinkResponse)
chat.getPermalink:
Retrieve a permalink URL for a specific extant message
chat.GetPermalink identifies this method in slackline.Call.
Rate limit tier: t5.
Documented errors: channel_not_found, message_not_found.
pub fn get_permalink_response_decoder() -> decode.Decoder(
GetPermalinkResponse,
)
Decodes the response from chat.getPermalink.
pub fn me_message(
channel channel: String,
text text: String,
) -> slackline.Call(MeMessage, MeMessageResponse)
chat.meMessage:
Share a me message into a channel.
chat.MeMessage identifies this method in slackline.Call.
Bot token scopes: chat:write.
User token scopes: chat:write.
Rate limit tier: t3.
Documented errors: channel_not_found, is_archived, msg_too_long,
no_text, not_in_channel, rate_limited.
pub fn me_message_response_decoder() -> decode.Decoder(
MeMessageResponse,
)
Decodes the response from chat.meMessage.
pub fn parse_mode_decoder() -> decode.Decoder(ParseMode)
Decodes ParseMode from a json string.
pub fn parse_mode_from_string(
string: String,
) -> Result(ParseMode, Nil)
Parses ParseMode from its json string.
pub fn parse_mode_to_string(it: ParseMode) -> String
The json string of ParseMode.
pub fn post_ephemeral(
channel channel: String,
user user: String,
text text: String,
) -> slackline.Call(PostEphemeral, PostEphemeralResponse)
chat.postEphemeral:
Sends an ephemeral message to a user in a channel.
chat.PostEphemeral identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/chat/post_ephemeral.
Bot token scopes: chat:write.
User token scopes: chat:write.
Rate limit tier: t4.
Documented errors: cannot_reply_to_message, channel_not_found,
invalid_attachments, invalid_blocks, invalid_blocks_format,
is_archived, markdown_text_conflict, message_limit_exceeded,
messages_tab_disabled, msg_too_long, no_text, not_in_channel,
restricted_action, restricted_action_read_only_channel,
too_many_attachments, user_not_in_channel.
pub fn post_ephemeral_response_decoder() -> decode.Decoder(
PostEphemeralResponse,
)
Decodes the response from chat.postEphemeral.
pub fn post_message(
channel channel: String,
text text: String,
) -> slackline.Call(PostMessage, PostMessageResponse)
chat.postMessage:
Sends a message to a channel.
chat.PostMessage identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/chat/post_message.
Bot token scopes: chat:write.
User token scopes: chat:write.
Rate limit tier: t5.
Documented errors: agent_prompt_display_not_allowed,
app_access_restricted, as_user_not_supported,
attachment_payload_limit_exceeded, cannot_reply_to_message,
channel_not_found, draft_already_deleted, draft_already_sent,
draft_has_conflict, draft_not_found, duplicate_channel_not_found,
duplicate_message_not_found, invalid_blocks, invalid_blocks_format,
invalid_metadata_format, invalid_metadata_schema, is_archived,
markdown_text_conflict, message_limit_exceeded, messages_tab_disabled,
metadata_must_be_sent_from_app, metadata_too_large, missing_file_data,
msg_blocks_too_long, no_text, not_in_channel,
posting_to_channel_denied, rate_limited, restricted_action,
restricted_action_non_threadable_channel,
restricted_action_read_only_channel, restricted_action_thread_locked,
restricted_action_thread_only_channel, send_on_behalf_not_allowed,
slack_connect_canvas_sharing_blocked,
slack_connect_file_link_sharing_blocked,
slack_connect_lists_sharing_blocked, team_not_found,
too_many_attachments, too_many_contact_cards.
pub fn post_message_response_decoder() -> decode.Decoder(
PostMessageResponse,
)
Decodes the response from chat.postMessage.
pub fn schedule_message(
channel channel: String,
post_at post_at: Int,
text text: String,
) -> slackline.Call(ScheduleMessage, ScheduleMessageResponse)
chat.scheduleMessage:
Schedules a message to be sent to a channel.
chat.ScheduleMessage identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/chat/schedule_message.
Bot token scopes: chat:write.
User token scopes: chat:write.
Rate limit tier: t3.
Documented errors: channel_not_found, invalid_blocks,
invalid_blocks_format, invalid_metadata_format,
invalid_metadata_schema, invalid_time, invalid_token, is_archived,
markdown_text_conflict, message_limit_exceeded,
metadata_must_be_sent_from_app, metadata_too_large, msg_too_long,
no_text, not_in_channel, posting_to_channel_denied, rate_limited,
restricted_action, restricted_action_non_threadable_channel,
restricted_action_read_only_channel,
restricted_action_thread_only_channel, restricted_too_many,
slack_connect_file_link_sharing_blocked, time_in_past, time_too_far,
too_many_attachments.
pub fn schedule_message_response_decoder() -> decode.Decoder(
ScheduleMessageResponse,
)
Decodes the response from chat.scheduleMessage.
pub fn scheduled_message_decoder() -> decode.Decoder(
ScheduledMessage,
)
Decodes ScheduledMessage from json.
pub fn scheduled_message_id_decoder() -> decode.Decoder(
ScheduledMessageId,
)
Decodes ScheduledMessageId from json. It tries each alternative in order.
pub fn scheduled_message_id_to_json(
it: ScheduledMessageId,
) -> json.Json
Encodes ScheduledMessageId as json.
pub fn scheduled_message_to_json(
it: ScheduledMessage,
) -> json.Json
Encodes ScheduledMessage as json.
pub fn scheduled_messages_list() -> slackline.Call(
ScheduledMessagesList,
ScheduledMessagesListResponse,
)
chat.scheduledMessages.list:
Returns a list of scheduled messages.
chat.ScheduledMessagesList identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/chat/scheduled_messages_list.
Rate limit tier: t3.
Documented errors: invalid_channel, invalid_cursor, invalid_token.
pub fn scheduled_messages_list_response_decoder() -> decode.Decoder(
ScheduledMessagesListResponse,
)
Decodes the response from chat.scheduledMessages.list.
pub fn scheduled_post_at_decoder() -> decode.Decoder(
ScheduledPostAt,
)
Decodes ScheduledPostAt from json. It tries each alternative in order.
pub fn scheduled_post_at_to_json(
it: ScheduledPostAt,
) -> json.Json
Encodes ScheduledPostAt as json.
pub fn session_status_decoder() -> decode.Decoder(SessionStatus)
Decodes SessionStatus from a json string.
pub fn session_status_from_string(
string: String,
) -> Result(SessionStatus, Nil)
Parses SessionStatus from its json string.
pub fn session_status_to_json(it: SessionStatus) -> json.Json
Encodes SessionStatus as a json string.
pub fn session_status_to_string(it: SessionStatus) -> String
The json string of SessionStatus.
pub fn start_stream(
channel channel: String,
) -> slackline.Call(StartStream, StartStreamResponse)
chat.startStream:
Start a new streaming conversation
chat.StartStream identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/chat/start_stream.
Bot token scopes: chat:write.
Rate limit tier: t2.
Documented errors: cannot_provide_both_markdown_text_and_chunks,
cannot_reply_to_message, channel_not_found,
channel_type_not_supported, duplicate_channel_not_found,
duplicate_message_not_found, invalid_blocks, invalid_blocks_format,
invalid_chunks, invalid_metadata_format, invalid_metadata_schema,
is_archived, message_limit_exceeded, messages_tab_disabled,
messaging_processing_failed, metadata_must_be_sent_from_app,
metadata_too_large, missing_recipient_team_id,
missing_recipient_user_id, msg_blocks_too_long, msg_blocks_too_many,
no_text, not_in_channel, rate_limited, restricted_action,
restricted_action_non_threadable_channel,
restricted_action_read_only_channel, restricted_action_thread_locked,
restricted_action_thread_only_channel,
slack_connect_canvas_sharing_blocked,
slack_connect_file_link_sharing_blocked,
slack_connect_lists_sharing_blocked, team_not_found, user_not_found.
pub fn start_stream_response_decoder() -> decode.Decoder(
StartStreamResponse,
)
Decodes the response from chat.startStream.
pub fn stop_stream(
channel channel: String,
ts ts: String,
) -> slackline.Call(StopStream, StopStreamResponse)
chat.stopStream:
Stop a streaming conversation
chat.StopStream identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/chat/stop_stream.
Bot token scopes: chat:write.
Rate limit tier: t2.
Documented errors: as_user_not_supported,
attachment_payload_limit_exceeded,
cannot_provide_both_markdown_text_and_chunks, cannot_reply_to_message,
channel_not_found, channel_type_not_supported,
duplicate_channel_not_found, duplicate_message_not_found,
invalid_blocks, invalid_chunks, invalid_metadata_format,
invalid_metadata_schema, is_archived, message_limit_exceeded,
message_not_found, message_not_in_streaming_state,
message_not_owned_by_app, messages_tab_disabled,
metadata_must_be_sent_from_app, metadata_too_large, missing_file_data,
msg_blocks_too_long, msg_blocks_too_many, no_text, not_in_channel,
rate_limited, restricted_action,
restricted_action_non_threadable_channel,
restricted_action_read_only_channel, restricted_action_thread_locked,
restricted_action_thread_only_channel,
slack_connect_canvas_sharing_blocked,
slack_connect_file_link_sharing_blocked,
slack_connect_lists_sharing_blocked, streaming_mode_mismatch,
team_not_found, too_many_attachments, too_many_contact_cards.
pub fn stop_stream_response_decoder() -> decode.Decoder(
StopStreamResponse,
)
Decodes the response from chat.stopStream.
pub fn stream_chunk_decoder() -> decode.Decoder(StreamChunk)
Decodes StreamChunk from json. The type field selects the variant.
pub fn stream_chunk_to_json(it: StreamChunk) -> json.Json
Encodes StreamChunk as json.
pub fn task_display_mode_decoder() -> decode.Decoder(
TaskDisplayMode,
)
Decodes TaskDisplayMode from a json string.
pub fn task_display_mode_from_string(
string: String,
) -> Result(TaskDisplayMode, Nil)
Parses TaskDisplayMode from its json string.
pub fn task_display_mode_to_json(
it: TaskDisplayMode,
) -> json.Json
Encodes TaskDisplayMode as a json string.
pub fn task_display_mode_to_string(it: TaskDisplayMode) -> String
The json string of TaskDisplayMode.
pub fn task_icon_decoder() -> decode.Decoder(TaskIcon)
Decodes TaskIcon from json.
pub fn task_source_decoder() -> decode.Decoder(TaskSource)
Decodes TaskSource from json.
pub fn task_source_to_json(it: TaskSource) -> json.Json
Encodes TaskSource as json.
pub fn unfurl() -> slackline.Call(UnfurlMethod, Nil)
chat.unfurl:
Provide custom unfurl behavior for user-posted URLs
chat.UnfurlMethod identifies this method in slackline.Call.
Set optional arguments with the functions in slackline/api/chat/unfurl.
Bot token scopes: links:write.
User token scopes: links:write.
Rate limit tier: t3.
Documented errors: cannot_auth_user, cannot_find_channel,
cannot_find_message, cannot_find_service, cannot_parse_attachment,
cannot_prompt, cannot_unfurl_message, cannot_unfurl_url,
invalid_metadata_format, invalid_source, invalid_unfurl_id,
invalid_unfurls_format, missing_channel, missing_source, missing_ts,
missing_unfurl_id, missing_unfurls.
pub fn unfurl_decoder() -> decode.Decoder(Unfurl)
Decodes Unfurl from json. It tries each alternative in order.
pub fn unfurl_preview_decoder() -> decode.Decoder(UnfurlPreview)
Decodes UnfurlPreview from json.
pub fn unfurl_preview_to_json(it: UnfurlPreview) -> json.Json
Encodes UnfurlPreview as json.
pub fn unfurl_source_decoder() -> decode.Decoder(UnfurlSource)
Decodes UnfurlSource from a json string.
pub fn unfurl_source_from_string(
string: String,
) -> Result(UnfurlSource, Nil)
Parses UnfurlSource from its json string.
pub fn unfurl_source_to_json(it: UnfurlSource) -> json.Json
Encodes UnfurlSource as a json string.
pub fn unfurl_source_to_string(it: UnfurlSource) -> String
The json string of UnfurlSource.
pub fn update(
channel channel: String,
ts ts: String,
) -> slackline.Call(Update, UpdateResponse)
chat.update:
Updates a message.
chat.Update identifies this method in slackline.Call.
Set optional arguments with the functions in slackline/api/chat/update.
Bot token scopes: chat:write.
User token scopes: chat:write.
Rate limit tier: t3.
Documented errors: as_user_not_supported, block_mismatch,
blocked_file_type, cant_broadcast_message, cant_update_message,
channel_not_found, edit_window_closed, external_channel_migrating,
file_deleted, file_is_deleted, file_not_found,
file_share_limit_reached, invalid_attachments, invalid_blocks,
invalid_blocks_format, invalid_channel_id, invalid_metadata_format,
invalid_metadata_schema, is_inactive, markdown_text_conflict,
max_file_sharing_exceeded, message_limit_exceeded, message_not_found,
metadata_must_be_sent_from_app, metadata_too_large, msg_too_long,
no_dual_broadcast_content_update, no_text, posting_to_channel_denied,
slack_connect_blocked_file_type, slack_connect_canvas_sharing_blocked,
slack_connect_clip_sharing_blocked,
slack_connect_file_link_sharing_blocked,
slack_connect_file_upload_sharing_blocked, streaming_state_conflict,
team_not_found, too_many_attachments, unable_to_share_files,
update_failed.
pub fn update_response_decoder() -> decode.Decoder(UpdateResponse)
Decodes the response from chat.update.