Miss any of our Open RFC calls?Watch the recordings here! »

@seedalpha/model

8.0.12 • Public • Published

Model

wercker status
Seedalpha models

Changelog

8.0.0

  • Update mongoose to v4.x.x
  • Update node to 7.x.x

7.13.0

  • New Fields
    • Company: trialPeriod (number in days)
    • User: trialBeganAt (time started trial)

7.12.0

  • Indexing

7.11.0

  • Guide model

7.10.5

  • Optimize usage generation

7.10.0

  • Add sourceType / sourceId to Usage for reading logs

7.9.1

  • Fix usage generation on Market related articles

7.9.0

  • Usage generate method

7.8.1

  • Expose rating model

7.8.0

  • Rating model

7.7.1

  • Typo in usage model

7.7.0

  • Usage model

7.6.0

  • Activity model

7.5.0

  • index article meta but not entries
  • bump es-index-mongoose (supports custom mappings)
  • include custom mapping during index time (reference)

7.4.0

  • add stats field in envelope model

7.3.0

  • not to index meta field in article, due to some value of meta field is rediculously huge
  • not to index any document but Reference, as it is the only used index at the moment, to reduce loading of ES machine

7.2.0

  • also index meta field in article

7.1.0

  • add onboardedAt field to user (used when autoforward is set up)

7.0.0

  • use es-index-mongoose@3.0.0 to get whole ES result object

6.15.0

  • add channel and message schema and model

6.14.0

  • add meta to user object (for the purposes of onboarding check)

6.13.0

  • revamp notification model

6.12.5

  • update es-index-mongoose to 2.3.2
  • allow minor updates on es-index-mongoose

6.12.4

  • add text to `Article``

6.12.3

  • enable TTL in user_token

6.12.2:

  • rollback mongoose to 3.8.x

6.12.1:

  • add activatedAt to User

6.12.0:

  • add name to Mailbox

6.11.2:

  • use mongoose 4.x

6.11.1:

  • ResourceId, ResourceType in notification schema

6.11.0:

  • mvp notifications

6.10.2:

  • use usernameLowerCase to user model

6.10.1:

  • use es-index-mongoose@2.3.1

6.10.0:

  • use es-index-mongoose@2.3.0

6.9.0:

  • add model report

6.8.0:

  • not to use enum for event name

6.7.0:

  • add model notification

6.6.0:

  • use es-index-mongoose@2.2.0 (support pagination)

6.5.0:

  • add article _id, title, tags, summary, content to Reference's es-index
  • use es-index-mongoose@2.1.0

6.4.0:

  • index all models, but user-token (expireable)

6.3.0:

  • article schema contains mixed type of media (could be an ObjectId could be an Object)

6.2.1:

  • syntax fix in enveloper model

6.2.0:

  • schema update:
    • article model - relates to envelope model instead of document
    • document model - will be removed
    • envelope model - only storing envelope.json S3 path to replace the infos
    • event model - followAuthor/unfollowAuthor updates to followUser/unfollowUser
    • file model - will be removed, infos are moving into envelope.json

6.1.0:

  • schema update:
    • document model - replace envelop & user with resourceType & resourceId
    • mailbox model - remove Company from resourceType
    • event model - download & archive events

6.0.1:

  • setup npm to use NPM_AUTH

6.0.0:

  • schema update (breaking apis):
    • reference model - remove user, rely on article instead
  • add back search test on article

5.0.0:

  • strict requirements on env vars (breaking apis)
  • schema update (breaking apis):
    • article model – move references to standalone model, move bookmarks to snadalone model
    • create bookmark model
    • create reference model
    • create comment model
    • update company roles enums
    • create department model
    • document model - remove enveloper uuid, rely on envelope id instead
    • envelope model - remove uuid, sentAt, rely on id and createdAt instead
    • remove campaign model (spec undefined for now)
    • remove feed model (spec undefined for now)
    • remove following author model (substiture with following)
    • remove following company model (substiture with following)
    • create following model
    • create group model
    • create mailbox model
    • create membership model (for group membership)
    • user model - move user uuid into mailbox instead
  • remove unused hashids dependency

4.3.1:

  • use private registry

Prerequisites

$ npm set registry http://npm.sandbox.elasticseed.net
$ npm set always-auth true
$ npm login

Installation

$ npm install seed-model --save

Usage

var User = require('seed-model').User;

Configuration

$ export DATABASE_URL=localhost:27017
$ export ES_URL=http://localhost:9200
$ npm test

Tests & Builds

$ export DATABASE_URL=localhost:27017
$ npm test

Note: this project is not meant to be run standalone, docker container is used for testing purposes only

Roadmap

  • Article
    • cover search with tests
  • Bookmark
    • ensure user index
  • Comment
    • ensure reference index
  • Company
    • create default department with a post create hook
  • Department
    • ensure company index
    • return tree helper method
  • Following
    • ensure user index
  • Mailbox
    • update schema to generate custom random case insensitive seeds
    • cover with tests
  • Membership
    • ensure indexes
  • Reference
    • ensure indexed
  • User
    • cover authentication with tests

Author

Vladimir Popov vlad@seedalpha.net

License

©2014 Seedalpha

Install

npm i @seedalpha/model

DownloadsWeekly Downloads

1

Version

8.0.12

License

©2014 Seedalpha

Unpacked Size

58.3 kB

Total Files

57

Last publish

Collaborators

  • avatar
  • avatar