Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Liana = require('forest-express-sequelize');
const models = require('../models');
Liana.collection('legal_docs', {
fields: [{
field: 'id',
type: 'String'
}, {
field: 'url',
type: 'String',
widget: 'link',
isReadOnly: true
}, {
field: 'last_modified',
type: 'Date',
isReadOnly: true
}, {
field: 'size',
type: 'String',
isReadOnly: true
import Liana from 'forest-express-sequelize';
Liana.collection('Collective', {
actions: [
{
name: 'Delete collective and dependencies',
fields: [
{
field: 'Confirmation',
type: 'Boolean',
description:
'You are about to delete this collective and all its dependencies (Members, Unpaid Expenses, Tiers, Payment Methods). Check this box to proceed.',
isRequired: true,
},
],
},
],
});
import Liana from 'forest-express-sequelize';
Liana.collection('Subscription', {
actions: [
{
name: 'Cancel subscription',
},
{
name: 'Activate subscription',
},
],
});
const Liana = require('forest-express-sequelize');
Liana.collection('companies', {
actions: [{
name: 'Upload Legal Docs',
type: 'single',
fields: [{
field: 'Certificate of Incorporation',
description: 'The legal document relating to the formation of a company or corporation.',
type: 'File',
isRequired: true
}, {
field: 'Proof of address',
description: '(Electricity, Gas, Water, Internet, Landline & Mobile Phone Invoice / Payment Schedule) no older than 3 months of the legal representative of your company',
type: 'File',
isRequired: true
}, {
field: 'Company bank statement',
description: 'PDF including company name as well as IBAN',
const Liana = require('forest-express-sequelize');
const models = require('../models/');
const _ = require('lodash');
Liana.collection('customers', {
actions: [{
name: 'Generate invoice',
download: true
}, {
name: 'Charge credit card',
type: 'single',
fields: [{
field: 'amount',
isRequired: true,
description: 'The amount (USD) to charge the credit card. Example: 42.50',
type: 'Number'
}, {
field: 'description',
isRequired: true,
description: 'Explain the reason why you want to charge manually the customer here',
type: 'String'
import Liana from 'forest-express-sequelize';
Liana.collection('User', {
fields: [
{
field: 'fullname',
type: 'String',
get: object => {
return `${object.firstName || ''} ${object.lastName || ''}`.trim();
},
},
],
actions: [
{
name: 'Delete user and dependencies',
fields: [
{
field: 'Confirmation',
type: 'Boolean',