How to use the forest-express.collection function in forest-express

To help you get started, we’ve selected a few forest-express examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ForestAdmin / forest-express-mongoose / src / index.js View on Github external
/* eslint global-require: 0 */
const P = require('bluebird');
const Interface = require('forest-express');
const utils = require('./utils/schema');
const orm = require('./utils/orm');
const mongooseUtils = require('./services/mongoose-utils');

const REGEX_VERSION = /(\d+\.)?(\d+\.)?(\*|\d+)/;

exports.collection = Interface.collection;
exports.ensureAuthenticated = Interface.ensureAuthenticated;
exports.StatSerializer = Interface.StatSerializer;
exports.ResourceSerializer = Interface.ResourceSerializer;

exports.PermissionMiddlewareCreator = Interface.PermissionMiddlewareCreator;
exports.RecordsCounter = Interface.RecordsCounter;
exports.RecordsExporter = Interface.RecordsExporter;
exports.RecordsGetter = Interface.RecordsGetter;
exports.RecordGetter = Interface.RecordGetter;
exports.RecordUpdater = Interface.RecordUpdater;
exports.RecordCreator = Interface.RecordCreator;
exports.RecordRemover = Interface.RecordRemover;
exports.RecordSerializer = Interface.RecordSerializer;

exports.PUBLIC_ROUTES = Interface.PUBLIC_ROUTES;
github ForestAdmin / forest-express-sequelize / src / index.js View on Github external
const HasManyGetter = require('./services/has-many-getter');
const HasManyAssociator = require('./services/has-many-associator');
const HasManyDissociator = require('./services/has-many-dissociator');
const BelongsToUpdater = require('./services/belongs-to-updater');

const ValueStatGetter = require('./services/value-stat-getter');
const PieStatGetter = require('./services/pie-stat-getter');
const LineStatGetter = require('./services/line-stat-getter');
const LeaderboardStatGetter = require('./services/leaderboard-stat-getter');
const QueryStatGetter = require('./services/query-stat-getter');

const RecordsDecorator = require('./utils/records-decorator');

const REGEX_VERSION = /(\d+\.)?(\d+\.)?(\*|\d+)/;

exports.collection = Interface.collection;
exports.ensureAuthenticated = Interface.ensureAuthenticated;
exports.StatSerializer = Interface.StatSerializer;
exports.ResourceSerializer = Interface.ResourceSerializer;
exports.ResourceDeserializer = Interface.ResourceDeserializer;
exports.Schemas = Interface.Schemas;
exports.ResourcesRoute = Interface.ResourcesRoute;

exports.PermissionMiddlewareCreator = Interface.PermissionMiddlewareCreator;
exports.RecordsCounter = Interface.RecordsCounter;
exports.RecordsExporter = Interface.RecordsExporter;
exports.RecordsGetter = Interface.RecordsGetter;
exports.RecordGetter = Interface.RecordGetter;
exports.RecordUpdater = Interface.RecordUpdater;
exports.RecordCreator = Interface.RecordCreator;
exports.RecordRemover = Interface.RecordRemover;
exports.RecordSerializer = Interface.RecordSerializer;