UNPKG

137 kBSource Map (JSON)View Raw
1{"version":3,"sources":["webpack://AceApiServer/webpack/universalModuleDefinition","webpack://AceApiServer/webpack/bootstrap","webpack://AceApiServer/external \"babel-runtime/helpers/asyncToGenerator\"","webpack://AceApiServer/external \"babel-runtime/regenerator\"","webpack://AceApiServer/external \"lodash\"","webpack://AceApiServer/external \"babel-runtime/core-js/json/stringify\"","webpack://AceApiServer/external \"lodash/isArray\"","webpack://AceApiServer/./config.default.js","webpack://AceApiServer/external \"bluebird\"","webpack://AceApiServer/external \"babel-runtime/core-js/object/keys\"","webpack://AceApiServer/external \"express\"","webpack://AceApiServer/./routes/user.js","webpack://AceApiServer/./routes/tools.js","webpack://AceApiServer/./routes/token.js","webpack://AceApiServer/./routes/taxonomy.js","webpack://AceApiServer/./routes/stripe.js","webpack://AceApiServer/external \"twitter\"","webpack://AceApiServer/./routes/social.js","webpack://AceApiServer/./routes/shippo.js","webpack://AceApiServer/./routes/settings.js","webpack://AceApiServer/./routes/schema.js","webpack://AceApiServer/./routes/pdf.js","webpack://AceApiServer/./routes/metadata.js","webpack://AceApiServer/./routes/entity.js","webpack://AceApiServer/./routes/embedly.js","webpack://AceApiServer/./routes/email.js","webpack://AceApiServer/./routes/ecommerce.js","webpack://AceApiServer/external \"express-useragent\"","webpack://AceApiServer/./routes/debug.js","webpack://AceApiServer/./routes/config.js","webpack://AceApiServer/./routes/cache.js","webpack://AceApiServer/./routes/auth.js","webpack://AceApiServer/./routes/analytics.js","webpack://AceApiServer/external \"ace-api\"","webpack://AceApiServer/external \"deep-freeze\"","webpack://AceApiServer/external \"object-sizeof\"","webpack://AceApiServer/external \"circular-json-es6\"","webpack://AceApiServer/external \"le_node\"","webpack://AceApiServer/external \"zlib\"","webpack://AceApiServer/external \"url-parse\"","webpack://AceApiServer/external \"cache-manager-redis-store\"","webpack://AceApiServer/external \"cache-manager\"","webpack://AceApiServer/./index.js","webpack://AceApiServer/external \"connect-redis\"","webpack://AceApiServer/external \"express-session\"","webpack://AceApiServer/external \"method-override\"","webpack://AceApiServer/external \"body-parser\"","webpack://AceApiServer/external \"cookie-parser\"","webpack://AceApiServer/external \"helmet\"","webpack://AceApiServer/external \"morgan\"","webpack://AceApiServer/external \"http\"","webpack://AceApiServer/./server.js"],"names":["root","factory","exports","module","define","amd","global","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","w","s","require","config","environment","process","env","ENVIRONMENT","api","prefix","API_PREFIX","blacklistToken","API_BLACKLIST_TOKEN","split","blacklistReferrer","API_BLACKLIST_REFERRER","forceHttps","FORCE_HTTPS","JSON","parse","session","secret","SESSION_SECRET","ttl","parseInt","SESSION_TTL","cache","enabled","CACHE_ENABLED","CACHE_TTL","compress","CACHE_COMPRESS","memory","max","CACHE_MEMORY_MAX","redis","url","REDIS_URL","host","REDIS_HOST","port","REDIS_PORT","password","REDIS_PASSWORD","db","REDIS_DB","logentriesToken","LOGENTRIES_TOKEN","_ref","_ref2","_ref3","_ref4","_ref5","User","router","authMiddleware","permissionMiddleware","asyncMiddleware","getConfig","handleResponse","handleError","post","bind","_asyncToGenerator3","default","_regenerator2","mark","_callee","req","res","user","wrap","_context","prev","next","t0","slug","t1","sent","t2","t3","t4","create","body","t5","t6","stop","undefined","_x","_x2","apply","this","arguments","_callee2","_context2","read","query","userId","_x3","_x4","put","_callee3","_context3","update","_x5","_x6","delete","_callee4","_context4","userIds","_x7","_x8","Tools","tools","getDb","setHeader","status","send","getChanges","Jwt","payload","_","options","jwt","token","role","dev","pickBy","key","test","mapValues","isNaN","signToken","apiToken","_ref6","_ref7","_ref8","Taxonomy","cacheMiddleware","taxonomy","taxonomySlug","taxonomySlugs","_callee5","_context5","createTerm","term","_x9","_x10","_callee6","_context6","updateTerm","_x11","_x12","_callee7","_context7","deleteTerm","_x13","_x14","Ecommerce","Email","Stripe","all","order","stripe","checkout","amount","Number","refund","retrieveAccount","email","ecommerce","settings","data","template","getSettings","getOrder","orderId","getTemplate","html","error","ClientConfig","Instagram","instagramAccessTokenMap","method","params","Promise","Twitter","twitter","filter","param","promisifyAll","consumer_key","consumerKey","consumer_secret","consumerSecret","access_token_key","accessTokenKey","access_token_secret","accessTokenSecret","join","cc","clientConfig","instagram","result","provider","access_token","Error","abrupt","client_id","clientId","pagination","next_url","Shippo","shippo","address","parcel","getQuote","Settings","Schema","schema","schemaId","schemaSlug","schemaSlugs","updateAll","schemas","Pdf","pdf","getPayload","id","then","getPdf","type","attachment","fileName","json","assetSlug","_stringify2","replace","assist","client","metadata","isArray","_ref9","_ref10","_ref11","_ref12","Db","Entity","indexAsync","include_docs","children","parents","trashed","sort","limit","bookmark","group_field","index","q","entity","push","entitySearch","selector","use_index","$and","$or","$exists","published","entityFind","fieldValues","fieldSlug","searchTerm","ids","entityList","entityRevisions","entityCreate","_callee8","_context8","entityRead","_x15","_x16","_callee9","_context9","entityUpdate","entities","restore","_x17","_x18","_callee10","_context10","entityDelete","forever","_x19","_x20","_callee11","_context11","_x21","_x22","Embedly","embedly","oembed","urls","input","renderTemplate","length","templateSlug","_keys2","preview","inky","mjml","skipValidation","entityId","row","doc","map","flattenValues","subscribe","messages","message","getType","setType","item","deleteType","verifyDiscount","code","useragent","headers","source","set","items","forEach","indexOf","del","Auth","error_description","auth","authenticateWithProvider","Analytics","analytics","on","console","express","cacheManager","redisStore","URL","zlib","Logger","CircularJSON","sizeof","deepFreeze","Api","defaultConfig","app","_this","customConfig","customAuthMiddleware","merge","fn","resolve","catch","skipAuth","path","cloneConfig","mergeWith","omitUndefined","obj","forIn","isPlainObject","keys","isUndefined","cloneDeep","configClone","redisOptions","caching","store","getClient","response","__cache","gunzipAsync","Buffer","from","toString","cacheResponse","stringify","gzipAsync","Router","enable","use","scheme","redirect","Access-Control-Allow-Origin","Access-Control-Allow-Methods","Access-Control-Expose-Headers","Vary","sendStatus","referrer","referer","referrerHostname","hostname","slice","verifyToken","context","permission","roles","Roles","permissions","isObject","statusCode","errorMessage","stack","log","afterResponse","removeListener","PORT","HOST","http","logger","helmet","cookieParser","bodyParser","methodOverride","RedisStore","AceApiServer","listen","sessionOptions","resave","saveUninitialized","cookie","maxAge","urlencoded","extended","server","createServer"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,UAAAH,GACA,iBAAAC,QACAA,QAAA,aAAAD,IAEAD,EAAA,aAAAC,IARA,CASCK,OAAA,WACD,mBCTA,IAAAC,KAMA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAP,QAGA,IAAAC,EAAAI,EAAAE,IACAC,EAAAD,EACAE,GAAA,EACAT,YAUA,OANAU,EAAAH,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAQ,GAAA,EAGAR,EAAAD,QA8CA,OAzCAM,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAd,EAAAe,EAAAC,GACAV,EAAAW,EAAAjB,EAAAe,IACAG,OAAAC,eAAAnB,EAAAe,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAV,EAAAiB,EAAA,SAAAvB,GACAkB,OAAAC,eAAAnB,EAAA,cAAiDwB,OAAA,KAIjDlB,EAAAmB,EAAA,SAAAxB,GACA,IAAAe,EAAAf,KAAAyB,WACA,WAA2B,OAAAzB,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAK,EAAAQ,EAAAE,EAAA,IAAAA,GACAA,GAIAV,EAAAW,EAAA,SAAAU,EAAAC,GAAsD,OAAAV,OAAAW,UAAAC,eAAAnB,KAAAgB,EAAAC,IAGtDtB,EAAAyB,EAAA,GAGAzB,EAAA0B,KAIA1B,IAAA2B,EAAA,oBCzEAhC,EAAAD,QAAAkC,QAAA,yDCAAjC,EAAAD,QAAAkC,QAAA,4CCAAjC,EAAA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AAImC,IAAI/W,EAAQoZ,IAEhBF,EAAatE,EAAK7V,GAEdoa,EAAQ,CACV,IAAMQ,EAAShB,EAAKiB,aAAahF,GACjC+E,EAAO5F,GAAG,YAAa,WACrBC,QAAQsE,IAAR,qBAAiCI,EAAjC,IAAyCD,KAE3CkB,EAAOR,OAAOV,GAGhB,OAAO7D","file":"ace-api-server.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"AceApiServer\"] = factory();\n\telse\n\t\troot[\"AceApiServer\"] = factory();\n})(global, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading wasm modules\n \tvar installedWasmModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// object with all compiled WebAssembly.Modules\n \t__webpack_require__.w = {};\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 49);\n","module.exports = require(\"babel-runtime/helpers/asyncToGenerator\");","module.exports = require(\"babel-runtime/regenerator\");","module.exports = require(\"lodash\");","module.exports = require(\"babel-runtime/core-js/json/stringify\");","module.exports = require(\"lodash/isArray\");","const config = {\n environment: process.env.ENVIRONMENT || 'development',\n\n api: {\n prefix: process.env.API_PREFIX || '',\n blacklistToken: (process.env.API_BLACKLIST_TOKEN || '').split(','),\n blacklistReferrer: (process.env.API_BLACKLIST_REFERRER || '').split(','),\n },\n\n forceHttps: process.env.FORCE_HTTPS ? JSON.parse(process.env.FORCE_HTTPS) : false,\n\n session: {\n secret: process.env.SESSION_SECRET || 'change_me',\n ttl: parseInt(process.env.SESSION_TTL || 7200, 10),\n },\n\n cache: {\n enabled: process.env.CACHE_ENABLED ? JSON.parse(process.env.CACHE_ENABLED) : false,\n ttl: parseInt(process.env.CACHE_TTL || 30, 10) * 60, // 30mins\n compress: process.env.CACHE_COMPRESS ? JSON.parse(process.env.CACHE_COMPRESS) : false,\n memory: {\n max: parseInt(process.env.CACHE_MEMORY_MAX || 128, 10) * 1000 * 1000, // ~128mb\n },\n },\n\n redis: {\n url: process.env.REDIS_URL,\n host: process.env.REDIS_HOST,\n port: process.env.REDIS_PORT,\n password: process.env.REDIS_PASSWORD,\n db: parseInt(process.env.REDIS_DB || 0, 10),\n },\n\n logentriesToken: process.env.LOGENTRIES_TOKEN,\n};\n\nmodule.exports = config;\n","module.exports = require(\"bluebird\");","module.exports = require(\"babel-runtime/core-js/object/keys\");","module.exports = require(\"express\");","module.exports = ({\n User,\n router,\n authMiddleware,\n permissionMiddleware,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n}) => {\n\n router.post(\n '/user.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'user'),\n asyncMiddleware(async (req, res) => {\n const user = User(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await user.create(req.body.user));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.get(\n '/user.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'user'),\n asyncMiddleware(async (req, res) => {\n const user = User(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await user.read(req.query.userId));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.put(\n '/user.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'user'),\n asyncMiddleware(async (req, res) => {\n const user = User(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await user.update(req.body.user));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.delete(\n '/user.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'user'),\n asyncMiddleware(async (req, res) => {\n const user = User(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await user.delete(req.body.userId || req.body.userIds || req.query.userId || req.query.userIds));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n};\n","module.exports = ({\n Tools,\n router,\n authMiddleware,\n permissionMiddleware,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n}) => {\n\n router.get(\n '/tools/export-db.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'tools'),\n asyncMiddleware(async (req, res) => {\n const tools = Tools(await getConfig(req.session.slug));\n\n try {\n const db = await tools.getDb();\n\n res.setHeader('Content-Disposition', `attachment; filename=${req.session.slug}.json`);\n res.setHeader('Content-Type', 'application/json');\n res.status(200);\n res.send(db);\n\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.get(\n '/tools/changes.:ext?',\n authMiddleware,\n asyncMiddleware(async (req, res) => {\n const tools = Tools(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await tools.getChanges());\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n};\n","module.exports = ({\n Jwt,\n router,\n authMiddleware,\n asyncMiddleware,\n getConfig,\n handleResponse,\n // handleError,\n}) => {\n\n /**\n * @swagger\n * /token:\n * get:\n * tags:\n * - token\n * summary: Get JWT\n * description: Get Json Web Token (JWT) for API access\n * produces:\n * - application/json\n * parameters:\n * - name: slug\n * description: Slug for token payload (super user only)\n * in: query\n * required: false\n * type: string\n * - name: userId\n * description: User ID for token payload (super user only)\n * in: query\n * required: false\n * type: string\n * - name: role\n * description: Role for token payload (super user only)\n * in: query\n * required: false\n * type: string\n * - name: expiresIn\n * description: Duration of token in seconds\n * in: query\n * required: false\n * type: number\n * responses:\n * 200:\n * description: Token\n */\n\n router.get(\n '/token.:ext?',\n authMiddleware,\n asyncMiddleware(async (req, res) => {\n const config = await getConfig();\n\n const payload = {\n role: req.session.role,\n slug: req.session.slug,\n userId: req.session.userId,\n };\n\n if (req.session.role === 'super' || config.environment === 'development') {\n payload.role = req.query.role || req.session.role || config.dev.role;\n payload.slug = req.query.slug || req.session.slug || config.dev.slug;\n if (payload.role !== 'guest') {\n payload.userId = req.query.userId || req.session.userId || config.dev.userId;\n }\n }\n\n const _ = require('lodash');\n\n let options = _.pickBy(req.query, (value, key) => /^(expiresIn|notBefore|audience|issuer|jwtid|subject|noTimestamp|header)$/.test(key));\n\n options = _.mapValues(options, (value) => {\n if (!_.isNaN(+value)) { // Check if value is a numeric string\n return +value; // Convert numeric string to number\n }\n return value;\n });\n\n const jwt = Jwt(config);\n\n const token = jwt.signToken(payload, options);\n\n req.session.apiToken = token;\n\n const response = {\n token,\n payload,\n options,\n };\n\n handleResponse(req, res, response);\n })\n );\n\n};\n","module.exports = ({\n Taxonomy,\n router,\n authMiddleware,\n permissionMiddleware,\n cacheMiddleware,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n}) => {\n\n /**\n * @swagger\n * definitions:\n * Taxonomy:\n * type: object\n * properties:\n * title:\n * type: string\n * slug:\n * type: string\n * terms:\n * type: array\n * items:\n * type: object\n * properties:\n * id:\n * type: string\n * title:\n * type: string\n * slug:\n * type: string\n * terms:\n * type: array\n */\n\n router.post(\n '/taxonomy.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'taxonomyUpdate'),\n asyncMiddleware(async (req, res) => {\n const taxonomy = Taxonomy(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await taxonomy.create(req.body.taxonomy));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n /**\n * @swagger\n * /taxonomy:\n * get:\n * tags:\n * - taxonomy\n * summary: Get taxonomy\n * produces:\n * - application/json\n * parameters:\n * - name: slug\n * description: Taxonomy slug\n * in: query\n * required: true\n * type: string\n * responses:\n * 200:\n * description: Taxonomy\n * schema:\n * type: object\n * $ref: '#/definitions/Taxonomy'\n */\n router.get(\n '/taxonomy.:ext?',\n cacheMiddleware,\n asyncMiddleware(async (req, res) => {\n const taxonomy = Taxonomy(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await taxonomy.read(req.query.slug || req.query.taxonomySlug), true);\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.put(\n '/taxonomy.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'taxonomyUpdate'),\n asyncMiddleware(async (req, res) => {\n const taxonomy = Taxonomy(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await taxonomy.update(req.body.taxonomy));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.delete(\n '/taxonomy.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'taxonomyUpdate'),\n asyncMiddleware(async (req, res) => {\n const taxonomy = Taxonomy(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await taxonomy.delete(req.body.taxonomySlug || req.body.taxonomySlugs || req.query.taxonomySlug || req.query.taxonomySlugs));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.post(\n '/taxonomy/term.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'taxonomyUpdate'),\n asyncMiddleware(async (req, res) => {\n const taxonomy = Taxonomy(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await taxonomy.createTerm(req.body.slug || req.body.taxonomySlug, req.body.term));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.put(\n '/taxonomy/term.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'taxonomyUpdate'),\n asyncMiddleware(async (req, res) => {\n const taxonomy = Taxonomy(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await taxonomy.updateTerm(req.query.term || req.body.term));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.delete(\n '/taxonomy/term.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'taxonomyUpdate'),\n asyncMiddleware(async (req, res) => {\n const taxonomy = Taxonomy(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await taxonomy.deleteTerm(req.query.term || req.body.term));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n};\n","module.exports = ({\n Ecommerce,\n Email,\n Stripe,\n router,\n authMiddleware,\n permissionMiddleware,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n}) => {\n\n router.all(\n '/stripe/checkout.:ext?',\n asyncMiddleware(async (req, res) => {\n const token = req.body.token || JSON.parse(req.query.token);\n const order = req.body.order || JSON.parse(req.query.order);\n\n const stripe = Stripe(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await stripe.checkout(token, order));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.post(\n '/stripe/refund.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'ecommerce'),\n asyncMiddleware(async (req, res) => {\n const order = req.body.order || JSON.parse(req.query.order);\n const amount = Number(req.body.amount || req.query.amount || 0) * 100;\n\n const stripe = Stripe(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await stripe.refund(order, amount));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.get(\n '/stripe/account.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'ecommerce'),\n asyncMiddleware(async (req, res) => {\n const stripe = Stripe(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await stripe.retrieveAccount());\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.get(\n '/stripe/email.:ext?',\n asyncMiddleware(async (req, res) => {\n const config = await getConfig(req.session.slug);\n const email = Email(config);\n const stripe = Stripe(config);\n const ecommerce = Ecommerce(config);\n\n const settings = await stripe.getSettings();\n const order = await ecommerce.getOrder(req.query.orderId);\n\n const data = {\n settings,\n order,\n };\n\n const template = await email.getTemplate(`${req.session.slug}/${req.query.template}`, data);\n\n try {\n handleResponse(req, res, template.html);\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n};\n","module.exports = require(\"twitter\");","module.exports = ({\n ClientConfig,\n Instagram,\n router,\n cacheMiddleware,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n}) => {\n\n const instagramAccessTokenMap = {};\n\n router.get(\n /\\/social\\/twitter\\/([^/]+)\\/?(.+)?/,\n cacheMiddleware,\n asyncMiddleware(async (req, res) => {\n const method = req.params[0];\n const params = req.params[1].split('/').filter(param => param !== '');\n\n const config = await getConfig(req.session.slug);\n\n const Promise = require('bluebird');\n const Twitter = require('twitter');\n\n const twitter = Promise.promisifyAll(new Twitter({\n consumer_key: config.twitter.consumerKey,\n consumer_secret: config.twitter.consumerSecret,\n access_token_key: config.twitter.accessTokenKey,\n access_token_secret: config.twitter.accessTokenSecret,\n }));\n\n try {\n handleResponse(req, res, await twitter[`${method}Async`](params.join('/'), req.query), true);\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.get(\n /\\/social\\/instagram\\/([^/]+)\\/?(.+)?/,\n cacheMiddleware,\n asyncMiddleware(async (req, res) => {\n const method = req.params[0];\n const params = req.params[1].split('/').filter(param => param !== '');\n\n const config = await getConfig(req.session.slug);\n\n if (!instagramAccessTokenMap[req.session.slug]) {\n const cc = ClientConfig(config);\n\n try {\n const clientConfig = await cc.get();\n instagramAccessTokenMap[req.session.slug] = clientConfig.provider.instagram.access_token;\n } catch (error) {\n handleError(res, new Error('Instagram: access_token required'));\n return;\n }\n }\n\n req.query.access_token = instagramAccessTokenMap[req.session.slug];\n\n const instagram = Instagram({\n client_id: config.instagram.clientId,\n });\n\n try {\n const result = await instagram[method](params.join('/'), req.query);\n try {\n delete result.pagination.next_url;\n } catch (error) {\n //\n }\n handleResponse(req, res, result, true);\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n};\n","module.exports = ({\n Shippo,\n router,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n}) => {\n\n router.all(\n '/shippo/quote.:ext?',\n asyncMiddleware(async (req, res) => {\n const shippo = Shippo(await getConfig());\n\n const address = req.body.address || JSON.parse(req.params.address);\n const parcel = req.body.parcel || JSON.parse(req.params.parcel);\n\n try {\n handleResponse(req, res, await shippo.getQuote(address, parcel), true);\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n};\n","module.exports = ({\n Settings,\n router,\n authMiddleware,\n permissionMiddleware,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n}) => {\n\n router.post(\n '/settings.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'settings'),\n asyncMiddleware(async (req, res) => {\n const settings = Settings(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await settings.update(req.body.settings));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n};\n","module.exports = ({\n Schema,\n router,\n authMiddleware,\n permissionMiddleware,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n}) => {\n\n router.post(\n '/schema.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'schema'),\n asyncMiddleware(async (req, res) => {\n const schema = Schema(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await schema.create(req.body.schema));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.get(\n '/schema.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'schema'),\n asyncMiddleware(async (req, res) => {\n const schema = Schema(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await schema.read(req.query.schemaId));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.put(\n '/schema.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'schema'),\n asyncMiddleware(async (req, res) => {\n const schema = Schema(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await schema.update(req.body.schema));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.delete(\n '/schema.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'schema'),\n asyncMiddleware(async (req, res) => {\n const schema = Schema(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await schema.delete(req.body.schemaSlug || req.body.schemaSlugs || req.query.schemaSlug || req.query.schemaSlugs));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.put(\n '/schemas.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'schema'),\n asyncMiddleware(async (req, res) => {\n const schema = Schema(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await schema.updateAll(req.body.schemas));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n};\n","const _ = require('lodash');\n\nmodule.exports = ({\n Pdf,\n ClientConfig,\n router,\n asyncMiddleware,\n getConfig,\n handleError,\n}) => {\n\n router.get(\n '/pdf/view.:ext?',\n asyncMiddleware(async (req, res) => {\n const pdf = Pdf(await getConfig(req.session.slug));\n\n pdf.getPayload(req.query.template, req.query.id, req.session.role)\n .then((payload) => {\n pdf.getPdf(payload)\n .then((pdf) => {\n res.type('application/pdf');\n res.status(200);\n res.send(pdf);\n }, handleError.bind(null, req, res));\n }, handleError.bind(null, req, res));\n })\n );\n\n router.get(\n '/pdf/download.:ext?',\n asyncMiddleware(async (req, res) => {\n const pdf = Pdf(await getConfig(req.session.slug));\n\n pdf.getPayload(req.query.template, req.query.id, req.session.role)\n .then((payload) => {\n pdf.getPdf(payload)\n .then((pdf) => {\n res.attachment(payload.fileName || 'download.pdf');\n res.status(200);\n res.send(pdf);\n }, handleError.bind(null, req, res));\n }, handleError.bind(null, req, res));\n })\n );\n\n router.get(\n '/pdf/payload.:ext?',\n asyncMiddleware(async (req, res) => {\n const pdf = Pdf(await getConfig(req.session.slug));\n\n pdf.getPayload(req.query.template, req.query.id, req.session.role)\n .then((payload) => {\n res.status(200);\n res.json(payload);\n }, handleError.bind(null, req, res));\n })\n );\n\n router.get(\n '/pdf/submit.:ext?',\n asyncMiddleware(async (req, res) => {\n const config = await getConfig(req.session.slug);\n\n const cc = ClientConfig(config);\n const clientConfig = await cc.get();\n\n const assetSlug = _.get(clientConfig, 'assets.slug', req.session.slug);\n\n const pdf = Pdf(config);\n\n pdf.getPayload(req.query.template, req.query.id, req.session.role)\n .then((payload) => {\n payload = JSON.stringify(payload).replace(/'/gi, '’');\n\n res.status(200);\n res.send(`\n <body onload='form.submit()'>\n <form id='form' method='POST' action='${config.assist.url}/${assetSlug}/pdf/download' target='_self'>\n <input type='hidden' name='payload' value='${payload}' />\n </form>\n </body>\n `);\n }, handleError.bind(null, req, res));\n })\n );\n};\n","module.exports = ({\n ClientConfig,\n router,\n cacheMiddleware,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n}) => {\n\n /**\n * @swagger\n * /metadata:\n * get:\n * tags:\n * - metadata\n * summary: Get metadata\n * produces:\n * - application/json\n * parameters: []\n * responses:\n * 200:\n * description: Metadata\n * schema:\n * type: object\n * properties:\n * description:\n * type: string\n */\n router.get(\n '/metadata.:ext?',\n cacheMiddleware,\n asyncMiddleware(async (req, res) => {\n const cc = ClientConfig(await getConfig(req.session.slug));\n\n const clientConfig = await cc.get();\n\n try {\n handleResponse(req, res, clientConfig.client.metadata, true);\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n};\n","const isArray = require('lodash/isArray');\n\nmodule.exports = ({\n Db,\n Entity,\n router,\n authMiddleware,\n permissionMiddleware,\n cacheMiddleware,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n}) => {\n\n /**\n * @swagger\n * definitions:\n * Entity:\n * type: object\n * required:\n * - _id\n * - _rev\n * properties:\n * _id:\n * type: string\n * _rev:\n * type: string\n * schema:\n * type: string\n * title:\n * type: string\n * slug:\n * type: string\n * thumbnail:\n * type: object\n * fields:\n * type: object\n * published:\n * type: boolean\n * publishedAt:\n * type: string\n */\n\n /**\n * @swagger\n * /entities/index:\n * get:\n * tags:\n * - entities\n * summary: Show indexes\n * description: Show all indexes, use this to find fields available for search/query.\n * produces:\n * - application/json\n * parameters: []\n * responses:\n * 200:\n * description: Indexes\n */\n router.get(\n '/entities/index.:ext?',\n asyncMiddleware(async (req, res) => {\n try {\n handleResponse(req, res, await Db(await getConfig(req.session.slug)).indexAsync());\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n /**\n * @swagger\n * /entities/search:\n * get:\n * tags:\n * - entities\n * summary: Search entities\n * description: This endpoint extends Cloudant's Lucene based search. Learn more from Cloudant's [documentation](https://docs.cloudant.com/search.html).\n * produces:\n * - application/json\n * parameters:\n * - name: query\n * description: Lucene search query\n * in: query\n * required: true\n * type: string\n * - name: include_docs\n * description: Include docs in search results (ignored if `children` or `parents` is `true`)\n * in: query\n * required: false\n * type: boolean\n * default: false\n * - name: sort\n * description: Field to sort results by. Prefixed with `-` to reverse order. Suffixed with &#60;`string|number`&#62;\n * in: query\n * required: false\n * type: string\n * - name: limit\n * description: Limit results (max 200)\n * in: query\n * required: false\n * type: number\n * - name: bookmark\n * description: Bookmark for the next page of results\n * in: query\n * required: false\n * type: string\n * - name: group_field\n * description: Field to group results by\n * in: query\n * required: false\n * type: string\n * - name: index\n * description: Search index\n * in: query\n * required: false\n * type: string\n * default: all\n * - name: children\n * description: Get child entities\n * in: query\n * required: false\n * type: boolean\n * default: false\n * - name: parents\n * description: Get parent entities\n * in: query\n * required: false\n * type: boolean\n * default: false\n * - name: trashed\n * description: Get trashed entities\n * in: query\n * required: false\n * type: boolean\n * default: false\n * responses:\n * 200:\n * description: Search result\n * schema:\n * type: object\n * properties:\n * bookmark:\n * type: string\n * total_rows:\n * type: number\n * rows:\n * type: array\n * items:\n * $ref: '#/definitions/Entity'\n */\n router.all(\n '/entities/search?.:ext?',\n cacheMiddleware,\n asyncMiddleware(async (req, res) => {\n const include_docs = (req.query.include_docs || req.body.include_docs) !== undefined\n ? JSON.parse(req.query.include_docs || req.body.include_docs) : false;\n\n let children = (req.query.children || req.body.children) !== undefined\n ? JSON.parse((req.query.children || req.body.children)) : false;\n let parents = (req.query.parents || req.body.parents) !== undefined\n ? JSON.parse(req.query.parents || req.body.parents) : false;\n\n const trashed = (req.query.trashed || req.body.trashed) !== undefined\n ? JSON.parse(req.query.trashed || req.body.trashed) : false;\n\n const sort = (req.query.sort || req.body.sort) !== undefined\n ? req.query.sort || req.body.sort : null;\n const limit = (req.query.limit || req.body.limit) !== undefined\n ? parseInt(req.query.limit || req.body.limit, 10) : null;\n\n const bookmark = (req.query.bookmark || req.body.bookmark) !== undefined\n ? req.query.bookmark || req.body.bookmark : null;\n\n const group_field = (req.query.group_field || req.body.group_field) !== undefined\n ? req.query.group_field || req.body.group_field : null;\n\n const index = (req.query.index || req.body.index) !== undefined\n ? req.query.index || req.body.index : null;\n\n const q = req.query.query || req.query.q || req.body.query || req.body.q;\n\n if (children === true) {\n children = 1;\n }\n if (parents === true) {\n parents = 1;\n }\n\n let query = [];\n\n query.push(trashed ? 'trashed:true' : '!trashed:true');\n\n if (req.session.role === 'guest') {\n query.push('published:true');\n }\n\n if (q) {\n query.push(`(${q})`);\n }\n\n query = query.join(' AND ');\n\n const entity = Entity(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await entity.entitySearch({\n query,\n include_docs,\n sort,\n limit,\n bookmark,\n group_field,\n index,\n }, children, parents, req.session.role), true);\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n /**\n * @swagger\n * /entities/find:\n * get:\n * tags:\n * - entities\n * summary: Query entities\n * description: This endpoint extends CouchDB's Mango query. Learn more from Cloudant's [documentation](https://docs.cloudant.com/cloudant_query.html#finding-documents-using-an-index).\n * produces:\n * - application/json\n * parameters:\n * - name: query\n * description: JSON query object, refer to CouchDB/Cloudant docs.\n * in: query\n * required: true\n * type: string\n * - name: children\n * description: Get child entities\n * in: query\n * required: false\n * type: boolean\n * default: false\n * - name: parents\n * description: Get parent entities\n * in: query\n * required: false\n * type: boolean\n * default: false\n * responses:\n * 200:\n * description: Query result\n * schema:\n * type: object\n * properties:\n * bookmark:\n * type: string\n * docs:\n * type: array\n * items:\n * $ref: '#/definitions/Entity'\n */\n router.all(\n '/entities/find.:ext?',\n cacheMiddleware,\n asyncMiddleware(async (req, res) => {\n let children = (req.query.children || req.body.children) !== undefined\n ? JSON.parse((req.query.children || req.body.children)) : false;\n let parents = (req.query.parents || req.body.parents) !== undefined\n ? JSON.parse(req.query.parents || req.body.parents) : false;\n const trashed = (req.query.trashed || req.body.trashed) !== undefined\n ? JSON.parse(req.query.trashed || req.body.trashed) : false;\n const query = req.query.query || req.body.query\n ? JSON.parse(req.query.query || req.body.query) : { selector: {} };\n\n query.use_index = ['entityIndex', 'entity'];\n\n if (children === true) {\n children = 1;\n }\n if (parents === true) {\n parents = 1;\n }\n\n if (!query.selector.$and) {\n query.selector = {\n $and: [\n query.selector,\n ],\n };\n }\n\n if (trashed) {\n query.selector.$and.push({ trashed: true });\n } else {\n query.selector.$and.push({\n $or: [\n {\n trashed: {\n $exists: false,\n },\n },\n {\n trashed: false,\n },\n ],\n });\n }\n\n if (req.session.role === 'guest') {\n query.selector.$and.push({ published: true });\n }\n\n if (req.query.limit) {\n query.limit = parseInt(req.query.limit, 10);\n }\n\n const entity = Entity(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await entity.entityFind(query, children, parents, req.session.role), true);\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.get(\n '/entities/field.:ext?',\n cacheMiddleware,\n asyncMiddleware(async (req, res) => {\n const entity = Entity(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await entity.fieldValues(req.query.slug || req.query.fieldSlug, req.query.searchTerm), true);\n } catch (error) {\n handleError(res, error);\n }\n })\n );\n\n /**\n * @swagger\n * /entities:\n * get:\n * tags:\n * - entities\n * summary: Get all entities\n * description: Get all entities, optionally from an array of IDs\n * produces:\n * - application/json\n * parameters:\n * - name: id\n * description: Entity ID\n * in: query\n * required: false\n * type: string\n * - name: ids\n * description: Entity IDs\n * in: query\n * required: false\n * type: array\n * items:\n * type: string\n * - name: children\n * description: Get child entities\n * in: query\n * required: false\n * type: boolean\n * default: false\n * - name: parents\n * description: Get parent entities\n * in: query\n * required: false\n * type: boolean\n * default: false\n * responses:\n * 200:\n * description: Entities\n * schema:\n * type: array\n * items:\n * $ref: '#/definitions/Entity'\n */\n router.all(\n '/entities.:ext?',\n cacheMiddleware,\n asyncMiddleware(async (req, res) => {\n let children = (req.query.children || req.body.children) !== undefined\n ? JSON.parse(req.query.children || req.body.children) : false;\n let parents = (req.query.parents || req.body.parents) !== undefined\n ? JSON.parse(req.query.parents || req.body.parents) : false;\n\n if (children === true) {\n children = 1;\n }\n if (parents === true) {\n parents = 1;\n }\n\n let ids = req.query.ids || req.query.id || req.body.ids || req.body.id;\n\n if (ids) {\n ids = isArray(ids) ? ids : [ids];\n }\n\n const entity = Entity(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await entity.entityList(ids, children, parents, req.session.role), true);\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.get(\n '/entity/revisions.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'entityRead'),\n asyncMiddleware(async (req, res) => {\n const entity = Entity(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await entity.entityRevisions(req.query.id));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.post(\n '/entity.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'entityCreate'),\n asyncMiddleware(async (req, res) => {\n const entity = Entity(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await entity.entityCreate(req.body.entity));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.get(\n '/entity.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'entityRead'),\n asyncMiddleware(async (req, res) => {\n const entity = Entity(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await entity.entityRead(req.query.id));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.put(\n '/entity.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'entityUpdate'),\n asyncMiddleware(async (req, res) => {\n const entity = Entity(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await entity.entityUpdate(req.body.entity || req.body.entities, req.body.restore || false));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.delete(\n '/entity.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'entityDelete'),\n asyncMiddleware(async (req, res) => {\n const entity = Entity(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await entity.entityDelete(req.body.entity || req.body.entities, req.body.forever || false));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.delete(\n '/entity/trashed.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'entityDelete'),\n asyncMiddleware(async (req, res) => {\n const entity = Entity(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await entity.entityDelete('trashed'));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n};\n","module.exports = ({\n Embedly,\n router,\n authMiddleware,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n}) => {\n\n router.get(\n '/embedly/oembed.:ext?',\n authMiddleware,\n asyncMiddleware(async (req, res) => {\n const embedly = Embedly(await getConfig());\n\n try {\n handleResponse(req, res, await embedly.oembed(req.query.url || req.query.urls));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n};\n","module.exports = ({\n Email,\n Entity,\n router,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n}) => {\n\n /**\n * @swagger\n * /email/template:\n * get:\n * tags:\n * - email\n * summary: Render email template\n * # description: Render email template\n * produces:\n * - text/html\n * parameters:\n * - name: slug\n * description: Slug (parent folder name of the template)\n * in: query\n * required: false\n * type: string\n * - name: templateSlug\n * description: Template slug (folder name of the template)\n * in: query\n * required: true\n * type: string\n * - name: entityId\n * description: Entity `id` from which to render the template\n * in: query\n * required: false\n * type: string\n * - name: preview\n * description: Preview mode (disable inlining of styles etc)\n * in: query\n * required: false\n * type: boolean\n * responses:\n * 200:\n * description: Template\n */\n router.all(\n '/email/template.:ext?',\n asyncMiddleware(async (req, res) => {\n const input = Object.keys(req.body).length ? req.body : req.query || {};\n\n const options = {\n data: input.data ? JSON.parse(input.data) : false,\n preview: input.preview ? JSON.parse(input.preview) : false,\n inky: input.inky ? JSON.parse(input.inky) : false,\n mjml: input.mjml ? JSON.parse(input.mjml) : false,\n skipValidation: input.skipValidation ? JSON.parse(input.skipValidation) : false,\n };\n\n const slug = req.session.slug || input.slug;\n\n if (!slug) {\n throw new Error('missing slug param');\n }\n\n async function renderTemplate(data = {}) {\n if (options.data) {\n handleResponse(req, res, data);\n return;\n }\n\n const email = Email(await getConfig(slug));\n\n const template = await email.getTemplate(`${slug}/${input.templateSlug}`, data, options);\n\n try {\n handleResponse(req, res, template.html);\n } catch (error) {\n handleError(req, res, error);\n }\n }\n\n if (input.payload) {\n renderTemplate(JSON.parse(input.payload));\n return;\n }\n\n if (input.entityId) {\n const entity = Entity(await getConfig(slug));\n\n const entities = (await entity.entityList([input.entityId], 2)).map(row => row.doc);\n\n renderTemplate(entity.flattenValues(entities)[0]);\n return;\n }\n\n renderTemplate();\n })\n );\n\n router.post(\n '/email/subscribe.:ext?',\n asyncMiddleware(async (req, res) => {\n const email = Email(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await email.subscribe({\n email: req.body.email || req.query.email,\n name: req.body.name || req.query.name || '',\n }));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n};\n","const isArray = require('lodash/isArray');\n\nmodule.exports = ({\n Ecommerce,\n router,\n authMiddleware,\n permissionMiddleware,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n}) => {\n\n router.get(\n '/ecommerce/order/message/:message.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'ecommerce'),\n asyncMiddleware(async (req, res) => {\n const ecommerce = Ecommerce(await getConfig(req.session.slug));\n\n try {\n const order = await ecommerce.getOrder(req.query.orderId);\n handleResponse(req, res, order.messages[req.params.message].email.html);\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.get(\n '/ecommerce/:type.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'ecommerce'),\n asyncMiddleware(async (req, res) => {\n if (isArray(req.query.sort)) {\n req.query.sort = JSON.stringify(req.query.sort).replace(/\\\\\"/g, '');\n }\n\n const ecommerce = Ecommerce(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await ecommerce.getType(req.params.type, req.query));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.post(\n '/ecommerce/:type.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'ecommerce'),\n asyncMiddleware(async (req, res) => {\n if (!/^(discount|order)$/.test(req.params.type)) {\n handleError(req, res, `Illegal type: ${req.params.type}`);\n return;\n }\n\n const ecommerce = Ecommerce(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await ecommerce.setType(req.params.type, req.body.item));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.delete(\n '/ecommerce/:type.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'ecommerce'),\n asyncMiddleware(async (req, res) => {\n if (!/^(discount)$/.test(req.params.type)) {\n handleError(req, res, `Illegal type: ${req.params.type}`);\n return;\n }\n\n const ecommerce = Ecommerce(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await ecommerce.deleteType(req.body.item));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.get(\n '/ecommerce/discount/:code.:ext?',\n asyncMiddleware(async (req, res) => {\n const ecommerce = Ecommerce(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await ecommerce.verifyDiscount(req.params.code));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n};\n","module.exports = require(\"express-useragent\");","module.exports = ({\n router,\n}) => {\n\n router.all('/debug/useragent.:ext?', (req, res) => {\n const expressUseragent = require('express-useragent');\n const useragent = expressUseragent.parse(req.headers['user-agent']);\n\n res.status(200);\n res.send(`\n <html>\n <head>\n <title>${useragent.source}</title>\n <meta name=\"description\" content=\"${useragent.source}\">\n </head>\n <body>${useragent.source}</body>\n </html>\n `);\n });\n\n};\n","module.exports = ({\n ClientConfig,\n router,\n authMiddleware,\n permissionMiddleware,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n}) => {\n\n router.get(\n '/config.:ext?',\n authMiddleware,\n asyncMiddleware(async (req, res) => {\n const clientConfig = ClientConfig(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await clientConfig.get());\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.post(\n '/config.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'config'),\n asyncMiddleware(async (req, res) => {\n const clientConfig = ClientConfig(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await clientConfig.set(req.body.config));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n};\n","module.exports = ({\n router,\n cache,\n asyncMiddleware,\n getConfig,\n handleResponse,\n}) => {\n\n /**\n * @swagger\n * /cache/clear:\n * get:\n * tags:\n * - cache\n * summary: Clear cache\n * description: Clears the LRU cache of API responses\n * produces:\n * - text/plain\n * responses:\n * 200:\n * description: Result\n */\n router.get(\n '/cache/clear.:ext?',\n asyncMiddleware(async (req, res) => {\n const config = await getConfig();\n\n if (!config.cache.enabled) {\n handleResponse(req, res, 'Cache disabled');\n return;\n }\n\n const items = [];\n\n cache.forEach((value, key) => {\n if (key.indexOf(req.session.slug) === 0) {\n items.push(key);\n }\n });\n\n items.forEach(key => cache.del(key));\n\n handleResponse(req, res, `${items.length} items removed from cache`);\n })\n );\n\n};\n","module.exports = ({\n Auth,\n router,\n authMiddleware,\n permissionMiddleware,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n}) => {\n\n router.get(\n '/auth/:provider/config.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'settings'),\n asyncMiddleware(async (req, res) => {\n const config = await getConfig();\n\n if (!config[req.params.provider]) {\n res.status(404);\n res.send({});\n return;\n }\n\n res.status(200);\n res.send({ clientId: config[req.params.provider].clientId });\n })\n );\n\n router.get(\n '/auth/:provider.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'settings'),\n (req, res) => {\n res.status(req.query.error ? 500 : 200);\n res.send(`${req.params.provider}: ${(req.query.error_description ? req.query.error_description : 'successfully authenticated')}`);\n }\n );\n\n router.post(\n '/auth/:provider.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'settings'),\n asyncMiddleware(async (req, res) => {\n const auth = Auth(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await auth.authenticateWithProvider(req.params.provider, req.body));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n router.put(\n '/auth/:provider.:ext?',\n authMiddleware,\n permissionMiddleware.bind(null, 'settings'),\n asyncMiddleware(async (req, res) => {\n const auth = Auth(await getConfig(req.session.slug));\n\n try {\n handleResponse(req, res, await auth.authenticateWithProvider(req.params.provider, req.body, true));\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n\n};\n","module.exports = ({\n Analytics,\n router,\n authMiddleware,\n cacheMiddleware,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n}) => {\n\n router.get(\n '/analytics.:ext?',\n authMiddleware,\n cacheMiddleware,\n asyncMiddleware(async (req, res) => {\n const analytics = Analytics(await getConfig());\n\n try {\n handleResponse(req, res, await analytics.get(req.query), true);\n } catch (error) {\n handleError(req, res, error);\n }\n })\n );\n};\n","module.exports = require(\"ace-api\");","module.exports = require(\"deep-freeze\");","module.exports = require(\"object-sizeof\");","module.exports = require(\"circular-json-es6\");","module.exports = require(\"le_node\");","module.exports = require(\"zlib\");","module.exports = require(\"url-parse\");","module.exports = require(\"cache-manager-redis-store\");","module.exports = require(\"cache-manager\");","process.on('unhandledRejection', result => console.error(result));\n\nconst _ = require('lodash');\nconst express = require('express');\nconst cacheManager = require('cache-manager');\nconst redisStore = require('cache-manager-redis-store');\nconst Promise = require('bluebird');\nconst URL = require('url-parse');\nconst zlib = Promise.promisifyAll(require('zlib'));\nconst Logger = require('le_node');\nconst CircularJSON = require('circular-json-es6');\nconst sizeof = require('object-sizeof');\nconst deepFreeze = require('deep-freeze');\n\nconst Api = require('ace-api');\n\nconst defaultConfig = require('./config.default');\n\nfunction AceApiServer (app, customConfig = {}, customAuthMiddleware = null) {\n const config = deepFreeze(_.merge({}, Api.defaultConfig, defaultConfig, customConfig));\n\n // Async middleware\n\n const asyncMiddleware = fn => (req, res, next) => {\n Promise.resolve(fn(req, res, next))\n .catch(next);\n };\n\n // Skip authorisation\n\n const skipAuth = (req) => {\n if (config.environment !== 'development') {\n return false;\n }\n const allowedRoutes = [\n '/token',\n '/email/template',\n ];\n return allowedRoutes.indexOf(req.path) > -1;\n };\n\n // Default auth middleware\n\n const defaultAuthMiddleware = (req, res, next) => {\n if (skipAuth(req)) {\n next();\n return;\n }\n\n if (!req.session.userId) {\n res.status(401);\n res.send({\n code: 401,\n message: 'Not authorised',\n });\n return;\n }\n\n next();\n };\n\n const authMiddleware = customAuthMiddleware || defaultAuthMiddleware;\n\n // Permissions middleware\n\n const permissionMiddleware = (permission, req, res, next) => {\n if (!req.session.role) {\n res.status(401);\n res.send({\n permission,\n message: 'Error: role not defined in session.',\n });\n return;\n }\n\n if (req.session.role === 'super') {\n next();\n return;\n }\n\n const roles = Api.Roles();\n\n if (!roles.role(req.session.role) || roles.role(req.session.role).permissions[permission] !== true) {\n res.status(401);\n res.send({\n permission,\n message: 'Sorry, you\\'re not authorised to do this.',\n });\n return;\n }\n\n next();\n };\n\n // Clone and extend config per request/session\n\n const omitUndefined = (obj) => {\n _.forIn(obj, (value, key, obj) => {\n if (_.isPlainObject(value)) {\n value = omitUndefined(value);\n\n if (_.keys(value).length === 0) {\n delete obj[key];\n }\n }\n\n if (_.isUndefined(value)) {\n delete obj[key];\n }\n });\n\n return obj;\n };\n\n const cloneConfig = config => _.mergeWith({}, JSON.parse(JSON.stringify(config)), omitUndefined(_.cloneDeep(config)));\n\n const getConfig = async (slug) => {\n const configClone = cloneConfig(config);\n\n configClone.slug = slug;\n configClone.db.name = slug;\n\n return configClone;\n };\n\n // Cache\n\n let cache;\n\n if (config.cache.enabled) {\n if (config.redis.url || config.redis.host) {\n const redisOptions = {\n ttl: config.cache.ttl,\n };\n\n if (config.redis.url) {\n redisOptions.url = config.redis.url;\n } else {\n redisOptions.host = config.redis.host;\n redisOptions.port = config.redis.port;\n redisOptions.password = config.redis.password;\n redisOptions.db = config.redis.db;\n }\n\n cache = cacheManager.caching(_.merge({ store: redisStore }, redisOptions));\n\n const redisClient = cache.store.getClient();\n redisClient.on('error', (error) => {\n console.error('redis: error:', error);\n });\n\n } else {\n cache = cacheManager.caching({\n store: 'memory',\n ttl: config.cache.ttl,\n max: config.cache.memory.max,\n length: (item) => {\n // const length = Buffer.byteLength(item, 'utf8')\n const length = sizeof(item);\n return length;\n },\n });\n }\n }\n\n // Cache middleware\n\n const cacheMiddleware = asyncMiddleware(async (req, res, next) => {\n const useCachedResponse = (\n config.cache.enabled\n && req.session.role === 'guest' // TODO: Replace 'guest' with constant\n && (req.query.__cache && JSON.parse(req.query.__cache)) !== false\n );\n\n if (useCachedResponse) {\n try {\n const key = `${req.session.slug}${req.url}`;\n\n let response = await cache.get(key);\n\n if (typeof response === 'string') {\n if (config.cache.compress) {\n response = (await zlib.gunzipAsync(Buffer.from(response, 'base64'))).toString();\n }\n\n try {\n response = JSON.parse(response);\n } catch (error) {\n //\n }\n\n res.set('X-Cached-Response', true);\n res.status(200);\n res.send(response);\n\n return;\n }\n } catch (error) {\n console.error(error);\n }\n }\n\n res.set('X-Cached-Response', false);\n next();\n });\n\n // Response helpers\n\n const handleError = (req, res, error) => {\n if (_.isObject(error)) {\n error = JSON.parse(CircularJSON.stringify(error));\n }\n\n const statusCode = error.statusCode || error.code || 500;\n const errorMessage = error.stack || error.error || error.message || error.body || error.data || error;\n\n console.error(errorMessage);\n\n res.status(typeof statusCode === 'string' ? 500 : statusCode);\n res.send({\n code: statusCode,\n message: errorMessage,\n });\n };\n\n const handleResponse = async (req, res, response, cacheResponse = false) => {\n response = CircularJSON.stringify(response);\n\n res.status(200);\n res.send(JSON.parse(response));\n\n if (cacheResponse && config.cache.enabled && req.session.role === 'guest') { // TODO: Replace 'guest' with constant\n const key = `${req.session.slug}${req.url}`;\n\n if (config.cache.compress) {\n response = (await zlib.gzipAsync(Buffer.from(response))).toString('base64');\n }\n\n cache.set(key, response);\n }\n };\n\n // Header middleware\n\n const headerMiddleware = (req, res, next) => {\n const headers = {\n 'Access-Control-Allow-Origin': '*',\n 'Access-Control-Allow-Methods': 'GET,PUT,POST,DELETE,OPTIONS',\n 'Access-Control-Expose-Headers': 'X-Slug, X-Role, X-User-Id',\n Vary: 'Accept-Encoding, X-Api-Token',\n };\n\n if (req.headers['access-control-request-headers']) {\n headers['Access-Control-Allow-Headers'] = req.headers['access-control-request-headers'];\n }\n\n res.set(headers);\n\n if (req.method === 'OPTIONS') {\n res.sendStatus(200);\n return;\n }\n\n next();\n };\n\n // Session middleware\n\n const jwt = Api.Jwt(config);\n\n const sessionMiddleware = (req, res, next) => {\n if (skipAuth(req)) {\n next();\n return;\n }\n\n const referrer = req.headers.referrer || req.headers.referer;\n\n if (referrer) {\n const referrerHostname = new URL(referrer)\n .hostname.split('.').slice(-2).join('.');\n\n if (config.api.blacklistReferrer.indexOf(referrerHostname) > -1) {\n res.status(401);\n res.send({\n code: 401,\n message: 'Not authorised, referrer blacklisted',\n });\n return;\n }\n }\n\n const token = req.headers['x-api-token'] || req.query.apiToken || req.session.apiToken;\n\n if (!token) {\n res.status(401);\n res.send({\n code: 401,\n message: 'Not authorised, missing token',\n });\n return;\n }\n\n if (config.api.blacklistToken.indexOf(token) > -1) {\n res.status(401);\n res.send({\n code: 401,\n message: 'Not authorised, token blacklisted',\n });\n return;\n }\n\n try {\n const payload = jwt.verifyToken(token);\n\n req.session.userId = payload.userId;\n req.session.slug = payload.slug;\n req.session.role = payload.role || 'guest'; // TODO: Replace 'guest' with constant\n\n } catch (error) {\n res.status(401);\n res.send({\n code: 401,\n message: `Not authorised, token verification failed (${error.message})`,\n error,\n });\n return;\n }\n\n if (!req.session.slug) {\n res.status(401);\n res.send({\n code: 401,\n message: 'Not authorised, missing slug',\n });\n return;\n }\n\n if (!req.session.role) {\n req.session.role = 'guest';\n }\n\n if (req.session.userId) {\n res.set('X-User-Id', req.session.userId);\n }\n\n res.set('X-Environment', config.environment);\n res.set('X-Slug', req.session.slug);\n res.set('X-Role', req.session.role);\n\n next();\n };\n\n // Router\n\n const router = express.Router();\n\n const forceHttps = (req, res, next) => {\n if (\n (req.headers['x-forwarded-proto'] && req.headers['x-forwarded-proto'] !== 'https') &&\n (req.headers['cf-visitor'] && JSON.parse(req.headers['cf-visitor']).scheme !== 'https') // Fix for Cloudflare/Heroku flexible SSL\n ) {\n res.redirect(301, `https://${req.headers.host}${req.path}`);\n return;\n }\n next();\n };\n\n if (config.environment === 'production' && config.forceHttps === true) {\n if (app.enable) {\n app.enable('trust proxy');\n }\n app.use(forceHttps);\n }\n\n app.use(`/${config.api.prefix}`, headerMiddleware, sessionMiddleware, router);\n\n app.get(`/${config.api.prefix}`, (req, res) => {\n res.send('<pre> ______\\n|A |\\n| /\\\\ |\\n| / \\\\ |\\n|( )|\\n| )( |\\n|______|</pre>');\n });\n\n // Context\n\n const context = {\n app,\n router,\n cache,\n authMiddleware,\n permissionMiddleware,\n cacheMiddleware,\n asyncMiddleware,\n getConfig,\n handleResponse,\n handleError,\n };\n\n // Inject API into context\n\n Object.keys(Api).forEach((key) => {\n context[key] = Api[key];\n });\n\n if (config.logentriesToken) {\n context.log = new Logger({\n token: config.logentriesToken,\n });\n }\n\n const afterResponse = (req, res) => {\n res.removeListener('finish', afterResponse);\n res.removeListener('close', afterResponse);\n };\n\n if (config.environment !== 'production') {\n app.use((req, res, next) => {\n res.on('finish', afterResponse.bind(null, req, res));\n res.on('close', afterResponse.bind(null, req, res));\n next();\n });\n }\n\n // Bootstrap Routes\n\n require('./routes/analytics')(context, config);\n require('./routes/auth')(context, config);\n require('./routes/cache')(context, config);\n require('./routes/config')(context, config);\n require('./routes/debug')(context, config);\n require('./routes/ecommerce')(context, config);\n require('./routes/email')(context, config);\n require('./routes/embedly')(context, config);\n require('./routes/entity')(context, config);\n require('./routes/metadata')(context, config);\n require('./routes/pdf')(context, config);\n require('./routes/schema')(context, config);\n require('./routes/settings')(context, config);\n require('./routes/shippo')(context, config);\n require('./routes/social')(context, config);\n require('./routes/stripe')(context, config);\n require('./routes/taxonomy')(context, config);\n require('./routes/token')(context, config);\n require('./routes/tools')(context, config);\n require('./routes/user')(context, config);\n\n return app;\n}\n\nmodule.exports = AceApiServer;\n","module.exports = require(\"connect-redis\");","module.exports = require(\"express-session\");","module.exports = require(\"method-override\");","module.exports = require(\"body-parser\");","module.exports = require(\"cookie-parser\");","module.exports = require(\"helmet\");","module.exports = require(\"morgan\");","module.exports = require(\"http\");","const PORT = process.env.PORT || 5000;\nconst HOST = process.env.HOST || 'localhost';\n\nconst _ = require('lodash');\nconst express = require('express');\nconst http = require('http');\nconst logger = require('morgan');\nconst helmet = require('helmet');\nconst cookieParser = require('cookie-parser');\nconst bodyParser = require('body-parser');\nconst methodOverride = require('method-override');\nconst session = require('express-session');\nconst RedisStore = require('connect-redis')(session);\n\nconst AceApiServer = require('./index');\n\nconst defaultConfig = require('./config.default');\n\nfunction Serve (customConfig = {}, listen = true) {\n const config = _.merge({}, defaultConfig, customConfig);\n\n const app = express();\n\n const sessionOptions = {\n secret: config.session.secret,\n resave: true,\n saveUninitialized: true,\n };\n\n if (config.redis.url || config.redis.host) {\n const redisOptions = {\n ttl: config.session.ttl,\n };\n\n if (config.redis.url) {\n redisOptions.url = config.redis.url;\n } else {\n redisOptions.host = config.redis.host;\n redisOptions.port = config.redis.port;\n redisOptions.password = config.redis.password;\n redisOptions.db = config.redis.db;\n }\n\n sessionOptions.store = new RedisStore(redisOptions);\n } else {\n sessionOptions.cookie = {\n maxAge: config.session.ttl,\n };\n }\n\n app.use(helmet());\n app.use(logger('tiny'));\n app.use(cookieParser());\n app.use(bodyParser.json({\n limit: '50mb',\n }));\n app.use(bodyParser.urlencoded({\n extended: true,\n limit: '50mb',\n }));\n app.use(methodOverride());\n app.use(session(sessionOptions));\n\n AceApiServer(app, config);\n\n if (listen) {\n const server = http.createServer(app);\n server.on('listening', () => {\n console.log(`listening: http://${HOST}:${PORT}`);\n });\n server.listen(PORT);\n }\n\n return app;\n}\n\nmodule.exports = Serve;\n"],"sourceRoot":""}
\No newline at end of file