slackline/api/auth

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

Slack Web API methods for checking and revoking tokens.

Types

A workspace an org-wide app has been approved for, from auth.teams.list.

pub type AuthTeam {
  AuthTeam(
    id: String,
    name: option.Option(String),
    icon: option.Option(dict.Dict(String, value.Value)),
  )
}

Constructors

  • AuthTeam(
      id: String,
      name: option.Option(String),
      icon: option.Option(dict.Dict(String, value.Value)),
    )

    Arguments

    id

    The workspace ID.

    name

    The workspace name.

    icon

    URIs for the images that represent the workspace, present when include_icon is set.

Identifies auth.revoke in the slackline.Call that revoke returns.

pub type Revoke

A successful response from auth.revoke.

pub type RevokeResponse {
  RevokeResponse(revoked: option.Option(Bool))
}

Constructors

  • RevokeResponse(revoked: option.Option(Bool))

    Arguments

    revoked

    Whether the token was actually revoked. false in testing mode.

Identifies auth.teams.list in the slackline.Call that teams_list returns.

pub type TeamsList

A successful response from auth.teams.list.

pub type TeamsListResponse {
  TeamsListResponse(
    teams: option.Option(List(AuthTeam)),
    response_metadata: option.Option(slackline.ResponseMetadata),
  )
}

Constructors

Identifies auth.test in the slackline.Call that test_ returns.

pub type Test

A successful response from auth.test.

pub type TestResponse {
  TestResponse(
    url: String,
    team: String,
    user: String,
    team_id: String,
    user_id: String,
    bot_id: option.Option(String),
    enterprise_id: option.Option(String),
    is_enterprise_install: option.Option(Bool),
  )
}

Constructors

  • TestResponse(
      url: String,
      team: String,
      user: String,
      team_id: String,
      user_id: String,
      bot_id: option.Option(String),
      enterprise_id: option.Option(String),
      is_enterprise_install: option.Option(Bool),
    )

    Arguments

    url

    The URL of the workspace.

    team

    The workspace name.

    user

    The name of the user (or bot user) the token belongs to.

    team_id

    The workspace ID.

    user_id

    The ID of the user (or bot user) the token belongs to.

    bot_id

    The bot ID, present for bot tokens.

    enterprise_id

    The enterprise organization ID, present for org installations.

    is_enterprise_install

    Whether the app is installed on an entire organization.

Values

pub fn auth_team_decoder() -> decode.Decoder(AuthTeam)

Decodes AuthTeam from json.

pub fn auth_team_to_json(it: AuthTeam) -> json.Json

Encodes AuthTeam as json.

pub fn revoke() -> slackline.Call(Revoke, RevokeResponse)

auth.revoke: Revokes a token.

auth.Revoke identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/auth/revoke.

Rate limit tier: t3.

Documented errors: not_bearer_token.

pub fn revoke_response_decoder() -> decode.Decoder(RevokeResponse)

Decodes the response from auth.revoke.

pub fn teams_list() -> slackline.Call(
  TeamsList,
  TeamsListResponse,
)

auth.teams.list: Obtain a full list of workspaces your org-wide app has been approved for.

auth.TeamsList identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/auth/teams_list.

Rate limit tier: t3.

Documented errors: invalid_cursor, invalid_limit.

pub fn teams_list_response_decoder() -> decode.Decoder(
  TeamsListResponse,
)

Decodes the response from auth.teams.list.

pub fn test_() -> slackline.Call(Test, TestResponse)

auth.test: Checks authentication & identity.

auth.Test identifies this method in slackline.Call.

Rate limit tier: t5.

pub fn test_response_decoder() -> decode.Decoder(TestResponse)

Decodes the response from auth.test.

✨ Search Document