Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
auto update to latest sync/staging
Browse files Browse the repository at this point in the history
  • Loading branch information
diracdeltas committed Jan 5, 2017
1 parent 225c77a commit 5da9ba5
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions js/constants/sync/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,29 @@ const messages = {
/**
* browser -> webview
* sent to fetch sync records after a given start time from the sync server.
* we perform an S3 ListObjectsV2 request per category. for each category
* with new records, do
* GET_EXISTING_OBJECTS -> RESOLVE_SYNC_RECORDS -> RESOLVED_SYNC_RECORDS
*/
FETCH_SYNC_RECORDS: _, /* @param Array.<string> categoryNames, @param {number} startAt (in seconds) */
/**
* webview -> browser
* browser must update its local values with the new sync records, performing
* conflict-resolution as necessary.
* after sync gets records, it requests the browser's existing objects so sync
* can perform conflict resolution.
*/
RECEIVE_SYNC_RECORDS: _, /* @param {string} categoryName, @param {Array.<Object>} records */
GET_EXISTING_OBJECTS: _, /* @param {string} categoryName, @param {Array.<Object>} records */
/**
* browser -> webview
* webview resolves sync records against matching browser objects and returns
* resolved syncRecords to apply against browser data.
* recordsAndExistingObjects: e.g. [[<syncRecord>, <browserObject=>], ...]
*/
RESOLVE_SYNC_RECORDS: _, /* @param {string} categoryName, @param {Array.<Array.<Object>>} recordsAndExistingObjects */
/**
* webview -> browser
* browser must update its local values with the resolved sync records.
*/
RESOLVED_SYNC_RECORDS: _, /* @param {string} categoryName, @param {Array.<Object>} records */
/**
* browser -> webview
* browser sends this to the webview with the data that needs to be synced
Expand Down

0 comments on commit 5da9ba5

Please sign in to comment.