|
@@ -37,7 +37,7 @@ const router = express.Router();
|
|
|
* description: CustomizeTheme
|
|
* description: CustomizeTheme
|
|
|
* type: object
|
|
* type: object
|
|
|
* properties:
|
|
* properties:
|
|
|
- * themeType:
|
|
|
|
|
|
|
+ * theme:
|
|
|
* type: string
|
|
* type: string
|
|
|
* CustomizeFunction:
|
|
* CustomizeFunction:
|
|
|
* description: CustomizeFunction
|
|
* description: CustomizeFunction
|
|
@@ -61,6 +61,14 @@ const router = express.Router();
|
|
|
* description: CustomizeHighlight
|
|
* description: CustomizeHighlight
|
|
|
* type: object
|
|
* type: object
|
|
|
* properties:
|
|
* properties:
|
|
|
|
|
+ * highlightJsStyle:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * highlightJsStyleBorder:
|
|
|
|
|
+ * type: boolean
|
|
|
|
|
+ * CustomizeHighlightResponse:
|
|
|
|
|
+ * description: CustomizeHighlight Response
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
* styleName:
|
|
* styleName:
|
|
|
* type: string
|
|
* type: string
|
|
|
* styleBorder:
|
|
* styleBorder:
|
|
@@ -89,6 +97,99 @@ const router = express.Router();
|
|
|
* properties:
|
|
* properties:
|
|
|
* customizeScript:
|
|
* customizeScript:
|
|
|
* type: string
|
|
* type: string
|
|
|
|
|
+ * CustomizeSetting:
|
|
|
|
|
+ * description: Customize Setting
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * isEnabledTimeline:
|
|
|
|
|
+ * type: boolean
|
|
|
|
|
+ * isEnabledAttachTitleHeader:
|
|
|
|
|
+ * type: boolean
|
|
|
|
|
+ * pageLimitationS:
|
|
|
|
|
+ * type: number
|
|
|
|
|
+ * pageLimitationM:
|
|
|
|
|
+ * type: number
|
|
|
|
|
+ * pageLimitationL:
|
|
|
|
|
+ * type: number
|
|
|
|
|
+ * pageLimitationXL:
|
|
|
|
|
+ * type: number
|
|
|
|
|
+ * isEnabledStaleNotification:
|
|
|
|
|
+ * type: boolean
|
|
|
|
|
+ * isAllReplyShown:
|
|
|
|
|
+ * type: boolean
|
|
|
|
|
+ * isSearchScopeChildrenAsDefault:
|
|
|
|
|
+ * type: boolean
|
|
|
|
|
+ * isEnabledMarp:
|
|
|
|
|
+ * type: boolean
|
|
|
|
|
+ * styleName:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * styleBorder:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * customizeTitle:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * customizeScript:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * customizeCss:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * customizeNoscript:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * ThemesMetadata:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * name:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * description: The name of the plugin theme.
|
|
|
|
|
+ * manifestKey:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * description: Path to the theme manifest file.
|
|
|
|
|
+ * schemeType:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * description: The color scheme type (e.g., light or dark).
|
|
|
|
|
+ * lightBg:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * description: Light mode background color (hex).
|
|
|
|
|
+ * darkBg:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * description: Dark mode background color (hex).
|
|
|
|
|
+ * lightSidebar:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * description: Light mode sidebar color (hex).
|
|
|
|
|
+ * darkSidebar:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * description: Dark mode sidebar color (hex).
|
|
|
|
|
+ * lightIcon:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * description: Light mode icon color (hex).
|
|
|
|
|
+ * darkIcon:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * description: Dark mode icon color (hex).
|
|
|
|
|
+ * createBtn:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * description: Color of the create button (hex).
|
|
|
|
|
+ * CustomizeSidebar:
|
|
|
|
|
+ * description: Customize Sidebar
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * isSidebarCollapsedMode:
|
|
|
|
|
+ * type: boolean
|
|
|
|
|
+ * description: The flag whether sidebar is collapsed mode or not.
|
|
|
|
|
+ * isSidebarClosedAtDockMode:
|
|
|
|
|
+ * type: boolean
|
|
|
|
|
+ * description: The flag whether sidebar is closed at dock mode or not.
|
|
|
|
|
+ * CustomizePresentation:
|
|
|
|
|
+ * description: Customize Presentation
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * isEnabledMarp:
|
|
|
|
|
+ * type: boolean
|
|
|
|
|
+ * description: The flag whether Marp is enabled or not.
|
|
|
|
|
+ * CustomizeLogo:
|
|
|
|
|
+ * description: Customize Logo
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * isDefaultLogo:
|
|
|
|
|
+ * type: boolean
|
|
|
|
|
+ * description: The flag whether the logo is default or not.
|
|
|
*/
|
|
*/
|
|
|
module.exports = (crowi) => {
|
|
module.exports = (crowi) => {
|
|
|
const loginRequiredStrictly = require('../../middlewares/login-required')(crowi);
|
|
const loginRequiredStrictly = require('../../middlewares/login-required')(crowi);
|
|
@@ -154,6 +255,8 @@ module.exports = (crowi) => {
|
|
|
* /customize-setting:
|
|
* /customize-setting:
|
|
|
* get:
|
|
* get:
|
|
|
* tags: [CustomizeSetting]
|
|
* tags: [CustomizeSetting]
|
|
|
|
|
+ * security:
|
|
|
|
|
+ * - cookieAuth: []
|
|
|
* operationId: getCustomizeSetting
|
|
* operationId: getCustomizeSetting
|
|
|
* summary: /customize-setting
|
|
* summary: /customize-setting
|
|
|
* description: Get customize parameters
|
|
* description: Get customize parameters
|
|
@@ -167,6 +270,7 @@ module.exports = (crowi) => {
|
|
|
* customizeParams:
|
|
* customizeParams:
|
|
|
* type: object
|
|
* type: object
|
|
|
* description: customize params
|
|
* description: customize params
|
|
|
|
|
+ * $ref: '#/components/schemas/CustomizeSetting'
|
|
|
*/
|
|
*/
|
|
|
router.get('/', loginRequiredStrictly, adminRequired, async(req, res) => {
|
|
router.get('/', loginRequiredStrictly, adminRequired, async(req, res) => {
|
|
|
const customizeParams = {
|
|
const customizeParams = {
|
|
@@ -197,6 +301,8 @@ module.exports = (crowi) => {
|
|
|
* /customize-setting/layout:
|
|
* /customize-setting/layout:
|
|
|
* get:
|
|
* get:
|
|
|
* tags: [CustomizeSetting]
|
|
* tags: [CustomizeSetting]
|
|
|
|
|
+ * security:
|
|
|
|
|
+ * - cookieAuth: []
|
|
|
* operationId: getLayoutCustomizeSetting
|
|
* operationId: getLayoutCustomizeSetting
|
|
|
* summary: /customize-setting/layout
|
|
* summary: /customize-setting/layout
|
|
|
* description: Get layout
|
|
* description: Get layout
|
|
@@ -209,7 +315,6 @@ module.exports = (crowi) => {
|
|
|
* $ref: '#/components/schemas/CustomizeLayout'
|
|
* $ref: '#/components/schemas/CustomizeLayout'
|
|
|
*/
|
|
*/
|
|
|
router.get('/layout', loginRequiredStrictly, adminRequired, async(req, res) => {
|
|
router.get('/layout', loginRequiredStrictly, adminRequired, async(req, res) => {
|
|
|
-
|
|
|
|
|
try {
|
|
try {
|
|
|
const isContainerFluid = await configManager.getConfig('customize:isContainerFluid');
|
|
const isContainerFluid = await configManager.getConfig('customize:isContainerFluid');
|
|
|
return res.apiv3({ isContainerFluid });
|
|
return res.apiv3({ isContainerFluid });
|
|
@@ -242,7 +347,12 @@ module.exports = (crowi) => {
|
|
|
* content:
|
|
* content:
|
|
|
* application/json:
|
|
* application/json:
|
|
|
* schema:
|
|
* schema:
|
|
|
- * $ref: '#/components/schemas/CustomizeLayout'
|
|
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * customizedParams:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * description: customized params
|
|
|
|
|
+ * $ref: '#/components/schemas/CustomizeLayout'
|
|
|
*/
|
|
*/
|
|
|
router.put('/layout', loginRequiredStrictly, adminRequired, addActivity, validator.layout, apiV3FormValidator, async(req, res) => {
|
|
router.put('/layout', loginRequiredStrictly, adminRequired, addActivity, validator.layout, apiV3FormValidator, async(req, res) => {
|
|
|
const requestParams = {
|
|
const requestParams = {
|
|
@@ -267,6 +377,34 @@ module.exports = (crowi) => {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @swagger
|
|
|
|
|
+ *
|
|
|
|
|
+ * /customize-setting/theme:
|
|
|
|
|
+ * get:
|
|
|
|
|
+ * tags: [CustomizeSetting]
|
|
|
|
|
+ * security:
|
|
|
|
|
+ * - cookieAuth: []
|
|
|
|
|
+ * operationId: getThemeCustomizeSetting
|
|
|
|
|
+ * summary: /customize-setting/theme
|
|
|
|
|
+ * description: Get theme
|
|
|
|
|
+ * responses:
|
|
|
|
|
+ * 200:
|
|
|
|
|
+ * description: Succeeded to get layout
|
|
|
|
|
+ * content:
|
|
|
|
|
+ * application/json:
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * currentTheme:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * description: The current theme name.
|
|
|
|
|
+ * pluginThemesMetadatas:
|
|
|
|
|
+ * type: array
|
|
|
|
|
+ * description: Metadata for available plugin themes.
|
|
|
|
|
+ * items:
|
|
|
|
|
+ * $ref: '#/components/schemas/ThemesMetadata'
|
|
|
|
|
+ */
|
|
|
router.get('/theme', loginRequiredStrictly, async(req, res) => {
|
|
router.get('/theme', loginRequiredStrictly, async(req, res) => {
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
@@ -294,6 +432,8 @@ module.exports = (crowi) => {
|
|
|
* /customize-setting/theme:
|
|
* /customize-setting/theme:
|
|
|
* put:
|
|
* put:
|
|
|
* tags: [CustomizeSetting]
|
|
* tags: [CustomizeSetting]
|
|
|
|
|
+ * security:
|
|
|
|
|
+ * - cookieAuth: []
|
|
|
* operationId: updateThemeCustomizeSetting
|
|
* operationId: updateThemeCustomizeSetting
|
|
|
* summary: /customize-setting/theme
|
|
* summary: /customize-setting/theme
|
|
|
* description: Update theme
|
|
* description: Update theme
|
|
@@ -309,7 +449,10 @@ module.exports = (crowi) => {
|
|
|
* content:
|
|
* content:
|
|
|
* application/json:
|
|
* application/json:
|
|
|
* schema:
|
|
* schema:
|
|
|
- * $ref: '#/components/schemas/CustomizeTheme'
|
|
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * customizedParams:
|
|
|
|
|
+ * $ref: '#/components/schemas/CustomizeTheme'
|
|
|
*/
|
|
*/
|
|
|
router.put('/theme', loginRequiredStrictly, adminRequired, addActivity, validator.theme, apiV3FormValidator, async(req, res) => {
|
|
router.put('/theme', loginRequiredStrictly, adminRequired, addActivity, validator.theme, apiV3FormValidator, async(req, res) => {
|
|
|
const requestParams = {
|
|
const requestParams = {
|
|
@@ -333,7 +476,25 @@ module.exports = (crowi) => {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
- // sidebar
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @swagger
|
|
|
|
|
+ *
|
|
|
|
|
+ * /customize-setting/sidebar:
|
|
|
|
|
+ * get:
|
|
|
|
|
+ * tags: [CustomizeSetting]
|
|
|
|
|
+ * security:
|
|
|
|
|
+ * - cookieAuth: []
|
|
|
|
|
+ * operationId: getCustomeSettingSidebar
|
|
|
|
|
+ * summary: /customize-setting/sidebar
|
|
|
|
|
+ * description: Get sidebar
|
|
|
|
|
+ * responses:
|
|
|
|
|
+ * 200:
|
|
|
|
|
+ * description: Succeeded to get sidebar
|
|
|
|
|
+ * content:
|
|
|
|
|
+ * application/json:
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * $ref: '#/components/schemas/CustomizeSidebar'
|
|
|
|
|
+ */
|
|
|
router.get('/sidebar', loginRequiredStrictly, adminRequired, async(req, res) => {
|
|
router.get('/sidebar', loginRequiredStrictly, adminRequired, async(req, res) => {
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
@@ -348,6 +509,34 @@ module.exports = (crowi) => {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @swagger
|
|
|
|
|
+ *
|
|
|
|
|
+ * /customize-setting/sidebar:
|
|
|
|
|
+ * put:
|
|
|
|
|
+ * tags: [CustomizeSetting]
|
|
|
|
|
+ * security:
|
|
|
|
|
+ * - cookieAuth: []
|
|
|
|
|
+ * operationId: updateCustomizeSettingSidebar
|
|
|
|
|
+ * summary: /customize-setting/sidebar
|
|
|
|
|
+ * description: Update sidebar
|
|
|
|
|
+ * requestBody:
|
|
|
|
|
+ * required: true
|
|
|
|
|
+ * content:
|
|
|
|
|
+ * application/json:
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * $ref: '#/components/schemas/CustomizeSidebar'
|
|
|
|
|
+ * responses:
|
|
|
|
|
+ * 200:
|
|
|
|
|
+ * description: Succeeded to update sidebar
|
|
|
|
|
+ * content:
|
|
|
|
|
+ * application/json:
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * customizedParams:
|
|
|
|
|
+ * $ref: '#/components/schemas/CustomizeSidebar'
|
|
|
|
|
+ */
|
|
|
router.put('/sidebar', loginRequiredStrictly, adminRequired, validator.sidebar, apiV3FormValidator, addActivity, async(req, res) => {
|
|
router.put('/sidebar', loginRequiredStrictly, adminRequired, validator.sidebar, apiV3FormValidator, addActivity, async(req, res) => {
|
|
|
const requestParams = {
|
|
const requestParams = {
|
|
|
'customize:isSidebarCollapsedMode': req.body.isSidebarCollapsedMode,
|
|
'customize:isSidebarCollapsedMode': req.body.isSidebarCollapsedMode,
|
|
@@ -378,6 +567,8 @@ module.exports = (crowi) => {
|
|
|
* /customize-setting/function:
|
|
* /customize-setting/function:
|
|
|
* put:
|
|
* put:
|
|
|
* tags: [CustomizeSetting]
|
|
* tags: [CustomizeSetting]
|
|
|
|
|
+ * security:
|
|
|
|
|
+ * - cookieAuth: []
|
|
|
* operationId: updateFunctionCustomizeSetting
|
|
* operationId: updateFunctionCustomizeSetting
|
|
|
* summary: /customize-setting/function
|
|
* summary: /customize-setting/function
|
|
|
* description: Update function
|
|
* description: Update function
|
|
@@ -393,7 +584,10 @@ module.exports = (crowi) => {
|
|
|
* content:
|
|
* content:
|
|
|
* application/json:
|
|
* application/json:
|
|
|
* schema:
|
|
* schema:
|
|
|
- * $ref: '#/components/schemas/CustomizeFunction'
|
|
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * customizedParams:
|
|
|
|
|
+ * $ref: '#/components/schemas/CustomizeFunction'
|
|
|
*/
|
|
*/
|
|
|
router.put('/function', loginRequiredStrictly, adminRequired, addActivity, validator.function, apiV3FormValidator, async(req, res) => {
|
|
router.put('/function', loginRequiredStrictly, adminRequired, addActivity, validator.function, apiV3FormValidator, async(req, res) => {
|
|
|
const requestParams = {
|
|
const requestParams = {
|
|
@@ -433,6 +627,34 @@ module.exports = (crowi) => {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @swagger
|
|
|
|
|
+ *
|
|
|
|
|
+ * /customize-setting/presentation:
|
|
|
|
|
+ * put:
|
|
|
|
|
+ * tags: [CustomizeSetting]
|
|
|
|
|
+ * security:
|
|
|
|
|
+ * - cookieAuth: []
|
|
|
|
|
+ * operationId: updatePresentationCustomizeSetting
|
|
|
|
|
+ * summary: /customize-setting/presentation
|
|
|
|
|
+ * description: Update presentation
|
|
|
|
|
+ * requestBody:
|
|
|
|
|
+ * required: true
|
|
|
|
|
+ * content:
|
|
|
|
|
+ * application/json:
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * $ref: '#/components/schemas/CustomizePresentation'
|
|
|
|
|
+ * responses:
|
|
|
|
|
+ * 200:
|
|
|
|
|
+ * description: Succeeded to update presentation
|
|
|
|
|
+ * content:
|
|
|
|
|
+ * application/json:
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * customizedParams:
|
|
|
|
|
+ * $ref: '#/components/schemas/CustomizePresentation'
|
|
|
|
|
+ */
|
|
|
router.put('/presentation', loginRequiredStrictly, adminRequired, addActivity, validator.CustomizePresentation, apiV3FormValidator, async(req, res) => {
|
|
router.put('/presentation', loginRequiredStrictly, adminRequired, addActivity, validator.CustomizePresentation, apiV3FormValidator, async(req, res) => {
|
|
|
const requestParams = {
|
|
const requestParams = {
|
|
|
'customize:isEnabledMarp': req.body.isEnabledMarp,
|
|
'customize:isEnabledMarp': req.body.isEnabledMarp,
|
|
@@ -460,6 +682,8 @@ module.exports = (crowi) => {
|
|
|
* /customize-setting/highlight:
|
|
* /customize-setting/highlight:
|
|
|
* put:
|
|
* put:
|
|
|
* tags: [CustomizeSetting]
|
|
* tags: [CustomizeSetting]
|
|
|
|
|
+ * security:
|
|
|
|
|
+ * - cookieAuth: []
|
|
|
* operationId: updateHighlightCustomizeSetting
|
|
* operationId: updateHighlightCustomizeSetting
|
|
|
* summary: /customize-setting/highlight
|
|
* summary: /customize-setting/highlight
|
|
|
* description: Update highlight
|
|
* description: Update highlight
|
|
@@ -475,7 +699,10 @@ module.exports = (crowi) => {
|
|
|
* content:
|
|
* content:
|
|
|
* application/json:
|
|
* application/json:
|
|
|
* schema:
|
|
* schema:
|
|
|
- * $ref: '#/components/schemas/CustomizeHighlight'
|
|
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * customizedParams:
|
|
|
|
|
+ * $ref: '#/components/schemas/CustomizeHighlightResponse'
|
|
|
*/
|
|
*/
|
|
|
router.put('/highlight', loginRequiredStrictly, adminRequired, addActivity, validator.highlight, apiV3FormValidator, async(req, res) => {
|
|
router.put('/highlight', loginRequiredStrictly, adminRequired, addActivity, validator.highlight, apiV3FormValidator, async(req, res) => {
|
|
|
const requestParams = {
|
|
const requestParams = {
|
|
@@ -506,9 +733,11 @@ module.exports = (crowi) => {
|
|
|
* /customize-setting/customizeTitle:
|
|
* /customize-setting/customizeTitle:
|
|
|
* put:
|
|
* put:
|
|
|
* tags: [CustomizeSetting]
|
|
* tags: [CustomizeSetting]
|
|
|
|
|
+ * security:
|
|
|
|
|
+ * - cookieAuth: []
|
|
|
* operationId: updateCustomizeTitleCustomizeSetting
|
|
* operationId: updateCustomizeTitleCustomizeSetting
|
|
|
* summary: /customize-setting/customizeTitle
|
|
* summary: /customize-setting/customizeTitle
|
|
|
- * description: Update customizeTitle
|
|
|
|
|
|
|
+ * description: Update title
|
|
|
* requestBody:
|
|
* requestBody:
|
|
|
* required: true
|
|
* required: true
|
|
|
* content:
|
|
* content:
|
|
@@ -521,7 +750,10 @@ module.exports = (crowi) => {
|
|
|
* content:
|
|
* content:
|
|
|
* application/json:
|
|
* application/json:
|
|
|
* schema:
|
|
* schema:
|
|
|
- * $ref: '#/components/schemas/CustomizeTitle'
|
|
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * customizedParams:
|
|
|
|
|
+ * $ref: '#/components/schemas/CustomizeTitle'
|
|
|
*/
|
|
*/
|
|
|
router.put('/customize-title', loginRequiredStrictly, adminRequired, addActivity, validator.customizeTitle, apiV3FormValidator, async(req, res) => {
|
|
router.put('/customize-title', loginRequiredStrictly, adminRequired, addActivity, validator.customizeTitle, apiV3FormValidator, async(req, res) => {
|
|
|
const requestParams = {
|
|
const requestParams = {
|
|
@@ -553,9 +785,11 @@ module.exports = (crowi) => {
|
|
|
* /customize-setting/customize-noscript:
|
|
* /customize-setting/customize-noscript:
|
|
|
* put:
|
|
* put:
|
|
|
* tags: [CustomizeSetting]
|
|
* tags: [CustomizeSetting]
|
|
|
|
|
+ * security:
|
|
|
|
|
+ * - cookieAuth: []
|
|
|
* operationId: updateCustomizeNoscriptCustomizeSetting
|
|
* operationId: updateCustomizeNoscriptCustomizeSetting
|
|
|
* summary: /customize-setting/customize-noscript
|
|
* summary: /customize-setting/customize-noscript
|
|
|
- * description: Update customizeNoscript
|
|
|
|
|
|
|
+ * description: Update noscript
|
|
|
* requestBody:
|
|
* requestBody:
|
|
|
* required: true
|
|
* required: true
|
|
|
* content:
|
|
* content:
|
|
@@ -568,7 +802,10 @@ module.exports = (crowi) => {
|
|
|
* content:
|
|
* content:
|
|
|
* application/json:
|
|
* application/json:
|
|
|
* schema:
|
|
* schema:
|
|
|
- * $ref: '#/components/schemas/CustomizeNoscript'
|
|
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * customizedParams:
|
|
|
|
|
+ * $ref: '#/components/schemas/CustomizeNoscript'
|
|
|
*/
|
|
*/
|
|
|
router.put('/customize-noscript', loginRequiredStrictly, adminRequired, addActivity, validator.customizeNoscript, apiV3FormValidator, async(req, res) => {
|
|
router.put('/customize-noscript', loginRequiredStrictly, adminRequired, addActivity, validator.customizeNoscript, apiV3FormValidator, async(req, res) => {
|
|
|
const requestParams = {
|
|
const requestParams = {
|
|
@@ -593,12 +830,14 @@ module.exports = (crowi) => {
|
|
|
/**
|
|
/**
|
|
|
* @swagger
|
|
* @swagger
|
|
|
*
|
|
*
|
|
|
- * /customize-setting/customizeCss:
|
|
|
|
|
|
|
+ * /customize-setting/customize-css:
|
|
|
* put:
|
|
* put:
|
|
|
* tags: [CustomizeSetting]
|
|
* tags: [CustomizeSetting]
|
|
|
|
|
+ * security:
|
|
|
|
|
+ * - cookieAuth: []
|
|
|
* operationId: updateCustomizeCssCustomizeSetting
|
|
* operationId: updateCustomizeCssCustomizeSetting
|
|
|
- * summary: /customize-setting/customizeCss
|
|
|
|
|
- * description: Update customizeCss
|
|
|
|
|
|
|
+ * summary: /customize-setting/customize-css
|
|
|
|
|
+ * description: Update customize css
|
|
|
* requestBody:
|
|
* requestBody:
|
|
|
* required: true
|
|
* required: true
|
|
|
* content:
|
|
* content:
|
|
@@ -611,7 +850,10 @@ module.exports = (crowi) => {
|
|
|
* content:
|
|
* content:
|
|
|
* application/json:
|
|
* application/json:
|
|
|
* schema:
|
|
* schema:
|
|
|
- * $ref: '#/components/schemas/CustomizeCss'
|
|
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * customizedParams:
|
|
|
|
|
+ * $ref: '#/components/schemas/CustomizeCss'
|
|
|
*/
|
|
*/
|
|
|
router.put('/customize-css', loginRequiredStrictly, adminRequired, addActivity, validator.customizeCss, apiV3FormValidator, async(req, res) => {
|
|
router.put('/customize-css', loginRequiredStrictly, adminRequired, addActivity, validator.customizeCss, apiV3FormValidator, async(req, res) => {
|
|
|
const requestParams = {
|
|
const requestParams = {
|
|
@@ -639,12 +881,14 @@ module.exports = (crowi) => {
|
|
|
/**
|
|
/**
|
|
|
* @swagger
|
|
* @swagger
|
|
|
*
|
|
*
|
|
|
- * /customize-setting/customizeScript:
|
|
|
|
|
|
|
+ * /customize-setting/customize-script:
|
|
|
* put:
|
|
* put:
|
|
|
* tags: [CustomizeSetting]
|
|
* tags: [CustomizeSetting]
|
|
|
|
|
+ * security:
|
|
|
|
|
+ * - cookieAuth: []
|
|
|
* operationId: updateCustomizeScriptCustomizeSetting
|
|
* operationId: updateCustomizeScriptCustomizeSetting
|
|
|
- * summary: /customize-setting/customizeScript
|
|
|
|
|
- * description: Update customizeScript
|
|
|
|
|
|
|
+ * summary: /customize-setting/customize-script
|
|
|
|
|
+ * description: Update customize script
|
|
|
* requestBody:
|
|
* requestBody:
|
|
|
* required: true
|
|
* required: true
|
|
|
* content:
|
|
* content:
|
|
@@ -657,7 +901,10 @@ module.exports = (crowi) => {
|
|
|
* content:
|
|
* content:
|
|
|
* application/json:
|
|
* application/json:
|
|
|
* schema:
|
|
* schema:
|
|
|
- * $ref: '#/components/schemas/CustomizeScript'
|
|
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * customizedParams:
|
|
|
|
|
+ * $ref: '#/components/schemas/CustomizeScript'
|
|
|
*/
|
|
*/
|
|
|
router.put('/customize-script', loginRequiredStrictly, adminRequired, addActivity, validator.customizeScript, apiV3FormValidator, async(req, res) => {
|
|
router.put('/customize-script', loginRequiredStrictly, adminRequired, addActivity, validator.customizeScript, apiV3FormValidator, async(req, res) => {
|
|
|
const requestParams = {
|
|
const requestParams = {
|
|
@@ -679,6 +926,34 @@ module.exports = (crowi) => {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @swagger
|
|
|
|
|
+ *
|
|
|
|
|
+ * /customize-setting/customize-logo:
|
|
|
|
|
+ * put:
|
|
|
|
|
+ * tags: [CustomizeSetting]
|
|
|
|
|
+ * security:
|
|
|
|
|
+ * - cookieAuth: []
|
|
|
|
|
+ * operationId: updateCustomizeLogoCustomizeSetting
|
|
|
|
|
+ * summary: /customize-setting/customize-logo
|
|
|
|
|
+ * description: Update customize logo
|
|
|
|
|
+ * requestBody:
|
|
|
|
|
+ * required: true
|
|
|
|
|
+ * content:
|
|
|
|
|
+ * application/json:
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * $ref: '#/components/schemas/CustomizeLogo'
|
|
|
|
|
+ * responses:
|
|
|
|
|
+ * 200:
|
|
|
|
|
+ * description: Succeeded to update customize logo
|
|
|
|
|
+ * content:
|
|
|
|
|
+ * application/json:
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * customizedParams:
|
|
|
|
|
+ * $ref: '#/components/schemas/CustomizeLogo'
|
|
|
|
|
+ */
|
|
|
router.put('/customize-logo', loginRequiredStrictly, adminRequired, validator.logo, apiV3FormValidator, async(req, res) => {
|
|
router.put('/customize-logo', loginRequiredStrictly, adminRequired, validator.logo, apiV3FormValidator, async(req, res) => {
|
|
|
|
|
|
|
|
const {
|
|
const {
|
|
@@ -702,6 +977,45 @@ module.exports = (crowi) => {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @swagger
|
|
|
|
|
+ *
|
|
|
|
|
+ * /customize-setting/upload-brand-logo:
|
|
|
|
|
+ * put:
|
|
|
|
|
+ * tags: [CustomizeSetting]
|
|
|
|
|
+ * security:
|
|
|
|
|
+ * - cookieAuth: []
|
|
|
|
|
+ * operationId: uploadBrandLogoCustomizeSetting
|
|
|
|
|
+ * summary: /customize-setting/upload-brand-logo
|
|
|
|
|
+ * description: Upload brand logo
|
|
|
|
|
+ * requestBody:
|
|
|
|
|
+ * required: true
|
|
|
|
|
+ * content:
|
|
|
|
|
+ * multipart/form-data:
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * file:
|
|
|
|
|
+ * format: binary
|
|
|
|
|
+ * responses:
|
|
|
|
|
+ * 200:
|
|
|
|
|
+ * description: Succeeded to upload brand logo
|
|
|
|
|
+ * content:
|
|
|
|
|
+ * application/json:
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * attachment:
|
|
|
|
|
+ * allOf:
|
|
|
|
|
+ * - $ref: '#/components/schemas/Attachment'
|
|
|
|
|
+ * - type: object
|
|
|
|
|
+ * properties:
|
|
|
|
|
+ * creator:
|
|
|
|
|
+ * type: string
|
|
|
|
|
+ * page: {}
|
|
|
|
|
+ * temporaryUrlExpiredAt: {}
|
|
|
|
|
+ * temporaryUrlCached: {}
|
|
|
|
|
+ */
|
|
|
router.post('/upload-brand-logo', uploads.single('file'), loginRequiredStrictly,
|
|
router.post('/upload-brand-logo', uploads.single('file'), loginRequiredStrictly,
|
|
|
adminRequired, validator.logo, apiV3FormValidator, async(req, res) => {
|
|
adminRequired, validator.logo, apiV3FormValidator, async(req, res) => {
|
|
|
|
|
|
|
@@ -739,6 +1053,25 @@ module.exports = (crowi) => {
|
|
|
return res.apiv3({ attachment });
|
|
return res.apiv3({ attachment });
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * @swagger
|
|
|
|
|
+ *
|
|
|
|
|
+ * /customize-setting/delete-brand-logo:
|
|
|
|
|
+ * delete:
|
|
|
|
|
+ * tags: [CustomizeSetting]
|
|
|
|
|
+ * security:
|
|
|
|
|
+ * - cookieAuth: []
|
|
|
|
|
+ * operationId: deleteBrandLogoCustomizeSetting
|
|
|
|
|
+ * summary: /customize-setting/delete-brand-logo
|
|
|
|
|
+ * description: Delete brand logo
|
|
|
|
|
+ * responses:
|
|
|
|
|
+ * 200:
|
|
|
|
|
+ * description: Succeeded to delete brand logo
|
|
|
|
|
+ * content:
|
|
|
|
|
+ * application/json:
|
|
|
|
|
+ * schema:
|
|
|
|
|
+ * additionalProperties: false
|
|
|
|
|
+ */
|
|
|
router.delete('/delete-brand-logo', loginRequiredStrictly, adminRequired, async(req, res) => {
|
|
router.delete('/delete-brand-logo', loginRequiredStrictly, adminRequired, async(req, res) => {
|
|
|
|
|
|
|
|
const attachments = await Attachment.find({ attachmentType: AttachmentType.BRAND_LOGO });
|
|
const attachments = await Attachment.find({ attachmentType: AttachmentType.BRAND_LOGO });
|