slackline/user

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

Users and their profiles. See https://docs.slack.dev/reference/objects/user-object.

The composition of user objects varies a lot between APIs and workspaces: data that has not been supplied may be absent, null or an empty string. Everything except id is optional.

Types

The Enterprise org identity of a user.

pub type EnterpriseUser {
  EnterpriseUser(
    id: option.Option(String),
    enterprise_id: option.Option(String),
    enterprise_name: option.Option(String),
    is_admin: option.Option(Bool),
    is_owner: option.Option(Bool),
    is_primary_owner: option.Option(Bool),
    teams: option.Option(List(String)),
  )
}

Constructors

  • EnterpriseUser(
      id: option.Option(String),
      enterprise_id: option.Option(String),
      enterprise_name: option.Option(String),
      is_admin: option.Option(Bool),
      is_owner: option.Option(Bool),
      is_primary_owner: option.Option(Bool),
      teams: option.Option(List(String)),
    )

    Arguments

    id

    The org-wide user ID. Prefer it over the root id when present.

    enterprise_id

    The Enterprise organization ID.

    enterprise_name

    A display name for the Enterprise organization.

    teams

    Workspace IDs in the Enterprise organization.

A user’s huddle status.

pub type HuddleState {
  DefaultUnset
  InAHuddle
  AvailableForHuddle
  UnknownHuddleState(String)
}

Constructors

  • DefaultUnset

    default_unset

  • InAHuddle

    in_a_huddle

  • AvailableForHuddle

    available_for_huddle

  • UnknownHuddleState(String)

    A value that this version of slackline does not know.

Display information for a status emoji.

pub type StatusEmojiDisplayInfo {
  StatusEmojiDisplayInfo(
    emoji_name: option.Option(String),
    display_alias: option.Option(String),
    display_url: option.Option(String),
    unicode: option.Option(String),
  )
}

Constructors

A Slack workspace user.

pub type User {
  User(
    id: String,
    team_id: option.Option(String),
    name: option.Option(String),
    deleted: option.Option(Bool),
    color: option.Option(String),
    real_name: option.Option(String),
    tz: option.Option(String),
    tz_label: option.Option(String),
    tz_offset: option.Option(Int),
    profile: option.Option(UserProfile),
    is_admin: option.Option(Bool),
    is_owner: option.Option(Bool),
    is_primary_owner: option.Option(Bool),
    is_restricted: option.Option(Bool),
    is_ultra_restricted: option.Option(Bool),
    is_bot: option.Option(Bool),
    is_app_user: option.Option(Bool),
    is_workflow_bot: option.Option(Bool),
    is_agentforce_bot: option.Option(Bool),
    updated: option.Option(Int),
    is_email_confirmed: option.Option(Bool),
    who_can_share_contact_card: option.Option(String),
    enterprise_user: option.Option(EnterpriseUser),
    enterprise_id: option.Option(String),
    enterprise_name: option.Option(String),
    has_2fa: option.Option(Bool),
    two_factor_type: option.Option(String),
    locale: option.Option(String),
    always_active: option.Option(Bool),
    first_login: option.Option(Int),
    is_external: option.Option(Bool),
    is_forgotten: option.Option(Bool),
    is_invited_user: option.Option(Bool),
    is_profile_only_user: option.Option(Bool),
    is_stranger: option.Option(Bool),
    manual_presence: option.Option(String),
    presence: option.Option(String),
    restricted_user_type: option.Option(Int),
    suspended: option.Option(Bool),
    team: option.Option(String),
    team_profile: option.Option(value.Value),
    teams: option.Option(List(String)),
  )
}

Constructors

  • User(
      id: String,
      team_id: option.Option(String),
      name: option.Option(String),
      deleted: option.Option(Bool),
      color: option.Option(String),
      real_name: option.Option(String),
      tz: option.Option(String),
      tz_label: option.Option(String),
      tz_offset: option.Option(Int),
      profile: option.Option(UserProfile),
      is_admin: option.Option(Bool),
      is_owner: option.Option(Bool),
      is_primary_owner: option.Option(Bool),
      is_restricted: option.Option(Bool),
      is_ultra_restricted: option.Option(Bool),
      is_bot: option.Option(Bool),
      is_app_user: option.Option(Bool),
      is_workflow_bot: option.Option(Bool),
      is_agentforce_bot: option.Option(Bool),
      updated: option.Option(Int),
      is_email_confirmed: option.Option(Bool),
      who_can_share_contact_card: option.Option(String),
      enterprise_user: option.Option(EnterpriseUser),
      enterprise_id: option.Option(String),
      enterprise_name: option.Option(String),
      has_2fa: option.Option(Bool),
      two_factor_type: option.Option(String),
      locale: option.Option(String),
      always_active: option.Option(Bool),
      first_login: option.Option(Int),
      is_external: option.Option(Bool),
      is_forgotten: option.Option(Bool),
      is_invited_user: option.Option(Bool),
      is_profile_only_user: option.Option(Bool),
      is_stranger: option.Option(Bool),
      manual_presence: option.Option(String),
      presence: option.Option(String),
      restricted_user_type: option.Option(Int),
      suspended: option.Option(Bool),
      team: option.Option(String),
      team_profile: option.Option(value.Value),
      teams: option.Option(List(String)),
    )

    Arguments

    id

    Identifier for this workspace user, unique to the workspace. Use it together with team_id as a unique key.

    team_id

    Workspace ID the user belongs to.

    name

    Do not use this. It once held the preferred username.

    deleted

    true if the user has been deactivated. May be absent otherwise.

    color

    Used in some clients to display a special username color.

    real_name

    User’s full real name (top-level copy from profile).

    tz

    Human-readable geographic timezone region, such as Europe/London.

    tz_label

    The commonly used name of the tz timezone.

    tz_offset

    Seconds to offset UTC time by for this user’s tz.

    profile

    The user’s workspace profile.

    is_admin

    Whether the user is an Admin of the current workspace.

    is_owner

    Whether the user is an Owner of the current workspace.

    is_primary_owner

    Whether the user is the Primary Owner of the current workspace.

    is_restricted

    Whether the user is a guest user.

    is_ultra_restricted

    Whether the user is a single-channel guest.

    is_bot

    Whether the user is a bot user. false for Slackbot.

    is_app_user

    Whether the user is an authorized user of the calling app.

    is_workflow_bot

    Whether this is a workflow bot user.

    is_agentforce_bot

    Whether this is an Agentforce bot user.

    updated

    Unix timestamp of when the user object was last updated.

    is_email_confirmed

    Whether the user’s email address has been confirmed.

    who_can_share_contact_card

    Contact card sharing permission setting, such as EVERYONE.

    enterprise_user

    Enterprise org identity of the user.

    enterprise_id

    Enterprise org ID (enterprise variant).

    enterprise_name

    Enterprise org name (enterprise variant).

    has_2fa

    Whether two-factor authentication is enabled. Only visible to admins.

    two_factor_type

    app or sms. Only present if has_2fa is true.

    locale

    IETF language code of the user’s chosen display language.

    always_active

    Whether a bot user is set to be constantly active.

    first_login

    Unix timestamp of the user’s first login.

    is_external

    Whether the user is external to the workspace.

    is_forgotten

    Whether the user has been GDPR-forgotten.

    is_invited_user

    Only present (and true) when the user was invited but has not signed in.

    is_profile_only_user

    Whether this is a profile-only user (enterprise variant).

    is_stranger

    true if the user belongs to a different workspace and is not in any shared channel visible to the app.

    manual_presence

    User’s manually-set presence value.

    presence

    User’s current presence, such as active or away.

    restricted_user_type

    Numeric type classification for restricted/guest users.

    suspended

    Whether the user account is suspended (non-enterprise variant).

    team

    Workspace ID (non-enterprise variant).

    team_profile

    Team profile fields and sections definitions.

    teams

    Workspace IDs the user belongs to (enterprise variant).

A user’s workspace profile. Also used when setting a profile with users.profile.set.

pub type UserProfile {
  UserProfile(
    title: option.Option(String),
    phone: option.Option(String),
    skype: option.Option(String),
    real_name: option.Option(String),
    real_name_normalized: option.Option(String),
    display_name: option.Option(String),
    display_name_normalized: option.Option(String),
    fields: option.Option(dict.Dict(String, UserProfileField)),
    status_text: option.Option(String),
    status_emoji: option.Option(String),
    status_emoji_display_info: option.Option(
      List(StatusEmojiDisplayInfo),
    ),
    status_expiration: option.Option(Int),
    status_text_canonical: option.Option(String),
    status_clear_on_focus_end: option.Option(Bool),
    avatar_hash: option.Option(String),
    last_avatar_image_hash: option.Option(String),
    start_date: option.Option(String),
    email: option.Option(String),
    pronouns: option.Option(String),
    huddle_state: option.Option(HuddleState),
    huddle_state_call_id: option.Option(String),
    huddle_state_channel_id: option.Option(String),
    huddle_state_expiration_ts: option.Option(Int),
    first_name: option.Option(String),
    last_name: option.Option(String),
    image_24: option.Option(String),
    image_32: option.Option(String),
    image_48: option.Option(String),
    image_72: option.Option(String),
    image_192: option.Option(String),
    image_512: option.Option(String),
    image_1024: option.Option(String),
    image_original: option.Option(String),
    is_custom_image: option.Option(Bool),
    team: option.Option(String),
    always_active: option.Option(Bool),
    api_app_id: option.Option(String),
    bot_id: option.Option(String),
    guest_expiration_ts: option.Option(Int),
    guest_invited_by: option.Option(String),
    is_agentforce_bot: option.Option(Bool),
    is_app_user: option.Option(Bool),
    is_restricted: option.Option(Bool),
    is_sidekick_bot: option.Option(Bool),
    is_ultra_restricted: option.Option(Bool),
    memberships_count: option.Option(Int),
    name: option.Option(String),
    restricted_user_type: option.Option(Int),
    updated: option.Option(Int),
    user_id: option.Option(String),
    username: option.Option(String),
    who_can_share_contact_card: option.Option(String),
  )
}

Constructors

The value of a custom profile field.

pub type UserProfileField {
  UserProfileField(
    value: option.Option(String),
    alt: option.Option(String),
    label: option.Option(String),
  )
}

Constructors

Values

pub fn enterprise_user_decoder() -> decode.Decoder(EnterpriseUser)

Decodes EnterpriseUser from json.

pub fn enterprise_user_to_json(it: EnterpriseUser) -> json.Json

Encodes EnterpriseUser as json.

pub fn huddle_state_decoder() -> decode.Decoder(HuddleState)

Decodes HuddleState from a json string.

pub fn huddle_state_from_string(string: String) -> HuddleState

Parses HuddleState from its json string.

pub fn huddle_state_to_json(it: HuddleState) -> json.Json

Encodes HuddleState as a json string.

pub fn huddle_state_to_string(it: HuddleState) -> String

The json string of HuddleState.

pub fn status_emoji_display_info_decoder() -> decode.Decoder(
  StatusEmojiDisplayInfo,
)

Decodes StatusEmojiDisplayInfo from json.

pub fn status_emoji_display_info_to_json(
  it: StatusEmojiDisplayInfo,
) -> json.Json

Encodes StatusEmojiDisplayInfo as json.

pub fn user_decoder() -> decode.Decoder(User)

Decodes User from json.

pub fn user_profile_decoder() -> decode.Decoder(UserProfile)

Decodes UserProfile from json.

pub fn user_profile_field_decoder() -> decode.Decoder(
  UserProfileField,
)

Decodes UserProfileField from json.

pub fn user_profile_field_to_json(
  it: UserProfileField,
) -> json.Json

Encodes UserProfileField as json.

pub fn user_profile_to_json(it: UserProfile) -> json.Json

Encodes UserProfile as json.

pub fn user_to_json(it: User) -> json.Json

Encodes User as json.

✨ Search Document