slackline/conversation

This module is generated by gleam run -m slackline_codegen/generate. Do not edit it by hand.

Conversations: public channels, private channels, direct messages (IMs) and multi-person direct messages (MPIMs). See https://docs.slack.dev/reference/objects/conversation-object.

Different fields are included depending on the type of conversation and the method that returned it, so everything except id is optional.

Types

A channel-like thing: a public or private channel, a DM or an MPIM.

pub type Conversation {
  Conversation(
    id: String,
    name: option.Option(String),
    name_normalized: option.Option(String),
    is_channel: option.Option(Bool),
    is_group: option.Option(Bool),
    is_im: option.Option(Bool),
    is_mpim: option.Option(Bool),
    is_private: option.Option(Bool),
    created: option.Option(Int),
    creator: option.Option(String),
    is_archived: option.Option(Bool),
    is_general: option.Option(Bool),
    unlinked: option.Option(Int),
    is_shared: option.Option(Bool),
    is_ext_shared: option.Option(Bool),
    is_org_shared: option.Option(Bool),
    is_pending_ext_shared: option.Option(Bool),
    is_global_shared: option.Option(Bool),
    is_ext_ws_shared: option.Option(Bool),
    is_member: option.Option(Bool),
    is_open: option.Option(Bool),
    is_frozen: option.Option(Bool),
    frozen_reason: option.Option(String),
    is_read_only: option.Option(Bool),
    is_thread_only: option.Option(Bool),
    is_non_threadable: option.Option(Bool),
    is_org_default: option.Option(Bool),
    is_org_mandatory: option.Option(Bool),
    is_starred: option.Option(Bool),
    is_file: option.Option(Bool),
    is_channel_agent_enabled: option.Option(Bool),
    is_migrating: option.Option(Bool),
    is_deleted: option.Option(Bool),
    is_moved: option.Option(Int),
    is_user_deleted: option.Option(Bool),
    is_redacted: option.Option(Bool),
    has_pins: option.Option(Bool),
    pin_count: option.Option(Int),
    has_barrier: option.Option(Bool),
    context_team_id: option.Option(String),
    team_id: option.Option(String),
    enterprise_id: option.Option(String),
    conversation_host_id: option.Option(String),
    updated: option.Option(Int),
    parent_conversation: option.Option(String),
    parent_group: option.Option(String),
    shared_team_ids: option.Option(List(String)),
    internal_team_ids: option.Option(List(String)),
    connected_team_ids: option.Option(List(String)),
    pending_connected_team_ids: option.Option(List(String)),
    pending_shared: option.Option(List(String)),
    accepted_user: option.Option(String),
    shares: option.Option(List(ConversationShare)),
    topic: option.Option(ConversationTopic),
    purpose: option.Option(ConversationTopic),
    previous_names: option.Option(List(String)),
    num_members: option.Option(Int),
    members: option.Option(List(String)),
    properties: option.Option(ConversationProperties),
    retention_duration: option.Option(Int),
    use_case: option.Option(String),
    user: option.Option(String),
    target_user_id: option.Option(String),
    locale: option.Option(String),
    priority: option.Option(Float),
    display_counts: option.Option(DisplayCounts),
    timezone_count: option.Option(Int),
    version: option.Option(Int),
    date_created: option.Option(Int),
    last_read: option.Option(String),
    latest: option.Option(message.Message),
    unread_count: option.Option(Int),
    unread_count_display: option.Option(Int),
  )
}

Constructors

  • Conversation(
      id: String,
      name: option.Option(String),
      name_normalized: option.Option(String),
      is_channel: option.Option(Bool),
      is_group: option.Option(Bool),
      is_im: option.Option(Bool),
      is_mpim: option.Option(Bool),
      is_private: option.Option(Bool),
      created: option.Option(Int),
      creator: option.Option(String),
      is_archived: option.Option(Bool),
      is_general: option.Option(Bool),
      unlinked: option.Option(Int),
      is_shared: option.Option(Bool),
      is_ext_shared: option.Option(Bool),
      is_org_shared: option.Option(Bool),
      is_pending_ext_shared: option.Option(Bool),
      is_global_shared: option.Option(Bool),
      is_ext_ws_shared: option.Option(Bool),
      is_member: option.Option(Bool),
      is_open: option.Option(Bool),
      is_frozen: option.Option(Bool),
      frozen_reason: option.Option(String),
      is_read_only: option.Option(Bool),
      is_thread_only: option.Option(Bool),
      is_non_threadable: option.Option(Bool),
      is_org_default: option.Option(Bool),
      is_org_mandatory: option.Option(Bool),
      is_starred: option.Option(Bool),
      is_file: option.Option(Bool),
      is_channel_agent_enabled: option.Option(Bool),
      is_migrating: option.Option(Bool),
      is_deleted: option.Option(Bool),
      is_moved: option.Option(Int),
      is_user_deleted: option.Option(Bool),
      is_redacted: option.Option(Bool),
      has_pins: option.Option(Bool),
      pin_count: option.Option(Int),
      has_barrier: option.Option(Bool),
      context_team_id: option.Option(String),
      team_id: option.Option(String),
      enterprise_id: option.Option(String),
      conversation_host_id: option.Option(String),
      updated: option.Option(Int),
      parent_conversation: option.Option(String),
      parent_group: option.Option(String),
      shared_team_ids: option.Option(List(String)),
      internal_team_ids: option.Option(List(String)),
      connected_team_ids: option.Option(List(String)),
      pending_connected_team_ids: option.Option(List(String)),
      pending_shared: option.Option(List(String)),
      accepted_user: option.Option(String),
      shares: option.Option(List(ConversationShare)),
      topic: option.Option(ConversationTopic),
      purpose: option.Option(ConversationTopic),
      previous_names: option.Option(List(String)),
      num_members: option.Option(Int),
      members: option.Option(List(String)),
      properties: option.Option(ConversationProperties),
      retention_duration: option.Option(Int),
      use_case: option.Option(String),
      user: option.Option(String),
      target_user_id: option.Option(String),
      locale: option.Option(String),
      priority: option.Option(Float),
      display_counts: option.Option(DisplayCounts),
      timezone_count: option.Option(Int),
      version: option.Option(Int),
      date_created: option.Option(Int),
      last_read: option.Option(String),
      latest: option.Option(message.Message),
      unread_count: option.Option(Int),
      unread_count_display: option.Option(Int),
    )

    Arguments

    id

    The conversation ID.

    name

    The name, without a leading #. Names change, so prefer IDs.

    name_normalized

    The normalized version of the channel name.

    is_channel

    Whether the conversation is a channel. Private channels created before March 2021 return false here and true for is_group.

    is_group

    Whether the conversation is a private channel created before March 2021.

    is_im

    Whether the conversation is a direct message.

    is_mpim

    Whether the conversation is a multi-person direct message.

    is_private

    Whether the conversation is private.

    created

    Unix timestamp, in seconds, of when the conversation was created.

    creator

    The ID of the member that created the conversation.

    is_archived

    Whether the conversation is archived.

    is_general

    Whether the channel is the workspace’s “general” channel.

    unlinked

    Whether the channel was previously shared and then disconnected.

    is_shared

    Whether the conversation is shared between multiple workspaces.

    is_ext_shared

    Whether the conversation is a Slack Connect channel with another org.

    is_org_shared

    Whether the conversation is shared between workspaces of one Enterprise org.

    is_pending_ext_shared

    Whether the conversation is waiting for approval to become externally shared.

    is_global_shared

    Whether the channel is shared across an entire Enterprise org.

    is_ext_ws_shared

    Whether the channel is shared on an external workspace.

    is_member

    Whether the calling user, bot or app is a member.

    is_open

    Whether a DM or MPIM is open.

    is_frozen

    Whether the conversation is frozen (for example a disconnected Slack Connect channel on the away-team side).

    frozen_reason

    Reason the conversation is frozen.

    is_read_only

    Whether the calling user cannot write to the conversation.

    is_thread_only

    Whether only thread replies can be posted.

    is_non_threadable

    Whether threads are disabled.

    is_org_default

    Whether this is an org-wide default channel.

    is_org_mandatory

    Whether this is a mandatory channel for all members of the org.

    is_starred

    Whether the calling user has starred the conversation.

    is_file

    Whether this is a file channel.

    is_channel_agent_enabled

    Whether a channel agent is enabled.

    is_migrating

    Whether the conversation is being migrated.

    is_deleted

    Whether the private channel has been deleted.

    is_moved

    Non-zero timestamp when the channel was moved (Enterprise orgs).

    is_user_deleted

    For DMs: true if the other user’s account has been disabled.

    is_redacted

    Whether details of this conversation are redacted for the caller.

    has_pins

    Whether the conversation has pinned items.

    pin_count

    Number of pinned items.

    has_barrier

    Whether an information barrier applies to this DM.

    context_team_id

    The ID of the workspace the conversation is within.

    team_id

    The workspace a channel belongs to, in some admin responses.

    enterprise_id

    The Enterprise organization ID.

    conversation_host_id

    The “host” of a shared channel: a workspace (T...) or org (E...) ID.

    updated

    Timestamp, in milliseconds, of when the channel settings were updated.

    parent_conversation

    The parent conversation ID, or null.

    parent_group

    ID of the parent group (nested private channels).

    shared_team_ids

    IDs of workspaces the channel is shared with.

    internal_team_ids

    Internal team IDs for shared channels.

    connected_team_ids

    Connected external team IDs.

    pending_connected_team_ids

    Pending connected team IDs.

    pending_shared

    Pending shared workspace IDs.

    accepted_user

    The user who accepted a shared channel invite.

    shares

    Share details of an MPIM.

    topic

    The topic of the channel.

    purpose

    The purpose of the channel.

    previous_names

    Previous names the channel has had.

    num_members

    Number of members. May be absent for DMs.

    members

    IDs of all members, including disabled accounts.

    properties

    Additional channel properties.

    retention_duration

    Custom message retention duration, in days, when one is set.

    use_case

    Channel use-case classification.

    user

    For DMs: the other user’s ID.

    target_user_id

    For DMs and MPIMs: the other participant’s user ID.

    locale

    Locale setting of the conversation.

    priority

    Sort priority in the user’s sidebar.

    display_counts

    Display and guest counts of an MPIM.

    timezone_count

    Number of timezones across members.

    version

    Version number of the conversation object.

    date_created

    Unix timestamp of when the conversation was created (shared channel invites).

    last_read

    ts of the last message the calling user has read.

    latest

    The latest message in the conversation. May be null or an empty object.

    unread_count

    Count of visible messages the calling user has yet to read.

    unread_count_display

    Count of unread messages that matter to the user (excludes joins/leaves).

Additional channel properties.

pub type ConversationProperties {
  ConversationProperties(
    at_channel_restricted: option.Option(Bool),
    at_here_restricted: option.Option(Bool),
    auto_open_tab_id: option.Option(String),
    default_tab_id: option.Option(String),
    canvas: option.Option(value.Value),
    channel_solutions: option.Option(value.Value),
    channel_workflows: option.Option(List(value.Value)),
    crm: option.Option(value.Value),
    huddles: option.Option(value.Value),
    huddles_restricted: option.Option(Bool),
    meeting_notes: option.Option(value.Value),
    membership_limit: option.Option(Int),
    posting_restricted_to: option.Option(PostingRestriction),
    threads_restricted_to: option.Option(PostingRestriction),
    record_channel: option.Option(value.Value),
    sharing_disabled: option.Option(Bool),
    tabs: option.Option(List(ConversationTab)),
    who_can_manage_channel_agent: option.Option(String),
    workflow: option.Option(value.Value),
  )
}

Constructors

One share of an MPIM.

pub type ConversationShare {
  ConversationShare(
    team: option.Option(String),
    user: option.Option(String),
    is_active: option.Option(Bool),
    accepted_user: option.Option(String),
  )
}

Constructors

A tab in a channel.

pub type ConversationTab {
  ConversationTab(
    id: option.Option(String),
    label: option.Option(String),
    type_: option.Option(ConversationTabType),
    data: option.Option(value.Value),
    is_disabled: option.Option(Bool),
  )
}

Constructors

The kind of a channel tab.

pub type ConversationTabType {
  ListTab
  Canvas
  Files
  Bookmarks
  Folder
  Pins
  Workflows
  ChannelCanvas
  RecordList
  RecordOverview
  RecordSummary
  RecordRelatedList
  SalesforceListView
  UnknownConversationTabType(String)
}

Constructors

  • ListTab

    list

  • Canvas

    canvas

  • Files

    files

  • Bookmarks

    bookmarks

  • Folder

    folder

  • Pins

    pins

  • Workflows

    workflows

  • ChannelCanvas

    channel_canvas

  • RecordList

    record_list

  • RecordOverview

    record_overview

  • RecordSummary

    record_summary

  • RecordRelatedList

    record_related_list

  • SalesforceListView

    salesforce_list_view

  • UnknownConversationTabType(String)

    A value that this version of slackline does not know.

The topic or purpose of a conversation.

pub type ConversationTopic {
  ConversationTopic(
    value: option.Option(String),
    creator: option.Option(String),
    last_set: option.Option(Int),
  )
}

Constructors

  • ConversationTopic(
      value: option.Option(String),
      creator: option.Option(String),
      last_set: option.Option(Int),
    )

    Arguments

    creator

    The ID of the user who set it, or an empty string.

    last_set

    Unix timestamp of when it was set, or 0.

Display and guest counts.

pub type DisplayCounts {
  DisplayCounts(
    display_counts: option.Option(Int),
    guest_counts: option.Option(Int),
  )
}

Constructors

Restricts who may post: by user group, by user type or by user.

pub type PostingRestriction {
  PostingRestriction(
    subteam: option.Option(List(String)),
    type_: option.Option(List(String)),
    user: option.Option(List(String)),
  )
}

Constructors

  • PostingRestriction(
      subteam: option.Option(List(String)),
      type_: option.Option(List(String)),
      user: option.Option(List(String)),
    )

    Arguments

    subteam

    User group IDs.

    type_

    User types, such as admin or ra.

    user

    User IDs.

Values

pub fn conversation_decoder() -> decode.Decoder(Conversation)

Decodes Conversation from json.

pub fn conversation_properties_decoder() -> decode.Decoder(
  ConversationProperties,
)

Decodes ConversationProperties from json.

pub fn conversation_properties_to_json(
  it: ConversationProperties,
) -> json.Json

Encodes ConversationProperties as json.

pub fn conversation_share_decoder() -> decode.Decoder(
  ConversationShare,
)

Decodes ConversationShare from json.

pub fn conversation_share_to_json(
  it: ConversationShare,
) -> json.Json

Encodes ConversationShare as json.

pub fn conversation_tab_decoder() -> decode.Decoder(
  ConversationTab,
)

Decodes ConversationTab from json.

pub fn conversation_tab_to_json(it: ConversationTab) -> json.Json

Encodes ConversationTab as json.

pub fn conversation_tab_type_decoder() -> decode.Decoder(
  ConversationTabType,
)

Decodes ConversationTabType from a json string.

pub fn conversation_tab_type_from_string(
  string: String,
) -> ConversationTabType

Parses ConversationTabType from its json string.

pub fn conversation_tab_type_to_json(
  it: ConversationTabType,
) -> json.Json

Encodes ConversationTabType as a json string.

pub fn conversation_tab_type_to_string(
  it: ConversationTabType,
) -> String

The json string of ConversationTabType.

pub fn conversation_to_json(it: Conversation) -> json.Json

Encodes Conversation as json.

pub fn conversation_topic_decoder() -> decode.Decoder(
  ConversationTopic,
)

Decodes ConversationTopic from json.

pub fn conversation_topic_to_json(
  it: ConversationTopic,
) -> json.Json

Encodes ConversationTopic as json.

pub fn display_counts_decoder() -> decode.Decoder(DisplayCounts)

Decodes DisplayCounts from json.

pub fn display_counts_to_json(it: DisplayCounts) -> json.Json

Encodes DisplayCounts as json.

pub fn posting_restriction_decoder() -> decode.Decoder(
  PostingRestriction,
)

Decodes PostingRestriction from json.

pub fn posting_restriction_to_json(
  it: PostingRestriction,
) -> json.Json

Encodes PostingRestriction as json.

✨ Search Document