README

marianoguerra/slack/model does not have a README file

#
Bookmark

pub(all) struct Bookmark {
id : String
app_action_id : String?
app_id : String?
channel_id : String?
date_created : Int64?
date_updated : Int64?
emoji : String?
entity_id : String?
icon_url : String?
last_updated_by_team_id : String?
last_updated_by_user_id : String?
link : String?
rank : String?
shortcut_id : String?
title : String?
type_ : String?
extra : Map[String, Json]
} derive(Eq,
Debug
)

A channel bookmark: a pinned link, file or app shortcut in a channel's header.

Anything Slack sends that is not below is in extra. Observed in the reference corpus at: $.bookmark, $.bookmarks[]

#
Bookmark::from_json

fn Bookmark::from_json(json : Json) -> Bookmark?

None when the value is not an object, or has no string id.

#
Bookmark::to_json

fn Bookmark::to_json(self : Bookmark) -> Json

#
BotProfile

pub(all) struct BotProfile {
app_id : String?
bot_access_token : String?
bot_user_id : String?
deleted : Bool?
id : String?
is_workflow_bot : Bool?
name : String?
team_id : String?
updated : Int64?
user_id : String?
extra : Map[String, Json]
} derive(Eq,
Debug
)

The app behind a bot message.

Anything Slack sends that is not below is in extra. Observed in the reference corpus at: $.bot, $.bots[], $..bot_profile, $..*.bot_profile

#
BotProfile::from_json

fn BotProfile::from_json(json : Json) -> BotProfile?

None when the value is not an object.

#
BotProfile::to_json

fn BotProfile::to_json(self : BotProfile) -> Json

#
Channel

pub(all) struct Channel {
id : String
channel_manager_count : Int?
connected_limited_team_ids : Array[String]?
connected_team_ids : Array[String]?
context_team_id : String?
conversation_host_id : String?
created : Int64?
creator : String?
creator_id : String?
date_connected : Int64?
enterprise_id : String?
external_user_count : Int?
has_pins : Bool?
internal_team_ids : Array[String]?
internal_team_ids_count : Int?
internal_team_ids_sample_team : String?
is_archived : Bool?
is_channel : Bool?
is_disconnect_in_progress : Bool?
is_ext_shared : Bool?
is_frozen : Bool?
is_general : Bool?
is_global_shared : Bool?
is_group : Bool?
is_im : Bool?
is_member : Bool?
is_moved : Int?
is_mpim : Bool?
is_non_threadable : Bool?
is_open : Bool?
is_org_default : Bool?
is_org_mandatory : Bool?
is_org_shared : Bool?
is_pending_ext_shared : Bool?
is_private : Bool?
is_read_only : Bool?
is_shared : Bool?
is_starred : Bool?
is_thread_only : Bool?
is_user_deleted : Bool?
last_activity_ts : Int64?
last_read : String?
latest : Message?
locale : String?
member_count : Int?
members : Array[String]?
name : String?
name_normalized : String?
num_members : Int?
parent_conversation : String?
parent_group : String?
pending_connected_team_ids : Array[String]?
pending_shared : Array[String]?
previous_names : Array[String]?
priority : Int?
shared_team_ids : Array[String]?
topic : ChannelText?
unlinked : Int?
unread_count : Int?
unread_count_display : Int?
updated : Int64?
user : String?
extra : Map[String, Json]
} derive(Eq,
Debug
)

A conversation: public or private channel, DM or MPIM. Slack calls all four a channel here.

Anything Slack sends that is not below is in extra. Observed in the reference corpus at: $.channel, $.channels[], $.group, $.groups[], $.ims[], $.conversations[]

#
Channel::display

fn Channel::display(self : Channel) -> String

The name to show for a conversation, falling back to its id.

A DM has no name at all, so the id is not a defensive fallback here -- it is the answer for every is_im conversation Slack returns.

#
Channel::from_json

fn Channel::from_json(json : Json) -> Channel?

None when the value is not an object, or has no string id.

#
Channel::to_json

fn Channel::to_json(self : Channel) -> Json

#
ChannelText

pub(all) struct ChannelText {
creator : String?
last_set : Int64?
value : String?
extra : Map[String, Json]
} derive(Eq,
Debug
)

A channel's topic or purpose. The same three fields for both.

Anything Slack sends that is not below is in extra. Observed in the reference corpus at: $..purpose, $..topic, $...purpose, $...topic

#
ChannelText::from_json

fn ChannelText::from_json(json : Json) -> ChannelText?

None when the value is not an object.

#
ChannelText::text

fn ChannelText::text(self : ChannelText) -> String

A topic or purpose's text, which is absent and empty often enough that unwrapping it at every call site is noise.

#
ChannelText::to_json

fn ChannelText::to_json(self : ChannelText) -> Json

#
Edited

pub(all) struct Edited {
ts : String?
user : String?
extra : Map[String, Json]
} derive(Eq,
Debug
)

When a message was last edited, and by whom.

Anything Slack sends that is not below is in extra. Observed in the reference corpus at: $..edited, $..*.edited

#
Edited::from_json

fn Edited::from_json(json : Json) -> Edited?

None when the value is not an object.

#
Edited::to_json

fn Edited::to_json(self : Edited) -> Json

#
File

pub(all) struct File {
id : String
access : String?
alt_txt : String?
app_id : String?
app_name : String?
blocks : Array[
LayoutBlock
]?
bot_id : String?
channels : Array[String]?
comments_count : Int?
converted_pdf : String?
created : Int64?
deanimate_gif : String?
display_as_bot : Bool?
duration_ms : Int?
editable : Bool?
editor : String?
external_id : String?
external_type : String?
external_url : String?
file_access : String?
filetype : String?
groups : Array[String]?
has_rich_preview : Bool?
hls : String?
ims : Array[String]?
is_external : Bool?
is_modified_by_ai : Bool?
is_public : Bool?
is_starred : Bool?
last_editor : String?
lines : Int?
media_display_type : String?
mimetype : String?
mode : String?
mp4 : String?
name : String?
num_stars : Int?
original_attachment_count : Int?
permalink : String?
permalink_public : String?
pinned_to : Array[String]?
plain_text : String?
pretty_type : String?
preview : String?
preview_is_truncated : Bool?
public_url_shared : Bool?
reactions : Array[Reaction]?
size : Int?
source_team : String?
subtype : String?
timestamp : Int64?
title : String?
title_blocks : Array[
LayoutBlock
]?
url_private : String?
url_private_download : String?
user : String?
user_team : String?
username : String?
extra : Map[String, Json]
} derive(Eq,
Debug
)

An uploaded file.

Anything Slack sends that is not below is in extra. Observed in the reference corpus at: $.file, $.files[], $.files.matches[], $.*.files[]

#
File::from_json

fn File::from_json(json : Json) -> File?

None when the value is not an object, or has no string id.

#
File::to_json

fn File::to_json(self : File) -> Json

#
Message

pub(all) struct Message {
app_id : String?
blocks : Array[
LayoutBlock
]?
bot_id : String?
bot_profile : BotProfile?
client_msg_id : String?
display_as_bot : Bool?
edited : Edited?
files : Array[File]?
iid : String?
inviter : String?
is_locked : Bool?
is_mpim : Bool?
is_starred : Bool?
last_read : String?
latest_reply : String?
no_notifications : Bool?
no_reactions : Bool?
parent_user_id : String?
permalink : String?
purpose : String?
reactions : Array[Reaction]?
reply_count : Int?
reply_users : Array[String]?
reply_users_count : Int?
root : Message?
score : Int?
subscribed : Bool?
subtype : String?
team : String?
text : String?
thread_ts : String?
topic : String?
ts : String?
type_ : String?
upload : Bool?
user : String?
username : String?
x_files : Array[String]?
extra : Map[String, Json]
} derive(Eq,
Debug
)

A message, as conversations.history, conversations.replies and chat.postMessage return one.

Anything Slack sends that is not below is in extra. Observed in the reference corpus at: $.message, $.messages[], $.channel.latest, $.group.latest, $.messages[].root, $.items[].message, $.messages.matches[]

#
Message::from_json

fn Message::from_json(json : Json) -> Message?

None when the value is not an object.

#
Message::is_thread_reply

fn Message::is_thread_reply(self : Message) -> Bool

Whether this message is a reply inside a thread, as opposed to the parent that started one.

The parent carries thread_ts == ts, so testing for thread_ts alone counts it as its own reply.

#
Message::thread_root

fn Message::thread_root(self : Message) -> String?

The ts that identifies the thread a message belongs to.

thread_ts on a reply, ts on anything else -- including the message that STARTED the thread, which carries both and whose two values are equal. Using thread_ts alone loses every message that is not in a thread; using ts alone scatters a thread across its replies.

#
Message::to_json

fn Message::to_json(self : Message) -> Json

#
Profile

pub(all) struct Profile {
always_active : Bool?
api_app_id : String?
avatar_hash : String?
bot_id : String?
display_name : String?
display_name_normalized : String?
email : String?
first_name : String?
guest_invited_by : String?
huddle_state : String?
huddle_state_expiration_ts : Int64?
image_1024 : String?
image_192 : String?
image_24 : String?
image_32 : String?
image_48 : String?
image_512 : String?
image_72 : String?
image_original : String?
is_custom_image : Bool?
last_name : String?
phone : String?
pronouns : String?
real_name : String?
real_name_normalized : String?
skype : String?
start_date : String?
status_clear_on_focus_end : Bool?
status_emoji : String?
status_emoji_url : String?
status_expiration : Int64?
status_text : String?
status_text_canonical : String?
team : String?
title : String?
extra : Map[String, Json]
} derive(Eq,
Debug
)

A user's profile. Separate because Slack sends it separately -- users.profile.get returns one on its own.

Anything Slack sends that is not below is in extra. Observed in the reference corpus at: $.profile, $..profile, $..*.profile

#
Profile::from_json

fn Profile::from_json(json : Json) -> Profile?

None when the value is not an object.

#
Profile::to_json

fn Profile::to_json(self : Profile) -> Json

#
Reaction

pub(all) struct Reaction {
count : Int?
name : String?
url : String?
users : Array[String]?
extra : Map[String, Json]
} derive(Eq,
Debug
)

One emoji on a message, and who added it.

Anything Slack sends that is not below is in extra. Observed in the reference corpus at: $..reactions[], $..*.reactions[]

#
Reaction::from_json

fn Reaction::from_json(json : Json) -> Reaction?

None when the value is not an object.

#
Reaction::to_json

fn Reaction::to_json(self : Reaction) -> Json

#
ScheduledMessage

pub(all) struct ScheduledMessage {
id : String
channel_id : String?
date_created : Int64?
post_at : Int64?
text : String?
extra : Map[String, Json]
} derive(Eq,
Debug
)

A message queued for later by chat.scheduleMessage, until it is sent or cancelled.

Anything Slack sends that is not below is in extra. Observed in the reference corpus at: $.scheduled_messages[]

#
ScheduledMessage::from_json

fn ScheduledMessage::from_json(json : Json) -> ScheduledMessage?

None when the value is not an object, or has no string id.

#
ScheduledMessage::to_json

fn ScheduledMessage::to_json(self : ScheduledMessage) -> Json

#
Team

pub(all) struct Team {
id : String
avatar_base_url : String?
date_create : Int64?
default_channels : Array[String]?
discoverability : String?
discoverable : String?
domain : String?
email_domain : String?
enterprise_domain : String?
enterprise_id : String?
enterprise_name : String?
is_sfdc_auto_slack : Bool?
is_verified : Bool?
limit_ts : Int64?
lob_sales_home_enabled : Bool?
locale : String?
messages_count : Int?
msg_edit_window_mins : Int?
name : String?
onboarding_channel_id : String?
over_storage_limit : Bool?
pay_prod_cur : String?
plan : String?
team_url : String?
url : String?
extra : Map[String, Json]
} derive(Eq,
Debug
)

A workspace.

Anything Slack sends that is not below is in extra. Observed in the reference corpus at: $.team, $.teams[]

#
Team::from_json

fn Team::from_json(json : Json) -> Team?

None when the value is not an object, or has no string id.

#
Team::to_json

fn Team::to_json(self : Team) -> Json

#
User

pub(all) struct User {
id : String
color : String?
created : Int64?
date_created : Int64?
deleted : Bool?
email : String?
enterprise_id : String?
enterprise_name : String?
error : String?
expiration_ts : Int64?
first_login : Int64?
full_name : String?
has_2fa : Bool?
has_sso : Bool?
image_192 : String?
image_24 : String?
image_32 : String?
image_48 : String?
image_512 : String?
image_72 : String?
is_active : Bool?
is_admin : Bool?
is_app_user : Bool?
is_bot : Bool?
is_connector_bot : Bool?
is_email_confirmed : Bool?
is_invited_user : Bool?
is_owner : Bool?
is_primary_owner : Bool?
is_restricted : Bool?
is_stranger : Bool?
is_ultra_restricted : Bool?
is_workflow_bot : Bool?
last_active_ts : Int64?
locale : String?
manual_presence : String?
name : String?
presence : String?
profile : Profile?
real_name : String?
roles : Array[String]?
team_id : String?
teams : Array[String]?
two_factor_type : String?
tz : String?
tz_label : String?
tz_offset : Int?
updated : Int64?
username : String?
who_can_share_contact_card : String?
workspaces : Array[String]?
extra : Map[String, Json]
} derive(Eq,
Debug
)

A member of a workspace: users.info, users.list, users.lookupByEmail.

Anything Slack sends that is not below is in extra. Observed in the reference corpus at: $.user, $.self, $.users[], $.members[], $.rejected_users[], $..inviting_user, $..accepting_user

#
User::display

fn User::display(self : User) -> String

The name to show for a user.

display_name, then real_name, then name, then the id. That is the order Slack's own clients fall back in, and the reason a bot that shows user.name looks wrong: name is the handle, which for many workspaces has not been the thing anyone recognises since Slack made display names editable. An empty string counts as absent, because Slack sends "" rather than omitting the field when a user has not set one.

#
User::from_json

fn User::from_json(json : Json) -> User?

None when the value is not an object, or has no string id.

#
User::to_json

fn User::to_json(self : User) -> Json

#
Usergroup

pub(all) struct Usergroup {
id : String
auto_provision : Bool?
channel_count : Int?
created_by : String?
date_create : Int64?
date_delete : Int64?
date_update : Int64?
deleted_by : String?
description : String?
enterprise_subteam_id : String?
handle : String?
is_editing_restricted : Bool?
is_external : Bool?
is_idp_group : Bool?
is_membership_locked : Bool?
is_org_level : Bool?
is_section : Bool?
is_subteam : Bool?
is_usergroup : Bool?
is_visible : Bool?
name : String?
team_id : String?
updated_by : String?
user_count : Int?
users : Array[String]?
extra : Map[String, Json]
} derive(Eq,
Debug
)

A user group, which Slack also calls a subteam.

Anything Slack sends that is not below is in extra. Observed in the reference corpus at: $.usergroup, $.usergroups[], $.subteams.all[]

#
Usergroup::from_json

fn Usergroup::from_json(json : Json) -> Usergroup?

None when the value is not an object, or has no string id.

#
Usergroup::to_json

fn Usergroup::to_json(self : Usergroup) -> Json

#
View

pub(all) struct View {
id : String
app_id : String?
app_installed_team_id : String?
app_unfurl_url : String?
blocks : Array[
LayoutBlock
]?
bot_id : String?
callback_id : String?
channel : String?
clear_on_close : Bool?
close :
TextObject
?
entity_url : String?
external_id : String?
hash : String?
message_ts : String?
notify_on_close : Bool?
previous_view_id : String?
private_metadata : String?
root_view_id : String?
submit :
TextObject
?
submit_disabled : Bool?
team_id : String?
thread_ts : String?
title :
TextObject
?
type_ : String?
extra : Map[String, Json]
} derive(Eq,
Debug
)

A modal or App Home view.

Anything Slack sends that is not below is in extra. Observed in the reference corpus at: $.view, $.views[]

#
View::from_json

fn View::from_json(json : Json) -> View?

None when the value is not an object, or has no string id.

#
View::to_json

fn View::to_json(self : View) -> Json

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io