slackline/api/workflows

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

Workflows: featured workflows in channels and trigger run permissions.

Types

The featured workflows of one channel.

pub type ChannelFeaturedWorkflows {
  ChannelFeaturedWorkflows(
    channel_id: String,
    triggers: option.Option(List(FeaturedTrigger)),
  )
}

Constructors

  • ChannelFeaturedWorkflows(
      channel_id: String,
      triggers: option.Option(List(FeaturedTrigger)),
    )

    Arguments

    triggers

    The channel’s featured triggers.

Identifies workflows.featured.add in the slackline.Call that featured_add returns.

pub type FeaturedAdd

Identifies workflows.featured.list in the slackline.Call that featured_list returns.

pub type FeaturedList

A successful response from workflows.featured.list.

pub type FeaturedListResponse {
  FeaturedListResponse(
    featured_workflows: option.Option(
      List(ChannelFeaturedWorkflows),
    ),
  )
}

Constructors

Identifies workflows.featured.remove in the slackline.Call that featured_remove returns.

pub type FeaturedRemove

Identifies workflows.featured.set in the slackline.Call that featured_set returns.

pub type FeaturedSet

A featured workflow trigger.

pub type FeaturedTrigger {
  FeaturedTrigger(id: String, title: option.Option(String))
}

Constructors

  • FeaturedTrigger(id: String, title: option.Option(String))

    Arguments

    id

    ID of the trigger.

    title

    Title of the workflow.

Who can run a workflow trigger.

pub type TriggerPermissionType {
  Everyone
  AppCollaborators
  NamedEntities
  UnknownTriggerPermissionType(String)
}

Constructors

  • Everyone

    everyone

  • AppCollaborators

    app_collaborators

  • NamedEntities

    named_entities

  • UnknownTriggerPermissionType(String)

    A value that this version of slackline does not know.

A trigger’s permission type and, if applicable, the entities with access.

pub type TriggerPermissions {
  TriggerPermissions(
    permission_type: option.Option(TriggerPermissionType),
    user_ids: option.Option(List(String)),
    channel_ids: option.Option(List(String)),
    team_ids: option.Option(List(String)),
    org_ids: option.Option(List(String)),
  )
}

Constructors

  • TriggerPermissions(
      permission_type: option.Option(TriggerPermissionType),
      user_ids: option.Option(List(String)),
      channel_ids: option.Option(List(String)),
      team_ids: option.Option(List(String)),
      org_ids: option.Option(List(String)),
    )

    Arguments

    permission_type

    Who can run the trigger.

    user_ids

    Users with access.

    channel_ids

    Channels whose members have access.

    team_ids

    Workspaces whose members have access.

    org_ids

    Organizations whose members have access.

Identifies workflows.triggers.permissions.add in the slackline.Call that triggers_permissions_add returns.

pub type TriggersPermissionsAdd

Identifies workflows.triggers.permissions.list in the slackline.Call that triggers_permissions_list returns.

pub type TriggersPermissionsList

Identifies workflows.triggers.permissions.remove in the slackline.Call that triggers_permissions_remove returns.

pub type TriggersPermissionsRemove

Identifies workflows.triggers.permissions.set in the slackline.Call that triggers_permissions_set returns.

pub type TriggersPermissionsSet

Values

pub fn channel_featured_workflows_decoder() -> decode.Decoder(
  ChannelFeaturedWorkflows,
)

Decodes ChannelFeaturedWorkflows from json.

pub fn channel_featured_workflows_to_json(
  it: ChannelFeaturedWorkflows,
) -> json.Json

Encodes ChannelFeaturedWorkflows as json.

pub fn featured_add(
  channel_id channel_id: String,
  trigger_ids trigger_ids: List(String),
) -> slackline.Call(FeaturedAdd, Nil)

workflows.featured.add: Add featured workflows to a channel.

workflows.FeaturedAdd identifies this method in slackline.Call.

Bot token scopes: bookmarks:write. User token scopes: bookmarks:write.

Rate limit tier: t2.

Documented errors: error_modifying_workflows, method_not_supported, restricted_action.

pub fn featured_list(
  channel_ids channel_ids: List(String),
) -> slackline.Call(FeaturedList, FeaturedListResponse)

workflows.featured.list: List the featured workflows for specified channels.

workflows.FeaturedList identifies this method in slackline.Call.

Bot token scopes: bookmarks:read. User token scopes: bookmarks:read.

Rate limit tier: t2.

Documented errors: channel_not_found, error_invalid_channels, method_not_supported, restricted_action.

pub fn featured_list_response_decoder() -> decode.Decoder(
  FeaturedListResponse,
)

Decodes the response from workflows.featured.list.

pub fn featured_remove(
  channel_id channel_id: String,
  trigger_ids trigger_ids: List(String),
) -> slackline.Call(FeaturedRemove, Nil)

workflows.featured.remove: Remove featured workflows from a channel.

workflows.FeaturedRemove identifies this method in slackline.Call.

Bot token scopes: bookmarks:write. User token scopes: bookmarks:write.

Rate limit tier: t2.

Documented errors: error_modifying_workflows, method_not_supported, restricted_action.

pub fn featured_set(
  channel_id channel_id: String,
  trigger_ids trigger_ids: List(String),
) -> slackline.Call(FeaturedSet, Nil)

workflows.featured.set: Set featured workflows for a channel.

workflows.FeaturedSet identifies this method in slackline.Call.

Bot token scopes: bookmarks:write. User token scopes: bookmarks:write.

Rate limit tier: t2.

Documented errors: error_modifying_workflows, method_not_supported, restricted_action.

pub fn featured_trigger_decoder() -> decode.Decoder(
  FeaturedTrigger,
)

Decodes FeaturedTrigger from json.

pub fn featured_trigger_to_json(it: FeaturedTrigger) -> json.Json

Encodes FeaturedTrigger as json.

pub fn trigger_permission_type_decoder() -> decode.Decoder(
  TriggerPermissionType,
)

Decodes TriggerPermissionType from a json string.

pub fn trigger_permission_type_from_string(
  string: String,
) -> TriggerPermissionType

Parses TriggerPermissionType from its json string.

pub fn trigger_permission_type_to_json(
  it: TriggerPermissionType,
) -> json.Json

Encodes TriggerPermissionType as a json string.

pub fn trigger_permission_type_to_string(
  it: TriggerPermissionType,
) -> String

The json string of TriggerPermissionType.

pub fn trigger_permissions_decoder() -> decode.Decoder(
  TriggerPermissions,
)

Decodes TriggerPermissions from json.

pub fn trigger_permissions_to_json(
  it: TriggerPermissions,
) -> json.Json

Encodes TriggerPermissions as json.

pub fn triggers_permissions_add(
  trigger_id trigger_id: String,
) -> slackline.Call(TriggersPermissionsAdd, TriggerPermissions)

workflows.triggers.permissions.add: Allows users to run a trigger that has its permission type set to named_entities

workflows.TriggersPermissionsAdd identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/workflows/triggers_permissions_add.

Bot token scopes: triggers:write.

Rate limit tier: t3.

Documented errors: channel_not_found, connected_org_denied, connected_team_denied, connected_user_denied, invalid_permission_type, no_valid_named_entities, org_not_connected, org_not_found, shared_channel_denied, team_not_connected, team_not_found, too_many_named_entities, trigger_not_found, unknown_method, user_not_found.

pub fn triggers_permissions_list(
  trigger_id trigger_id: String,
) -> slackline.Call(TriggersPermissionsList, TriggerPermissions)

workflows.triggers.permissions.list: Returns the permission type of a trigger and if applicable, includes the entities that have been granted access

workflows.TriggersPermissionsList identifies this method in slackline.Call.

Bot token scopes: triggers:read.

Rate limit tier: t3.

Documented errors: trigger_not_found, unknown_method.

pub fn triggers_permissions_remove(
  trigger_id trigger_id: String,
) -> slackline.Call(TriggersPermissionsRemove, TriggerPermissions)

workflows.triggers.permissions.remove: Revoke an entity’s access to a trigger that has its permission type set to named_entities

workflows.TriggersPermissionsRemove identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/workflows/triggers_permissions_remove.

Bot token scopes: triggers:write.

Rate limit tier: t3.

Documented errors: connected_org_denied, connected_team_denied, connected_user_denied, invalid_permission_type, named_entities_cannot_be_empty, org_not_connected, org_not_found, shared_channel_denied, too_many_named_entities, trigger_not_found, unknown_method.

pub fn triggers_permissions_set(
  trigger_id trigger_id: String,
  permission_type permission_type: TriggerPermissionType,
) -> slackline.Call(TriggersPermissionsSet, TriggerPermissions)

workflows.triggers.permissions.set: Set the permission type for who can run a trigger

workflows.TriggersPermissionsSet identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/workflows/triggers_permissions_set.

Bot token scopes: triggers:write.

Rate limit tier: t3.

Documented errors: channel_not_found, connected_org_denied, connected_team_denied, connected_user_denied, external_workspace_denied, invalid_permission_type, named_entities_cannot_be_empty, no_valid_named_entities, org_not_connected, org_not_found, shared_channel_denied, team_not_connected, team_not_found, too_many_named_entities, trigger_not_found, unknown_method, user_not_found.

✨ Search Document