Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
= Sync Framework

[[sync-pages]]
== Sync introduction

* link:sync_overview.adoc[Sync Overview]
* link:sync_terminology.adoc[Sync Terminology]
* link:sync_configuration_guide.adoc[Sync Configuration Guide]

* link:sync_server_architecture.adoc[Sync Server Architecture]
* link:sync_service.adoc[Sync Client API]

== Sync technical specification

* link:sync_collections.adoc[Sync Collections]
* link:sync_protocol.adoc[Sync Protocol]
20 changes: 0 additions & 20 deletions docs/README.asciidoc

This file was deleted.

4 changes: 1 addition & 3 deletions docs/sync_overview.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
include::shared/attributes.adoc[]

[[data-sync-framework]]
= Data Sync Framework

Expand Down Expand Up @@ -229,7 +227,7 @@ Use the following handlers to deal with collisions:
You can provide the handler function overrides for dealing with data collisions. Options include:

* Store the collision record for manual resolution by a data administrator at a later date.
* Discard the update which caused the collision. To achieve this, the `handleCollision()` function would simply not do anything with the collision record passed to it.
* Discard the update which caused the collision. To achieve this, the `handleCollision()` function would simply not do anything with the collision record passed to it.
+
WARNING: This may result in data loss as the update which caused the collision would be discarded by the Cloud App.
+
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fh-sync",
"version": "1.0.3",
"version": "1.0.5",
"description": "FeedHenry Data Synchronization Server",
"main": "index.js",
"dependencies": {
Expand Down
6 changes: 3 additions & 3 deletions types/fh-sync.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ declare module SyncCloud {
max: number;
}

type StandardCb<T> = (err: Error | string | undefined, res: T | undefined) => void;
type StandardCb<T> = (err: Error | string | undefined, res?: T | undefined) => void;
type NoRespCb = (err: Error | string | undefined) => void;

/**
Expand Down Expand Up @@ -133,7 +133,7 @@ declare module SyncCloud {
* @param redisUrl
* @param cb
*/
function connect(mongoDBConnectionUrl: string, mongoDBConnectionOption: any, redisUrl: string, cb: StandardCb<void>): void;
function connect(mongoDBConnectionUrl: string, mongoDBConnectionOption: any, redisUrl: string, callback: (err: any, mongoDbClient?: any, redisClient?: any) => void): void;

/**
* Initialize sync for specific dataset
Expand Down Expand Up @@ -355,4 +355,4 @@ declare module SyncCloud {
*/
function setRecordHashFn(datasetId: string, hashFunction: (target: any) => string): void;
}
export = SyncCloud;
export = SyncCloud;