slackline/api/admin/workflows

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

Admin API methods for managing workflows and trigger permissions across an org.

Types

A workflow, as returned by admin.workflows.search.

pub type AdminWorkflow {
  AdminWorkflow(
    id: String,
    workflow_function_id: option.Option(String),
    callback_id: option.Option(String),
    title: option.Option(String),
    description: option.Option(String),
    input_parameters: option.Option(
      dict.Dict(String, WorkflowInputParameter),
    ),
    steps: option.Option(List(AdminWorkflowStep)),
    collaborators: option.Option(List(String)),
    icons: option.Option(WorkflowIcons),
    is_published: option.Option(Bool),
    last_updated_by: option.Option(String),
    unpublished_change_count: option.Option(Int),
    app_id: option.Option(String),
    source: option.Option(WorkflowSource),
    billing_type: option.Option(String),
    date_updated: option.Option(Int),
    is_billable: option.Option(Bool),
    creation_source_type: option.Option(Int),
    creation_source_id: option.Option(String),
    last_published_version_id: option.Option(String),
    last_published_date: option.Option(String),
    trigger_ids: option.Option(List(String)),
    is_sales_home_workflow: option.Option(Bool),
    is_sales_elevate: option.Option(Bool),
    trigger_types: option.Option(List(WorkflowTriggerType)),
  )
}

Constructors

A step of a workflow, as returned by admin.workflows.search.

pub type AdminWorkflowStep {
  AdminWorkflowStep(
    id: String,
    function_id: option.Option(String),
    inputs: option.Option(dict.Dict(String, WorkflowStepInput)),
  )
}

Constructors

Identifies admin.workflows.collaborators.add in the slackline.Call that collaborators_add returns.

pub type CollaboratorsAdd

Identifies admin.workflows.collaborators.remove in the slackline.Call that collaborators_remove returns.

pub type CollaboratorsRemove

Who has access to a trigger type.

pub type PermissionVisibility {
  Everyone
  NamedEntities
  NoOne
  UnknownPermissionVisibility(String)
}

Constructors

  • Everyone

    everyone

  • NamedEntities

    named_entities

  • NoOne

    no_one

  • UnknownPermissionVisibility(String)

    A value that this version of slackline does not know.

Identifies admin.workflows.permissions.lookup in the slackline.Call that permissions_lookup returns.

pub type PermissionsLookup

A successful response from admin.workflows.permissions.lookup.

pub type PermissionsLookupResponse {
  PermissionsLookupResponse(
    permissions: option.Option(value.Value),
    complete: option.Option(Bool),
  )
}

Constructors

  • PermissionsLookupResponse(
      permissions: option.Option(value.Value),
      complete: option.Option(Bool),
    )

    Arguments

    permissions

    Run permissions per workflow ID.

    complete

    false when only a subset of triggers was checked (see max_workflow_triggers).

Identifies admin.workflows.search in the slackline.Call that search returns.

pub type Search

A successful response from admin.workflows.search.

pub type SearchResponse {
  SearchResponse(
    total_found: option.Option(Int),
    workflows: option.Option(List(AdminWorkflow)),
    response_metadata: option.Option(slackline.ResponseMetadata),
  )
}

Constructors

One permission to set on a trigger type with admin.workflows.triggers.types.permissions.set.

pub type TriggerPermissionInput {
  TriggerPermissionInput(
    type_: TriggerPermissionKind,
    visibility: PermissionVisibility,
    user_ids: option.Option(List(String)),
    team_ids: option.Option(List(String)),
    org_ids: option.Option(List(String)),
  )
}

Constructors

  • TriggerPermissionInput(
      type_: TriggerPermissionKind,
      visibility: PermissionVisibility,
      user_ids: option.Option(List(String)),
      team_ids: option.Option(List(String)),
      org_ids: option.Option(List(String)),
    )

    Arguments

    type_

    The type of permission.

    visibility

    Who has access. named_entities needs at least one ID list.

    user_ids

    User IDs to allow (max 50).

    team_ids

    Workspace IDs to allow (max 50).

    org_ids

    Enterprise IDs to allow.

The kind of access a trigger type permission controls.

pub type TriggerPermissionKind {
  TriggerType
  PrivateChannelAccess
  PrivateChannelMessageAccess
  UnknownTriggerPermissionKind(String)
}

Constructors

  • TriggerType

    Trigger access permission.

  • PrivateChannelAccess

    Access to private channels.

  • PrivateChannelMessageAccess

    Access to text from messages in private channels.

  • UnknownTriggerPermissionKind(String)

    A value that this version of slackline does not know.

One granular permission of a trigger type.

pub type TriggerTypePermission {
  TriggerTypePermission(
    type_: option.Option(TriggerPermissionKind),
    permission: option.Option(PermissionVisibility),
    user_ids: option.Option(List(String)),
    team_ids: option.Option(List(String)),
    org_ids: option.Option(List(String)),
  )
}

Constructors

The permissions of a trigger type. Legacy responses carry permission and ID lists. Granular responses carry the permissions array instead.

pub type TriggerTypePermissions {
  TriggerTypePermissions(
    permission: option.Option(PermissionVisibility),
    user_ids: option.Option(List(String)),
    team_ids: option.Option(List(String)),
    org_ids: option.Option(List(String)),
    permissions: option.Option(List(TriggerTypePermission)),
  )
}

Constructors

Identifies admin.workflows.triggers.types.permissions.lookup in the slackline.Call that triggers_types_permissions_lookup returns.

pub type TriggersTypesPermissionsLookup

A successful response from admin.workflows.triggers.types.permissions.lookup.

pub type TriggersTypesPermissionsLookupResponse {
  TriggersTypesPermissionsLookupResponse(
    permissions: option.Option(
      dict.Dict(String, TriggerTypePermissions),
    ),
    metadata: option.Option(value.Value),
  )
}

Constructors

Identifies admin.workflows.triggers.types.permissions.set in the slackline.Call that triggers_types_permissions_set returns.

pub type TriggersTypesPermissionsSet

Identifies admin.workflows.unpublish in the slackline.Call that unpublish returns.

pub type Unpublish

Icons of a workflow.

pub type WorkflowIcons {
  WorkflowIcons(
    image_96: option.Option(String),
    image_192: option.Option(String),
  )
}

Constructors

An input parameter of a workflow.

pub type WorkflowInputParameter {
  WorkflowInputParameter(
    type_: option.Option(String),
    name: option.Option(String),
    title: option.Option(String),
    description: option.Option(String),
    is_required: option.Option(Bool),
  )
}

Constructors

Filter workflows by whether they are published.

pub type WorkflowPublishStatus {
  AnyPublishStatus
  Published
  Unpublished
}

Constructors

  • AnyPublishStatus

    all

  • Published

    published

  • Unpublished

    unpublished

How to sort workflows.

pub type WorkflowSort {
  SortByName
}

Constructors

  • SortByName

    name

Where a workflow was created.

pub type WorkflowSource {
  App
  Code
  WorkflowBuilder
  SalesHome
  Agent
  UnknownWorkflowSource(String)
}

Constructors

  • App

    app

  • Code

    code

  • WorkflowBuilder

    workflow_builder

  • SalesHome

    sales_home

  • Agent

    agent

  • UnknownWorkflowSource(String)

    A value that this version of slackline does not know.

A configured input of a workflow step.

pub type WorkflowStepInput {
  WorkflowStepInput(
    value: option.Option(value.Value),
    locked: option.Option(Bool),
  )
}

Constructors

  • WorkflowStepInput(
      value: option.Option(value.Value),
      locked: option.Option(Bool),
    )

    Arguments

    value

    The input value: any json, often a string with {{...}} references.

    locked

    Whether the input is locked.

A trigger type used by a workflow.

pub type WorkflowTriggerType {
  WorkflowTriggerType(
    id: option.Option(String),
    type_: option.Option(String),
    subtype: option.Option(String),
  )
}

Constructors

  • WorkflowTriggerType(
      id: option.Option(String),
      type_: option.Option(String),
      subtype: option.Option(String),
    )

    Arguments

    type_

    Such as event or shortcut.

    subtype

    For event triggers, the event, such as slack#/events/reaction_added.

Values

pub fn admin_workflow_decoder() -> decode.Decoder(AdminWorkflow)

Decodes AdminWorkflow from json.

pub fn admin_workflow_step_decoder() -> decode.Decoder(
  AdminWorkflowStep,
)

Decodes AdminWorkflowStep from json.

pub fn admin_workflow_step_to_json(
  it: AdminWorkflowStep,
) -> json.Json

Encodes AdminWorkflowStep as json.

pub fn admin_workflow_to_json(it: AdminWorkflow) -> json.Json

Encodes AdminWorkflow as json.

pub fn collaborators_add(
  workflow_ids workflow_ids: List(String),
  collaborator_ids collaborator_ids: List(String),
) -> slackline.Call(CollaboratorsAdd, Nil)

admin.workflows.collaborators.add: Add collaborators to workflows within the team or enterprise

workflows.CollaboratorsAdd identifies this method in slackline.Call.

User token scopes: admin.workflows:write.

Rate limit tier: t2.

Documented errors: error_adding_collaborators, not_allowed.

pub fn collaborators_remove(
  workflow_ids workflow_ids: List(String),
  collaborator_ids collaborator_ids: List(String),
) -> slackline.Call(CollaboratorsRemove, Nil)

admin.workflows.collaborators.remove: Remove collaborators from workflows within the team or enterprise

workflows.CollaboratorsRemove identifies this method in slackline.Call.

User token scopes: admin.workflows:write.

Rate limit tier: t2.

Documented errors: error_removing_collaborators, not_allowed.

pub fn permission_visibility_decoder() -> decode.Decoder(
  PermissionVisibility,
)

Decodes PermissionVisibility from a json string.

pub fn permission_visibility_from_string(
  string: String,
) -> PermissionVisibility

Parses PermissionVisibility from its json string.

pub fn permission_visibility_to_json(
  it: PermissionVisibility,
) -> json.Json

Encodes PermissionVisibility as a json string.

pub fn permission_visibility_to_string(
  it: PermissionVisibility,
) -> String

The json string of PermissionVisibility.

pub fn permissions_lookup(
  workflow_ids workflow_ids: List(String),
) -> slackline.Call(PermissionsLookup, PermissionsLookupResponse)

admin.workflows.permissions.lookup: Look up the permissions for a set of workflows

workflows.PermissionsLookup identifies this method in slackline.Call.

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

User token scopes: admin.workflows:read.

Rate limit tier: t2.

pub fn permissions_lookup_response_decoder() -> decode.Decoder(
  PermissionsLookupResponse,
)

Decodes the response from admin.workflows.permissions.lookup.

pub fn search() -> slackline.Call(Search, SearchResponse)

admin.workflows.search: Search workflows within the team or enterprise

workflows.Search identifies this method in slackline.Call.

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

User token scopes: admin.workflows:read.

Rate limit tier: t2.

Documented errors: invalid_cursor, not_allowed.

pub fn search_response_decoder() -> decode.Decoder(SearchResponse)

Decodes the response from admin.workflows.search.

pub fn trigger_permission_input_decoder() -> decode.Decoder(
  TriggerPermissionInput,
)

Decodes TriggerPermissionInput from json.

pub fn trigger_permission_input_to_json(
  it: TriggerPermissionInput,
) -> json.Json

Encodes TriggerPermissionInput as json.

pub fn trigger_permission_kind_decoder() -> decode.Decoder(
  TriggerPermissionKind,
)

Decodes TriggerPermissionKind from a json string.

pub fn trigger_permission_kind_from_string(
  string: String,
) -> TriggerPermissionKind

Parses TriggerPermissionKind from its json string.

pub fn trigger_permission_kind_to_json(
  it: TriggerPermissionKind,
) -> json.Json

Encodes TriggerPermissionKind as a json string.

pub fn trigger_permission_kind_to_string(
  it: TriggerPermissionKind,
) -> String

The json string of TriggerPermissionKind.

pub fn trigger_type_permission_decoder() -> decode.Decoder(
  TriggerTypePermission,
)

Decodes TriggerTypePermission from json.

pub fn trigger_type_permission_to_json(
  it: TriggerTypePermission,
) -> json.Json

Encodes TriggerTypePermission as json.

pub fn trigger_type_permissions_decoder() -> decode.Decoder(
  TriggerTypePermissions,
)

Decodes TriggerTypePermissions from json.

pub fn trigger_type_permissions_to_json(
  it: TriggerTypePermissions,
) -> json.Json

Encodes TriggerTypePermissions as json.

pub fn triggers_types_permissions_lookup(
  trigger_type_ids trigger_type_ids: List(String),
) -> slackline.Call(
  TriggersTypesPermissionsLookup,
  TriggersTypesPermissionsLookupResponse,
)

admin.workflows.triggers.types.permissions.lookup: List the permissions for using each trigger type

workflows.TriggersTypesPermissionsLookup identifies this method in slackline.Call.

User token scopes: client.

Rate limit tier: t2.

Documented errors: restricted_action, trigger_type_id_not_found.

pub fn triggers_types_permissions_lookup_response_decoder() -> decode.Decoder(
  TriggersTypesPermissionsLookupResponse,
)

Decodes the response from admin.workflows.triggers.types.permissions.lookup.

pub fn triggers_types_permissions_set(
  id id: String,
) -> slackline.Call(TriggersTypesPermissionsSet, Nil)

admin.workflows.triggers.types.permissions.set: Set the permissions for using a trigger type

workflows.TriggersTypesPermissionsSet identifies this method in slackline.Call.

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

User token scopes: client.

Rate limit tier: t3.

Documented errors: invalid_named_entities, invalid_permission_set, invalid_permission_type, required_visibility, restricted_action, trigger_type_id_not_found, user_not_found, visibility_is_not_named_entities.

pub fn unpublish(
  workflow_ids workflow_ids: List(String),
) -> slackline.Call(Unpublish, Nil)

admin.workflows.unpublish: Unpublish workflows within the team or enterprise

workflows.Unpublish identifies this method in slackline.Call.

User token scopes: admin.workflows:write.

Rate limit tier: t2.

Documented errors: error_unpublishing_workflows, not_allowed.

pub fn workflow_icons_decoder() -> decode.Decoder(WorkflowIcons)

Decodes WorkflowIcons from json.

pub fn workflow_icons_to_json(it: WorkflowIcons) -> json.Json

Encodes WorkflowIcons as json.

pub fn workflow_input_parameter_decoder() -> decode.Decoder(
  WorkflowInputParameter,
)

Decodes WorkflowInputParameter from json.

pub fn workflow_input_parameter_to_json(
  it: WorkflowInputParameter,
) -> json.Json

Encodes WorkflowInputParameter as json.

pub fn workflow_publish_status_decoder() -> decode.Decoder(
  WorkflowPublishStatus,
)

Decodes WorkflowPublishStatus from a json string.

pub fn workflow_publish_status_from_string(
  string: String,
) -> Result(WorkflowPublishStatus, Nil)

Parses WorkflowPublishStatus from its json string.

pub fn workflow_publish_status_to_json(
  it: WorkflowPublishStatus,
) -> json.Json

Encodes WorkflowPublishStatus as a json string.

pub fn workflow_publish_status_to_string(
  it: WorkflowPublishStatus,
) -> String

The json string of WorkflowPublishStatus.

pub fn workflow_sort_decoder() -> decode.Decoder(WorkflowSort)

Decodes WorkflowSort from a json string.

pub fn workflow_sort_from_string(
  string: String,
) -> Result(WorkflowSort, Nil)

Parses WorkflowSort from its json string.

pub fn workflow_sort_to_json(it: WorkflowSort) -> json.Json

Encodes WorkflowSort as a json string.

pub fn workflow_sort_to_string(it: WorkflowSort) -> String

The json string of WorkflowSort.

pub fn workflow_source_decoder() -> decode.Decoder(WorkflowSource)

Decodes WorkflowSource from a json string.

pub fn workflow_source_from_string(
  string: String,
) -> WorkflowSource

Parses WorkflowSource from its json string.

pub fn workflow_source_to_json(it: WorkflowSource) -> json.Json

Encodes WorkflowSource as a json string.

pub fn workflow_source_to_string(it: WorkflowSource) -> String

The json string of WorkflowSource.

pub fn workflow_step_input_decoder() -> decode.Decoder(
  WorkflowStepInput,
)

Decodes WorkflowStepInput from json.

pub fn workflow_step_input_to_json(
  it: WorkflowStepInput,
) -> json.Json

Encodes WorkflowStepInput as json.

pub fn workflow_trigger_type_decoder() -> decode.Decoder(
  WorkflowTriggerType,
)

Decodes WorkflowTriggerType from json.

pub fn workflow_trigger_type_to_json(
  it: WorkflowTriggerType,
) -> json.Json

Encodes WorkflowTriggerType as json.

✨ Search Document