Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Rhmap 17460 - jstafford changes to api documentation (#124)
Browse files Browse the repository at this point in the history
* Ported jstafford changes for api review to passportAuth

* port jstaffords changes for api documentation for datasync client

* port jstaffords changes for api documentation for wfm module
  • Loading branch information
austincunningham committed Sep 20, 2017
1 parent 54dff88 commit 35809c4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 27 deletions.
16 changes: 7 additions & 9 deletions client/datasync-client/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
# RainCatcher DataSync

Feedhenry Sync typescript client.
Data synchonization javascript client. Library can be used for offline storage of mobile applications data.

Raincatcher DataSync is based on [sync.js client](https://github.com/feedhenry/fh-sync-js)
For advanced usage see [FeedHenry Sync documentation](https://github.com/feedhenry/fh-sync/tree/master/docs).
Raincatcher DataSync is based on the[Feedhenry sync.js client](https://github.com/feedhenry/fh-sync-js)
For advanced usage of the Raincatcher DataSync module, see[FeedHenry Sync] (https://github.com/feedhenry/fh-sync/tree/master/docs) documentation.

## Overview

Sync mobile data synchronization framework provides the following key functionality:
Raincatcher DataSync provides the following functionality:

- Allows synchronisation of WFM workorder data between the RainCatcher mobile client and the RainCatcher cloud server
- Allows mobile apps to use and update data offline (local cache)
- Provides a mechanism to manage bi-directional data synchronization from multiple Client Apps via the Cloud App and into back-end data stores
- Allows data updates (that is, deltas) to be distributed from the Cloud App to connected clients
- Provides facilities for managing data collisions from multiple updates in the cloud

This service effectively allows sync apps to seamlessly continue working when the network connection is lost, and allow them to recover when the network connection is restored.
This service effectively allows Sync apps to seamlessly continue working when the network connection is lost, and allow them to recover when the network connection is restored.

## Getting started with sync

Expand All @@ -41,7 +39,7 @@ $fh.sync.init(options);

Sync introduces concept of `DataSets`. DataSets are form of local data collections
that will be managed and synchronized with server in sync loop.
In example bellow we register new `UserTasks` dataset.
In the following example,a new `UserTasks` dataset is registered.

```typescript
const datasetId = 'UserTasks';
Expand All @@ -56,7 +54,7 @@ $fh.sync.manage(datasetId, options, queryParams, metaData, function() {

### Perform operations on datasets

Sync provides set of methods to perform create, read, update and delete operations on datasets.
Sync provides a set of methods to perform create, read, update and delete operations on datasets.

```typescript
// Example object to save
Expand Down
18 changes: 9 additions & 9 deletions client/wfm/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
## RainCatcher WFM

RainCatcher **W**ork**F**low **M**anagement module is an TypeScript implementation for an equivalent subset of the [BPMN specification](http://www.bpmn.org/).
RainCatcher **W**ork**F**low **M**anagement module is an TypeScript implementation for an equivalent subset of the [Business Process Model and Notation (BPMN) specification](http://www.bpmn.org/).

This module allows users to map business process into an organized set of tasks that can be built by developers to suit business needs.
This module allows users to map a business process into an organized set of tasks that can be built by developers to suit business needs.

## Concepts

The WFM module consists of a set of TypeScript interfaces and implementations for Process Management. The main entities are described bellow:
The WFM module consists of a set of TypeScript interfaces and implementations for Process Management. The module's main entities are:

* `WorkFlow`: contain an ordered set of definitions of `Step`s, to be instantiated into a `WorkOrder` for execution
* `WorkFlow`: contains an ordered set of definitions of `Step`s than are instantiated into a `WorkOrder` for execution
* `WorkOrder`: instance of a `WorkFlow` to be executed
* `Step`: defines single unit of work
* `Step`: defines a single unit of work
* `StepResult`: the output of the execution of a `Step`
* `WorkOrderResult`: The tracking of the progress of a `WorkOrder`
* `WorkOrderResult`: Tracks the progress of a `WorkOrder`

The classes are framework-agnostic, allowing developers to focus on the implementation of Business Process on top of any new or existing solution.
The classes are framework-agnostic which allows a developer to focus on the implementation of Business Processes on top of any new or existing solution.

## Getting Started

In order to use this module, begin by installing all dependencies:
1) install all dependencies:

If inside the [lerna](http://lernajs.io)-based mono repo: `lerna bootstrap --scope=@raincatcher/wfm --include-filtered-dependencies`

For standalone usage: `npm install`
2) For standalone usage: `npm install`
17 changes: 8 additions & 9 deletions cloud/passportauth/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# RainCatcher Passport Auth
Raincatcher authentication and authorization module using [PassportJS](http://passportjs.org/).
This module allows the:
- Creation and initialization of a Passport authentication service using Passport's local strategy.
- Protection of express routes from requests by user authentication and authorization.
- Usage of persistent login sessions using [express-session](https://github.com/expressjs/session).
# RainCatcher PassportAuth
The PassportAuth module is RainCatcher's implementation of [PassportJS](http://passportjs.org/) and is the default authentication and authorization module for RainCatcher..
PassportAuth provides:
- Creation and initialization of a Passport authentication service using Passport's local strategy
- Protection of express routes from requests by user authentication and authorization
- Usage of persistent login sessions using [express-session](https://github.com/expressjs/session)


## Quick Start
Expand All @@ -23,8 +23,7 @@ authService.init(router, undefined, secret);
...
```
In order to use cookie-based authentication, specify the sessionOptions.
- Visit [express-session](https://github.com/expressjs/session) to find more information about the available express
session options.
- For more information about the available express session options, see [express-session](https://github.com/expressjs/session).

Without the sessionOptions, Passport will use token-based authentication using Passport's JWT strategy by default.

Expand All @@ -35,4 +34,4 @@ app.get('/secureEndpoint', authService.protect('admin'), (req: express.Request,
});
```

See [./example](./example/index.ts) for a sample implementation
To view a sample implementation, see [./example](./example/index.ts) sample example

0 comments on commit 35809c4

Please sign in to comment.