Skip to content
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

Add Support for App Manifest Endpoints #1355

Merged

Conversation

misscoded
Copy link
Contributor

Summary

This pull request introduces support for the App Manifest endpoints, including:

apps.manifest.create
apps.manifest.delete
apps.manifest.export
apps.manifest.update
apps.manifest.validate
tooling.tokens.rotate

WebAPICallResult should be switched out when the API responses become available and the generated types are updated.

Requirements (place an x in each [ ])

@misscoded misscoded added enhancement M-T: A feature request for new functionality pkg:web-api applies to `@slack/web-api` labels Oct 6, 2021
@seratch
Copy link
Member

seratch commented Oct 6, 2021

The changes look good to me. If you have more time, can you add a test script under prod-server-integration-tests for easily running end-to-end tests with the endpoints? As the endpoints are not yet available in production, we can set the dev environment base URL from an env variable as below:

const { WebClient } = require('@slack/web-api');
const options = {};
if (process.env.SLACK_SDK_TEST_DEV_API_URL !== undefined) {
  options.slackApiUrl = process.env.SLACK_SDK_TEST_DEV_API_URL;
}
const client = new WebClient(process.env.SLACK_SDK_TEST_TOOLING_TOKEN, options);
// perform API calls below ...

options.slackApiUrl = process.env.SLACK_SDK_TEST_DEV_API_URL;
}

const client = new WebClient(BOT_TOKEN, options);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seratch For the test script, I kept the bot token as the "main" token, and used the tooling token in an override manner, as I assume this is how most folks would use it in practice. Let me know if you think otherwise

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as both ways (1: passing in constructor 2: passing as argument) work, it's fine.

@misscoded misscoded merged commit fc4791e into slackapi:feat-app-manifests Oct 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement M-T: A feature request for new functionality pkg:web-api applies to `@slack/web-api`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants