|
|
@@ -55,6 +55,8 @@ module.exports = (crowi) => {
|
|
|
* /slack-integration-legacy-setting/:
|
|
|
* get:
|
|
|
* tags: [SlackIntegrationLegacySetting]
|
|
|
+ * security:
|
|
|
+ * - cookieAuth: []
|
|
|
* description: Get slack configuration setting
|
|
|
* responses:
|
|
|
* 200:
|
|
|
@@ -63,9 +65,15 @@ module.exports = (crowi) => {
|
|
|
* application/json:
|
|
|
* schema:
|
|
|
* properties:
|
|
|
- * notificationParams:
|
|
|
+ * slackIntegrationParams:
|
|
|
* type: object
|
|
|
- * description: slack configuration setting params
|
|
|
+ * allOf:
|
|
|
+ * - $ref: '#/components/schemas/SlackConfigurationParams'
|
|
|
+ * - type: object
|
|
|
+ * properties:
|
|
|
+ * isSlackbotConfigured:
|
|
|
+ * type: boolean
|
|
|
+ * description: whether slackbot is configured
|
|
|
*/
|
|
|
router.get('/', loginRequiredStrictly, adminRequired, async(req, res) => {
|
|
|
|
|
|
@@ -84,20 +92,34 @@ module.exports = (crowi) => {
|
|
|
* /slack-integration-legacy-setting/:
|
|
|
* put:
|
|
|
* tags: [SlackIntegrationLegacySetting]
|
|
|
+ * security:
|
|
|
+ * - cookieAuth: []
|
|
|
* description: Update slack configuration setting
|
|
|
* requestBody:
|
|
|
* required: true
|
|
|
* content:
|
|
|
* application/json:
|
|
|
* schema:
|
|
|
- * $ref: '#/components/schemas/SlackConfigurationParams'
|
|
|
+ * properties:
|
|
|
+ * webhookUrl:
|
|
|
+ * type: string
|
|
|
+ * description: incoming webhooks url
|
|
|
+ * isIncomingWebhookPrioritized:
|
|
|
+ * type: boolean
|
|
|
+ * description: use incoming webhooks even if Slack App settings are enabled
|
|
|
+ * slackToken:
|
|
|
+ * type: string
|
|
|
+ * description: OAuth access token
|
|
|
* responses:
|
|
|
* 200:
|
|
|
* description: Succeeded to update slack configuration setting
|
|
|
* content:
|
|
|
* application/json:
|
|
|
* schema:
|
|
|
- * $ref: '#/components/schemas/SlackConfigurationParams'
|
|
|
+ * properties:
|
|
|
+ * responseParams:
|
|
|
+ * type: object
|
|
|
+ * $ref: '#/components/schemas/SlackConfigurationParams'
|
|
|
*/
|
|
|
router.put('/', loginRequiredStrictly, adminRequired, addActivity, validator.slackConfiguration, apiV3FormValidator, async(req, res) => {
|
|
|
|