routier-collection / datastore/src / SYNC_CONSTANTS
Variable: SYNC_CONSTANTS
constSYNC_CONSTANTS:object
Defined in: datastore/src/utils/constants.ts:4
Constants used throughout the sync system
Type Declaration
SYNC_MARKER
readonlySYNC_MARKER:"__sync__"='__sync__'
Special marker for sync events in recordIds Used to track when we successfully fetched from the server
ENDPOINTS
readonlyENDPOINTS:object
API endpoint paths for sync server
ENDPOINTS.TIMESTAMPS
readonlyTIMESTAMPS:"/api/sync/timestamps"='/api/sync/timestamps'
GET endpoint to fetch current server timestamps for all tables
ENDPOINTS.CHANGES
readonlyCHANGES:"/api/sync/changes"='/api/sync/changes'
GET endpoint to fetch changes since a given timestamp
ENDPOINTS.POST_CHANGES
readonlyPOST_CHANGES:"/api/sync/changes"='/api/sync/changes'
POST endpoint to send local changes to the server
ENDPOINTS.CHANGES_STREAM
readonlyCHANGES_STREAM:"/api/sync/changes/stream"='/api/sync/changes/stream'
GET endpoint for Server-Sent Events (SSE) real-time change streaming
ENDPOINTS.HEALTH
readonlyHEALTH:"/health"='/health'
GET endpoint for health check
QUERY_PARAMS
readonlyQUERY_PARAMS:object
Query parameter names for API endpoints
QUERY_PARAMS.TABLE
readonlyTABLE:"table"='table'
QUERY_PARAMS.SINCE
readonlySINCE:"since"='since'
QUERY_PARAMS.LIMIT
readonlyLIMIT:"limit"='limit'
QUERY_PARAMS.CLIENT_ID
readonlyCLIENT_ID:"clientId"='clientId'
SSE_ENDPOINT
readonlySSE_ENDPOINT:"/api/sync/changes/stream"='/api/sync/changes/stream'
SSE endpoint path (kept for backward compatibility)
Deprecated
Use ENDPOINTS.CHANGES_STREAM instead
SSE_PARAMS
readonlySSE_PARAMS:object
Query parameter names for SSE (kept for backward compatibility)
Deprecated
Use QUERY_PARAMS instead
SSE_PARAMS.TABLE
readonlyTABLE:"table"='table'
SSE_PARAMS.SINCE
readonlySINCE:"since"='since'
SSE_PARAMS.CLIENT_ID
readonlyCLIENT_ID:"clientId"='clientId'