Skip to content

routier-collection


routier-collection / datastore/src / SYNC_CONSTANTS

Variable: SYNC_CONSTANTS ​

const SYNC_CONSTANTS: object

Defined in: datastore/src/utils/constants.ts:4

Constants used throughout the sync system

Type Declaration ​

SYNC_MARKER ​

readonly SYNC_MARKER: "__sync__" = '__sync__'

Special marker for sync events in recordIds Used to track when we successfully fetched from the server

ENDPOINTS ​

readonly ENDPOINTS: object

API endpoint paths for sync server

ENDPOINTS.TIMESTAMPS ​

readonly TIMESTAMPS: "/api/sync/timestamps" = '/api/sync/timestamps'

GET endpoint to fetch current server timestamps for all tables

ENDPOINTS.CHANGES ​

readonly CHANGES: "/api/sync/changes" = '/api/sync/changes'

GET endpoint to fetch changes since a given timestamp

ENDPOINTS.POST_CHANGES ​

readonly POST_CHANGES: "/api/sync/changes" = '/api/sync/changes'

POST endpoint to send local changes to the server

ENDPOINTS.CHANGES_STREAM ​

readonly CHANGES_STREAM: "/api/sync/changes/stream" = '/api/sync/changes/stream'

GET endpoint for Server-Sent Events (SSE) real-time change streaming

ENDPOINTS.HEALTH ​

readonly HEALTH: "/health" = '/health'

GET endpoint for health check

QUERY_PARAMS ​

readonly QUERY_PARAMS: object

Query parameter names for API endpoints

QUERY_PARAMS.TABLE ​

readonly TABLE: "table" = 'table'

QUERY_PARAMS.SINCE ​

readonly SINCE: "since" = 'since'

QUERY_PARAMS.LIMIT ​

readonly LIMIT: "limit" = 'limit'

QUERY_PARAMS.CLIENT_ID ​

readonly CLIENT_ID: "clientId" = 'clientId'

SSE_ENDPOINT ​

readonly SSE_ENDPOINT: "/api/sync/changes/stream" = '/api/sync/changes/stream'

SSE endpoint path (kept for backward compatibility)

Deprecated ​

Use ENDPOINTS.CHANGES_STREAM instead

SSE_PARAMS ​

readonly SSE_PARAMS: object

Query parameter names for SSE (kept for backward compatibility)

Deprecated ​

Use QUERY_PARAMS instead

SSE_PARAMS.TABLE ​

readonly TABLE: "table" = 'table'

SSE_PARAMS.SINCE ​

readonly SINCE: "since" = 'since'

SSE_PARAMS.CLIENT_ID ​

readonly CLIENT_ID: "clientId" = 'clientId'

Released under the MIT License.