slackline/usergroup

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

User groups. See https://docs.slack.dev/reference/objects/usergroup-object.

Types

A group of users that can be mentioned together.

pub type Usergroup {
  Usergroup(
    id: String,
    team_id: option.Option(String),
    is_usergroup: option.Option(Bool),
    is_subteam: option.Option(Bool),
    name: option.Option(String),
    description: option.Option(String),
    handle: option.Option(String),
    is_external: option.Option(Bool),
    date_create: option.Option(Int),
    date_update: option.Option(Int),
    date_delete: option.Option(Int),
    auto_type: option.Option(UsergroupAutoType),
    created_by: option.Option(String),
    updated_by: option.Option(String),
    deleted_by: option.Option(String),
    prefs: option.Option(UsergroupPrefs),
    users: option.Option(List(String)),
    user_count: option.Option(UsergroupCount),
    channel_count: option.Option(Int),
    channels: option.Option(List(String)),
    enterprise_id: option.Option(String),
    enterprise_subteam_id: option.Option(String),
    auto_provision: option.Option(Bool),
    is_editing_restricted: option.Option(Bool),
    is_idp_group: option.Option(Bool),
    is_membership_locked: option.Option(Bool),
    is_org_level: option.Option(Bool),
    is_section: option.Option(Bool),
    is_visible: option.Option(Bool),
    teams: option.Option(List(String)),
  )
}

Constructors

  • Usergroup(
      id: String,
      team_id: option.Option(String),
      is_usergroup: option.Option(Bool),
      is_subteam: option.Option(Bool),
      name: option.Option(String),
      description: option.Option(String),
      handle: option.Option(String),
      is_external: option.Option(Bool),
      date_create: option.Option(Int),
      date_update: option.Option(Int),
      date_delete: option.Option(Int),
      auto_type: option.Option(UsergroupAutoType),
      created_by: option.Option(String),
      updated_by: option.Option(String),
      deleted_by: option.Option(String),
      prefs: option.Option(UsergroupPrefs),
      users: option.Option(List(String)),
      user_count: option.Option(UsergroupCount),
      channel_count: option.Option(Int),
      channels: option.Option(List(String)),
      enterprise_id: option.Option(String),
      enterprise_subteam_id: option.Option(String),
      auto_provision: option.Option(Bool),
      is_editing_restricted: option.Option(Bool),
      is_idp_group: option.Option(Bool),
      is_membership_locked: option.Option(Bool),
      is_org_level: option.Option(Bool),
      is_section: option.Option(Bool),
      is_visible: option.Option(Bool),
      teams: option.Option(List(String)),
    )

    Arguments

    id

    The ID of the usergroup.

    team_id

    The ID of the team.

    is_usergroup

    Indicates if the object is a user group.

    is_subteam

    Whether this is a subteam.

    name

    The friendly name of the group.

    description

    Explains the purpose of the group.

    handle

    The value used to mention the group, without a leading @.

    is_external

    Whether the user group is external.

    date_create

    Unix timestamp of when the group was created.

    date_update

    Unix timestamp of when the group was last updated.

    date_delete

    Non-zero for disabled groups.

    auto_type

    admins (or admin) for Workspace Admins, owner for Workspace Owners, absent or null for a custom group.

    created_by

    User ID of the member who created the group.

    updated_by

    User ID of the member who last updated the group.

    deleted_by

    User ID of the member who deleted the group.

    prefs

    Default channels members are invited to on joining.

    users

    IDs of the group’s members, when include_users is set.

    user_count

    The total number of users in the group. Slack sends a number or a numeric string.

    channel_count

    Number of channels associated with the group.

    channels

    Channel IDs associated with the group.

    auto_provision

    Whether members are auto-provisioned into the group.

    is_idp_group

    Whether the group is synced from an identity provider.

    is_org_level

    Whether this is an org-level usergroup.

    is_section

    Whether this usergroup represents a sidebar section.

    teams

    Workspace IDs the group spans (org-level groups).

The kind of automatic group.

pub type UsergroupAutoType {
  Admins
  Admin
  Owner
  UnknownUsergroupAutoType(String)
}

Constructors

  • Admins

    Workspace Admins, as spelled in the reference prose.

  • Admin

    Workspace Admins, as spelled in the response examples.

  • Owner

    Workspace Owners.

  • UnknownUsergroupAutoType(String)

    A value that this version of slackline does not know.

A count that Slack sends either as a number or as a numeric string.

pub type UsergroupCount {
  UsergroupCountInt(Int)
  UsergroupCountString(String)
}

Constructors

  • UsergroupCountInt(Int)
  • UsergroupCountString(String)

Default channels for members of a group.

pub type UsergroupPrefs {
  UsergroupPrefs(
    channels: option.Option(List(String)),
    groups: option.Option(List(String)),
    file_id: option.Option(String),
    additional_channels: option.Option(List(String)),
  )
}

Constructors

Values

pub fn usergroup_auto_type_decoder() -> decode.Decoder(
  UsergroupAutoType,
)

Decodes UsergroupAutoType from a json string.

pub fn usergroup_auto_type_from_string(
  string: String,
) -> UsergroupAutoType

Parses UsergroupAutoType from its json string.

pub fn usergroup_auto_type_to_json(
  it: UsergroupAutoType,
) -> json.Json

Encodes UsergroupAutoType as a json string.

pub fn usergroup_auto_type_to_string(
  it: UsergroupAutoType,
) -> String

The json string of UsergroupAutoType.

pub fn usergroup_count_decoder() -> decode.Decoder(UsergroupCount)

Decodes UsergroupCount from json. It tries each alternative in order.

pub fn usergroup_count_to_int(
  count: UsergroupCount,
) -> Result(Int, Nil)

The value of a UsergroupCount as an integer, or Error(Nil) when Slack sent a string that is not a number.

pub fn usergroup_count_to_json(it: UsergroupCount) -> json.Json

Encodes UsergroupCount as json.

pub fn usergroup_decoder() -> decode.Decoder(Usergroup)

Decodes Usergroup from json.

pub fn usergroup_prefs_decoder() -> decode.Decoder(UsergroupPrefs)

Decodes UsergroupPrefs from json.

pub fn usergroup_prefs_to_json(it: UsergroupPrefs) -> json.Json

Encodes UsergroupPrefs as json.

pub fn usergroup_to_json(it: Usergroup) -> json.Json

Encodes Usergroup as json.

✨ Search Document