Skip to content

Commit

Permalink
docs: config for docs rearranging items
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-scherzinger committed Feb 17, 2017
1 parent a9abc9a commit e810485
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 23 deletions.
39 changes: 39 additions & 0 deletions documentation.yml
@@ -0,0 +1,39 @@
toc:
- name: Introduction
description: |
Awesome Introduction.
- name: API connectors
description: |
What are those?
- Core
- Session
- Accounts
- DataManager
- environment
- name: Resources
description: |
Resource Description.
- Resource
- ListResource
- filterOptions
- filter
- name: Accounts Resources
description: |
Accounts resources are awesome.
- AccountResource
- AccountList
- TokenResource
- TokenList
- ClientResource
- ClientList
- GroupResource
- GroupList
- InvitesResource
- InvalidPermissionsResource
- name: DataManager Resources
description: |
They are awesome too.
- DataManagerResource
- DataManagerList
- ModelResource
- ModelList
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -17,7 +17,7 @@
"changelog": "conventional-changelog -i CHANGELOG.md -s",
"coveralls": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
"coverage": "istanbul cover ./node_modules/mocha/bin/_mocha -- -R spec && open ./coverage/lcov-report/index.html",
"docs": "documentation build src/** -f html -o docs --sort-order alpha && documentation build src/** -f md --sort-order alpha -o DOCUMENTATION.md",
"docs": "documentation build src/** -c documentation.yml -f html -o docs --sort-order alpha && documentation build src/** -c documentation.yml -f md --sort-order alpha -o DOCUMENTATION.md",
"test": "npm run buildNode && mocha --recursive",
"testTravis": "npm run build && mocha --recursive"
},
Expand Down
2 changes: 2 additions & 0 deletions src/TokenStore.js
Expand Up @@ -138,6 +138,8 @@ class TokenStore {
* Factory function for creating a {@link TokenStore} for an environment. Will return a
* previously created {@link TokenStore}.
*
* @access private
*
* @param {environment} environment the environment for which the token store should be created
* @returns {TokenStore} The created token store
*/
Expand Down
9 changes: 2 additions & 7 deletions src/resources/AccountResource.js
Expand Up @@ -15,7 +15,8 @@ import { get } from '../helper';
* @prop {boolean} hasPassword - Whether or not this account has a password
* @prop {boolean} hasPendingEmail - Whether or not this account has a pending email
* @prop {string} language - The language for frontend usage
* @prop {Array<openID>} openID - Array of connected openID accounts
* @prop {Array<{{sub: string, iss: string, pending: boolean, email: string, name: string}}>}
* openID - Array of connected openID accounts
* @prop {Array<string>} permissions - Array of permissions
* @prop {string} state - State of the account.
*/
Expand Down Expand Up @@ -145,9 +146,3 @@ export default class AccountResource extends Resource {
});
}
}

/**
* Object describing openID connections.
*
* @typedef {{sub: string, iss: string, pending: boolean, email: string, name: string}} openID
*/
15 changes: 2 additions & 13 deletions src/resources/ListResource.js
Expand Up @@ -19,18 +19,7 @@ export default class ListResource extends Resource {
constructor(resource, environment, name, traversal) {
super(resource, environment, traversal);

/**
* Defines the class this {@link ListResource} has. Is used to support more specified classes
* like {@link DataManagerList}.
*
* @type {ListResource|ListResourceClass}
*/
this.ListClass = ListResource;

/**
* Defines the class the items of this {@link ListResource} have.
* @type {Resource|ResourceClass}
*/
this.ItemClass = Resource;
this.name = name || Object.keys(this.resource.allEmbeddedResources())[0];
}
Expand Down Expand Up @@ -166,10 +155,10 @@ export default class ListResource extends Resource {

/**
* @typedef {class} ListResourceClass
* @private
* @access private
*/

/**
* @typedef {class} ResourceClass
* @private
* @access private
*/
5 changes: 3 additions & 2 deletions src/resources/ModelResource.js
Expand Up @@ -8,7 +8,7 @@ import Resource from './Resource';
* @prop {string} modelID - The id of this Model
* @prop {Date} created - The Date on which this Model was created
* @prop {string} description - optional description
* @prop {Array<Field>} fields - Array of fields
* @prop {Array<object>} fields - Array of fields
* @prop {boolean} hasEntries - Whether or not this Model has Entries
* @prop {string} hexColor - The hexColor for frontend usage
* @prop {Array<object>} hooks - Array of hooks
Expand Down Expand Up @@ -119,8 +119,9 @@ export default class ModelResource extends Resource {

// TODO hooks type
// TODO policies type
// TODO fields type

/**
/*
* Fields object
* @typedef {{
* title: string,
Expand Down

0 comments on commit e810485

Please sign in to comment.