diff --git a/deployments/platform-dev/docker-compose.yml b/deployments/platform-dev/docker-compose.yml index 17cc34176..ccb2d108b 100644 --- a/deployments/platform-dev/docker-compose.yml +++ b/deployments/platform-dev/docker-compose.yml @@ -82,8 +82,23 @@ services: - MYSQL_PASSWORD - MYSQL_USER - MYSQL_DATABASE=pathwar + networks: + - internal + + forestadmin: + build: + context: ../../tool/forestadmin + dockerfile: Dockerfile + environment: + - APPLICATION_PORT=3310 + - DATABASE_URL=mysql://$MYSQL_USER:$MYSQL_PASSWORD@db:3306/pathwar + - DATABASE_SSL=false + - FOREST_AUTH_SECRET + - FOREST_ENV_SECRET ports: - - 3306:3306 + - "3310:3310" + volumes: + - ../../tool/forestadmin/:/usr/src/app networks: - internal diff --git a/tool/forestadmin/.dockerignore b/tool/forestadmin/.dockerignore new file mode 100644 index 000000000..c81b8d319 --- /dev/null +++ b/tool/forestadmin/.dockerignore @@ -0,0 +1,3 @@ +node_modules +npm-debug.log +.env diff --git a/tool/forestadmin/.env.example b/tool/forestadmin/.env.example new file mode 100644 index 000000000..6a8d8c680 --- /dev/null +++ b/tool/forestadmin/.env.example @@ -0,0 +1,9 @@ +APPLICATION_PORT=3310 + +CORS_ORIGINS= + +DATABASE_URL=mysql://root:password@localhost:3306/pathwar +DATABASE_SSL=false + +FOREST_AUTH_SECRET= +FOREST_ENV_SECRET= diff --git a/tool/forestadmin/.forestadmin-schema.json b/tool/forestadmin/.forestadmin-schema.json new file mode 100644 index 000000000..2a6120f09 --- /dev/null +++ b/tool/forestadmin/.forestadmin-schema.json @@ -0,0 +1,3157 @@ +{ + "collections": [{ + "name": "achievement", + "nameOld": "achievement", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "argument", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "author", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "user.authorIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "challengeValidationId", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "comment", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "isGlobal", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "team", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "team.teamIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "type", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "agent", + "nameOld": "agent", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "arch", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "challengeInstances", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "challenge_instance.agentIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "errMsg", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "hostname", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "lastRegistrationAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "lastSeenAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "name", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "os", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "status", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "tags", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "version", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "challenge", + "nameOld": "challenge", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "author", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "challengeFlavors", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "challenge_flavor.challengeIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "description", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "homepage", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "isDraft", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "locale", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "name", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "previewUrl", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "challenge_flavor", + "nameOld": "challenge_flavor", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "challenge", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "challenge.challengeIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "changelog", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "composeBundle", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "driver", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "flavorChallengeInstances", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "challenge_instance.flavorIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "isDraft", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "isLatest", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "seasons", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "season.flavor_id", + "inverseOf": null, + "relationship": "BelongsToMany", + "validations": [] + }, { + "field": "sourceUrl", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "version", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "challenge_instance", + "nameOld": "challenge_instance", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "agent", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "agent.agentIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "flavor", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "challenge_flavor.flavorIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "lastRedumpRequestedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "lastStartedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "lastStoppedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "redumpCount", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "startupError", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "status", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "validationCount", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "challenge_subscription", + "nameOld": "challenge_subscription", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "buyer", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "user.buyerIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "challengeSubscriptionChallengeValidations", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "challenge_validation.challengeSubscriptionIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "closedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "closerId", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "seasonChallenge", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "season_challenge.seasonChallengeIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "status", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "team", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "team.teamIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "challenge_validation", + "nameOld": "challenge_validation", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "author", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "user.authorIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "authorComment", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "challengeSubscription", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "challenge_subscription.challengeSubscriptionIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "correctorComment", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "passphrase", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "passphraseKey", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "status", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "teamId", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "coupon", + "nameOld": "coupon", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "couponValidations", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "coupon_validation.couponIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "hash", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "maxValidationCount", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "season", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "season.seasonIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "value", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "coupon_validation", + "nameOld": "coupon_validation", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "author", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "user.authorIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "comment", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "coupon", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "coupon.couponIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "team", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "team.teamIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "inventory_item", + "nameOld": "inventory_item", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "item", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "owner", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "team_member.ownerIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "migrations", + "nameOld": "migrations", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "id", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "notification", + "nameOld": "notification", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "args", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "clickUrl", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "msg", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "readAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "user", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "user.userIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "organization", + "nameOld": "organization", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "deletedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "deletionStatus", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "gravatarUrl", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "locale", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "name", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "organizationMembers", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "organization_member.organizationIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "soloSeason", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "teams", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "team.organizationIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "organization_member", + "nameOld": "organization_member", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "organization", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "organization.organizationIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "role", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "user", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "user.userIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "season", + "nameOld": "season", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "challenge_flavors", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "challenge_flavor.season_id", + "inverseOf": null, + "relationship": "BelongsToMany", + "validations": [] + }, { + "field": "coupons", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "coupon.seasonIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "isDefault", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "name", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "status", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "teams", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "team.seasonIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "visibility", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "season_challenge", + "nameOld": "season_challenge", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "flavor", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "challenge_flavor.flavorIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "flavor_id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "season", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "season.seasonIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "seasonChallengeChallengeSubscriptions", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "challenge_subscription.seasonChallengeIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "season_id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "team", + "nameOld": "team", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "achievements", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "achievement.teamIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "authorTeamWhoswhoAttempts", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "whoswho_attempt.authorTeamIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "bronzeMedals", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "cash", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "challengeSubscriptions", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "challenge_subscription.teamIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "couponValidations", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "coupon_validation.teamIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "deletedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "deletionStatus", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "goldMedals", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "isDefault", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "nbAchievements", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "organization", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "organization.organizationIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "score", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "season", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "season.seasonIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "silverMedals", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "targetTeamWhoswhoAttempts", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "whoswho_attempt.targetTeamIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "teamMembers", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "team_member.teamIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "team_member", + "nameOld": "team_member", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "ownerInventoryItems", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "inventory_item.ownerIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "role", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "team", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "team.teamIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "user", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "user.userIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "user", + "nameOld": "user", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "activeSeasonId", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "activeTeamMemberId", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "authorAchievements", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "achievement.authorIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "authorChallengeValidations", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "challenge_validation.authorIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "authorCouponValidations", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "coupon_validation.authorIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "authorWhoswhoAttempts", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "whoswho_attempt.authorIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "buyerChallengeSubscriptions", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "challenge_subscription.buyerIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "deletedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "deletionReason", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "deletionStatus", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "email", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "gravatarUrl", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "locale", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "notifications", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "notification.userIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "oAuthSubject", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "organizationMembers", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "organization_member.userIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "targetUserWhoswhoAttempts", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "whoswho_attempt.targetUserIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "teamMembers", + "type": ["Number"], + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "team_member.userIdKey", + "inverseOf": null, + "relationship": "HasMany", + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "username", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "websiteUrl", + "type": "String", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }, { + "name": "whoswho_attempt", + "nameOld": "whoswho_attempt", + "icon": null, + "integration": null, + "isReadOnly": false, + "isSearchable": true, + "isVirtual": false, + "onlyForRelationships": false, + "paginationType": "page", + "fields": [{ + "field": "author", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "user.authorIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "authorTeam", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "team.authorTeamIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "createdAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "id", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "success", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }, { + "field": "targetTeam", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "team.targetTeamIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "targetUser", + "type": "Number", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": "user.targetUserIdKey", + "inverseOf": null, + "relationship": "BelongsTo", + "validations": [] + }, { + "field": "updatedAt", + "type": "Date", + "defaultValue": null, + "enums": null, + "integration": null, + "isFilterable": true, + "isReadOnly": false, + "isRequired": false, + "isSortable": true, + "isVirtual": false, + "reference": null, + "inverseOf": null, + "validations": [] + }], + "segments": [], + "actions": [] + }], + "meta": { + "database_type": "mysql", + "liana": "forest-express-sequelize", + "liana_version": "5.7.0", + "engine": "nodejs", + "engine_version": "10.19.0", + "framework": "express", + "framework_version": "~4.16.3", + "orm_version": "5.15.2" + } +} \ No newline at end of file diff --git a/tool/forestadmin/.gitignore b/tool/forestadmin/.gitignore new file mode 100644 index 000000000..38657bed1 --- /dev/null +++ b/tool/forestadmin/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +node_modules +.env diff --git a/tool/forestadmin/Dockerfile b/tool/forestadmin/Dockerfile new file mode 100644 index 000000000..83e00bbbd --- /dev/null +++ b/tool/forestadmin/Dockerfile @@ -0,0 +1,8 @@ +FROM node:10-alpine +WORKDIR /usr/src/app +COPY package*.json ./ +RUN npm install lumber-cli -g -s +RUN npm install -s +COPY . . +EXPOSE 3310 +CMD ["npm", "start"] diff --git a/tool/forestadmin/app.js b/tool/forestadmin/app.js new file mode 100644 index 000000000..5d8686b74 --- /dev/null +++ b/tool/forestadmin/app.js @@ -0,0 +1,59 @@ +const express = require('express'); +const requireAll = require('require-all'); +const path = require('path'); +const cookieParser = require('cookie-parser'); +const bodyParser = require('body-parser'); +const cors = require('cors'); +const jwt = require('express-jwt'); +const morgan = require('morgan'); +const { + ensureAuthenticated, + PUBLIC_ROUTES, +} = require('forest-express-sequelize'); + +const app = express(); + +app.use(morgan('tiny')); +app.use(bodyParser.json()); +app.use(bodyParser.urlencoded({ extended: false })); +app.use(cookieParser()); +app.use(express.static(path.join(__dirname, 'public'))); + +let allowedOrigins = [/forestadmin\.com$/ ]; + +if (process.env.CORS_ORIGINS) { + allowedOrigins = allowedOrigins.concat(process.env.CORS_ORIGINS.split(',')); +} + +app.use(cors({ + origin: allowedOrigins, + allowedHeaders: ['Authorization', 'X-Requested-With', 'Content-Type'], + maxAge: 86400, // NOTICE: 1 day + credentials: true, +})); + +app.use(jwt({ + secret: process.env.FOREST_AUTH_SECRET, + credentialsRequired: false, +})); + +app.use('/forest', (request, response, next) => { + if (PUBLIC_ROUTES.includes(request.url)) { + return next(); + } + return ensureAuthenticated(request, response, next); +}); + +requireAll({ + dirname: path.join(__dirname, 'routes'), + recursive: true, + resolve: Module => app.use('/forest', Module), +}); + +requireAll({ + dirname: path.join(__dirname, 'middlewares'), + recursive: true, + resolve: Module => new Module(app), +}); + +module.exports = app; diff --git a/tool/forestadmin/docker-compose.yml b/tool/forestadmin/docker-compose.yml new file mode 100644 index 000000000..39eac2c21 --- /dev/null +++ b/tool/forestadmin/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3' +services: + app: + build: + context: . + dockerfile: Dockerfile + environment: + - APPLICATION_PORT=3310 + - DATABASE_URL=mysql://root:uns3cur3@localhost:3306/pathwar + - DATABASE_SSL=false + - FOREST_AUTH_SECRET= + - FOREST_ENV_SECRET= + ports: + - "3310:3310" + volumes: + - ./:/usr/src/app diff --git a/tool/forestadmin/forest/achievement.js b/tool/forestadmin/forest/achievement.js new file mode 100644 index 000000000..e5fafe3c8 --- /dev/null +++ b/tool/forestadmin/forest/achievement.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('achievement', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/agent.js b/tool/forestadmin/forest/agent.js new file mode 100644 index 000000000..6dfa8dde8 --- /dev/null +++ b/tool/forestadmin/forest/agent.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('agent', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/challenge-flavor.js b/tool/forestadmin/forest/challenge-flavor.js new file mode 100644 index 000000000..f7f657244 --- /dev/null +++ b/tool/forestadmin/forest/challenge-flavor.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('challenge_flavor', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/challenge-instance.js b/tool/forestadmin/forest/challenge-instance.js new file mode 100644 index 000000000..6e2445045 --- /dev/null +++ b/tool/forestadmin/forest/challenge-instance.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('challenge_instance', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/challenge-subscription.js b/tool/forestadmin/forest/challenge-subscription.js new file mode 100644 index 000000000..ecb21895d --- /dev/null +++ b/tool/forestadmin/forest/challenge-subscription.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('challenge_subscription', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/challenge-validation.js b/tool/forestadmin/forest/challenge-validation.js new file mode 100644 index 000000000..bcdffc528 --- /dev/null +++ b/tool/forestadmin/forest/challenge-validation.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('challenge_validation', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/challenge.js b/tool/forestadmin/forest/challenge.js new file mode 100644 index 000000000..360fc12be --- /dev/null +++ b/tool/forestadmin/forest/challenge.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('challenge', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/coupon-validation.js b/tool/forestadmin/forest/coupon-validation.js new file mode 100644 index 000000000..1d1e0aea9 --- /dev/null +++ b/tool/forestadmin/forest/coupon-validation.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('coupon_validation', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/coupon.js b/tool/forestadmin/forest/coupon.js new file mode 100644 index 000000000..cbb79d5ee --- /dev/null +++ b/tool/forestadmin/forest/coupon.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('coupon', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/inventory-item.js b/tool/forestadmin/forest/inventory-item.js new file mode 100644 index 000000000..75b306038 --- /dev/null +++ b/tool/forestadmin/forest/inventory-item.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('inventory_item', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/migrations.js b/tool/forestadmin/forest/migrations.js new file mode 100644 index 000000000..5b4d62fa9 --- /dev/null +++ b/tool/forestadmin/forest/migrations.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('migrations', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/notification.js b/tool/forestadmin/forest/notification.js new file mode 100644 index 000000000..6cea66efd --- /dev/null +++ b/tool/forestadmin/forest/notification.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('notification', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/organization-member.js b/tool/forestadmin/forest/organization-member.js new file mode 100644 index 000000000..dc4ed830e --- /dev/null +++ b/tool/forestadmin/forest/organization-member.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('organization_member', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/organization.js b/tool/forestadmin/forest/organization.js new file mode 100644 index 000000000..96860f4d9 --- /dev/null +++ b/tool/forestadmin/forest/organization.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('organization', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/season-challenge.js b/tool/forestadmin/forest/season-challenge.js new file mode 100644 index 000000000..dac445a45 --- /dev/null +++ b/tool/forestadmin/forest/season-challenge.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('season_challenge', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/season.js b/tool/forestadmin/forest/season.js new file mode 100644 index 000000000..fb6c87c43 --- /dev/null +++ b/tool/forestadmin/forest/season.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('season', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/team-member.js b/tool/forestadmin/forest/team-member.js new file mode 100644 index 000000000..a78a97ddb --- /dev/null +++ b/tool/forestadmin/forest/team-member.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('team_member', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/team.js b/tool/forestadmin/forest/team.js new file mode 100644 index 000000000..68da043a3 --- /dev/null +++ b/tool/forestadmin/forest/team.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('team', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/user.js b/tool/forestadmin/forest/user.js new file mode 100644 index 000000000..ae2f811cf --- /dev/null +++ b/tool/forestadmin/forest/user.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('user', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/forest/whoswho-attempt.js b/tool/forestadmin/forest/whoswho-attempt.js new file mode 100644 index 000000000..2832bc0a1 --- /dev/null +++ b/tool/forestadmin/forest/whoswho-attempt.js @@ -0,0 +1,12 @@ +const { collection } = require('forest-express-sequelize'); + +// This file allows you to add to your Forest UI: +// - Smart actions: https://docs.forestadmin.com/documentation/reference-guide/actions/create-and-manage-smart-actions +// - Smart fields: https://docs.forestadmin.com/documentation/reference-guide/fields/create-and-manage-smart-fields +// - Smart relationships: https://docs.forestadmin.com/documentation/reference-guide/relationships/create-a-smart-relationship +// - Smart segments: https://docs.forestadmin.com/documentation/reference-guide/segments/smart-segments +collection('whoswho_attempt', { + actions: [], + fields: [], + segments: [], +}); diff --git a/tool/forestadmin/middlewares/forestadmin.js b/tool/forestadmin/middlewares/forestadmin.js new file mode 100644 index 000000000..684b5f8da --- /dev/null +++ b/tool/forestadmin/middlewares/forestadmin.js @@ -0,0 +1,16 @@ +const chalk = require('chalk'); +const path = require('path'); +const Liana = require('forest-express-sequelize'); +const { sequelize } = require('../models'); + +module.exports = function (app) { + app.use(Liana.init({ + modelsDir: path.join(__dirname, '../models'), + configDir: path.join(__dirname, '../forest'), + envSecret: process.env.FOREST_ENV_SECRET, + authSecret: process.env.FOREST_AUTH_SECRET, + sequelize, + })); + + console.log(chalk.cyan('Your admin panel is available here: https://app.forestadmin.com/projects')); +}; diff --git a/tool/forestadmin/middlewares/welcome.js b/tool/forestadmin/middlewares/welcome.js new file mode 100644 index 000000000..9ab98d7d0 --- /dev/null +++ b/tool/forestadmin/middlewares/welcome.js @@ -0,0 +1,7 @@ +const path = require('path'); + +module.exports = function (app) { + app.get('/', (req, res) => { + res.sendFile(path.join(__dirname, '../views/index.html')); + }); +}; diff --git a/tool/forestadmin/models/achievement.js b/tool/forestadmin/models/achievement.js new file mode 100644 index 000000000..e5c4f47e8 --- /dev/null +++ b/tool/forestadmin/models/achievement.js @@ -0,0 +1,53 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const Achievement = sequelize.define('achievement', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + type: { + type: DataTypes.INTEGER, + }, + isGlobal: { + type: DataTypes.INTEGER, + }, + comment: { + type: DataTypes.STRING, + }, + argument: { + type: DataTypes.STRING, + }, + challengeValidationId: { + type: DataTypes.BIGINT, + }, + }, { + tableName: 'achievement', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + Achievement.associate = (models) => { + Achievement.belongsTo(models.user, { + foreignKey: { + name: 'authorIdKey', + field: 'author_id', + }, + as: 'author', + }); + Achievement.belongsTo(models.team, { + foreignKey: { + name: 'teamIdKey', + field: 'team_id', + }, + as: 'team', + }); + }; + + return Achievement; +}; diff --git a/tool/forestadmin/models/agent.js b/tool/forestadmin/models/agent.js new file mode 100644 index 000000000..04e870223 --- /dev/null +++ b/tool/forestadmin/models/agent.js @@ -0,0 +1,61 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const Agent = sequelize.define('agent', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + name: { + type: DataTypes.STRING, + }, + hostname: { + type: DataTypes.STRING, + }, + os: { + type: DataTypes.STRING, + }, + status: { + type: DataTypes.INTEGER, + }, + errMsg: { + type: DataTypes.STRING, + }, + arch: { + type: DataTypes.STRING, + }, + version: { + type: DataTypes.STRING, + }, + tags: { + type: DataTypes.STRING, + }, + lastRegistrationAt: { + type: DataTypes.DATE, + }, + lastSeenAt: { + type: DataTypes.DATE, + }, + }, { + tableName: 'agent', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + Agent.associate = (models) => { + Agent.hasMany(models.challenge_instance, { + foreignKey: { + name: 'agentIdKey', + field: 'agent_id', + }, + as: 'challengeInstances', + }); + }; + + return Agent; +}; diff --git a/tool/forestadmin/models/challenge-flavor.js b/tool/forestadmin/models/challenge-flavor.js new file mode 100644 index 000000000..574af8401 --- /dev/null +++ b/tool/forestadmin/models/challenge-flavor.js @@ -0,0 +1,64 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const ChallengeFlavor = sequelize.define('challenge_flavor', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + version: { + type: DataTypes.STRING, + }, + changelog: { + type: DataTypes.STRING, + }, + isDraft: { + type: DataTypes.INTEGER, + }, + isLatest: { + type: DataTypes.INTEGER, + }, + sourceUrl: { + type: DataTypes.STRING, + }, + composeBundle: { + type: DataTypes.STRING, + }, + driver: { + type: DataTypes.INTEGER, + }, + }, { + tableName: 'challenge_flavor', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + ChallengeFlavor.associate = (models) => { + ChallengeFlavor.belongsTo(models.challenge, { + foreignKey: { + name: 'challengeIdKey', + field: 'challenge_id', + }, + as: 'challenge', + }); + ChallengeFlavor.belongsToMany(models.season, { + through: 'season_challenge', + foreignKey: 'flavor_id', + otherKey: 'season_id', + }); + ChallengeFlavor.hasMany(models.challenge_instance, { + foreignKey: { + name: 'flavorIdKey', + field: 'flavor_id', + }, + as: 'flavorChallengeInstances', + }); + }; + + return ChallengeFlavor; +}; diff --git a/tool/forestadmin/models/challenge-instance.js b/tool/forestadmin/models/challenge-instance.js new file mode 100644 index 000000000..9bfe81b51 --- /dev/null +++ b/tool/forestadmin/models/challenge-instance.js @@ -0,0 +1,59 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const ChallengeInstance = sequelize.define('challenge_instance', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + status: { + type: DataTypes.INTEGER, + }, + lastStartedAt: { + type: DataTypes.DATE, + }, + lastStoppedAt: { + type: DataTypes.DATE, + }, + lastRedumpRequestedAt: { + type: DataTypes.DATE, + }, + startupError: { + type: DataTypes.STRING, + }, + redumpCount: { + type: DataTypes.INTEGER, + }, + validationCount: { + type: DataTypes.INTEGER, + }, + }, { + tableName: 'challenge_instance', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + ChallengeInstance.associate = (models) => { + ChallengeInstance.belongsTo(models.agent, { + foreignKey: { + name: 'agentIdKey', + field: 'agent_id', + }, + as: 'agent', + }); + ChallengeInstance.belongsTo(models.challenge_flavor, { + foreignKey: { + name: 'flavorIdKey', + field: 'flavor_id', + }, + as: 'flavor', + }); + }; + + return ChallengeInstance; +}; diff --git a/tool/forestadmin/models/challenge-subscription.js b/tool/forestadmin/models/challenge-subscription.js new file mode 100644 index 000000000..f917efce7 --- /dev/null +++ b/tool/forestadmin/models/challenge-subscription.js @@ -0,0 +1,61 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const ChallengeSubscription = sequelize.define('challenge_subscription', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + status: { + type: DataTypes.INTEGER, + }, + closedAt: { + type: DataTypes.DATE, + }, + closerId: { + type: DataTypes.BIGINT, + }, + }, { + tableName: 'challenge_subscription', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + ChallengeSubscription.associate = (models) => { + ChallengeSubscription.belongsTo(models.team, { + foreignKey: { + name: 'teamIdKey', + field: 'team_id', + }, + as: 'team', + }); + ChallengeSubscription.belongsTo(models.user, { + foreignKey: { + name: 'buyerIdKey', + field: 'buyer_id', + }, + as: 'buyer', + }); + ChallengeSubscription.belongsTo(models.season_challenge, { + foreignKey: { + name: 'seasonChallengeIdKey', + field: 'season_challenge_id', + }, + as: 'seasonChallenge', + }); + ChallengeSubscription.hasMany(models.challenge_validation, { + foreignKey: { + name: 'challengeSubscriptionIdKey', + field: 'challenge_subscription_id', + }, + as: 'challengeSubscriptionChallengeValidations', + }); + }; + + return ChallengeSubscription; +}; diff --git a/tool/forestadmin/models/challenge-validation.js b/tool/forestadmin/models/challenge-validation.js new file mode 100644 index 000000000..765794513 --- /dev/null +++ b/tool/forestadmin/models/challenge-validation.js @@ -0,0 +1,56 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const ChallengeValidation = sequelize.define('challenge_validation', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + status: { + type: DataTypes.INTEGER, + }, + authorComment: { + type: DataTypes.STRING, + }, + correctorComment: { + type: DataTypes.STRING, + }, + passphraseKey: { + type: DataTypes.STRING, + }, + passphrase: { + type: DataTypes.STRING, + }, + teamId: { + type: DataTypes.BIGINT, + }, + }, { + tableName: 'challenge_validation', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + ChallengeValidation.associate = (models) => { + ChallengeValidation.belongsTo(models.challenge_subscription, { + foreignKey: { + name: 'challengeSubscriptionIdKey', + field: 'challenge_subscription_id', + }, + as: 'challengeSubscription', + }); + ChallengeValidation.belongsTo(models.user, { + foreignKey: { + name: 'authorIdKey', + field: 'author_id', + }, + as: 'author', + }); + }; + + return ChallengeValidation; +}; diff --git a/tool/forestadmin/models/challenge.js b/tool/forestadmin/models/challenge.js new file mode 100644 index 000000000..6c7340992 --- /dev/null +++ b/tool/forestadmin/models/challenge.js @@ -0,0 +1,52 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const Challenge = sequelize.define('challenge', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + name: { + type: DataTypes.STRING, + }, + description: { + type: DataTypes.STRING, + }, + author: { + type: DataTypes.STRING, + }, + locale: { + type: DataTypes.STRING, + }, + isDraft: { + type: DataTypes.INTEGER, + }, + previewUrl: { + type: DataTypes.STRING, + }, + homepage: { + type: DataTypes.STRING, + }, + }, { + tableName: 'challenge', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + Challenge.associate = (models) => { + Challenge.hasMany(models.challenge_flavor, { + foreignKey: { + name: 'challengeIdKey', + field: 'challenge_id', + }, + as: 'challengeFlavors', + }); + }; + + return Challenge; +}; diff --git a/tool/forestadmin/models/coupon-validation.js b/tool/forestadmin/models/coupon-validation.js new file mode 100644 index 000000000..4dfddde8e --- /dev/null +++ b/tool/forestadmin/models/coupon-validation.js @@ -0,0 +1,48 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const CouponValidation = sequelize.define('coupon_validation', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + comment: { + type: DataTypes.STRING, + }, + }, { + tableName: 'coupon_validation', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + CouponValidation.associate = (models) => { + CouponValidation.belongsTo(models.user, { + foreignKey: { + name: 'authorIdKey', + field: 'author_id', + }, + as: 'author', + }); + CouponValidation.belongsTo(models.team, { + foreignKey: { + name: 'teamIdKey', + field: 'team_id', + }, + as: 'team', + }); + CouponValidation.belongsTo(models.coupon, { + foreignKey: { + name: 'couponIdKey', + field: 'coupon_id', + }, + as: 'coupon', + }); + }; + + return CouponValidation; +}; diff --git a/tool/forestadmin/models/coupon.js b/tool/forestadmin/models/coupon.js new file mode 100644 index 000000000..5497f1c19 --- /dev/null +++ b/tool/forestadmin/models/coupon.js @@ -0,0 +1,47 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const Coupon = sequelize.define('coupon', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + hash: { + type: DataTypes.STRING, + }, + value: { + type: DataTypes.INTEGER, + }, + maxValidationCount: { + type: DataTypes.INTEGER, + }, + }, { + tableName: 'coupon', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + Coupon.associate = (models) => { + Coupon.belongsTo(models.season, { + foreignKey: { + name: 'seasonIdKey', + field: 'season_id', + }, + as: 'season', + }); + Coupon.hasMany(models.coupon_validation, { + foreignKey: { + name: 'couponIdKey', + field: 'coupon_id', + }, + as: 'couponValidations', + }); + }; + + return Coupon; +}; diff --git a/tool/forestadmin/models/index.js b/tool/forestadmin/models/index.js new file mode 100644 index 000000000..3807ca81c --- /dev/null +++ b/tool/forestadmin/models/index.js @@ -0,0 +1,55 @@ +const fs = require('fs'); +const path = require('path'); +const Sequelize = require('sequelize'); + +if (!process.env.DATABASE_URL) { + console.error('Cannot connect to the database. Please declare the DATABASE_URL environment variable with the correct database connection string.'); + process.exit(); +} + +let databaseOptions = { + logging: process.env.NODE_ENV === 'development' ? console.log : false, + pool: { maxConnections: 10, minConnections: 1 }, + dialectOptions: {} +}; + +databaseOptions.dialectOptions.typeCast = (field, useDefaultTypeCasting) => { + if ((field.type === "BIT") && (field.length === 1)) { + const bytes = field.buffer(); + return bytes ? bytes[0] === 1 : bytes; + } + + return useDefaultTypeCasting(); +}; + +if (process.env.DATABASE_SSL && JSON.parse(process.env.DATABASE_SSL.toLowerCase())) { + databaseOptions.dialectOptions.ssl = { rejectUnauthorized: true }; +} + +let sequelize = new Sequelize(process.env.DATABASE_URL, databaseOptions); +let db = {}; + +fs + .readdirSync(__dirname) + .filter(function (file) { + return (file.indexOf('.') !== 0) && (file !== 'index.js'); + }) + .forEach(function (file) { + try { + var model = sequelize['import'](path.join(__dirname, file)); + db[model.name] = model; + } catch (error) { + console.error('Model creation error: ' + error); + } + }); + +Object.keys(db).forEach(function(modelName) { + if ('associate' in db[modelName]) { + db[modelName].associate(db); + } +}); + +db.sequelize = sequelize; +db.Sequelize = Sequelize; + +module.exports = db; diff --git a/tool/forestadmin/models/inventory-item.js b/tool/forestadmin/models/inventory-item.js new file mode 100644 index 000000000..86b6d616d --- /dev/null +++ b/tool/forestadmin/models/inventory-item.js @@ -0,0 +1,34 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const InventoryItem = sequelize.define('inventory_item', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + item: { + type: DataTypes.INTEGER, + }, + }, { + tableName: 'inventory_item', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + InventoryItem.associate = (models) => { + InventoryItem.belongsTo(models.team_member, { + foreignKey: { + name: 'ownerIdKey', + field: 'owner_id', + }, + as: 'owner', + }); + }; + + return InventoryItem; +}; diff --git a/tool/forestadmin/models/migrations.js b/tool/forestadmin/models/migrations.js new file mode 100644 index 000000000..6055fee43 --- /dev/null +++ b/tool/forestadmin/models/migrations.js @@ -0,0 +1,22 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const Migrations = sequelize.define('migrations', { + id: { + type: DataTypes.STRING, + primaryKey: true, + }, + }, { + tableName: 'migrations', + timestamps: false, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + Migrations.associate = (models) => { + }; + + return Migrations; +}; diff --git a/tool/forestadmin/models/notification.js b/tool/forestadmin/models/notification.js new file mode 100644 index 000000000..08965d733 --- /dev/null +++ b/tool/forestadmin/models/notification.js @@ -0,0 +1,43 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const Notification = sequelize.define('notification', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + readAt: { + type: DataTypes.DATE, + }, + clickUrl: { + type: DataTypes.STRING, + }, + msg: { + type: DataTypes.STRING, + }, + args: { + type: DataTypes.STRING, + }, + }, { + tableName: 'notification', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + Notification.associate = (models) => { + Notification.belongsTo(models.user, { + foreignKey: { + name: 'userIdKey', + field: 'user_id', + }, + as: 'user', + }); + }; + + return Notification; +}; diff --git a/tool/forestadmin/models/organization-member.js b/tool/forestadmin/models/organization-member.js new file mode 100644 index 000000000..ff191cbbb --- /dev/null +++ b/tool/forestadmin/models/organization-member.js @@ -0,0 +1,41 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const OrganizationMember = sequelize.define('organization_member', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + role: { + type: DataTypes.INTEGER, + }, + }, { + tableName: 'organization_member', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + OrganizationMember.associate = (models) => { + OrganizationMember.belongsTo(models.organization, { + foreignKey: { + name: 'organizationIdKey', + field: 'organization_id', + }, + as: 'organization', + }); + OrganizationMember.belongsTo(models.user, { + foreignKey: { + name: 'userIdKey', + field: 'user_id', + }, + as: 'user', + }); + }; + + return OrganizationMember; +}; diff --git a/tool/forestadmin/models/organization.js b/tool/forestadmin/models/organization.js new file mode 100644 index 000000000..748ef0074 --- /dev/null +++ b/tool/forestadmin/models/organization.js @@ -0,0 +1,56 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const Organization = sequelize.define('organization', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + deletedAt: { + type: DataTypes.DATE, + }, + name: { + type: DataTypes.STRING, + }, + gravatarUrl: { + type: DataTypes.STRING, + }, + locale: { + type: DataTypes.STRING, + }, + deletionStatus: { + type: DataTypes.INTEGER, + }, + soloSeason: { + type: DataTypes.INTEGER, + }, + }, { + tableName: 'organization', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + Organization.associate = (models) => { + Organization.hasMany(models.organization_member, { + foreignKey: { + name: 'organizationIdKey', + field: 'organization_id', + }, + as: 'organizationMembers', + }); + Organization.hasMany(models.team, { + foreignKey: { + name: 'organizationIdKey', + field: 'organization_id', + }, + as: 'teams', + }); + }; + + return Organization; +}; diff --git a/tool/forestadmin/models/season-challenge.js b/tool/forestadmin/models/season-challenge.js new file mode 100644 index 000000000..250067800 --- /dev/null +++ b/tool/forestadmin/models/season-challenge.js @@ -0,0 +1,45 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const SeasonChallenge = sequelize.define('season_challenge', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + }, { + tableName: 'season_challenge', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + SeasonChallenge.associate = (models) => { + SeasonChallenge.belongsTo(models.challenge_flavor, { + foreignKey: { + name: 'flavorIdKey', + field: 'flavor_id', + }, + as: 'flavor', + }); + SeasonChallenge.belongsTo(models.season, { + foreignKey: { + name: 'seasonIdKey', + field: 'season_id', + }, + as: 'season', + }); + SeasonChallenge.hasMany(models.challenge_subscription, { + foreignKey: { + name: 'seasonChallengeIdKey', + field: 'season_challenge_id', + }, + as: 'seasonChallengeChallengeSubscriptions', + }); + }; + + return SeasonChallenge; +}; diff --git a/tool/forestadmin/models/season.js b/tool/forestadmin/models/season.js new file mode 100644 index 000000000..d8cbda330 --- /dev/null +++ b/tool/forestadmin/models/season.js @@ -0,0 +1,55 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const Season = sequelize.define('season', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + name: { + type: DataTypes.STRING, + }, + status: { + type: DataTypes.INTEGER, + }, + visibility: { + type: DataTypes.INTEGER, + }, + isDefault: { + type: DataTypes.INTEGER, + }, + }, { + tableName: 'season', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + Season.associate = (models) => { + Season.belongsToMany(models.challenge_flavor, { + through: 'season_challenge', + foreignKey: 'season_id', + otherKey: 'flavor_id', + }); + Season.hasMany(models.coupon, { + foreignKey: { + name: 'seasonIdKey', + field: 'season_id', + }, + as: 'coupons', + }); + Season.hasMany(models.team, { + foreignKey: { + name: 'seasonIdKey', + field: 'season_id', + }, + as: 'teams', + }); + }; + + return Season; +}; diff --git a/tool/forestadmin/models/team-member.js b/tool/forestadmin/models/team-member.js new file mode 100644 index 000000000..b8dbd878a --- /dev/null +++ b/tool/forestadmin/models/team-member.js @@ -0,0 +1,48 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const TeamMember = sequelize.define('team_member', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + role: { + type: DataTypes.INTEGER, + }, + }, { + tableName: 'team_member', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + TeamMember.associate = (models) => { + TeamMember.belongsTo(models.team, { + foreignKey: { + name: 'teamIdKey', + field: 'team_id', + }, + as: 'team', + }); + TeamMember.belongsTo(models.user, { + foreignKey: { + name: 'userIdKey', + field: 'user_id', + }, + as: 'user', + }); + TeamMember.hasMany(models.inventory_item, { + foreignKey: { + name: 'ownerIdKey', + field: 'owner_id', + }, + as: 'ownerInventoryItems', + }); + }; + + return TeamMember; +}; diff --git a/tool/forestadmin/models/team.js b/tool/forestadmin/models/team.js new file mode 100644 index 000000000..e85fa41a7 --- /dev/null +++ b/tool/forestadmin/models/team.js @@ -0,0 +1,107 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const Team = sequelize.define('team', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + deletedAt: { + type: DataTypes.DATE, + }, + isDefault: { + type: DataTypes.INTEGER, + }, + deletionStatus: { + type: DataTypes.INTEGER, + }, + cash: { + type: DataTypes.BIGINT, + }, + score: { + type: DataTypes.BIGINT, + }, + goldMedals: { + type: DataTypes.BIGINT, + }, + silverMedals: { + type: DataTypes.BIGINT, + }, + bronzeMedals: { + type: DataTypes.BIGINT, + }, + nbAchievements: { + type: DataTypes.BIGINT, + }, + }, { + tableName: 'team', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + Team.associate = (models) => { + Team.belongsTo(models.organization, { + foreignKey: { + name: 'organizationIdKey', + field: 'organization_id', + }, + as: 'organization', + }); + Team.belongsTo(models.season, { + foreignKey: { + name: 'seasonIdKey', + field: 'season_id', + }, + as: 'season', + }); + Team.hasMany(models.coupon_validation, { + foreignKey: { + name: 'teamIdKey', + field: 'team_id', + }, + as: 'couponValidations', + }); + Team.hasMany(models.challenge_subscription, { + foreignKey: { + name: 'teamIdKey', + field: 'team_id', + }, + as: 'challengeSubscriptions', + }); + Team.hasMany(models.whoswho_attempt, { + foreignKey: { + name: 'targetTeamIdKey', + field: 'target_team_id', + }, + as: 'targetTeamWhoswhoAttempts', + }); + Team.hasMany(models.whoswho_attempt, { + foreignKey: { + name: 'authorTeamIdKey', + field: 'author_team_id', + }, + as: 'authorTeamWhoswhoAttempts', + }); + Team.hasMany(models.achievement, { + foreignKey: { + name: 'teamIdKey', + field: 'team_id', + }, + as: 'achievements', + }); + Team.hasMany(models.team_member, { + foreignKey: { + name: 'teamIdKey', + field: 'team_id', + }, + as: 'teamMembers', + }); + }; + + return Team; +}; diff --git a/tool/forestadmin/models/user.js b/tool/forestadmin/models/user.js new file mode 100644 index 000000000..5ba0b499b --- /dev/null +++ b/tool/forestadmin/models/user.js @@ -0,0 +1,120 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const User = sequelize.define('user', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + deletedAt: { + type: DataTypes.DATE, + }, + username: { + type: DataTypes.STRING, + }, + email: { + type: DataTypes.STRING, + }, + gravatarUrl: { + type: DataTypes.STRING, + }, + websiteUrl: { + type: DataTypes.STRING, + }, + locale: { + type: DataTypes.STRING, + }, + oAuthSubject: { + type: DataTypes.STRING, + }, + deletionReason: { + type: DataTypes.STRING, + }, + deletionStatus: { + type: DataTypes.INTEGER, + }, + activeTeamMemberId: { + type: DataTypes.BIGINT, + }, + activeSeasonId: { + type: DataTypes.BIGINT, + }, + }, { + tableName: 'user', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + User.associate = (models) => { + User.hasMany(models.coupon_validation, { + foreignKey: { + name: 'authorIdKey', + field: 'author_id', + }, + as: 'authorCouponValidations', + }); + User.hasMany(models.notification, { + foreignKey: { + name: 'userIdKey', + field: 'user_id', + }, + as: 'notifications', + }); + User.hasMany(models.organization_member, { + foreignKey: { + name: 'userIdKey', + field: 'user_id', + }, + as: 'organizationMembers', + }); + User.hasMany(models.challenge_subscription, { + foreignKey: { + name: 'buyerIdKey', + field: 'buyer_id', + }, + as: 'buyerChallengeSubscriptions', + }); + User.hasMany(models.challenge_validation, { + foreignKey: { + name: 'authorIdKey', + field: 'author_id', + }, + as: 'authorChallengeValidations', + }); + User.hasMany(models.whoswho_attempt, { + foreignKey: { + name: 'authorIdKey', + field: 'author_id', + }, + as: 'authorWhoswhoAttempts', + }); + User.hasMany(models.whoswho_attempt, { + foreignKey: { + name: 'targetUserIdKey', + field: 'target_user_id', + }, + as: 'targetUserWhoswhoAttempts', + }); + User.hasMany(models.achievement, { + foreignKey: { + name: 'authorIdKey', + field: 'author_id', + }, + as: 'authorAchievements', + }); + User.hasMany(models.team_member, { + foreignKey: { + name: 'userIdKey', + field: 'user_id', + }, + as: 'teamMembers', + }); + }; + + return User; +}; diff --git a/tool/forestadmin/models/whoswho-attempt.js b/tool/forestadmin/models/whoswho-attempt.js new file mode 100644 index 000000000..f736efc2d --- /dev/null +++ b/tool/forestadmin/models/whoswho-attempt.js @@ -0,0 +1,55 @@ +// This model was generated by Lumber. However, you remain in control of your models. +// Learn how here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models +module.exports = (sequelize, DataTypes) => { + const { Sequelize } = sequelize; + // This section contains the fields of your model, mapped to your table's columns. + // Learn more here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model + const WhoswhoAttempt = sequelize.define('whoswho_attempt', { + createdAt: { + type: DataTypes.DATE, + }, + updatedAt: { + type: DataTypes.DATE, + }, + success: { + type: DataTypes.INTEGER, + }, + }, { + tableName: 'whoswho_attempt', + underscored: true, + }); + + // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v5/reference-guide/relationships#adding-relationships. + WhoswhoAttempt.associate = (models) => { + WhoswhoAttempt.belongsTo(models.user, { + foreignKey: { + name: 'authorIdKey', + field: 'author_id', + }, + as: 'author', + }); + WhoswhoAttempt.belongsTo(models.team, { + foreignKey: { + name: 'targetTeamIdKey', + field: 'target_team_id', + }, + as: 'targetTeam', + }); + WhoswhoAttempt.belongsTo(models.team, { + foreignKey: { + name: 'authorTeamIdKey', + field: 'author_team_id', + }, + as: 'authorTeam', + }); + WhoswhoAttempt.belongsTo(models.user, { + foreignKey: { + name: 'targetUserIdKey', + field: 'target_user_id', + }, + as: 'targetUser', + }); + }; + + return WhoswhoAttempt; +}; diff --git a/tool/forestadmin/package-lock.json b/tool/forestadmin/package-lock.json new file mode 100644 index 000000000..170d4ad61 --- /dev/null +++ b/tool/forestadmin/package-lock.json @@ -0,0 +1,1757 @@ +{ + "name": "pathwar", + "version": "0.0.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/runtime": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.7.2.tgz", + "integrity": "sha512-JONRbXbTXc9WQE2mAZd1p0Z3DZ/6vaQIkgYMSTP3KjRCyd7rCZCcfhCyX+YjwcKxcZ82UrxbRD358bpExNgrjw==", + "requires": { + "regenerator-runtime": "^0.13.2" + }, + "dependencies": { + "regenerator-runtime": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", + "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==" + } + } + }, + "@types/debug": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-0.0.29.tgz", + "integrity": "sha1-oeUUrfvZLwOiJLpU1pMRHb8fN1Q=" + }, + "@types/node": { + "version": "13.7.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.7.2.tgz", + "integrity": "sha512-uvilvAQbdJvnSBFcKJ2td4016urcGvsiR+N4dHGU87ml8O2Vl6l+ErOi9w0kXSPiwJ1AYlIW+0pDXDWWMOiWbw==" + }, + "accepts": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==", + "requires": { + "mime-types": "~2.1.24", + "negotiator": "0.6.2" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" + }, + "any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "babel-runtime": { + "version": "7.0.0-beta.3", + "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-7.0.0-beta.3.tgz", + "integrity": "sha512-jlzZ8RACjt0QGxq+wqsw5bCQE9RcUyWpw987mDY3GYxTpOQT2xoyNoG++oVCHzr/nACLBIprfVBNvv/If1ZYcg==", + "requires": { + "core-js": "^2.4.0", + "regenerator-runtime": "^0.11.0" + } + }, + "base32-encode": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/base32-encode/-/base32-encode-1.1.1.tgz", + "integrity": "sha512-eqa0BeGghj3guezlasdHJhr3+J5ZbbQvxeprkcDMbRQrjlqOT832IUDT4Al4ofAwekFYMqkkM9KMUHs9Cu0HKA==" + }, + "basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "bitwise-xor": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/bitwise-xor/-/bitwise-xor-0.0.0.tgz", + "integrity": "sha1-BAqBcrW7jMVisLcRnyMLKhp4Dj0=" + }, + "bluebird": { + "version": "2.9.25", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.9.25.tgz", + "integrity": "sha1-bja9BAZNlTTAcWC59/JsWnOP4Wo=" + }, + "body-parser": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "~1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "~2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "~1.6.16" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "requires": { + "ansi-styles": "^2.2.1", + "escape-string-regexp": "^1.0.2", + "has-ansi": "^2.0.0", + "strip-ansi": "^3.0.0", + "supports-color": "^2.0.0" + } + }, + "cls-bluebird": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cls-bluebird/-/cls-bluebird-2.1.0.tgz", + "integrity": "sha1-N+8eCAqP+1XC9BZPU28ZGeeWiu4=", + "requires": { + "is-bluebird": "^1.0.2", + "shimmer": "^1.1.0" + } + }, + "color": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/color/-/color-3.0.0.tgz", + "integrity": "sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==", + "requires": { + "color-convert": "^1.9.1", + "color-string": "^1.5.2" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "color-string": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz", + "integrity": "sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw==", + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "colornames": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/colornames/-/colornames-1.1.1.tgz", + "integrity": "sha1-+IiQMGhcfE/54qVZ9Qd+t2qBb5Y=" + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + }, + "colorspace": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.2.tgz", + "integrity": "sha512-vt+OoIP2d76xLhjwbBaucYlNSpPsrJWPlBTtwCpQKIu6/CSMutyzX93O/Do0qzpH3YoHEes8YEFXyZ797rEhzQ==", + "requires": { + "color": "3.0.x", + "text-hex": "1.0.x" + } + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, + "compose-middleware": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/compose-middleware/-/compose-middleware-4.0.0.tgz", + "integrity": "sha512-8GBuTt6Q8ukt9XJ4Gka/PGAMHIZwtWgxN4kPnP+giUKUs9WFpCJGmEVk0Jij65UgoiVwC0hIHW5EQQghnIEUjQ==", + "requires": { + "@types/debug": "0.0.29", + "array-flatten": "^2.1.0", + "debug": "^3.1.0" + }, + "dependencies": { + "array-flatten": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz", + "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==" + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + }, + "cookie-parser": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.4.tgz", + "integrity": "sha512-lo13tqF3JEtFO7FyA49CqbhaFkskRJ0u/UAiINgrIXeRCY41c88/zxtrECl8AKH3B0hj9q10+h3Kt8I7KlW4tw==", + "requires": { + "cookie": "0.3.1", + "cookie-signature": "1.0.6" + } + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "cookiejar": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", + "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" + }, + "core-js": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "csv-stringify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/csv-stringify/-/csv-stringify-1.0.4.tgz", + "integrity": "sha1-vBi6ua1M7zGV/SV5gLWLR5xC0+U=", + "requires": { + "lodash.get": "^4.0.0" + } + }, + "debug": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.0.1.tgz", + "integrity": "sha512-K23FHJ/Mt404FSlp6gSZCevIbTMLX0j3fmHhUEhQ3Wq0FMODW3+cUSoLdy1Gx4polAf4t/lphhmHH35BB8cLYw==", + "requires": { + "ms": "^2.1.1" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "denque": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", + "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "diagnostics": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/diagnostics/-/diagnostics-1.1.1.tgz", + "integrity": "sha512-8wn1PmdunLJ9Tqbx+Fx/ZEuHfJf4NKSN2ZBj7SJC/OWRWha843+WsTjqMe1B5E3p28jqBlp+mJ2fPVxPyNgYKQ==", + "requires": { + "colorspace": "1.1.x", + "enabled": "1.0.x", + "kuler": "1.0.x" + } + }, + "dotenv": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-6.1.0.tgz", + "integrity": "sha512-/veDn2ztgRlB7gKmE3i9f6CmDIyXAy6d5nBq+whO9SLX+Zs1sXEgFLPi+aSuWqUuusMfbi84fT8j34fs1HaYUw==" + }, + "dottie": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dottie/-/dottie-2.0.2.tgz", + "integrity": "sha512-fmrwR04lsniq/uSr8yikThDTrM7epXHBAAjH9TbeH3rEA8tdCO7mRzB9hdmdGyJCxF8KERo9CITcm3kGuoyMhg==" + }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "enabled": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-1.0.2.tgz", + "integrity": "sha1-ll9lE9LC0cX0ZStkouM5ZGf8L5M=", + "requires": { + "env-variable": "0.0.x" + } + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "env-variable": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/env-variable/-/env-variable-0.0.6.tgz", + "integrity": "sha512-bHz59NlBbtS0NhftmR8+ExBEekE7br0e01jw+kk0NDro7TtZzBYZ5ScGPs3OmwnpyfHTHOtr1Y6uedCdrIldtg==" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "express": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "requires": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.3", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.4", + "qs": "6.5.2", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.2", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "express-jwt": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/express-jwt/-/express-jwt-5.3.1.tgz", + "integrity": "sha512-1C9RNq0wMp/JvsH/qZMlg3SIPvKu14YkZ4YYv7gJQ1Vq+Dv8LH9tLKenS5vMNth45gTlEUGx+ycp9IHIlaHP/g==", + "requires": { + "async": "^1.5.0", + "express-unless": "^0.3.0", + "jsonwebtoken": "^8.1.0", + "lodash.set": "^4.0.0" + } + }, + "express-unless": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/express-unless/-/express-unless-0.3.1.tgz", + "integrity": "sha1-JVfBRudb65A+LSR/m1ugFFJpbiA=" + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.0.tgz", + "integrity": "sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=" + }, + "fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" + }, + "fecha": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-2.3.3.tgz", + "integrity": "sha512-lUGBnIamTAwk4znq5BcqsDaxSmZ9nDVJaij6NvRt/Tg4R69gERA+otPKbS86ROw9nxVMw2/mp1fnaiWqbs6Sdg==" + }, + "finalhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "forest-express": { + "version": "5.6.1", + "resolved": "https://registry.npmjs.org/forest-express/-/forest-express-5.6.1.tgz", + "integrity": "sha512-bv/hedS/mGkWNMPWozUgL87eC10R2TsAVfA+dZnWOCZ+JVgCMnKHIO4TRdAa64AQXXk57ofRAqCJBhpByLWn0Q==", + "requires": { + "@babel/runtime": "7.7.2", + "base32-encode": "1.1.1", + "bitwise-xor": "0.0.0", + "bluebird": "3.7.1", + "body-parser": "1.19.0", + "compose-middleware": "4.0.0", + "cors": "2.8.5", + "csv-stringify": "1.0.4", + "express": "4.17.1", + "express-jwt": "5.3.1", + "forest-ip-utils": "1.0.1", + "http-errors": "1.7.3", + "inflected": "2.0.4", + "jsonapi-serializer": "3.6.5", + "jsonwebtoken": "8.5.1", + "lodash": "4.17.15", + "moment": "2.24.0", + "moment-timezone": "0.5.26", + "otplib": "11.0.1", + "require-all": "3.0.0", + "semver": "6.3.0", + "superagent": "3.7.0", + "useragent": "2.1.13", + "uuid": "3.3.3", + "verror": "1.10.0", + "winston": "3.2.1" + }, + "dependencies": { + "bluebird": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.1.tgz", + "integrity": "sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg==" + }, + "body-parser": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz", + "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==", + "requires": { + "bytes": "3.1.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "on-finished": "~2.3.0", + "qs": "6.7.0", + "raw-body": "2.4.0", + "type-is": "~1.6.17" + }, + "dependencies": { + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + } + } + }, + "bytes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", + "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" + }, + "content-disposition": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", + "integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==", + "requires": { + "safe-buffer": "5.1.2" + } + }, + "cookie": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", + "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "express": { + "version": "4.17.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz", + "integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==", + "requires": { + "accepts": "~1.3.7", + "array-flatten": "1.1.1", + "body-parser": "1.19.0", + "content-disposition": "0.5.3", + "content-type": "~1.0.4", + "cookie": "0.4.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.1.2", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.5", + "qs": "6.7.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.1.2", + "send": "0.17.1", + "serve-static": "1.14.1", + "setprototypeof": "1.1.1", + "statuses": "~1.5.0", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, + "finalhandler": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", + "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.3", + "statuses": "~1.5.0", + "unpipe": "~1.0.0" + } + }, + "http-errors": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", + "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + }, + "dependencies": { + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + } + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, + "mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" + }, + "moment": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", + "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "qs": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" + }, + "raw-body": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", + "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", + "requires": { + "bytes": "3.1.0", + "http-errors": "1.7.2", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "dependencies": { + "http-errors": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", + "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.1", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.0" + } + } + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "send": { + "version": "0.17.1", + "resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz", + "integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.7.2", + "mime": "1.6.0", + "ms": "2.1.1", + "on-finished": "~2.3.0", + "range-parser": "~1.2.1", + "statuses": "~1.5.0" + }, + "dependencies": { + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "serve-static": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", + "integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.17.1" + } + }, + "setprototypeof": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", + "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + } + } + }, + "forest-express-sequelize": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/forest-express-sequelize/-/forest-express-sequelize-5.7.0.tgz", + "integrity": "sha512-S/kOFIAjn7a1P/vvQ0XRZjV/+EAWjOrSIJwl/G/L0NHQD6M4EP9ZA3SbgU7OSGdXAR7tfGEmA9e4mctO79L0nA==", + "requires": { + "babel-runtime": "7.0.0-beta.3", + "bluebird": "2.9.25", + "forest-express": "5.6.1", + "http-errors": "1.6.1", + "lodash": "4.17.13", + "moment": "2.19.4", + "semver": "5.4.1" + }, + "dependencies": { + "depd": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", + "integrity": "sha1-4b2Cxqq2ztlluXuIsX7T5SjKGMM=" + }, + "http-errors": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz", + "integrity": "sha1-X4uO2YrKVFZWv1cplzh/kEpyIlc=", + "requires": { + "depd": "1.1.0", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": ">= 1.3.1 < 2" + } + }, + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" + } + } + }, + "forest-ip-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/forest-ip-utils/-/forest-ip-utils-1.0.1.tgz", + "integrity": "sha512-m/pXGliPvJ6pt5/kyTgNT3X4AKHBdeKJX+cg1RVHWrQiqvD7Qs6WbSaP8/l1nJz1FhrLC/EQJAWXTj/kdJjDEQ==", + "requires": { + "ip-address": "^5.8.9", + "range_check": "^1.4.0" + } + }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "formidable": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", + "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==" + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", + "requires": { + "is-property": "^1.0.2" + } + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inflected": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inflected/-/inflected-2.0.4.tgz", + "integrity": "sha512-HQPzFLTTUvwfeUH6RAGjD8cHS069mBqXG5n4qaxX7sJXBhVQrsGgF+0ZJGkSuN6a8pcUWB/GXStta11kKi/WvA==" + }, + "inflection": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.12.0.tgz", + "integrity": "sha1-ogCTVlbW9fa8TcdQLhrstwMihBY=" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ip-address": { + "version": "5.9.4", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-5.9.4.tgz", + "integrity": "sha512-dHkI3/YNJq4b/qQaz+c8LuarD3pY24JqZWfjB8aZx1gtpc2MDILu9L9jpZe1sHpzo/yWFweQVn+U//FhazUxmw==", + "requires": { + "jsbn": "1.1.0", + "lodash": "^4.17.15", + "sprintf-js": "1.1.2" + }, + "dependencies": { + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + } + } + }, + "ip6": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/ip6/-/ip6-0.0.4.tgz", + "integrity": "sha1-RMWp23njnUBSAbTXjROzhw5I2zE=" + }, + "ipaddr.js": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", + "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" + }, + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + }, + "is-bluebird": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-bluebird/-/is-bluebird-1.0.2.tgz", + "integrity": "sha1-CWQ5Bg9KpBGr7hkUOoTWpVNG1uI=" + }, + "is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ=" + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha1-sBMHyym2GKHtJux56RH4A8TaAEA=" + }, + "jsonapi-serializer": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/jsonapi-serializer/-/jsonapi-serializer-3.6.5.tgz", + "integrity": "sha512-UmBU9JnWVi2H2vZcPTSsPsA7+SUIkuGXwjXbx2GWW7crbZr/pYgQPUH3MSmOQYvpAIYlg5oIomnS4F9eM8g5cQ==", + "requires": { + "inflected": "^1.1.6", + "lodash": "^4.16.3" + }, + "dependencies": { + "inflected": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/inflected/-/inflected-1.1.7.tgz", + "integrity": "sha1-w5PfbihHLQ13swguw6ogkfS8lvk=" + } + } + }, + "jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "requires": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + } + }, + "jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "requires": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "kuler": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-1.0.1.tgz", + "integrity": "sha512-J9nVUucG1p/skKul6DU3PUZrhs0LPulNaeUOox0IyXDi8S4CztTHs1gQphhuZmzXG7VOQSf6NJfKuzteQLv9gQ==", + "requires": { + "colornames": "^1.1.1" + } + }, + "lodash": { + "version": "4.17.13", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.13.tgz", + "integrity": "sha512-vm3/XWXfWtRua0FkUyEHBZy8kCPjErNBT9fJx8Zvs+U6zjqPbTUOpkaoum3O5uiA8sm+yNMHXfYkTUHFoMxFNA==" + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" + }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" + }, + "lodash.set": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", + "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=" + }, + "logform": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.1.2.tgz", + "integrity": "sha512-+lZh4OpERDBLqjiwDLpAWNQu6KMjnlXH2ByZwCuSqVPJletw0kTWJf5CgSNAUKn1KUkv3m2cUz/LK8zyEy7wzQ==", + "requires": { + "colors": "^1.2.1", + "fast-safe-stringify": "^2.0.4", + "fecha": "^2.3.3", + "ms": "^2.1.1", + "triple-beam": "^1.3.0" + } + }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "lru-cache": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.2.4.tgz", + "integrity": "sha1-bGWGGb7PFAMdDQtZSxYELOTcBj0=" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "mime-db": { + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" + }, + "mime-types": { + "version": "2.1.26", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", + "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", + "requires": { + "mime-db": "1.43.0" + } + }, + "moment": { + "version": "2.19.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.19.4.tgz", + "integrity": "sha512-1xFTAknSLfc47DIxHDUbnJWC+UwgWxATmymaxIPQpmMh7LBm7ZbwVEsuushqwL2GYZU0jie4xO+TK44hJPjNSQ==" + }, + "moment-timezone": { + "version": "0.5.26", + "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.26.tgz", + "integrity": "sha512-sFP4cgEKTCymBBKgoxZjYzlSovC20Y6J7y3nanDc5RoBIXKlZhoYwBoZGe3flwU6A372AcRwScH8KiwV6zjy1g==", + "requires": { + "moment": ">= 2.9.0" + } + }, + "morgan": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz", + "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==", + "requires": { + "basic-auth": "~2.0.0", + "debug": "2.6.9", + "depd": "~1.1.2", + "on-finished": "~2.3.0", + "on-headers": "~1.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "mysql2": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-1.7.0.tgz", + "integrity": "sha512-xTWWQPjP5rcrceZQ7CSTKR/4XIDeH/cRkNH/uzvVGQ7W5c7EJ0dXeJUusk7OKhIoHj7uFKUxDVSCfLIl+jluog==", + "requires": { + "denque": "^1.4.1", + "generate-function": "^2.3.1", + "iconv-lite": "^0.5.0", + "long": "^4.0.0", + "lru-cache": "^5.1.1", + "named-placeholders": "^1.1.2", + "seq-queue": "^0.0.5", + "sqlstring": "^2.3.1" + }, + "dependencies": { + "iconv-lite": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.5.1.tgz", + "integrity": "sha512-ONHr16SQvKZNSqjQT9gy5z24Jw+uqfO02/ngBSBoqChZ+W8qXX7GPRa1RoUnzGADw8K63R1BXUMzarCVQBpY8Q==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "requires": { + "yallist": "^3.0.2" + } + } + } + }, + "named-placeholders": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.2.tgz", + "integrity": "sha512-wiFWqxoLL3PGVReSZpjLVxyJ1bRqe+KKJVbr4hGs1KWfTZTQyezHFBbuKj9hsizHyGV2ne7EMjHdxEGAybD5SA==", + "requires": { + "lru-cache": "^4.1.3" + }, + "dependencies": { + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + } + } + }, + "negotiator": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", + "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" + }, + "one-time": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-0.0.4.tgz", + "integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4=" + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "otplib": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/otplib/-/otplib-11.0.1.tgz", + "integrity": "sha512-oi57teljNyWTC/JqJztHOtSGeFNDiDh5C1myd+faocUtFAX27Sm1mbx69kpEJ8/JqrblI3kAm4Pqd6tZJoOIBQ==", + "requires": { + "thirty-two": "1.0.2" + } + }, + "parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "proxy-addr": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", + "integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==", + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.9.0" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==" + }, + "range_check": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/range_check/-/range_check-1.4.0.tgz", + "integrity": "sha1-zYfHrGLEC6nfabhwPGBPYMN0hjU=", + "requires": { + "ip6": "0.0.4", + "ipaddr.js": "1.2" + }, + "dependencies": { + "ipaddr.js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.2.0.tgz", + "integrity": "sha1-irpJyRknmVhb3WQ+DMtQ6K53e6Q=" + } + } + }, + "raw-body": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "regenerator-runtime": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", + "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" + }, + "require-all": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/require-all/-/require-all-3.0.0.tgz", + "integrity": "sha1-Rz1JcEvjEBFc4ST3c4Ox69hnExI=" + }, + "retry-as-promised": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/retry-as-promised/-/retry-as-promised-3.2.0.tgz", + "integrity": "sha512-CybGs60B7oYU/qSQ6kuaFmRd9sTZ6oXSc0toqePvV74Ac6/IFZSI1ReFQmtCN+uvW1Mtqdwpvt/LGOiCBAY2Mg==", + "requires": { + "any-promise": "^1.3.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "seq-queue": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha1-1WgS4cAXpuTnw+Ojeh2m143TyT4=" + }, + "sequelize": { + "version": "5.15.2", + "resolved": "https://registry.npmjs.org/sequelize/-/sequelize-5.15.2.tgz", + "integrity": "sha512-kWit2WyarcvA8iGph3OwaI524lW7ICZazFdKjLbY2oyYsoNkwFPbF0fAtJOiGFcW5yWyUHlA2Y04anxXMTgAKg==", + "requires": { + "bluebird": "^3.5.0", + "cls-bluebird": "^2.1.0", + "debug": "^4.1.1", + "dottie": "^2.0.0", + "inflection": "1.12.0", + "lodash": "^4.17.11", + "moment": "^2.24.0", + "moment-timezone": "^0.5.21", + "retry-as-promised": "^3.1.0", + "semver": "^6.1.1", + "sequelize-pool": "^2.3.0", + "toposort-class": "^1.0.1", + "uuid": "^3.2.1", + "validator": "^10.11.0", + "wkx": "^0.4.6" + }, + "dependencies": { + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "moment": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", + "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "sequelize-pool": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/sequelize-pool/-/sequelize-pool-2.3.0.tgz", + "integrity": "sha512-Ibz08vnXvkZ8LJTiUOxRcj1Ckdn7qafNZ2t59jYHMX1VIebTAOYefWdRYFt6z6+hy52WGthAHAoLc9hvk3onqA==" + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "shimmer": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/shimmer/-/shimmer-1.2.1.tgz", + "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==" + }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", + "requires": { + "is-arrayish": "^0.3.1" + } + }, + "sprintf-js": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", + "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==" + }, + "sqlstring": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.1.tgz", + "integrity": "sha1-R1OT/56RR5rqYtyvDKPRSYOn+0A=" + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "superagent": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.7.0.tgz", + "integrity": "sha512-/8trxO6NbLx4YXb7IeeFTSmsQ35pQBiTBsLNvobZx7qBzBeHYvKCyIIhW2gNcWbLzYxPAjdgFbiepd8ypwC0Gw==", + "requires": { + "component-emitter": "^1.2.0", + "cookiejar": "^2.1.0", + "debug": "^3.1.0", + "extend": "^3.0.0", + "form-data": "^2.3.1", + "formidable": "^1.1.1", + "methods": "^1.1.1", + "mime": "^1.4.1", + "qs": "^6.5.1", + "readable-stream": "^2.0.5" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" + }, + "text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" + }, + "thirty-two": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/thirty-two/-/thirty-two-1.0.2.tgz", + "integrity": "sha1-TKL//AKlEpDSdEueP1V2k8prYno=" + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "toidentifier": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", + "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" + }, + "toposort-class": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toposort-class/-/toposort-class-1.0.1.tgz", + "integrity": "sha1-f/0feMi+KMO6Rc1OGj9e4ZO9mYg=" + }, + "triple-beam": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", + "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" + }, + "type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "useragent": { + "version": "2.1.13", + "resolved": "https://registry.npmjs.org/useragent/-/useragent-2.1.13.tgz", + "integrity": "sha1-u6Q+iqJNXOuDwpN0c+EC4h33TBA=", + "requires": { + "lru-cache": "2.2.x", + "tmp": "0.0.x" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "uuid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", + "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==" + }, + "validator": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-10.11.0.tgz", + "integrity": "sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw==" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "winston": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.2.1.tgz", + "integrity": "sha512-zU6vgnS9dAWCEKg/QYigd6cgMVVNwyTzKs81XZtTFuRwJOcDdBg7AU0mXVyNbs7O5RH2zdv+BdNZUlx7mXPuOw==", + "requires": { + "async": "^2.6.1", + "diagnostics": "^1.1.1", + "is-stream": "^1.1.0", + "logform": "^2.1.1", + "one-time": "0.0.4", + "readable-stream": "^3.1.1", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.3.0" + }, + "dependencies": { + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "requires": { + "lodash": "^4.17.14" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "winston-transport": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.3.0.tgz", + "integrity": "sha512-B2wPuwUi3vhzn/51Uukcao4dIduEiPOcOt9HJ3QeaXgkJ5Z7UwpBzxS4ZGNHtrxrUvTwemsQiSys0ihOf8Mp1A==", + "requires": { + "readable-stream": "^2.3.6", + "triple-beam": "^1.2.0" + } + }, + "wkx": { + "version": "0.4.8", + "resolved": "https://registry.npmjs.org/wkx/-/wkx-0.4.8.tgz", + "integrity": "sha512-ikPXMM9IR/gy/LwiOSqWlSL3X/J5uk9EO2hHNRXS41eTLXaUFEVw9fn/593jW/tE5tedNg8YjT5HkCa4FqQZyQ==", + "requires": { + "@types/node": "*" + } + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + } + } +} diff --git a/tool/forestadmin/package.json b/tool/forestadmin/package.json new file mode 100644 index 000000000..3bae74159 --- /dev/null +++ b/tool/forestadmin/package.json @@ -0,0 +1,22 @@ +{ + "name": "pathwar", + "version": "0.0.1", + "private": true, + "scripts": { + "start": "node ./server.js" + }, + "dependencies": { + "chalk": "~1.1.3", + "cookie-parser": "1.4.4", + "cors": "2.8.5", + "debug": "~4.0.1", + "dotenv": "~6.1.0", + "express": "~4.16.3", + "express-jwt": "5.3.1", + "forest-express-sequelize": "^5.5.0", + "morgan": "1.9.1", + "require-all": "^3.0.0", + "sequelize": "~5.15.1", + "mysql2": "~1.7.0" + } +} diff --git a/tool/forestadmin/public/favicon.png b/tool/forestadmin/public/favicon.png new file mode 100644 index 000000000..2c26500fe Binary files /dev/null and b/tool/forestadmin/public/favicon.png differ diff --git a/tool/forestadmin/routes/achievement.js b/tool/forestadmin/routes/achievement.js new file mode 100644 index 000000000..78dd2a69a --- /dev/null +++ b/tool/forestadmin/routes/achievement.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { achievement } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('achievement'); + +// This file contains the logic of every route in Forest Admin for the collection achievement: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Achievement +router.post('/achievement', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Achievement +router.put('/achievement/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Achievement +router.delete('/achievement/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Achievements +router.get('/achievement', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Achievements +router.get('/achievement/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Achievement +router.get('/achievement/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Achievements +router.get('/achievement.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/agent.js b/tool/forestadmin/routes/agent.js new file mode 100644 index 000000000..434d6e68b --- /dev/null +++ b/tool/forestadmin/routes/agent.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { agent } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('agent'); + +// This file contains the logic of every route in Forest Admin for the collection agent: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Agent +router.post('/agent', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Agent +router.put('/agent/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Agent +router.delete('/agent/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Agents +router.get('/agent', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Agents +router.get('/agent/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Agent +router.get('/agent/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Agents +router.get('/agent.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/challenge-flavor.js b/tool/forestadmin/routes/challenge-flavor.js new file mode 100644 index 000000000..1b308c731 --- /dev/null +++ b/tool/forestadmin/routes/challenge-flavor.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { challenge_flavor } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('challenge_flavor'); + +// This file contains the logic of every route in Forest Admin for the collection challenge_flavor: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Challenge Flavor +router.post('/challenge_flavor', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Challenge Flavor +router.put('/challenge_flavor/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Challenge Flavor +router.delete('/challenge_flavor/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Challenge Flavors +router.get('/challenge_flavor', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Challenge Flavors +router.get('/challenge_flavor/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Challenge Flavor +router.get('/challenge_flavor/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Challenge Flavors +router.get('/challenge_flavor.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/challenge-instance.js b/tool/forestadmin/routes/challenge-instance.js new file mode 100644 index 000000000..0cab8e64a --- /dev/null +++ b/tool/forestadmin/routes/challenge-instance.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { challenge_instance } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('challenge_instance'); + +// This file contains the logic of every route in Forest Admin for the collection challenge_instance: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Challenge Instance +router.post('/challenge_instance', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Challenge Instance +router.put('/challenge_instance/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Challenge Instance +router.delete('/challenge_instance/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Challenge Instances +router.get('/challenge_instance', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Challenge Instances +router.get('/challenge_instance/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Challenge Instance +router.get('/challenge_instance/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Challenge Instances +router.get('/challenge_instance.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/challenge-subscription.js b/tool/forestadmin/routes/challenge-subscription.js new file mode 100644 index 000000000..af6594128 --- /dev/null +++ b/tool/forestadmin/routes/challenge-subscription.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { challenge_subscription } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('challenge_subscription'); + +// This file contains the logic of every route in Forest Admin for the collection challenge_subscription: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Challenge Subscription +router.post('/challenge_subscription', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Challenge Subscription +router.put('/challenge_subscription/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Challenge Subscription +router.delete('/challenge_subscription/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Challenge Subscriptions +router.get('/challenge_subscription', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Challenge Subscriptions +router.get('/challenge_subscription/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Challenge Subscription +router.get('/challenge_subscription/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Challenge Subscriptions +router.get('/challenge_subscription.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/challenge-validation.js b/tool/forestadmin/routes/challenge-validation.js new file mode 100644 index 000000000..e0c0fbf88 --- /dev/null +++ b/tool/forestadmin/routes/challenge-validation.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { challenge_validation } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('challenge_validation'); + +// This file contains the logic of every route in Forest Admin for the collection challenge_validation: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Challenge Validation +router.post('/challenge_validation', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Challenge Validation +router.put('/challenge_validation/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Challenge Validation +router.delete('/challenge_validation/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Challenge Validations +router.get('/challenge_validation', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Challenge Validations +router.get('/challenge_validation/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Challenge Validation +router.get('/challenge_validation/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Challenge Validations +router.get('/challenge_validation.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/challenge.js b/tool/forestadmin/routes/challenge.js new file mode 100644 index 000000000..09f53793c --- /dev/null +++ b/tool/forestadmin/routes/challenge.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { challenge } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('challenge'); + +// This file contains the logic of every route in Forest Admin for the collection challenge: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Challenge +router.post('/challenge', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Challenge +router.put('/challenge/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Challenge +router.delete('/challenge/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Challenges +router.get('/challenge', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Challenges +router.get('/challenge/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Challenge +router.get('/challenge/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Challenges +router.get('/challenge.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/coupon-validation.js b/tool/forestadmin/routes/coupon-validation.js new file mode 100644 index 000000000..ddce8ad23 --- /dev/null +++ b/tool/forestadmin/routes/coupon-validation.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { coupon_validation } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('coupon_validation'); + +// This file contains the logic of every route in Forest Admin for the collection coupon_validation: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Coupon Validation +router.post('/coupon_validation', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Coupon Validation +router.put('/coupon_validation/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Coupon Validation +router.delete('/coupon_validation/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Coupon Validations +router.get('/coupon_validation', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Coupon Validations +router.get('/coupon_validation/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Coupon Validation +router.get('/coupon_validation/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Coupon Validations +router.get('/coupon_validation.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/coupon.js b/tool/forestadmin/routes/coupon.js new file mode 100644 index 000000000..c3a5a2199 --- /dev/null +++ b/tool/forestadmin/routes/coupon.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { coupon } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('coupon'); + +// This file contains the logic of every route in Forest Admin for the collection coupon: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Coupon +router.post('/coupon', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Coupon +router.put('/coupon/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Coupon +router.delete('/coupon/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Coupons +router.get('/coupon', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Coupons +router.get('/coupon/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Coupon +router.get('/coupon/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Coupons +router.get('/coupon.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/inventory-item.js b/tool/forestadmin/routes/inventory-item.js new file mode 100644 index 000000000..800a14313 --- /dev/null +++ b/tool/forestadmin/routes/inventory-item.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { inventory_item } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('inventory_item'); + +// This file contains the logic of every route in Forest Admin for the collection inventory_item: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Inventory Item +router.post('/inventory_item', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Inventory Item +router.put('/inventory_item/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Inventory Item +router.delete('/inventory_item/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Inventory Items +router.get('/inventory_item', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Inventory Items +router.get('/inventory_item/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Inventory Item +router.get('/inventory_item/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Inventory Items +router.get('/inventory_item.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/migrations.js b/tool/forestadmin/routes/migrations.js new file mode 100644 index 000000000..884fece4d --- /dev/null +++ b/tool/forestadmin/routes/migrations.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { migrations } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('migrations'); + +// This file contains the logic of every route in Forest Admin for the collection migrations: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Migration +router.post('/migrations', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Migration +router.put('/migrations/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Migration +router.delete('/migrations/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Migrations +router.get('/migrations', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Migrations +router.get('/migrations/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Migration +router.get('/migrations/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Migrations +router.get('/migrations.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/notification.js b/tool/forestadmin/routes/notification.js new file mode 100644 index 000000000..7f4eb335a --- /dev/null +++ b/tool/forestadmin/routes/notification.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { notification } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('notification'); + +// This file contains the logic of every route in Forest Admin for the collection notification: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Notification +router.post('/notification', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Notification +router.put('/notification/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Notification +router.delete('/notification/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Notifications +router.get('/notification', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Notifications +router.get('/notification/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Notification +router.get('/notification/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Notifications +router.get('/notification.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/organization-member.js b/tool/forestadmin/routes/organization-member.js new file mode 100644 index 000000000..9ec055439 --- /dev/null +++ b/tool/forestadmin/routes/organization-member.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { organization_member } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('organization_member'); + +// This file contains the logic of every route in Forest Admin for the collection organization_member: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Organization Member +router.post('/organization_member', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Organization Member +router.put('/organization_member/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Organization Member +router.delete('/organization_member/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Organization Members +router.get('/organization_member', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Organization Members +router.get('/organization_member/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Organization Member +router.get('/organization_member/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Organization Members +router.get('/organization_member.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/organization.js b/tool/forestadmin/routes/organization.js new file mode 100644 index 000000000..31524e75b --- /dev/null +++ b/tool/forestadmin/routes/organization.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { organization } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('organization'); + +// This file contains the logic of every route in Forest Admin for the collection organization: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Organization +router.post('/organization', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Organization +router.put('/organization/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Organization +router.delete('/organization/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Organizations +router.get('/organization', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Organizations +router.get('/organization/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Organization +router.get('/organization/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Organizations +router.get('/organization.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/season-challenge.js b/tool/forestadmin/routes/season-challenge.js new file mode 100644 index 000000000..b9aa01407 --- /dev/null +++ b/tool/forestadmin/routes/season-challenge.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { season_challenge } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('season_challenge'); + +// This file contains the logic of every route in Forest Admin for the collection season_challenge: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Season Challenge +router.post('/season_challenge', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Season Challenge +router.put('/season_challenge/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Season Challenge +router.delete('/season_challenge/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Season Challenges +router.get('/season_challenge', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Season Challenges +router.get('/season_challenge/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Season Challenge +router.get('/season_challenge/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Season Challenges +router.get('/season_challenge.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/season.js b/tool/forestadmin/routes/season.js new file mode 100644 index 000000000..493adb31b --- /dev/null +++ b/tool/forestadmin/routes/season.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { season } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('season'); + +// This file contains the logic of every route in Forest Admin for the collection season: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Season +router.post('/season', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Season +router.put('/season/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Season +router.delete('/season/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Seasons +router.get('/season', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Seasons +router.get('/season/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Season +router.get('/season/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Seasons +router.get('/season.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/team-member.js b/tool/forestadmin/routes/team-member.js new file mode 100644 index 000000000..676c29a8d --- /dev/null +++ b/tool/forestadmin/routes/team-member.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { team_member } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('team_member'); + +// This file contains the logic of every route in Forest Admin for the collection team_member: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Team Member +router.post('/team_member', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Team Member +router.put('/team_member/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Team Member +router.delete('/team_member/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Team Members +router.get('/team_member', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Team Members +router.get('/team_member/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Team Member +router.get('/team_member/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Team Members +router.get('/team_member.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/team.js b/tool/forestadmin/routes/team.js new file mode 100644 index 000000000..c4429e51b --- /dev/null +++ b/tool/forestadmin/routes/team.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { team } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('team'); + +// This file contains the logic of every route in Forest Admin for the collection team: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Team +router.post('/team', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Team +router.put('/team/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Team +router.delete('/team/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Teams +router.get('/team', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Teams +router.get('/team/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Team +router.get('/team/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Teams +router.get('/team.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/user.js b/tool/forestadmin/routes/user.js new file mode 100644 index 000000000..9cf2c3fbd --- /dev/null +++ b/tool/forestadmin/routes/user.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { user } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('user'); + +// This file contains the logic of every route in Forest Admin for the collection user: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a User +router.post('/user', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a User +router.put('/user/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a User +router.delete('/user/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Users +router.get('/user', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Users +router.get('/user/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a User +router.get('/user/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Users +router.get('/user.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/routes/whoswho-attempt.js b/tool/forestadmin/routes/whoswho-attempt.js new file mode 100644 index 000000000..04ee88b5f --- /dev/null +++ b/tool/forestadmin/routes/whoswho-attempt.js @@ -0,0 +1,54 @@ +const express = require('express'); +const { PermissionMiddlewareCreator } = require('forest-express-sequelize'); +const { whoswho_attempt } = require('../models'); + +const router = express.Router(); +const permissionMiddlewareCreator = new PermissionMiddlewareCreator('whoswho_attempt'); + +// This file contains the logic of every route in Forest Admin for the collection whoswho_attempt: +// - Native routes are already generated but can be extended/overriden - Learn how to extend a route here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/extend-a-route +// - Smart action routes will need to be added as you create new Smart Actions - Learn how to create a Smart Action here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/actions/create-and-manage-smart-actions + +// Create a Whoswho Attempt +router.post('/whoswho_attempt', permissionMiddlewareCreator.create(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#create-a-record + next(); +}); + +// Update a Whoswho Attempt +router.put('/whoswho_attempt/:recordId', permissionMiddlewareCreator.update(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#update-a-record + next(); +}); + +// Delete a Whoswho Attempt +router.delete('/whoswho_attempt/:recordId', permissionMiddlewareCreator.delete(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#delete-a-record + next(); +}); + +// Get a list of Whoswho Attempts +router.get('/whoswho_attempt', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-list-of-records + next(); +}); + +// Get a number of Whoswho Attempts +router.get('/whoswho_attempt/count', permissionMiddlewareCreator.list(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-number-of-records + next(); +}); + +// Get a Whoswho Attempt +router.get('/whoswho_attempt/:recordId', permissionMiddlewareCreator.details(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#get-a-record + next(); +}); + +// Export a list of Whoswho Attempts +router.get('/whoswho_attempt.csv', permissionMiddlewareCreator.export(), (request, response, next) => { + // Learn what this route does here: https://docs.forestadmin.com/documentation/v/v5/reference-guide/routes/default-routes#export-a-list-of-records + next(); +}); + +module.exports = router; diff --git a/tool/forestadmin/server.js b/tool/forestadmin/server.js new file mode 100644 index 000000000..6122c0122 --- /dev/null +++ b/tool/forestadmin/server.js @@ -0,0 +1,56 @@ +require('dotenv').config(); +const app = require('./app'); +const debug = require('debug')('{name}:server'); +const http = require('http'); +const chalk = require('chalk'); + +function normalizePort(val) { + const port = parseInt(val, 10); + + if (Number.isNaN(port)) { return val; } + if (port >= 0) { return port; } + + return false; +} + +const port = normalizePort(process.env.PORT || process.env.APPLICATION_PORT || '3310'); +app.set('port', port); + +const server = http.createServer(app); +server.listen(port); + +function onError(error) { + if (error.syscall !== 'listen') { + throw error; + } + + const bind = typeof port === 'string' + ? `Pipe ${port}` + : `Port ${port}`; + + switch (error.code) { + case 'EACCES': + console.error(`${bind} requires elevated privileges`); + process.exit(1); + break; + case 'EADDRINUSE': + console.error(`${bind} is already in use`); + process.exit(1); + break; + default: + throw error; + } +} + +function onListening() { + const addr = server.address(); + const bind = typeof addr === 'string' + ? `pipe ${addr}` + : `port ${addr.port}`; + debug(`Listening on ${bind}`); + + console.log(chalk.cyan(`Your application is listening on ${bind}.`)); +} + +server.on('error', onError); +server.on('listening', onListening); diff --git a/tool/forestadmin/views/index.html b/tool/forestadmin/views/index.html new file mode 100644 index 000000000..dd572b3c8 --- /dev/null +++ b/tool/forestadmin/views/index.html @@ -0,0 +1,73 @@ + +
+ +