|
@@ -170,32 +170,34 @@ module.exports = (crowi) => {
|
|
|
* description: Succeeded to get info.
|
|
* description: Succeeded to get info.
|
|
|
* content:
|
|
* content:
|
|
|
* application/json:
|
|
* application/json:
|
|
|
- * properties:
|
|
|
|
|
- * currentBotType:
|
|
|
|
|
- * type: string
|
|
|
|
|
- * settings:
|
|
|
|
|
- * type: object
|
|
|
|
|
- * properties:
|
|
|
|
|
- * slackSigningSecretEnvVars:
|
|
|
|
|
- * type: string
|
|
|
|
|
- * slackBotTokenEnvVars:
|
|
|
|
|
- * type: string
|
|
|
|
|
- * slackSigningSecret:
|
|
|
|
|
- * type: string
|
|
|
|
|
- * slackBotToken:
|
|
|
|
|
- * type: string
|
|
|
|
|
- * commandPermission:
|
|
|
|
|
- * type: object
|
|
|
|
|
- * eventActionsPermission:
|
|
|
|
|
- * type: object
|
|
|
|
|
- * proxyServerUri:
|
|
|
|
|
- * type: string
|
|
|
|
|
- * connectionStatuses:
|
|
|
|
|
- * type: object
|
|
|
|
|
- * errorMsg:
|
|
|
|
|
- * type: string
|
|
|
|
|
- * errorCode:
|
|
|
|
|
- * type: string
|
|
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * currentBotType:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * settings:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * slackSigningSecretEnvVars:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * slackBotTokenEnvVars:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * slackSigningSecret:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * slackBotToken:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * commandPermission:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * eventActionsPermission:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * proxyServerUri:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * connectionStatuses:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * errorMsg:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * errorCode:
|
|
|
|
|
+ * type: string
|
|
|
*/
|
|
*/
|
|
|
router.get('/', accessTokenParser, loginRequiredStrictly, adminRequired, async(req, res) => {
|
|
router.get('/', accessTokenParser, loginRequiredStrictly, adminRequired, async(req, res) => {
|
|
|
|
|
|
|
@@ -399,6 +401,7 @@ module.exports = (crowi) => {
|
|
|
* content:
|
|
* content:
|
|
|
* application/json:
|
|
* application/json:
|
|
|
* schema:
|
|
* schema:
|
|
|
|
|
+ * type: object
|
|
|
* properties:
|
|
* properties:
|
|
|
* slackSigningSecret:
|
|
* slackSigningSecret:
|
|
|
* type: string
|
|
* type: string
|
|
@@ -451,6 +454,7 @@ module.exports = (crowi) => {
|
|
|
* content:
|
|
* content:
|
|
|
* application/json:
|
|
* application/json:
|
|
|
* schema:
|
|
* schema:
|
|
|
|
|
+ * type: object
|
|
|
* properties:
|
|
* properties:
|
|
|
* commandPermission:
|
|
* commandPermission:
|
|
|
* type: object
|
|
* type: object
|
|
@@ -506,19 +510,21 @@ module.exports = (crowi) => {
|
|
|
* description: Succeeded to create slack app integration
|
|
* description: Succeeded to create slack app integration
|
|
|
* content:
|
|
* content:
|
|
|
* application/json:
|
|
* application/json:
|
|
|
- * properties:
|
|
|
|
|
- * tokenGtoP:
|
|
|
|
|
- * type: string
|
|
|
|
|
- * tokenPtoG:
|
|
|
|
|
- * type: string
|
|
|
|
|
- * permissionsForBroadcastUseCommands:
|
|
|
|
|
- * type: object
|
|
|
|
|
- * permissionsForSingleUseCommands:
|
|
|
|
|
- * type: object
|
|
|
|
|
- * permissionsForSlackEvents:
|
|
|
|
|
- * type: object
|
|
|
|
|
- * isPrimary:
|
|
|
|
|
- * type: boolean
|
|
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * tokenGtoP:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * tokenPtoG:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * permissionsForBroadcastUseCommands:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * permissionsForSingleUseCommands:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * permissionsForSlackEvents:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * isPrimary:
|
|
|
|
|
+ * type: boolean
|
|
|
*/
|
|
*/
|
|
|
router.post('/slack-app-integrations', loginRequiredStrictly, adminRequired, addActivity, async(req, res) => {
|
|
router.post('/slack-app-integrations', loginRequiredStrictly, adminRequired, addActivity, async(req, res) => {
|
|
|
const SlackAppIntegrationRecordsNum = await SlackAppIntegration.countDocuments();
|
|
const SlackAppIntegrationRecordsNum = await SlackAppIntegration.countDocuments();
|
|
@@ -560,7 +566,7 @@ module.exports = (crowi) => {
|
|
|
/**
|
|
/**
|
|
|
* @swagger
|
|
* @swagger
|
|
|
*
|
|
*
|
|
|
- * /slack-integration-settings/slack-app-integrations/:id:
|
|
|
|
|
|
|
+ * /slack-integration-settings/slack-app-integrations/{id}:
|
|
|
* delete:
|
|
* delete:
|
|
|
* tags: [SlackIntegrationSettings (with proxy)]
|
|
* tags: [SlackIntegrationSettings (with proxy)]
|
|
|
* security:
|
|
* security:
|
|
@@ -579,9 +585,11 @@ module.exports = (crowi) => {
|
|
|
* description: Succeeded to delete access tokens for slack
|
|
* description: Succeeded to delete access tokens for slack
|
|
|
* content:
|
|
* content:
|
|
|
* application/json:
|
|
* application/json:
|
|
|
- * properties:
|
|
|
|
|
- * response:
|
|
|
|
|
- * type: object
|
|
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * response:
|
|
|
|
|
+ * type: object
|
|
|
*/
|
|
*/
|
|
|
router.delete('/slack-app-integrations/:id', loginRequiredStrictly, adminRequired, validator.deleteIntegration, apiV3FormValidator, addActivity,
|
|
router.delete('/slack-app-integrations/:id', loginRequiredStrictly, adminRequired, validator.deleteIntegration, apiV3FormValidator, addActivity,
|
|
|
async(req, res) => {
|
|
async(req, res) => {
|
|
@@ -657,7 +665,7 @@ module.exports = (crowi) => {
|
|
|
/**
|
|
/**
|
|
|
* @swagger
|
|
* @swagger
|
|
|
*
|
|
*
|
|
|
- * /slack-integration-settings/slack-app-integrations/:id/makeprimary:
|
|
|
|
|
|
|
+ * /slack-integration-settings/slack-app-integrations/{id}/makeprimary:
|
|
|
* put:
|
|
* put:
|
|
|
* tags: [SlackIntegrationSettings (with proxy)]
|
|
* tags: [SlackIntegrationSettings (with proxy)]
|
|
|
* security:
|
|
* security:
|
|
@@ -712,7 +720,7 @@ module.exports = (crowi) => {
|
|
|
/**
|
|
/**
|
|
|
* @swagger
|
|
* @swagger
|
|
|
*
|
|
*
|
|
|
- * /slack-integration-settings/slack-app-integrations/:id/regenerate-tokens:
|
|
|
|
|
|
|
+ * /slack-integration-settings/slack-app-integrations/{id}/regenerate-tokens:
|
|
|
* put:
|
|
* put:
|
|
|
* tags: [SlackIntegrationSettings (with proxy)]
|
|
* tags: [SlackIntegrationSettings (with proxy)]
|
|
|
* security:
|
|
* security:
|
|
@@ -757,7 +765,7 @@ module.exports = (crowi) => {
|
|
|
/**
|
|
/**
|
|
|
* @swagger
|
|
* @swagger
|
|
|
*
|
|
*
|
|
|
- * /slack-integration-settings/slack-app-integrations/:id/permissions:
|
|
|
|
|
|
|
+ * /slack-integration-settings/slack-app-integrations/{id}/permissions:
|
|
|
* put:
|
|
* put:
|
|
|
* tags: [SlackIntegrationSettings (with proxy)]
|
|
* tags: [SlackIntegrationSettings (with proxy)]
|
|
|
* security:
|
|
* security:
|
|
@@ -840,7 +848,7 @@ module.exports = (crowi) => {
|
|
|
/**
|
|
/**
|
|
|
* @swagger
|
|
* @swagger
|
|
|
*
|
|
*
|
|
|
- * /slack-integration-settings/slack-app-integrations/:id/relation-test:
|
|
|
|
|
|
|
+ * /slack-integration-settings/slack-app-integrations/{id}/relation-test:
|
|
|
* post:
|
|
* post:
|
|
|
* tags: [SlackIntegrationSettings (with proxy)]
|
|
* tags: [SlackIntegrationSettings (with proxy)]
|
|
|
* security:
|
|
* security:
|