-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
web-api: public canvas APIs #1813
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1813 +/- ##
==========================================
+ Coverage 81.62% 81.76% +0.13%
==========================================
Files 35 35
Lines 7684 7742 +58
Branches 316 316
==========================================
+ Hits 6272 6330 +58
Misses 1400 1400
Partials 12 12
Flags with carried forward coverage won't be shown. Click here to find out more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tester script and instructs are much appreciated!
I think we could even start making a habit of sharing manifest setups to make getting configured for testing even smoother (ended up needing to add scopes). Here's mine:
This also forced me to update my terribly out of date node version to boot 🙇 🚀
Adds several new Canvas APIs: create, edit, delete, sections.lookup, access.delete, access.set and conversations.canvases.create.
The response shapes were generated using slackapi/java-slack-sdk#1322
Manual Testing
To give this PR a try, check out this branch locally, then you can add a
test.ts
to thepackages/web-api
directory that is the following code. It exercises the various Canvas APIs: creates a canvas, sets access on it, looks up sections on it, edits it, and finally deletes it. You will need to export aSLACK_BOT_TOKEN
environment variable before running it, that is a bot token with at leastcanvases:write
,canvases:read
andfiles:read
scopes. This script code executes against the dev environment. Finally, make sure to adjust the channel and user IDs at the top of the script to match a channel and user ID in the workspace you are testing in.You can run it with
npx tsx test.ts
: