slackline/api/functions

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

Custom functions: complete function executions, manage distribution permissions and inspect workflow steps.

Types

Identifies functions.completeError in the slackline.Call that complete_error returns.

pub type CompleteError

Identifies functions.completeSuccess in the slackline.Call that complete_success returns.

pub type CompleteSuccess

Identifies functions.distributions.permissions.add in the slackline.Call that distributions_permissions_add returns.

pub type DistributionsPermissionsAdd

Identifies functions.distributions.permissions.list in the slackline.Call that distributions_permissions_list returns.

pub type DistributionsPermissionsList

Identifies functions.distributions.permissions.remove in the slackline.Call that distributions_permissions_remove returns.

pub type DistributionsPermissionsRemove

Identifies functions.distributions.permissions.set in the slackline.Call that distributions_permissions_set returns.

pub type DistributionsPermissionsSet

The permission type of a function and, if applicable, the users with access.

pub type FunctionDistributionPermissions {
  FunctionDistributionPermissions(
    permission_type: option.Option(FunctionPermissionType),
    users: option.Option(List(FunctionPermissionUser)),
  )
}

Constructors

Who can use a custom function in their workflows.

pub type FunctionPermissionType {
  Everyone
  AppCollaborators
  NamedEntities
  System
  UnknownFunctionPermissionType(String)
}

Constructors

  • Everyone

    everyone

  • AppCollaborators

    app_collaborators

  • NamedEntities

    named_entities

  • System

    system

  • UnknownFunctionPermissionType(String)

    A value that this version of slackline does not know.

A user granted access to a custom function.

pub type FunctionPermissionUser {
  FunctionPermissionUser(
    user_id: String,
    username: option.Option(String),
    email: option.Option(String),
  )
}

Constructors

A workflow step that uses a function.

pub type WorkflowStepVersion {
  WorkflowStepVersion(
    title: option.Option(String),
    workflow_id: option.Option(String),
    step_id: String,
    is_deleted: option.Option(Bool),
    workflow_version_created: option.Option(String),
  )
}

Constructors

  • WorkflowStepVersion(
      title: option.Option(String),
      workflow_id: option.Option(String),
      step_id: String,
      is_deleted: option.Option(Bool),
      workflow_version_created: option.Option(String),
    )

    Arguments

    title

    Title of the step.

    step_id

    ID of the step within the workflow.

    is_deleted

    Whether the step has been deleted.

    workflow_version_created

    When the workflow version containing the step was created.

Identifies functions.workflows.steps.list in the slackline.Call that workflows_steps_list returns.

pub type WorkflowsStepsList

A successful response from functions.workflows.steps.list.

pub type WorkflowsStepsListResponse {
  WorkflowsStepsListResponse(
    steps_versions: option.Option(List(WorkflowStepVersion)),
  )
}

Constructors

  • WorkflowsStepsListResponse(
      steps_versions: option.Option(List(WorkflowStepVersion)),
    )

    Arguments

    steps_versions

    Steps that use the function, across workflow versions.

Identifies functions.workflows.steps.responses.export in the slackline.Call that workflows_steps_responses_export returns.

pub type WorkflowsStepsResponsesExport

Values

pub fn complete_error(
  function_execution_id function_execution_id: String,
  error error: String,
) -> slackline.Call(CompleteError, Nil)

functions.completeError: Signal that a function failed to complete

functions.CompleteError identifies this method in slackline.Call.

Rate limit tier: t3.

Documented errors: execution_not_in_running_state, function_execution_not_found, unknown_method.

pub fn complete_success(
  function_execution_id function_execution_id: String,
  outputs outputs: dict.Dict(String, value.Value),
) -> slackline.Call(CompleteSuccess, Nil)

functions.completeSuccess: Signal the successful completion of a function

functions.CompleteSuccess identifies this method in slackline.Call.

Rate limit tier: t3.

Documented errors: execution_not_in_running_state, function_execution_not_found, parameter_validation_failed, unknown_method.

pub fn distributions_permissions_add() -> slackline.Call(
  DistributionsPermissionsAdd,
  FunctionDistributionPermissions,
)

functions.distributions.permissions.add: Grant users access to a custom slack function if its permission_type is set to named_entities

functions.DistributionsPermissionsAdd identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/functions/distributions_permissions_add.

Rate limit tier: t3.

Documented errors: app_edit_disabled, app_not_found, function_not_found, invalid_permission_type, unknown_method, user_not_found.

pub fn distributions_permissions_list() -> slackline.Call(
  DistributionsPermissionsList,
  FunctionDistributionPermissions,
)

functions.distributions.permissions.list: List the access type of a custom slack function and include the users, team or org ids with access if its permission_type is set to named_entities

functions.DistributionsPermissionsList identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/functions/distributions_permissions_list.

Rate limit tier: t3.

Documented errors: app_not_found, function_not_found, unknown_method, user_not_found.

pub fn distributions_permissions_remove() -> slackline.Call(
  DistributionsPermissionsRemove,
  FunctionDistributionPermissions,
)

functions.distributions.permissions.remove: Revoke user access to a custom slack function if permission_type set to named_entities

functions.DistributionsPermissionsRemove identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/functions/distributions_permissions_remove.

Rate limit tier: t3.

Documented errors: app_not_found, function_not_found, invalid_permission_type, unknown_method, user_not_found.

pub fn distributions_permissions_set() -> slackline.Call(
  DistributionsPermissionsSet,
  FunctionDistributionPermissions,
)

functions.distributions.permissions.set: Set the access type of a custom slack function and define the users, team or org ids to be granted access if permission_type is set to named_entities

functions.DistributionsPermissionsSet identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/functions/distributions_permissions_set.

Rate limit tier: t3.

Documented errors: app_edit_disabled, app_not_found, function_not_found, invalid_named_entities, invalid_permission_type, permission_type_required, unknown_method, user_not_found.

pub fn function_distribution_permissions_decoder() -> decode.Decoder(
  FunctionDistributionPermissions,
)

Decodes FunctionDistributionPermissions from json.

pub fn function_distribution_permissions_to_json(
  it: FunctionDistributionPermissions,
) -> json.Json

Encodes FunctionDistributionPermissions as json.

pub fn function_permission_type_decoder() -> decode.Decoder(
  FunctionPermissionType,
)

Decodes FunctionPermissionType from a json string.

pub fn function_permission_type_from_string(
  string: String,
) -> FunctionPermissionType

Parses FunctionPermissionType from its json string.

pub fn function_permission_type_to_json(
  it: FunctionPermissionType,
) -> json.Json

Encodes FunctionPermissionType as a json string.

pub fn function_permission_type_to_string(
  it: FunctionPermissionType,
) -> String

The json string of FunctionPermissionType.

pub fn function_permission_user_decoder() -> decode.Decoder(
  FunctionPermissionUser,
)

Decodes FunctionPermissionUser from json.

pub fn function_permission_user_to_json(
  it: FunctionPermissionUser,
) -> json.Json

Encodes FunctionPermissionUser as json.

pub fn workflow_step_version_decoder() -> decode.Decoder(
  WorkflowStepVersion,
)

Decodes WorkflowStepVersion from json.

pub fn workflow_step_version_to_json(
  it: WorkflowStepVersion,
) -> json.Json

Encodes WorkflowStepVersion as json.

pub fn workflows_steps_list(
  function_id function_id: String,
) -> slackline.Call(
  WorkflowsStepsList,
  WorkflowsStepsListResponse,
)

functions.workflows.steps.list: List the steps of a specific function of a workflow’s versions

functions.WorkflowsStepsList identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/functions/workflows_steps_list.

Rate limit tier: t3.

Documented errors: cannot_fetch_versions, missing_step_ids, unknown_app_id, unknown_function_id, unknown_method, unknown_workflow_id.

pub fn workflows_steps_list_response_decoder() -> decode.Decoder(
  WorkflowsStepsListResponse,
)

Decodes the response from functions.workflows.steps.list.

pub fn workflows_steps_responses_export(
  step_id step_id: String,
) -> slackline.Call(WorkflowsStepsResponsesExport, Nil)

functions.workflows.steps.responses.export: Download form responses of a workflow

functions.WorkflowsStepsResponsesExport identifies this method in slackline.Call.

Set optional arguments with the functions in slackline/api/functions/workflows_steps_responses_export.

Rate limit tier: t3.

Documented errors: unknown_app_id, unknown_method, unknown_step_id, unknown_workflow_id, workflows_export_csv_not_enabled.

✨ Search Document