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
idwhen 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
-
DefaultUnsetdefault_unset -
InAHuddlein_a_huddle -
AvailableForHuddleavailable_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
-
StatusEmojiDisplayInfo( emoji_name: option.Option(String), display_alias: option.Option(String), display_url: option.Option(String), unicode: option.Option(String), )
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_idas a unique key. - team_id
-
Workspace ID the user belongs to.
- name
-
Do not use this. It once held the preferred username.
- deleted
-
trueif 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
tztimezone. - 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.
falsefor 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
-
apporsms. Only present ifhas_2faistrue. - 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
-
trueif 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
activeoraway. - 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
-
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), )Arguments
- title
-
The user’s title.
- phone
-
The user’s phone number, in any format.
- skype
-
Always an empty string.
- real_name
-
The user’s first and last name.
- real_name_normalized
-
real_namewith non-Latin characters filtered out. - display_name
-
The display name the user has chosen. Not a unique identifier.
- display_name_normalized
-
display_namewith non-Latin characters filtered out. - fields
-
Custom profile fields, keyed by field ID.
- status_text
-
The displayed status text, up to 100 characters.
- status_emoji
-
The displayed status emoji, such as
:train:. - status_emoji_display_info
-
Rich emoji display info for the status emoji.
- status_expiration
-
Unix timestamp of when the status expires.
0means never. - avatar_hash
-
Hash of the user’s profile image.
- start_date
-
The date the person joined the organization (Slack Atlas only).
-
A valid email address. Requires the
users:read.emailscope. - pronouns
-
The pronouns the user prefers.
- huddle_state
-
default_unset,in_a_huddleoravailable_for_huddle. - first_name
-
The user’s first name.
- last_name
-
The user’s last name.
- is_custom_image
-
Whether the user uploaded a custom profile image.
- team
-
The ID of the team the user is on.
- always_active
-
Whether a bot user is set to be constantly active.
- api_app_id
-
App ID associated with this bot/app user.
- bot_id
-
Bot ID if this is a bot user profile.
- guest_expiration_ts
-
Unix timestamp when the guest account expires.
- guest_invited_by
-
User ID of who invited this guest.
The value of a custom profile field.
pub type UserProfileField {
UserProfileField(
value: option.Option(String),
alt: option.Option(String),
label: option.Option(String),
)
}
Constructors
-
UserProfileField( value: option.Option(String), alt: option.Option(String), label: option.Option(String), )
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_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.