slackline/api/agents/conversations_set_view
This module is generated by gleam run -m slackline_codegen/generate. Do not edit it by hand.
Setters for the optional arguments of
agents.conversations.setView.
Each setter takes the call that agents.conversations_set_view returns and
sets one argument:
agents.conversations_set_view(channel_id: "channel_id")
|> conversations_set_view.type_("type_")
Values
pub fn access_level(
call: slackline.Call(agents.ConversationsSetView, r),
access_level: agents.ViewAccessLevel,
) -> slackline.Call(agents.ConversationsSetView, r)
For canvas views: access level granted to the channel for the canvas tab.
Defaults to write. Use comment to grant channel members comment access
(read and comment, no editing) so the agent remains the sole author of the
canvas text. Acceptable values: read write comment
pub fn agent_content_hash(
call: slackline.Call(agents.ConversationsSetView, r),
agent_content_hash: String,
) -> slackline.Call(agents.ConversationsSetView, r)
For canvas views: hash of the canvas-derived markdown the agent last
wrote, recorded so the agent can later detect human edits to the canvas.
Opaque to the server.
pub fn base_branch(
call: slackline.Call(agents.ConversationsSetView, r),
base_branch: String,
) -> slackline.Call(agents.ConversationsSetView, r)
For diff views: base branch name for display purposes.
pub fn blocks(
call: slackline.Call(agents.ConversationsSetView, r),
blocks: List(block.Block),
) -> slackline.Call(agents.ConversationsSetView, r)
Block Kit blocks to render in the view tab. Required when type is
block_kit.
pub fn canvas_id(
call: slackline.Call(agents.ConversationsSetView, r),
canvas_id: String,
) -> slackline.Call(agents.ConversationsSetView, r)
Encoded ID of the canvas to attach as the view. Required when type is
canvas; ignored otherwise.
pub fn content(
call: slackline.Call(agents.ConversationsSetView, r),
content: String,
) -> slackline.Call(agents.ConversationsSetView, r)
View content. For html, a full self-contained HTML document; for diff,
raw unified diff text. Capped at 1,000,000 bytes; larger content returns
content_too_large. The cap is enforced by the handler (not schema
maxLength) so the documented error code actually surfaces instead of a
generic argument-validation failure. Required when type is html or
diff.
pub fn csp(
call: slackline.Call(agents.ConversationsSetView, r),
csp: agents.ViewCsp,
) -> slackline.Call(agents.ConversationsSetView, r)
Content-Security-Policy domain declarations for the view.
pub fn head_branch(
call: slackline.Call(agents.ConversationsSetView, r),
head_branch: String,
) -> slackline.Call(agents.ConversationsSetView, r)
For diff views: head branch name for display purposes.
pub fn label(
call: slackline.Call(agents.ConversationsSetView, r),
label: String,
) -> slackline.Call(agents.ConversationsSetView, r)
Deprecated alias for name. Display label for the view tab. Defaults to the
last path segment of view_key, stripped of any .html or .htm
extension.
pub fn name(
call: slackline.Call(agents.ConversationsSetView, r),
name: String,
) -> slackline.Call(agents.ConversationsSetView, r)
Display label for the view tab. Preferred over the legacy label argument
(name wins if both are supplied). Defaults to the last path segment of
view_key, stripped of any .html or .htm extension.
pub fn type_(
call: slackline.Call(agents.ConversationsSetView, r),
type_: String,
) -> slackline.Call(agents.ConversationsSetView, r)
The kind of view to create or update. Defaults to html. Determines which
other arguments are required: html and diff require content,
block_kit requires blocks, and canvas requires canvas_id. Defaults
to html.
pub fn view_key(
call: slackline.Call(agents.ConversationsSetView, r),
view_key: String,
) -> slackline.Call(agents.ConversationsSetView, r)
Agent-assigned stable identity for the view (e.g. the source file path on
the agent’s machine). Used as the upsert key: calls with the same view_key
update the same view. Required for html, block_kit, and canvas views;
ignored for diff (a diff view is a per-channel singleton).