slackline/api/admin/teams
This module is generated by gleam run -m slackline_codegen/generate. Do not edit it by hand.
Admin API methods for creating and configuring workspaces in an org.
Types
Identifies admin.teams.admins.list in the slackline.Call that
admins_list returns.
pub type AdminsList
A successful response from admin.teams.admins.list.
pub type AdminsListResponse {
AdminsListResponse(
admin_ids: option.Option(List(String)),
response_metadata: option.Option(slackline.ResponseMetadata),
)
}
Constructors
-
AdminsListResponse( admin_ids: option.Option(List(String)), response_metadata: option.Option(slackline.ResponseMetadata), )Arguments
- admin_ids
-
IDs of the workspace admins.
A successful response from admin.teams.create.
pub type CreateResponse {
CreateResponse(team: String)
}
Constructors
-
CreateResponse(team: String)Arguments
- team
-
ID of the new workspace.
Identifies admin.teams.list in the slackline.Call that list returns.
pub type ListMethod
A successful response from admin.teams.list.
pub type ListResponse {
ListResponse(
teams: option.Option(List(OrgTeam)),
response_metadata: option.Option(slackline.ResponseMetadata),
)
}
Constructors
-
ListResponse( teams: option.Option(List(OrgTeam)), response_metadata: option.Option(slackline.ResponseMetadata), )
A workspace in the org, as listed by admin.teams.list.
pub type OrgTeam {
OrgTeam(
id: String,
name: option.Option(String),
discoverability: option.Option(TeamDiscoverability),
primary_owner: option.Option(TeamPrimaryOwner),
team_url: option.Option(String),
)
}
Constructors
-
OrgTeam( id: String, name: option.Option(String), discoverability: option.Option(TeamDiscoverability), primary_owner: option.Option(TeamPrimaryOwner), team_url: option.Option(String), )
Identifies admin.teams.owners.list in the slackline.Call that
owners_list returns.
pub type OwnersList
A successful response from admin.teams.owners.list.
pub type OwnersListResponse {
OwnersListResponse(
owner_ids: option.Option(List(String)),
response_metadata: option.Option(slackline.ResponseMetadata),
)
}
Constructors
-
OwnersListResponse( owner_ids: option.Option(List(String)), response_metadata: option.Option(slackline.ResponseMetadata), )Arguments
- owner_ids
-
IDs of the workspace owners.
Identifies admin.teams.settings.info in the slackline.Call that
settings_info returns.
pub type SettingsInfo
A successful response from admin.teams.settings.info.
pub type SettingsInfoResponse {
SettingsInfoResponse(team: TeamSettings)
}
Constructors
-
SettingsInfoResponse(team: TeamSettings)
Identifies admin.teams.settings.setDefaultChannels in the slackline.Call
that settings_set_default_channels returns.
pub type SettingsSetDefaultChannels
Identifies admin.teams.settings.setDescription in the slackline.Call
that settings_set_description returns.
pub type SettingsSetDescription
Identifies admin.teams.settings.setDiscoverability in the slackline.Call
that settings_set_discoverability returns.
pub type SettingsSetDiscoverability
Identifies admin.teams.settings.setIcon in the slackline.Call that
settings_set_icon returns.
pub type SettingsSetIcon
Identifies admin.teams.settings.setName in the slackline.Call that
settings_set_name returns.
pub type SettingsSetName
Who can find and join a workspace.
pub type TeamDiscoverability {
Open
Closed
InviteOnly
Unlisted
Hidden
UnknownTeamDiscoverability(String)
}
Constructors
-
Openopen -
Closedclosed -
InviteOnlyinvite_only -
Unlistedunlisted -
Hiddenhidden -
UnknownTeamDiscoverability(String)A value that this version of slackline does not know.
The primary owner of a workspace.
pub type TeamPrimaryOwner {
TeamPrimaryOwner(
user_id: option.Option(String),
email: option.Option(String),
)
}
Constructors
-
TeamPrimaryOwner( user_id: option.Option(String), email: option.Option(String), )
Settings of a workspace.
pub type TeamSettings {
TeamSettings(
id: String,
name: option.Option(String),
domain: option.Option(String),
email_domain: option.Option(String),
icon: option.Option(value.Value),
enterprise_id: option.Option(String),
enterprise_name: option.Option(String),
default_channels: option.Option(value.Value),
)
}
Constructors
-
TeamSettings( id: String, name: option.Option(String), domain: option.Option(String), email_domain: option.Option(String), icon: option.Option(value.Value), enterprise_id: option.Option(String), enterprise_name: option.Option(String), default_channels: option.Option(value.Value), )Arguments
- icon
-
The workspace icon.
- default_channels
-
The default channels of the workspace.
Values
pub fn admins_list(
team_id team_id: String,
) -> slackline.Call(AdminsList, AdminsListResponse)
admin.teams.admins.list:
List all of the admins on a given workspace.
teams.AdminsList identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/admin/teams/admins_list.
User token scopes: admin.teams:read.
Rate limit tier: t3.
Documented errors: feature_not_enabled, invalid_cursor, invalid_limit,
not_an_admin, team_not_found.
pub fn admins_list_response_decoder() -> decode.Decoder(
AdminsListResponse,
)
Decodes the response from admin.teams.admins.list.
pub fn create(
team_domain team_domain: String,
team_name team_name: String,
) -> slackline.Call(Create, CreateResponse)
admin.teams.create:
Create an Enterprise team.
teams.Create identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/admin/teams/create.
User token scopes: admin.teams:write.
Rate limit tier: t1.
Documented errors: bad_url, could_not_create_workspace,
discoverability_setting_invalid, domain_taken, feature_not_enabled,
must_provide_team_domain, must_provide_team_name, name_taken_in_org,
not_an_admin.
pub fn create_response_decoder() -> decode.Decoder(CreateResponse)
Decodes the response from admin.teams.create.
pub fn list() -> slackline.Call(ListMethod, ListResponse)
admin.teams.list:
List all teams in an Enterprise organization
teams.ListMethod identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/admin/teams/list.
User token scopes: admin.teams:read.
Rate limit tier: t3.
Documented errors: feature_not_enabled, invalid_cursor, invalid_limit,
not_an_admin.
pub fn list_response_decoder() -> decode.Decoder(ListResponse)
Decodes the response from admin.teams.list.
pub fn org_team_decoder() -> decode.Decoder(OrgTeam)
Decodes OrgTeam from json.
pub fn owners_list(
team_id team_id: String,
) -> slackline.Call(OwnersList, OwnersListResponse)
admin.teams.owners.list:
List all of the owners on a given workspace.
teams.OwnersList identifies this method in slackline.Call.
Set optional arguments with the functions in
slackline/api/admin/teams/owners_list.
User token scopes: admin.teams:read.
Rate limit tier: t3.
Documented errors: feature_not_enabled, invalid_cursor, not_an_admin,
team_not_found.
pub fn owners_list_response_decoder() -> decode.Decoder(
OwnersListResponse,
)
Decodes the response from admin.teams.owners.list.
pub fn settings_info(
team_id team_id: String,
) -> slackline.Call(SettingsInfo, SettingsInfoResponse)
admin.teams.settings.info:
Fetch information about settings in a workspace
teams.SettingsInfo identifies this method in slackline.Call.
User token scopes: admin.teams:read.
Rate limit tier: t3.
Documented errors: failed_to_fetch_info, feature_not_enabled,
team_not_found.
pub fn settings_info_response_decoder() -> decode.Decoder(
SettingsInfoResponse,
)
Decodes the response from admin.teams.settings.info.
pub fn settings_set_default_channels(
team_id team_id: String,
channel_ids channel_ids: List(String),
) -> slackline.Call(SettingsSetDefaultChannels, Nil)
admin.teams.settings.setDefaultChannels:
Set the default channels of a workspace.
teams.SettingsSetDefaultChannels identifies this method in
slackline.Call.
User token scopes: admin.teams:write.
Rate limit tier: t2.
Documented errors: failed_to_set_default_channels, feature_not_enabled,
not_an_admin, one_or_more_invalid_channels, restricted_action,
team_not_found.
pub fn settings_set_description(
team_id team_id: String,
description description: String,
) -> slackline.Call(SettingsSetDescription, Nil)
admin.teams.settings.setDescription:
Set the description of a given workspace.
teams.SettingsSetDescription identifies this method in slackline.Call.
User token scopes: admin.teams:write.
Rate limit tier: t2.
Documented errors: failed_to_set_description, feature_not_enabled,
team_not_found.
pub fn settings_set_discoverability(
team_id team_id: String,
discoverability discoverability: TeamDiscoverability,
) -> slackline.Call(SettingsSetDiscoverability, Nil)
admin.teams.settings.setDiscoverability:
An API method that allows admins to set the discoverability of a given
workspace
teams.SettingsSetDiscoverability identifies this method in
slackline.Call.
User token scopes: admin.teams:write.
Rate limit tier: t2.
Documented errors: discoverability_setting_invalid,
failed_to_set_discoverability, feature_not_enabled, team_not_found.
pub fn settings_set_icon(
image_url image_url: String,
team_id team_id: String,
) -> slackline.Call(SettingsSetIcon, Nil)
admin.teams.settings.setIcon:
Sets the icon of a workspace.
teams.SettingsSetIcon identifies this method in slackline.Call.
User token scopes: admin.teams:write.
Rate limit tier: t2.
Documented errors: failed_to_set_icon, feature_not_enabled,
invalid_url, not_an_admin, team_not_found.
pub fn settings_set_name(
team_id team_id: String,
name name: String,
) -> slackline.Call(SettingsSetName, Nil)
admin.teams.settings.setName:
Set the name of a given workspace.
teams.SettingsSetName identifies this method in slackline.Call.
User token scopes: admin.teams:write.
Rate limit tier: t3.
Documented errors: failed_to_set_name, feature_not_enabled,
team_not_found.
pub fn team_discoverability_decoder() -> decode.Decoder(
TeamDiscoverability,
)
Decodes TeamDiscoverability from a json string.
pub fn team_discoverability_from_string(
string: String,
) -> TeamDiscoverability
Parses TeamDiscoverability from its json string.
pub fn team_discoverability_to_json(
it: TeamDiscoverability,
) -> json.Json
Encodes TeamDiscoverability as a json string.
pub fn team_discoverability_to_string(
it: TeamDiscoverability,
) -> String
The json string of TeamDiscoverability.
pub fn team_primary_owner_decoder() -> decode.Decoder(
TeamPrimaryOwner,
)
Decodes TeamPrimaryOwner from json.
pub fn team_primary_owner_to_json(
it: TeamPrimaryOwner,
) -> json.Json
Encodes TeamPrimaryOwner as json.
pub fn team_settings_decoder() -> decode.Decoder(TeamSettings)
Decodes TeamSettings from json.
pub fn team_settings_to_json(it: TeamSettings) -> json.Json
Encodes TeamSettings as json.