slackline/api/team

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

Slack Web API methods for workspace information, logs, billing and profile fields.

Types

Access by one user from one IP address and user agent combination.

pub type AccessLog {
  AccessLog(
    user_id: String,
    username: option.Option(String),
    date_first: option.Option(Int),
    date_last: option.Option(Int),
    count: option.Option(Int),
    ip: option.Option(String),
    user_agent: option.Option(String),
    isp: option.Option(String),
    country: option.Option(String),
    region: option.Option(String),
  )
}

Constructors

  • AccessLog(
      user_id: String,
      username: option.Option(String),
      date_first: option.Option(Int),
      date_last: option.Option(Int),
      count: option.Option(Int),
      ip: option.Option(String),
      user_agent: option.Option(String),
      isp: option.Option(String),
      country: option.Option(String),
      region: option.Option(String),
    )

    Arguments

    user_id

    The ID of the user who accessed Slack.

    username

    The name of the user who accessed Slack.

    date_first

    Unix timestamp of the first access for this combination.

    date_last

    Unix timestamp of the most recent access for this combination.

    count

    The total number of accesses for this combination.

    ip

    The IP address of the device used.

    user_agent

    The user agent of the browser or client application.

    isp

    Best guess at the internet service provider owning the IP address.

    country

    Best guess at the country the access came from.

    region

    Best guess at the region the access came from.

Identifies team.accessLogs in the slackline.Call that access_logs returns.

pub type AccessLogs

A successful response from team.accessLogs.

pub type AccessLogsResponse {
  AccessLogsResponse(
    logins: option.Option(List(AccessLog)),
    paging: option.Option(TeamPaging),
    response_metadata: option.Option(slackline.ResponseMetadata),
  )
}

Constructors

Billing information for one user.

pub type BillableInfo {
  BillableInfo(billing_active: option.Option(Bool))
}

Constructors

  • BillableInfo(billing_active: option.Option(Bool))

    Arguments

    billing_active

    Whether the user is billable under Slack’s Fair Billing policy.

Identifies team.billableInfo in the slackline.Call that billable_info returns.

pub type BillableInfoMethod

A successful response from team.billableInfo.

pub type BillableInfoResponse {
  BillableInfoResponse(
    billable_info: option.Option(dict.Dict(String, BillableInfo)),
    response_metadata: option.Option(slackline.ResponseMetadata),
  )
}

Constructors

Identifies team.billing.info in the slackline.Call that billing_info returns.

pub type BillingInfo

A successful response from team.billing.info.

pub type BillingInfoResponse {
  BillingInfoResponse(plan: option.Option(BillingPlan))
}

Constructors

A workspace’s billing plan.

pub type BillingPlan {
  FreePlan
  StdPlan
  PlusPlan
  EnterprisePlan
  CompliancePlan
  UnknownBillingPlan(String)
}

Constructors

  • FreePlan

    Free plan.

  • StdPlan

    Pro plan.

  • PlusPlan

    Business+ plan.

  • EnterprisePlan

    Enterprise plan.

  • CompliancePlan

    Enterprise Compliance Select plan.

  • UnknownBillingPlan(String)

    A value that this version of slackline does not know.

A workspace connected to an external organization.

pub type ConnectedWorkspace {
  ConnectedWorkspace(
    workspace_id: option.Option(String),
    workspace_name: option.Option(String),
  )
}

Constructors

  • ConnectedWorkspace(
      workspace_id: option.Option(String),
      workspace_name: option.Option(String),
    )

    Arguments

    workspace_id

    The workspace ID.

    workspace_name

    The workspace name.

The connected workspaces of an external organization: one object or a list.

pub type ConnectedWorkspaces {
  ManyConnectedWorkspaces(List(ConnectedWorkspace))
  OneConnectedWorkspace(ConnectedWorkspace)
}

Constructors

The Slack Connect status of an external organization.

pub type ConnectionStatus {
  Connected
  Disconnected
  Blocked
  InReview
  UnknownConnectionStatus(String)
}

Constructors

  • Connected

    CONNECTED

  • Disconnected

    DISCONNECTED

  • Blocked

    BLOCKED

  • InReview

    IN_REVIEW

  • UnknownConnectionStatus(String)

    A value that this version of slackline does not know.

An external organization connected through Slack Connect.

pub type ExternalOrganization {
  ExternalOrganization(
    team_id: String,
    team_name: option.Option(String),
    team_domain: option.Option(String),
    public_channel_count: option.Option(Int),
    private_channel_count: option.Option(Int),
    im_channel_count: option.Option(Int),
    mpim_channel_count: option.Option(Int),
    connected_workspaces: option.Option(ConnectedWorkspaces),
    slack_connect_prefs: option.Option(value.Value),
    connection_status: option.Option(ConnectionStatus),
    last_active_timestamp: option.Option(Int),
    is_sponsored: option.Option(Bool),
    canvas: option.Option(SharedItemCounts),
    lists: option.Option(SharedItemCounts),
  )
}

Constructors

  • ExternalOrganization(
      team_id: String,
      team_name: option.Option(String),
      team_domain: option.Option(String),
      public_channel_count: option.Option(Int),
      private_channel_count: option.Option(Int),
      im_channel_count: option.Option(Int),
      mpim_channel_count: option.Option(Int),
      connected_workspaces: option.Option(ConnectedWorkspaces),
      slack_connect_prefs: option.Option(value.Value),
      connection_status: option.Option(ConnectionStatus),
      last_active_timestamp: option.Option(Int),
      is_sponsored: option.Option(Bool),
      canvas: option.Option(SharedItemCounts),
      lists: option.Option(SharedItemCounts),
    )

    Arguments

    team_id

    The organization’s team ID.

    team_name

    The organization’s name.

    team_domain

    The organization’s domain.

    public_channel_count

    The number of shared public channels.

    private_channel_count

    The number of shared private channels.

    im_channel_count

    The number of shared direct messages.

    mpim_channel_count

    The number of shared group direct messages.

    connected_workspaces

    Your workspaces connected to this organization.

    slack_connect_prefs

    Slack Connect preference overrides for this organization.

    connection_status

    The connection status.

    last_active_timestamp

    Unix timestamp of the last activity.

    is_sponsored

    Whether the organization is sponsored.

    canvas

    Shared canvases.

    lists

    Shared lists.

How to sort external organizations.

pub type ExternalTeamSortField {
  TeamName
  LastActiveTimestamp
  SortByConnectionStatus
}

Constructors

  • TeamName

    team_name

  • LastActiveTimestamp

    last_active_timestamp

  • SortByConnectionStatus

    connection_status

Identifies team.externalTeams.disconnect in the slackline.Call that external_teams_disconnect returns.

pub type ExternalTeamsDisconnect

Identifies team.externalTeams.list in the slackline.Call that external_teams_list returns.

pub type ExternalTeamsList

A successful response from team.externalTeams.list.

pub type ExternalTeamsListResponse {
  ExternalTeamsListResponse(
    organizations: option.Option(List(ExternalOrganization)),
    total_count: option.Option(Int),
    response_metadata: option.Option(slackline.ResponseMetadata),
  )
}

Constructors

Identifies team.info in the slackline.Call that info returns.

pub type Info

A successful response from team.info.

pub type InfoResponse {
  InfoResponse(team: option.Option(team.Team))
}

Constructors

The kind of change an integration log records.

pub type IntegrationChangeType {
  IntegrationAdded
  IntegrationRemoved
  IntegrationEnabled
  IntegrationDisabled
  IntegrationExpanded
  IntegrationUpdated
  UnknownIntegrationChangeType(String)
}

Constructors

  • IntegrationAdded

    added

  • IntegrationRemoved

    removed

  • IntegrationEnabled

    enabled

  • IntegrationDisabled

    disabled

  • IntegrationExpanded

    expanded

  • IntegrationUpdated

    updated

  • UnknownIntegrationChangeType(String)

    A value that this version of slackline does not know.

Why an integration was disabled.

pub type IntegrationDisableReason {
  DisabledByUser
  DisabledByRateLimits
  DisabledBySlack
  DisabledByErrors
  DisabledBySystem
  DisabledByAdmin
  DisabledByApiDecline
  DisabledByDeauth
  UnknownIntegrationDisableReason(String)
}

Constructors

  • DisabledByUser

    Manually disabled by a user.

  • DisabledByRateLimits

    Rate limits exceeded.

  • DisabledBySlack

    Disabled by Slack.

  • DisabledByErrors

    Too many errors.

  • DisabledBySystem

    A system change, such as a channel being archived.

  • DisabledByAdmin

    An admin, such as a user being deleted.

  • DisabledByApiDecline

    The user declined the API terms of service.

  • DisabledByDeauth

    The service was de-authorized.

  • UnknownIntegrationDisableReason(String)

    A value that this version of slackline does not know.

An integration activity log entry, for either a service or an app.

pub type IntegrationLog {
  IntegrationLog(
    service_id: option.Option(IntegrationServiceId),
    service_type: option.Option(String),
    app_id: option.Option(String),
    app_type: option.Option(String),
    user_id: option.Option(String),
    user_name: option.Option(String),
    channel: option.Option(String),
    date: option.Option(String),
    change_type: option.Option(IntegrationChangeType),
    reason: option.Option(IntegrationDisableReason),
    scope: option.Option(String),
    rss_feed: option.Option(Bool),
    rss_feed_change_type: option.Option(String),
    rss_feed_title: option.Option(String),
    rss_feed_url: option.Option(String),
  )
}

Constructors

Identifies team.integrationLogs in the slackline.Call that integration_logs returns.

pub type IntegrationLogs

A successful response from team.integrationLogs.

pub type IntegrationLogsResponse {
  IntegrationLogsResponse(
    logs: option.Option(List(IntegrationLog)),
    paging: option.Option(TeamPaging),
  )
}

Constructors

The ID of the service an integration log refers to, as a number or a string.

pub type IntegrationServiceId {
  IntegrationServiceIdString(String)
  IntegrationServiceIdInt(Int)
}

Constructors

  • IntegrationServiceIdString(String)
  • IntegrationServiceIdInt(Int)

An entry in an ownership breakdown.

pub type OwnershipDetail {
  OwnershipDetail(
    team_id: option.Option(String),
    count: option.Option(Int),
  )
}

Constructors

  • OwnershipDetail(
      team_id: option.Option(String),
      count: option.Option(Int),
    )

    Arguments

    team_id

    The owning team.

    count

    The number of items it owns.

Identifies team.preferences.list in the slackline.Call that preferences_list returns.

pub type PreferencesList

A successful response from team.preferences.list.

pub type PreferencesListResponse {
  PreferencesListResponse(
    display_real_names: option.Option(Bool),
    disable_file_uploads: option.Option(String),
    msg_edit_window_mins: option.Option(Int),
    who_can_post_general: option.Option(String),
  )
}

Constructors

  • PreferencesListResponse(
      display_real_names: option.Option(Bool),
      disable_file_uploads: option.Option(String),
      msg_edit_window_mins: option.Option(Int),
      who_can_post_general: option.Option(String),
    )

    Arguments

    display_real_names

    Whether real names are displayed instead of display names.

    disable_file_uploads

    Who can upload files, such as disallow_all, allow_all, type:owner,type:admin or type:regular.

    msg_edit_window_mins

    How many minutes after posting a message can be edited.

    who_can_post_general

    Who can post in the general channel.

Identifies team.profile.get in the slackline.Call that profile_get returns.

pub type ProfileGet

A successful response from team.profile.get.

pub type ProfileGetResponse {
  ProfileGetResponse(profile: option.Option(team.TeamProfile))
}

Constructors

Which profile fields to return.

pub type ProfileVisibility {
  AllFields
  VisibleFields
  HiddenFields
}

Constructors

  • AllFields

    all

  • VisibleFields

    visible

  • HiddenFields

    hidden

Counts of shared items, such as canvases or lists, with an external organization.

pub type SharedItemCounts {
  SharedItemCounts(
    total_count: option.Option(Int),
    ownership_details: option.Option(List(OwnershipDetail)),
  )
}

Constructors

Page-based paging details.

pub type TeamPaging {
  TeamPaging(
    count: option.Option(Int),
    total: option.Option(Int),
    page: option.Option(Int),
    pages: option.Option(Int),
  )
}

Constructors

  • TeamPaging(
      count: option.Option(Int),
      total: option.Option(Int),
      page: option.Option(Int),
      pages: option.Option(Int),
    )

    Arguments

    count

    The number of items returned.

    total

    The total number of items.

    page

    The page of results returned.

    pages

    The total number of pages.

Values

pub fn access_log_decoder() -> decode.Decoder(AccessLog)

Decodes AccessLog from json.

pub fn access_log_to_json(it: AccessLog) -> json.Json

Encodes AccessLog as json.

pub fn access_logs() -> slackline.Call(
  AccessLogs,
  AccessLogsResponse,
)

team.accessLogs: Gets the access logs for the current team.

team.AccessLogs identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/team/access_logs.

User token scopes: admin.

Rate limit tier: t2.

Documented errors: invalid_cursor, invalid_limit, invalid_team_id, over_pagination_limit, paid_only.

pub fn access_logs_response_decoder() -> decode.Decoder(
  AccessLogsResponse,
)

Decodes the response from team.accessLogs.

pub fn billable_info() -> slackline.Call(
  BillableInfoMethod,
  BillableInfoResponse,
)

team.billableInfo: Gets billable users information for the current team.

team.BillableInfoMethod identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/team/billable_info.

User token scopes: admin.

Rate limit tier: t2.

Documented errors: invalid_cursor, user_not_found.

pub fn billable_info_decoder() -> decode.Decoder(BillableInfo)

Decodes BillableInfo from json.

pub fn billable_info_response_decoder() -> decode.Decoder(
  BillableInfoResponse,
)

Decodes the response from team.billableInfo.

pub fn billable_info_to_json(it: BillableInfo) -> json.Json

Encodes BillableInfo as json.

pub fn billing_info() -> slackline.Call(
  BillingInfo,
  BillingInfoResponse,
)

team.billing.info: Reads a workspace’s billing plan information.

team.BillingInfo identifies this method in slackline.Call.

Bot token scopes: team.billing:read. User token scopes: team.billing:read.

Rate limit tier: t3.

Documented errors: invalid_team.

pub fn billing_info_response_decoder() -> decode.Decoder(
  BillingInfoResponse,
)

Decodes the response from team.billing.info.

pub fn billing_plan_decoder() -> decode.Decoder(BillingPlan)

Decodes BillingPlan from a json string.

pub fn billing_plan_from_string(string: String) -> BillingPlan

Parses BillingPlan from its json string.

pub fn billing_plan_to_json(it: BillingPlan) -> json.Json

Encodes BillingPlan as a json string.

pub fn billing_plan_to_string(it: BillingPlan) -> String

The json string of BillingPlan.

pub fn connected_workspace_decoder() -> decode.Decoder(
  ConnectedWorkspace,
)

Decodes ConnectedWorkspace from json.

pub fn connected_workspace_to_json(
  it: ConnectedWorkspace,
) -> json.Json

Encodes ConnectedWorkspace as json.

pub fn connected_workspaces_decoder() -> decode.Decoder(
  ConnectedWorkspaces,
)

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

pub fn connected_workspaces_to_json(
  it: ConnectedWorkspaces,
) -> json.Json

Encodes ConnectedWorkspaces as json.

pub fn connection_status_decoder() -> decode.Decoder(
  ConnectionStatus,
)

Decodes ConnectionStatus from a json string.

pub fn connection_status_from_string(
  string: String,
) -> ConnectionStatus

Parses ConnectionStatus from its json string.

pub fn connection_status_to_json(
  it: ConnectionStatus,
) -> json.Json

Encodes ConnectionStatus as a json string.

pub fn connection_status_to_string(
  it: ConnectionStatus,
) -> String

The json string of ConnectionStatus.

pub fn external_organization_decoder() -> decode.Decoder(
  ExternalOrganization,
)

Decodes ExternalOrganization from json.

pub fn external_organization_to_json(
  it: ExternalOrganization,
) -> json.Json

Encodes ExternalOrganization as json.

pub fn external_team_sort_field_decoder() -> decode.Decoder(
  ExternalTeamSortField,
)

Decodes ExternalTeamSortField from a json string.

pub fn external_team_sort_field_from_string(
  string: String,
) -> Result(ExternalTeamSortField, Nil)

Parses ExternalTeamSortField from its json string.

pub fn external_team_sort_field_to_json(
  it: ExternalTeamSortField,
) -> json.Json

Encodes ExternalTeamSortField as a json string.

pub fn external_team_sort_field_to_string(
  it: ExternalTeamSortField,
) -> String

The json string of ExternalTeamSortField.

pub fn external_teams_disconnect(
  target_team target_team: String,
) -> slackline.Call(ExternalTeamsDisconnect, Nil)

team.externalTeams.disconnect: Disconnect an external organization.

team.ExternalTeamsDisconnect identifies this method in slackline.Call.

Bot token scopes: conversations.connect:manage.

Rate limit tier: t1.

Documented errors: invalid_target_team, restricted_action.

pub fn external_teams_list() -> slackline.Call(
  ExternalTeamsList,
  ExternalTeamsListResponse,
)

team.externalTeams.list: Returns a list of all the external teams connected and details about the connection.

team.ExternalTeamsList identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/team/external_teams_list.

Bot token scopes: conversations.connect:manage, team:read.

Rate limit tier: t2.

Documented errors: invalid_workspace_filter, not_allowed, restricted_action, user_cannot_manage_workspace.

pub fn external_teams_list_response_decoder() -> decode.Decoder(
  ExternalTeamsListResponse,
)

Decodes the response from team.externalTeams.list.

pub fn info() -> slackline.Call(Info, InfoResponse)

team.info: Gets information about the current team.

team.Info identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/team/info.

Bot token scopes: team:read. User token scopes: team:read.

Rate limit tier: t3.

Documented errors: enterprise_not_found, fail_to_get_teams_for_restricted_user, missing_user, org_not_found, team_not_found, team_not_on_enterprise, user_not_found.

pub fn info_response_decoder() -> decode.Decoder(InfoResponse)

Decodes the response from team.info.

pub fn integration_change_type_decoder() -> decode.Decoder(
  IntegrationChangeType,
)

Decodes IntegrationChangeType from a json string.

pub fn integration_change_type_from_string(
  string: String,
) -> IntegrationChangeType

Parses IntegrationChangeType from its json string.

pub fn integration_change_type_to_json(
  it: IntegrationChangeType,
) -> json.Json

Encodes IntegrationChangeType as a json string.

pub fn integration_change_type_to_string(
  it: IntegrationChangeType,
) -> String

The json string of IntegrationChangeType.

pub fn integration_disable_reason_decoder() -> decode.Decoder(
  IntegrationDisableReason,
)

Decodes IntegrationDisableReason from a json string.

pub fn integration_disable_reason_from_string(
  string: String,
) -> IntegrationDisableReason

Parses IntegrationDisableReason from its json string.

pub fn integration_disable_reason_to_json(
  it: IntegrationDisableReason,
) -> json.Json

Encodes IntegrationDisableReason as a json string.

pub fn integration_disable_reason_to_string(
  it: IntegrationDisableReason,
) -> String

The json string of IntegrationDisableReason.

pub fn integration_log_decoder() -> decode.Decoder(IntegrationLog)

Decodes IntegrationLog from json.

pub fn integration_log_to_json(it: IntegrationLog) -> json.Json

Encodes IntegrationLog as json.

pub fn integration_logs() -> slackline.Call(
  IntegrationLogs,
  IntegrationLogsResponse,
)

team.integrationLogs: Gets the integration logs for the current team.

team.IntegrationLogs identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/team/integration_logs.

User token scopes: admin.

Rate limit tier: t2.

pub fn integration_logs_response_decoder() -> decode.Decoder(
  IntegrationLogsResponse,
)

Decodes the response from team.integrationLogs.

pub fn integration_service_id_decoder() -> decode.Decoder(
  IntegrationServiceId,
)

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

pub fn integration_service_id_to_json(
  it: IntegrationServiceId,
) -> json.Json

Encodes IntegrationServiceId as json.

pub fn ownership_detail_decoder() -> decode.Decoder(
  OwnershipDetail,
)

Decodes OwnershipDetail from json.

pub fn ownership_detail_to_json(it: OwnershipDetail) -> json.Json

Encodes OwnershipDetail as json.

pub fn preferences_list() -> slackline.Call(
  PreferencesList,
  PreferencesListResponse,
)

team.preferences.list: Retrieve a list of a workspace’s team preferences.

team.PreferencesList identifies this method in slackline.Call.

Bot token scopes: team.preferences:read. User token scopes: team.preferences:read.

Rate limit tier: t3.

Documented errors: invalid_team.

pub fn preferences_list_response_decoder() -> decode.Decoder(
  PreferencesListResponse,
)

Decodes the response from team.preferences.list.

pub fn profile_get() -> slackline.Call(
  ProfileGet,
  ProfileGetResponse,
)

team.profile.get: Retrieve a team’s profile.

team.ProfileGet identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/team/profile_get.

Bot token scopes: users.profile:read. User token scopes: users.profile:read.

Rate limit tier: t3.

pub fn profile_get_response_decoder() -> decode.Decoder(
  ProfileGetResponse,
)

Decodes the response from team.profile.get.

pub fn profile_visibility_decoder() -> decode.Decoder(
  ProfileVisibility,
)

Decodes ProfileVisibility from a json string.

pub fn profile_visibility_from_string(
  string: String,
) -> Result(ProfileVisibility, Nil)

Parses ProfileVisibility from its json string.

pub fn profile_visibility_to_json(
  it: ProfileVisibility,
) -> json.Json

Encodes ProfileVisibility as a json string.

pub fn profile_visibility_to_string(
  it: ProfileVisibility,
) -> String

The json string of ProfileVisibility.

pub fn shared_item_counts_decoder() -> decode.Decoder(
  SharedItemCounts,
)

Decodes SharedItemCounts from json.

pub fn shared_item_counts_to_json(
  it: SharedItemCounts,
) -> json.Json

Encodes SharedItemCounts as json.

pub fn team_paging_decoder() -> decode.Decoder(TeamPaging)

Decodes TeamPaging from json.

pub fn team_paging_to_json(it: TeamPaging) -> json.Json

Encodes TeamPaging as json.

✨ Search Document