slackline/common
This module is generated by gleam run -m slackline_codegen/generate. Do not edit it by hand.
Types that more than one module uses, such as reactions (on messages and files) and the enums that several Web API families share.
Types
The severity of an app activity log entry.
pub type ActivityLogLevel {
LogLevelTrace
LogLevelDebug
LogLevelInfo
LogLevelWarn
LogLevelError
LogLevelFatal
UnknownActivityLogLevel(String)
}
Constructors
-
LogLevelTracetrace -
LogLevelDebugdebug -
LogLevelInfoinfo -
LogLevelWarnwarn -
LogLevelErrorerror -
LogLevelFatalfatal -
UnknownActivityLogLevel(String)A value that this version of slackline does not know.
One log entry from apps.activities.list or admin.apps.activities.list.
pub type AppActivity {
AppActivity(
app_id: option.Option(String),
level: option.Option(ActivityLogLevel),
event_type: option.Option(String),
source: option.Option(String),
component_type: option.Option(String),
component_id: option.Option(String),
payload: option.Option(value.Value),
created: option.Option(Int),
trace_id: option.Option(String),
)
}
Constructors
-
AppActivity( app_id: option.Option(String), level: option.Option(ActivityLogLevel), event_type: option.Option(String), source: option.Option(String), component_type: option.Option(String), component_id: option.Option(String), payload: option.Option(value.Value), created: option.Option(Int), trace_id: option.Option(String), )Arguments
- level
-
The severity of the entry.
- event_type
-
Such as
function_execution_startedorworkflow_execution_result. - source
-
slackordeveloper. - component_type
-
events_api,workflows,functionsortables. - component_id
-
FnXXXXXXfor functions,WfXXXXXXfor workflows. - payload
-
Event details. The shape depends on
event_type. - created
-
When the entry was logged (epoch microseconds).
- trace_id
-
The trace ID of the event.
Canvas content. Only markdown is supported, limited to 1 MiB.
pub type CanvasDocumentContent {
CanvasDocumentContent(markdown: String)
}
Constructors
-
CanvasDocumentContent(markdown: String)Arguments
- markdown
-
The markdown content of the canvas, up to 1,048,576 characters.
How the token is being granted.
pub type GrantType {
AuthorizationCode
RefreshToken
}
Constructors
-
AuthorizationCodeauthorization_code -
RefreshTokenrefresh_token
A reaction on a message, file or file comment.
pub type Reaction {
Reaction(
name: String,
count: option.Option(Int),
users: option.Option(List(String)),
url: option.Option(String),
)
}
Constructors
-
Reaction( name: String, count: option.Option(Int), users: option.Option(List(String)), url: option.Option(String), )Arguments
- name
-
The emoji name, without colons.
- count
-
The total number of users who reacted. It can be more than the length of
users. - users
-
A possibly incomplete list of users who reacted. The calling user is always included if they reacted.
How to sort search results.
pub type SearchSort {
SortByScore
SortByTimestamp
}
Constructors
-
SortByScorescore -
SortByTimestamptimestamp
The category of a Slackbot skill.
pub type SkillCategory {
Communication
CustomerSupport
DataAndAnalytics
Engineering
ProductManagement
Productivity
ProfessionalDevelopment
ProjectManagement
Sales
System
TeamManagement
Other
UnknownSkillCategory(String)
}
Constructors
-
Communicationcommunication -
CustomerSupportcustomer_support -
DataAndAnalyticsdata_and_analytics -
Engineeringengineering -
ProductManagementproduct_management -
Productivityproductivity -
ProfessionalDevelopmentprofessional_development -
ProjectManagementproject_management -
Salessales -
Systemsystem -
TeamManagementteam_management -
Otherother -
UnknownSkillCategory(String)A value that this version of slackline does not know.
The order to sort results in.
pub type SortDirection {
Ascending
Descending
}
Constructors
-
Ascendingasc -
Descendingdesc
Values
pub fn activity_log_level_decoder() -> decode.Decoder(
ActivityLogLevel,
)
Decodes ActivityLogLevel from a json string.
pub fn activity_log_level_from_string(
string: String,
) -> ActivityLogLevel
Parses ActivityLogLevel from its json string.
pub fn activity_log_level_to_json(
it: ActivityLogLevel,
) -> json.Json
Encodes ActivityLogLevel as a json string.
pub fn activity_log_level_to_string(
it: ActivityLogLevel,
) -> String
The json string of ActivityLogLevel.
pub fn app_activity_decoder() -> decode.Decoder(AppActivity)
Decodes AppActivity from json.
pub fn app_activity_to_json(it: AppActivity) -> json.Json
Encodes AppActivity as json.
pub fn canvas_document_content_decoder() -> decode.Decoder(
CanvasDocumentContent,
)
Decodes CanvasDocumentContent from json.
pub fn canvas_document_content_to_json(
it: CanvasDocumentContent,
) -> json.Json
Encodes CanvasDocumentContent as json.
pub fn grant_type_decoder() -> decode.Decoder(GrantType)
Decodes GrantType from a json string.
pub fn grant_type_from_string(
string: String,
) -> Result(GrantType, Nil)
Parses GrantType from its json string.
pub fn grant_type_to_string(it: GrantType) -> String
The json string of GrantType.
pub fn reaction_decoder() -> decode.Decoder(Reaction)
Decodes Reaction from json.
pub fn search_sort_decoder() -> decode.Decoder(SearchSort)
Decodes SearchSort from a json string.
pub fn search_sort_from_string(
string: String,
) -> Result(SearchSort, Nil)
Parses SearchSort from its json string.
pub fn search_sort_to_json(it: SearchSort) -> json.Json
Encodes SearchSort as a json string.
pub fn search_sort_to_string(it: SearchSort) -> String
The json string of SearchSort.
pub fn skill_category_decoder() -> decode.Decoder(SkillCategory)
Decodes SkillCategory from a json string.
pub fn skill_category_from_string(
string: String,
) -> SkillCategory
Parses SkillCategory from its json string.
pub fn skill_category_to_json(it: SkillCategory) -> json.Json
Encodes SkillCategory as a json string.
pub fn skill_category_to_string(it: SkillCategory) -> String
The json string of SkillCategory.
pub fn sort_direction_decoder() -> decode.Decoder(SortDirection)
Decodes SortDirection from a json string.
pub fn sort_direction_from_string(
string: String,
) -> Result(SortDirection, Nil)
Parses SortDirection from its json string.
pub fn sort_direction_to_json(it: SortDirection) -> json.Json
Encodes SortDirection as a json string.
pub fn sort_direction_to_string(it: SortDirection) -> String
The json string of SortDirection.