const Joi = require('joi') const path = require('path') const editoriaMode = require('../app/authsome_editoria') const inkEndpoint = process.env.INK_ENDPOINT const inkUsername = process.env.INK_USERNAME const inkPassword = process.env.INK_PASSWORD module.exports = { authsome: { mode: editoriaMode, teams: { teamProduction: { name: 'Production Editor', permissions: 'all' }, teamCopyEditor: { name: 'Copy Editor', permissions: 'update' }, teamauthors: { name: 'Author', permissions: 'update' } } }, inkBackend: { inkEndpoint: inkEndpoint || 'http://ink-api.coko.foundation', email: inkUsername, password: inkPassword }, pubsweet: { components: [ 'pubsweet-component-ink-backend', 'pubsweet-component-ink-frontend', 'pubsweet-component-login', 'pubsweet-component-signup' ] }, pubsweetClient: { navigation: 'app/components/Navigation/Navigation.jsx', routes: 'app/routes.jsx', theme: 'ThemeEditoria' }, pubsweetServer: { API_ENDPOINT: '/api', dbPath: path.join(__dirname, '..', 'api', 'db'), secret: process.env.PUBSWEET_SECRET }, validations: { collection: { productionEditor: Joi.object().allow(null) }, fragment: { alignment: Joi.object(), author: Joi.string().allow(''), book: Joi.string().guid().required(), comments: Joi.object(), division: Joi.string(), index: Joi.number(), kind: Joi.string(), lock: Joi.object().allow(null), progress: Joi.object(), source: Joi.string().allow(''), status: Joi.string(), subCategory: Joi.string(), title: Joi.string(), trackChanges: Joi.boolean() } } }