slackline/api/admin/usergroups
This module is generated by gleam run -m slackline_codegen/generate. Do not edit it by hand.
Admin API methods for managing user groups and IDP groups across an org.
Types
Identifies admin.usergroups.addChannels in the slackline.Call that
add_channels returns.
pub type AddChannels
Identifies admin.usergroups.addTeams in the slackline.Call that
add_teams returns.
pub type AddTeams
Identifies admin.usergroups.addUsers in the slackline.Call that
add_users returns.
pub type AddUsers
A successful response from admin.usergroups.addUsers.
pub type AddUsersResponse {
AddUsersResponse(
invalid_users: option.Option(List(InvalidUsergroupUser)),
)
}
Constructors
-
AddUsersResponse( invalid_users: option.Option(List(InvalidUsergroupUser)), )Arguments
- invalid_users
-
Users that could not be added. Omitted when every user was added.
Identifies admin.usergroups.create in the slackline.Call that create
returns.
pub type Create
A successful response from admin.usergroups.create.
pub type CreateResponse {
CreateResponse(subteam: usergroup.Usergroup)
}
Constructors
-
CreateResponse(subteam: usergroup.Usergroup)Arguments
- subteam
-
The new user group.
Identifies admin.usergroups.fetch in the slackline.Call that fetch
returns.
pub type Fetch
A successful response from admin.usergroups.fetch.
pub type FetchResponse {
FetchResponse(subteam: usergroup.Usergroup)
}
Constructors
-
FetchResponse(subteam: usergroup.Usergroup)
A user that could not be added to a user group.
pub type InvalidUsergroupUser {
InvalidUsergroupUser(
user_id: String,
reason: option.Option(String),
)
}
Constructors
-
InvalidUsergroupUser( user_id: String, reason: option.Option(String), )Arguments
- reason
-
Why the user was rejected, such as
guest_user.
Identifies admin.usergroups.listChannels in the slackline.Call that
list_channels returns.
pub type ListChannels
A successful response from admin.usergroups.listChannels.
pub type ListChannelsResponse {
ListChannelsResponse(
channels: option.Option(List(UsergroupChannel)),
)
}
Constructors
-
ListChannelsResponse( channels: option.Option(List(UsergroupChannel)), )
Identifies admin.usergroups.removeChannels in the slackline.Call that
remove_channels returns.
pub type RemoveChannels
Identifies admin.usergroups.removeTeams in the slackline.Call that
remove_teams returns.
pub type RemoveTeams
Identifies admin.usergroups.removeUsers in the slackline.Call that
remove_users returns.
pub type RemoveUsers
Identifies admin.usergroups.update in the slackline.Call that update
returns.
pub type Update
A successful response from admin.usergroups.update.
pub type UpdateResponse {
UpdateResponse(subteam: usergroup.Usergroup)
}
Constructors
-
UpdateResponse(subteam: usergroup.Usergroup)Arguments
- subteam
-
The updated user group.
Identifies admin.usergroups.uploadUsers in the slackline.Call that
upload_users returns.
pub type UploadUsers
A successful response from admin.usergroups.uploadUsers.
pub type UploadUsersResponse {
UploadUsersResponse(
successful_user_count: option.Option(Int),
invalid_users: option.Option(List(InvalidUsergroupUser)),
)
}
Constructors
-
UploadUsersResponse( successful_user_count: option.Option(Int), invalid_users: option.Option(List(InvalidUsergroupUser)), )Arguments
- successful_user_count
-
How many users were added.
- invalid_users
-
Users that could not be added.
A default channel of an IDP group.
pub type UsergroupChannel {
UsergroupChannel(
id: String,
name: option.Option(String),
team_id: option.Option(String),
num_members: option.Option(Int),
is_redacted: option.Option(Bool),
)
}
Constructors
-
UsergroupChannel( id: String, name: option.Option(String), team_id: option.Option(String), num_members: option.Option(Int), is_redacted: option.Option(Bool), )Arguments
- num_members
-
Member count, when
include_num_memberswas set. - is_redacted
-
Whether the channel details are redacted for the caller.
Values
pub fn add_channels(
usergroup_id usergroup_id: String,
channel_ids channel_ids: List(String),
) -> slackline.Call(AddChannels, Nil)
admin.usergroups.addChannels:
Add up to one hundred default channels to an IDP group.
usergroups.AddChannels identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/admin/usergroups/add_channels.
User token scopes: admin.usergroups:write.
Rate limit tier: t1.
Documented errors: channel_not_found, feature_not_enabled,
invalid_channels_limit, not_an_admin, not_an_enterprise,
team_not_found, user_channel_limit_exceeded, usergroup_not_found,
usergroup_not_linked_to_team, usergroup_team_not_provisioned.
pub fn add_teams(
usergroup_id usergroup_id: String,
team_ids team_ids: List(String),
) -> slackline.Call(AddTeams, Nil)
admin.usergroups.addTeams:
Associate one or more default workspaces with an organization-wide IDP
group.
usergroups.AddTeams identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/admin/usergroups/add_teams.
User token scopes: admin.teams:write.
Rate limit tier: t2.
Documented errors: auto_provision_failure, auto_provision_required,
invalid_team_ids, multi_workspace_restriction, no_team_ids_given,
restricted_action, team_limit_exceeded, usergroup_not_found,
workspace_not_eligible.
pub fn add_users(
id id: String,
users users: List(String),
) -> slackline.Call(AddUsers, AddUsersResponse)
admin.usergroups.addUsers:
Add members to an existing organizational usergroup.
usergroups.AddUsers identifies this method in slackline.Call.
User token scopes: admin.usergroups:write.
Rate limit tier: t2.
Documented errors: cannot_modify_role_admin, feature_not_enabled,
invalid_usergroup, invalid_users,
member_count_would_exceed_visible_limit, not_an_enterprise,
restricted_action, user_not_found.
pub fn add_users_response_decoder() -> decode.Decoder(
AddUsersResponse,
)
Decodes the response from admin.usergroups.addUsers.
pub fn create(
name name: String,
) -> slackline.Call(Create, CreateResponse)
admin.usergroups.create:
Create a new organizational usergroup.
usergroups.Create identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/admin/usergroups/create.
User token scopes: admin.usergroups:write.
Rate limit tier: t1.
Documented errors: feature_not_enabled, handle_already_exists,
name_already_exists, not_an_enterprise, restricted_action.
pub fn create_response_decoder() -> decode.Decoder(CreateResponse)
Decodes the response from admin.usergroups.create.
pub fn fetch(
id id: String,
) -> slackline.Call(Fetch, FetchResponse)
admin.usergroups.fetch:
Fetch an organizational usergroup.
usergroups.Fetch identifies this method in slackline.Call.
User token scopes: admin.usergroups:read.
Rate limit tier: t1.
Documented errors: feature_not_enabled, invalid_usergroup,
not_an_enterprise, restricted_action.
pub fn fetch_response_decoder() -> decode.Decoder(FetchResponse)
Decodes the response from admin.usergroups.fetch.
pub fn invalid_usergroup_user_decoder() -> decode.Decoder(
InvalidUsergroupUser,
)
Decodes InvalidUsergroupUser from json.
pub fn invalid_usergroup_user_to_json(
it: InvalidUsergroupUser,
) -> json.Json
Encodes InvalidUsergroupUser as json.
pub fn list_channels(
usergroup_id usergroup_id: String,
) -> slackline.Call(ListChannels, ListChannelsResponse)
admin.usergroups.listChannels:
List the channels linked to an org-level IDP group (user group).
usergroups.ListChannels identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/admin/usergroups/list_channels.
User token scopes: admin.usergroups:read.
Rate limit tier: t2.
Documented errors: feature_not_enabled, invalid_user, not_allowed,
not_an_admin, not_an_enterprise, team_not_found,
usergroup_not_found, usergroup_not_linked_to_team.
pub fn list_channels_response_decoder() -> decode.Decoder(
ListChannelsResponse,
)
Decodes the response from admin.usergroups.listChannels.
pub fn remove_channels(
usergroup_id usergroup_id: String,
channel_ids channel_ids: List(String),
) -> slackline.Call(RemoveChannels, Nil)
admin.usergroups.removeChannels:
Remove one or more default channels from an org-level IDP group (user
group).
usergroups.RemoveChannels identifies this method in slackline.Call.
User token scopes: admin.usergroups:write.
Rate limit tier: t2.
Documented errors: channel_not_found, feature_not_enabled,
invalid_channels_limit, not_an_admin, not_an_enterprise,
usergroup_not_found.
pub fn remove_teams(
usergroup_id usergroup_id: String,
team_ids team_ids: List(String),
) -> slackline.Call(RemoveTeams, Nil)
admin.usergroups.removeTeams:
Remove one or more default workspaces from an organization-wide IDP Group or
Admin Group
usergroups.RemoveTeams identifies this method in slackline.Call.
User token scopes: admin.teams:write.
Rate limit tier: t2.
Documented errors: invalid_team_ids, no_team_ids_given,
restricted_action, usergroup_not_found.
pub fn remove_users(
id id: String,
users users: List(String),
) -> slackline.Call(RemoveUsers, Nil)
admin.usergroups.removeUsers:
Remove members from an existing organizational usergroup.
usergroups.RemoveUsers identifies this method in slackline.Call.
User token scopes: admin.usergroups:write.
Rate limit tier: t2.
Documented errors: feature_not_enabled, invalid_usergroup,
invalid_users, not_an_enterprise, restricted_action, user_not_found.
pub fn update(
id id: String,
) -> slackline.Call(Update, UpdateResponse)
admin.usergroups.update:
Update one or more properties of an existing organizational usergroup.
usergroups.Update identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/admin/usergroups/update.
User token scopes: admin.usergroups:write.
Rate limit tier: t1.
Documented errors: cannot_modify_pref_after_creation,
feature_not_enabled, handle_already_exists, invalid_usergroup,
name_already_exists, not_an_enterprise, restricted_action,
too_many_usergroup_members_to_make_visible, user_channel_limit_exceeded,
visible_group_needs_handle.
pub fn update_response_decoder() -> decode.Decoder(UpdateResponse)
Decodes the response from admin.usergroups.update.
pub fn upload_users(
id id: String,
) -> slackline.Call(UploadUsers, UploadUsersResponse)
admin.usergroups.uploadUsers:
Add members to an existing organizational usergroup in bulk via CSV upload.
usergroups.UploadUsers identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/admin/usergroups/upload_users.
User token scopes: admin.usergroups:write.
Rate limit tier: t2.
Documented errors: cannot_modify_role_admin, feature_not_enabled,
invalid_usergroup, member_count_would_exceed_visible_limit,
no_valid_users, not_an_enterprise, restricted_action,
subteam_limit_exceeded, unable_to_parse_csv.
pub fn upload_users_response_decoder() -> decode.Decoder(
UploadUsersResponse,
)
Decodes the response from admin.usergroups.uploadUsers.
pub fn usergroup_channel_decoder() -> decode.Decoder(
UsergroupChannel,
)
Decodes UsergroupChannel from json.
pub fn usergroup_channel_to_json(
it: UsergroupChannel,
) -> json.Json
Encodes UsergroupChannel as json.