Closed rafaelamsili closed 6 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 98.35%. Comparing base (
9de72ce
) to head (e47b971
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary
This PR add the new deno-sdk built in Slack functions for canvas
Also adds new primitives types:
slack#/types/canvas_id
id of the canvasslack#/types/canvas_template_id
id of a canvas templateslack#/types/expanded_rich_text
is similar to rich text but in the future will support extra typesNotes
Requirements
Manifest
In order to use the Canvas deno-sdk function its required to enable
appHome
and setmessagesTabEnabled
to true andmessagesTabReadOnlyEnabled
to false. This is required since Canvas Sharing require sending messages in order to Share and transfer ownership of canvasesCreate Canvas
For creating a canvas a user will need to set the
canvas_create_type
toblank
ortemplate
, it defaults toblank
is if not passed. In case thattemplate
is set then the user will have to providecanvas_template_id
, in which case the canvas will copy the template to the newly created standalone canvasCreate Channel Canvas
For creating a channels canvas a user will need to set the
canvas_create_type
toblank
ortemplate
, it defaults toblank
is if not passed. In case thattemplate
is set then the user will have to providecanvas_template_id
, in which case the canvas will copy the template to the newly created channel canvasUpdate Canvas Content
For updating the canvas content the
canvas_update_type
will determine if the user want to update a standalone canvas or a channel canvas, by default if is not set it will be treated asstandalone
. If the user setstandalone
then acanvas_id
need to be provided, otherwise if the user setchannel_canvas
it will need to provide achannel_id
of the channel canvas that the user want to update.If the user set the
section_id
then the content will be updated to the top of bottom of the section, this is the section_id of the heading sections, otherwise if is not set the content will be updated to the top or bottom of the canvasTesting
Create an app using the functions and see that it perform the actions
deno task test
after making the changes.